Changes between Initial Version and Version 1 of Ticket #21188


Ignore:
Timestamp:
09/28/2013 07:45:35 AM (2 years ago)
Author:
timo
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #21188 – Description

    initial v1  
    1111By using these warnings we can achieve the following:
    1212   - Moving PendingDeprecationWarning to DeprecationWarning after release is single line change.
    13    - It will be possible to filter on Django's deprecation warnings without caching warnings from non-django components.
     13   - It will be possible to filter on Django's deprecation warnings without catching warnings from non-django components.
    1414   - It will be harder to miss removal of code. After 1.7 is released just remove ToBeRemovedInDjango18Warning. Any code importing that warning will immediately fail. Also, grepping might be a little easier.
    1515   - After release, currently introducing a new PendingDeprecationWarning before PendingDeprecationWarnings are renamed to DeprecationWarnings (as part of release procedure) the new deprecatin will likely be moved to DeprecationWarning. But if a ToBeRemovedInDjango20Warning is added it will be really hard to accidentally move that one to DeprecationWarning.
     
    1818Drawbacks:
    1919   - If we use automatic filtering for deprecations, then code currently doing:
    20 warning.simplefilter("always", DeprecationWarning)
    21      will no longer catch Django's deprecation warnings (as we added an entry for warning.simplefilter("default" ToBeRemovedInDjango18Warning) which matches before DeprecationWarning.
     20`warning.simplefilter("always", DeprecationWarning)`
     21     will no longer catch Django's deprecation warnings (as we added an entry for `warning.simplefilter("default" ToBeRemovedInDjango18Warning)` which matches before DeprecationWarning.
    2222
    2323I tried this approach in: https://github.com/akaariai/django/compare/deprecation_subclasses#L3R18 - The patch is totally incomplete so I will not mark "has patch".
Back to Top