diff --git a/graphene_django/tests/test_types.py b/graphene_django/tests/test_types.py index 1986568c7..6587b98b0 100644 --- a/graphene_django/tests/test_types.py +++ b/graphene_django/tests/test_types.py @@ -290,7 +290,7 @@ def inner(*args, **kwargs): @with_local_registry def test_django_objecttype_only_fields(): - with pytest.warns(PendingDeprecationWarning): + with pytest.warns(DeprecationWarning): class Reporter(DjangoObjectType): class Meta: @@ -347,7 +347,7 @@ class Meta: @with_local_registry def test_django_objecttype_exclude_fields(): - with pytest.warns(PendingDeprecationWarning): + with pytest.warns(DeprecationWarning): class Reporter(DjangoObjectType): class Meta: diff --git a/graphene_django/types.py b/graphene_django/types.py index f3894213e..f00be1c83 100644 --- a/graphene_django/types.py +++ b/graphene_django/types.py @@ -194,7 +194,7 @@ def __init_subclass_with_meta__( if only_fields: warnings.warn( "Defining `only_fields` is deprecated in favour of `fields`.", - PendingDeprecationWarning, + DeprecationWarning, stacklevel=2, ) fields = only_fields @@ -210,7 +210,7 @@ def __init_subclass_with_meta__( if exclude_fields: warnings.warn( "Defining `exclude_fields` is deprecated in favour of `exclude`.", - PendingDeprecationWarning, + DeprecationWarning, stacklevel=2, ) exclude = exclude_fields