mirror of
https://github.com/django/django.git
synced 2025-09-15 13:39:11 +00:00
Refs #35667 -- Updated contributing guide to use django_file_prefixes on deprecations.
This commit is contained in:
parent
b7507bad77
commit
8956ee3ce3
@ -282,7 +282,7 @@ previous behavior, or standalone items that are unnecessary or unused when the
|
||||
deprecation ends. For example::
|
||||
|
||||
import warnings
|
||||
from django.utils.deprecation import RemovedInDjangoXXWarning
|
||||
from django.utils.deprecation import RemovedInDjangoXXWarning, django_file_prefixes
|
||||
|
||||
|
||||
# RemovedInDjangoXXWarning.
|
||||
@ -295,7 +295,7 @@ deprecation ends. For example::
|
||||
warnings.warn(
|
||||
"foo() is deprecated.",
|
||||
category=RemovedInDjangoXXWarning,
|
||||
stacklevel=2,
|
||||
stacklevel=django_file_prefixes(),
|
||||
)
|
||||
old_private_helper()
|
||||
...
|
||||
|
Loading…
x
Reference in New Issue
Block a user