Opened 6 years ago

Closed 6 years ago

Last modified 5 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 6 years ago.
15299.2.diff (4.7 KB) - added by v1v3kn 6 years ago.
Changed to std DeprecationWarning, updated deprecation policy

Download all attachments as: .zip

Change History (10)

comment:1 Changed 6 years ago by Russell Keith-Magee

Component: UncategorizedAuthentication
Keywords: easy-pickings added
milestone: 1.3
Triage Stage: UnreviewedAccepted

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

Attachment: 15299.diff added

comment:2 Changed 6 years ago by v1v3kn

Has patch: set
Owner: changed from nobody to v1v3kn
Status: newassigned

Changed 6 years ago by v1v3kn

Attachment: 15299.2.diff added

Changed to std DeprecationWarning, updated deprecation policy

comment:3 Changed 6 years ago by v1v3kn

Cc: v1v3kn added

comment:4 Changed 6 years ago by Russell Keith-Magee

Triage Stage: AcceptedReady for checkin

comment:5 Changed 6 years ago by Jannis Leidel

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

comment:6 Changed 6 years ago by Russell Keith-Magee

Resolution: fixed
Status: assignedclosed

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

@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 5 years ago by Jacob

milestone: 1.3

Milestone 1.3 deleted

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