Opened 2 months ago

Closed 8 weeks ago

Last modified 8 weeks ago

#36390 closed Bug (fixed)

process_request method removed from RemoteUserMiddleware without deprecation/release note

Reported by: shamoon Owned by: Sarah Boyce
Component: contrib.auth Version: 5.2
Severity: Release blocker Keywords:
Cc: Jon Janzen Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Hello,

There were some async changes https://github.com/django/django/pull/18036 to middleware released in 5.2.1 but is this not a breaking change? Even just the diff for RemoteUserMiddleware completely removes process_request thereby breaking anything that depended on that: https://github.com/django/django/pull/18036/files#diff-0855f8c0e8b7fbb0ed4cd47469c9b75c9e8f3de04fd0415d92e05b7e682fbb1e

I didn't see it explicitly mentioned in the release notes and found it quite a challenge to track down.

Apologies if I've missed something here.

Change History (10)

comment:1 by Sarah Boyce, 2 months ago

Cc: Jon Janzen added
Severity: NormalRelease blocker
Summary: Django 5.2.1 breaking for RemoteUserMiddleware subclasses that use process_request?process_request method removed from RemoteUserMiddleware without deprecation/release note
Triage Stage: UnreviewedAccepted
Type: UncategorizedBug

Regression in 50f89ae850f6b4e35819fe725a08c7e579bfd099 (#35303)
We should at least add a note in the backwards incompatible changes, if it's easy to do we might be able to support process_request subclasses

Last edited 2 months ago by Sarah Boyce (previous) (diff)

comment:2 by Jon Janzen, 2 months ago

I don't have the bandwidth to do it myself, but I think just a note about backwards incompatibility would be good. MiddlewareMixin is intended as a transitional, temporary mechanism AIUI

comment:3 by Sarah Boyce, 2 months ago

Has patch: set
Owner: set to Sarah Boyce
Status: newassigned

comment:4 by Natalia Bidart, 2 months ago

Patch needs improvement: set

comment:5 by Sarah Boyce, 2 months ago

Patch needs improvement: unset

comment:6 by Natalia Bidart, 2 months ago

Patch needs improvement: set

comment:7 by Sarah Boyce, 2 months ago

Patch needs improvement: unset

comment:8 by Natalia Bidart, 2 months ago

Triage Stage: AcceptedReady for checkin

comment:9 by Sarah Boyce <42296566+sarahboyce@…>, 8 weeks ago

Resolution: fixed
Status: assignedclosed

In 1704c49:

Fixed #36390 -- Deprecated RemoteUserMiddleware subclasses missing aprocess_request().

Regression in 50f89ae850f6b4e35819fe725a08c7e579bfd099.
Thank you to shamoon for the report and Natalia Bidart for the review.

comment:10 by Sarah Boyce <42296566+sarahboyce@…>, 8 weeks ago

In 9db932a:

[5.2.x] Fixed #36390 -- Deprecated RemoteUserMiddleware subclasses missing aprocess_request().

Regression in 50f89ae850f6b4e35819fe725a08c7e579bfd099.
Thank you to shamoon for the report and Natalia Bidart for the review.

Backport of 1704c49a9b149b66b6a0e67abc8c95293bc35649 from main.

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