Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#15299 closed (fixed)

django.core.context_processors.PermWrapper should be moved to django.contrib.auth.context_processors

Reported by: shailesh Owned by: v1v3kn
Component: contrib.auth Version: 1.2
Severity: Keywords: easy-pickings
Cc: v1v3kn Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

django.core.context_processors.PermWrapper specifically is meant for Permissions framework and doesn't really belong to django.core.

It would be a good idea to shift it to django.contrib.auth.context_processors.py

Attachments (2)

15299.diff (3.6 KB) - added by v1v3kn 4 years ago.
15299.2.diff (4.7 KB) - added by v1v3kn 4 years ago.
Changed to std DeprecationWarning, updated deprecation policy

Download all attachments as: .zip

Change History (10)

comment:1 Changed 4 years ago by russellm

  • Component changed from Uncategorized to Authentication
  • Keywords easy-pickings added
  • milestone set to 1.3
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

This ticket requires a couple of things:

  • Adding a deprecation warning to the existing instances
  • Copying the code to the contrib.auth context processor module
  • Updating the references in the docs (two references at present, in ref/templates/api and topics/auth)

It would be good to get this in for 1.3 -- we're already going to have to keep the alias around for a release longer than the auth processor that originally used it.

Changed 4 years ago by v1v3kn

comment:2 Changed 4 years ago by v1v3kn

  • Has patch set
  • Owner changed from nobody to v1v3kn
  • Status changed from new to assigned

Changed 4 years ago by v1v3kn

Changed to std DeprecationWarning, updated deprecation policy

comment:3 Changed 4 years ago by v1v3kn

  • Cc v1v3kn added

comment:4 Changed 4 years ago by russellm

  • Triage Stage changed from Accepted to Ready for checkin

comment:5 Changed 4 years ago by jezdez

Hm, shouldn't this use a PendingDeprecationWarning in 1.3 first?

comment:6 Changed 4 years ago by russellm

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

In [15635]:

Fixed #15299 -- Started the process of migrating the auth context processor support classes into the auth context processor module. Thanks to shailesh for the report, and v1v3kn for the draft patch.

comment:7 Changed 4 years ago by russellm

@jezdez - Yes, it should; I've made a couple of tweaks to the patch as submitted, including using a PendingDeprecationWarning, adding a release note, and correcting the location of the deprecation note.

comment:8 Changed 4 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

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