Opened 2 years ago

Closed 2 years ago

#21024 closed Cleanup/optimization (fixed)

In the contributing guide document how to deprecate a feature

Reported by: timo Owned by: nobody
Component: Documentation Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by aaugustin)

Somewhere in internals/contributing we document guidelines for deprecating a feature. I couldn't find anything on this after a quick search.

This includes how to silence deprecation warnings:

When a feature is deprecated, it raises a PendingDeprecationWarning, either at import time or at run time. After the following release it raises DeprecationWarning. Assuming we have a good test coverage, these warnings will be shown by the test suite, with -Wall for PendingDeprecationWarning, or by default for DeprecationWarning. This is annoying. The output of the test suite should remain clean.

Aymeric's full post including how to silence warnings:
https://groups.google.com/forum/#!topic/django-developers/nXlNqpy6sC8

Attachments (1)

21024.diff (3.3 KB) - added by timo 2 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 2 years ago by aaugustin

  • Description modified (diff)

#21025 was a duplicate.

comment:2 Changed 2 years ago by mjtamlyn

Worth mentioning that we should make sure to take care when silencing deprecation warnings - eating our own dogfood must be the first step to removing the warnings.

comment:3 Changed 2 years ago by kedmiston

I think I may have found the location in the docs to be in the Minor Releases section of the Release Process page.

comment:4 Changed 2 years ago by timo

  • Has patch set

Changed 2 years ago by timo

comment:5 Changed 2 years ago by e0ne

"The first step is to remove any use of the deprecated behavior by Django itself"
What's about cases when some code doesn't used by Django itself?

Version 0, edited 2 years ago by e0ne (next)

comment:6 Changed 2 years ago by timo

I'm not sure how common that would be. I guess I would handle that on a case by case basis.

comment:7 Changed 2 years ago by Tim Graham <timograham@…>

  • Resolution set to fixed
  • Status changed from new to closed

In 5be56d0e0d8492a41b3d40757a4f2677211a9179:

Fixed #21024 -- Documented how to deprecate a feature.

Note: See TracTickets for help on using tickets.
Back to Top