#33518: Add alias RemovedAfterNextVersionWarning for deprecations after next version -------------------------------------+------------------------------------- Reporter: Shai Berger | Owner: nobody Type: | Status: new Cleanup/optimization | Component: Core (Other) | Version: dev Severity: Normal | Resolution: Keywords: | Triage Stage: | Unreviewed Has patch: 0 | Needs documentation: 1 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 1 | UI/UX: 0 -------------------------------------+------------------------------------- Description changed by Shai Berger:
Old description: > 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. New description: 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, {{{RemovedAfterNextVersionWarning}}} 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#comment:1> 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 django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/063.f6680dcae8e7b54c960edd9da16b3bba%40djangoproject.com.