Code

#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 10 months ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 10 months ago by aaugustin

  • Description modified (diff)

#21025 was a duplicate.

comment:2 Changed 10 months 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 10 months 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 10 months ago by timo

  • Has patch set

Changed 10 months ago by timo

comment:5 Changed 10 months 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? Should we write any tests in this case?

Last edited 10 months ago by e0ne (previous) (diff)

comment:6 Changed 10 months 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 10 months 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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.