Skip to content

Commit 85976ff

Browse files
authored
Start raising DeprecationWarnings for using only_fields and exclude_fields (v3) (#980)
1 parent 26c4c48 commit 85976ff

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

graphene_django/tests/test_types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def inner(*args, **kwargs):
263263

264264
@with_local_registry
265265
def test_django_objecttype_only_fields():
266-
with pytest.warns(PendingDeprecationWarning):
266+
with pytest.warns(DeprecationWarning):
267267

268268
class Reporter(DjangoObjectType):
269269
class Meta:
@@ -320,7 +320,7 @@ class Meta:
320320

321321
@with_local_registry
322322
def test_django_objecttype_exclude_fields():
323-
with pytest.warns(PendingDeprecationWarning):
323+
with pytest.warns(DeprecationWarning):
324324

325325
class Reporter(DjangoObjectType):
326326
class Meta:

graphene_django/types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def __init_subclass_with_meta__(
194194
if only_fields:
195195
warnings.warn(
196196
"Defining `only_fields` is deprecated in favour of `fields`.",
197-
PendingDeprecationWarning,
197+
DeprecationWarning,
198198
stacklevel=2,
199199
)
200200
fields = only_fields
@@ -210,7 +210,7 @@ def __init_subclass_with_meta__(
210210
if exclude_fields:
211211
warnings.warn(
212212
"Defining `exclude_fields` is deprecated in favour of `exclude`.",
213-
PendingDeprecationWarning,
213+
DeprecationWarning,
214214
stacklevel=2,
215215
)
216216
exclude = exclude_fields

0 commit comments

Comments
 (0)