mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-12 09:12:18 +03:00
Bump PendingDeprecationWarning to DeprecationWarning
* as it is a major release 3, start right away from DeprecationWarning for ObjectTypes missing fields or exclude option * updated docs information to be more forbidding
This commit is contained in:
parent
3d497ea094
commit
8054803fde
|
@ -54,9 +54,8 @@ all fields that should be exposed using the fields attribute.
|
|||
This will make it less likely to result in unintentionally exposing data when
|
||||
your models change.
|
||||
|
||||
Setting neither ``fields`` nor ``exclude`` is allowed but will raise a warning, to
|
||||
avoid that you can easily make ``DjangoObjectType`` include all fields in the model as
|
||||
described below.
|
||||
Setting neither ``fields`` nor ``exclude`` is deprecated and will raise a warning, you should at least explicitly make
|
||||
``DjangoObjectType`` include all fields in the model as described below.
|
||||
|
||||
``fields``
|
||||
~~~~~~~~~~
|
||||
|
|
|
@ -482,7 +482,7 @@ def test_django_objecttype_exclude_fields_exist_on_model():
|
|||
@with_local_registry
|
||||
def test_django_objecttype_neither_fields_nor_exclude():
|
||||
with pytest.warns(
|
||||
PendingDeprecationWarning,
|
||||
DeprecationWarning,
|
||||
match=r"Creating a DjangoObjectType without either the `fields` "
|
||||
"or the `exclude` option is deprecated.",
|
||||
):
|
||||
|
|
|
@ -226,7 +226,7 @@ class DjangoObjectType(ObjectType):
|
|||
"or the `exclude` option is deprecated. Add an explicit `fields "
|
||||
"= '__all__'` option on DjangoObjectType {class_name} to use all "
|
||||
"fields".format(class_name=cls.__name__,),
|
||||
PendingDeprecationWarning,
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user