Opened 6 years ago

Closed 6 years ago

#21024 closed Cleanup/optimization (fixed)

In the contributing guide document how to deprecate a feature

Reported by: Tim Graham 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 Aymeric Augustin)

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:!topic/django-developers/nXlNqpy6sC8

Attachments (1)

21024.diff (3.3 KB) - added by Tim Graham 6 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 6 years ago by Aymeric Augustin

Description: modified (diff)

#21025 was a duplicate.

comment:2 Changed 6 years ago by Marc Tamlyn

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 6 years ago by Keith Edmiston

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 6 years ago by Tim Graham

Has patch: set

Changed 6 years ago by Tim Graham

Attachment: 21024.diff added

comment:5 Changed 6 years ago by Ivan Kolodyazhny

"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? Should we write any tests in this case?

Last edited 6 years ago by Ivan Kolodyazhny (previous) (diff)

comment:6 Changed 6 years ago by Tim Graham

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

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

Resolution: fixed
Status: newclosed

In 5be56d0e0d8492a41b3d40757a4f2677211a9179:

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

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