#33518: Add alias RemovedAfterNextVersionWarning for deprecations after next
version
------------------------------------------------+------------------------
Reporter: Shai Berger | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version: dev
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 1 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
------------------------------------------------+------------------------
For a very long time, we've had in {{{django.utils.deprecation}}}
something like this (from the 3.2 source code):
{{{#!python
class RemovedInDjango40Warning(DeprecationWarning):
pass
class RemovedInDjango41Warning(PendingDeprecationWarning):
pass
RemovedInNextVersionWarning = RemovedInDjango40Warning
}}}
Or (current master, towards 4.1):
{{{#!python
class RemovedInNextVersionWarning(DeprecationWarning):
pass
class RemovedInDjango50Warning(PendingDeprecationWarning):
pass
}}}
I suggest that we add an alias, {{{RemovedAfterNextVersion}}} for the
{{{PendingDeprecationWarning}}} subclass.
The motivation is to make it easier for long-running projects to prepare
for future deprecations, with scripts that run tests with special filters
on the relevant warnings; currently, such scripts need to be updated for
every version. This is especially important for projects which stick to
LTS versions, as for them, both warnings need to be treated the same.
--
Ticket URL: <https://code.djangoproject.com/ticket/33518>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/048.d80adf7f9a7fea55da84748ac4d3fbd3%40djangoproject.com.