#18974: Deprecate models.permalink
-------------------------------------+-------------------------------------
Reporter: dstufft | Owner: nobody
Type: | Status: new
Cleanup/optimization | Version: master
Component: Database layer | Resolution:
(models, ORM) | Triage Stage: Design
Severity: Normal | decision needed
Keywords: | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Comment (by russellm):
Replying to [comment:12 dstufft]:
> I think that if it doesn't get removed, at the very least it should
trigger some form of warning for any usage of it. Maybe a longer
deprecation process would be appropriate.
...
> Note I don't mean to be snarky sounding (I feel like I am), I just don't
see how this is any different than any of these other changes, some of
which are going to cause issues on a *lot* of projects too.
No argument that we've deprecated some things for 'purity' reasons in the
past. However, of the examples you've provided, (4) (and maybe (6)) are
the only two that are really comparable in my mind. The others are either
removing features that weren't being used, or shouldn't have been used, or
were internals where we documented the change because some people were
known to be using them, or were so fundamentally broken that the "fix" was
to remove the wrong ways to use them.
(4) is a case of something in widespread use, where we are deprecating the
use of an anti-pattern (import *). We did this because Django is an
influencer in the Python best-practices space, and Django is often
people's first introduction to Python, so when our tutorial tells people
to do things a bad way, it leads to problems later on.
(6) is a case where the name is fundamentally misleading. There's nothing
about raw_post_body that is POST specific.
My hesitation to support deprecation comes from two places:
1) I *really* don't want to go through another round of tickets and
django-users questions like we have done with the {% url %} tag. I'm
already bracing for the urls-import onslaught. @permalink is in *really*
common usage; we *will* get fallout from this.
2) There's a lingering discussion about actually fixing
get_absolute_url(), which would give us a *reason* to deprecate
@permalink. When this discussion is on the horizon, tinkering around the
edges seems like wasted effort. If we're going to face some community
pain, lets get community attention once, and fix the problem once, not
attack it in lots of little passes.
If people want to remove references to @permalink everywhere except for
the reference documentation, and then put a "this decorator isn't a good
idea" note into the reference docs, I say go for it. But to formally
deprecate it? I'd rather wait until we actually fix the problems with
get_absolute_url(), and do all the changes.
--
Ticket URL: <https://code.djangoproject.com/ticket/18974#comment:15>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.