Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#33921 closed Cleanup/optimization (fixed)

Removed LogoutView.get_next_page without any notice

Reported by: Serafeim Papastefanos Owned by: mtabbasi
Component: Documentation Version: 4.1
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Hello friends, I was usign the LogoutView.get_next_page method in a django 4.0 project and when I updated to django 4.1 the method was missing!

Please see here the code for 4.0: https://github.com/django/django/blob/4.0.7/django/contrib/auth/views.py#L138

and 4.1: https://github.com/django/django/blob/4.1/django/contrib/auth/views.py#L126

You'll see that the get_next_page has completely disappeared. No mention of this on the release notes: https://docs.djangoproject.com/en/4.1/releases/4.1/

Please either return the get_next_page method or mention that it is removed in the release notes so we'll know what to use instead.

Thank you

Change History (7)

comment:1 by Mariusz Felisiak, 2 years ago

Easy pickings: set
Triage Stage: UnreviewedAccepted
Type: BugCleanup/optimization

LogoutView.get_next_page() was renamed to get_success_url() in 5b8699e723d9daf373fff46c6859fed2b780a9bd . It's a private API so there was no need for a deprecation period. A short release note won't hurt, e.g.

  • docs/releases/4.1.txt

    diff --git a/docs/releases/4.1.txt b/docs/releases/4.1.txt
    index cf0107cfbe..11268df298 100644
    a b Miscellaneous  
    712712  ``"django/forms/formsets/default.html"`` templates which are a proxy to the
    713713  table-based templates are deprecated. Use the specific template instead.
    714714
     715* The undocumented ``LogoutView.get_next_page()`` method is renamed to
     716  ``get_success_url()``.
     717
    715718Features removed in 4.1
    716719=======================
    717720

Would you like to prepare a patch?

comment:2 by Serafeim Papastefanos, 2 years ago

Yes a small notice in the release notes will definitely be very helpful! I can't prepare a patch right now because I'm going for a vacation :)

Please notice that the get_net_page method was visible in the CBV inspector site (https://ccbv.co.uk/projects/Django/4.0/django.contrib.auth.views/LogoutView/#get_next_page) ; I understand that it may be considered private in the django docs but CBV inspector is the defacto documentation for CBVs, so removing something that exists there will break the code of a lot of people.

Thank you

in reply to:  2 comment:3 by Mariusz Felisiak, 2 years ago

Replying to Serafeim Papastefanos:

Yes a small notice in the release notes will definitely be very helpful! I can't prepare a patch right now because I'm going for a vacation :)

Please notice that the get_net_page method was visible in the CBV inspector site (https://ccbv.co.uk/projects/Django/4.0/django.contrib.auth.views/LogoutView/#get_next_page) ; I understand that it may be considered private in the django docs but CBV inspector is the defacto documentation for CBVs, so removing something that exists there will break the code of a lot of people.

ccbv.co.uk is not an official Django docs.

comment:4 by Serafeim Papastefanos, 2 years ago

Yes I'm aware of that, please notice I mentioned that the CBV inspector is the de facto documentation for CBVs (not the de jure, see here https://onlinelaw.wustl.edu/blog/legal-english-de-factode-jure/#:~:text=De%20facto%20means%20a%20state,i.e.%20that%20is%20officially%20sanctioned).

Thank you and kind regards,
Serafeim

comment:5 by Mariusz Felisiak, 2 years ago

Has patch: set
Owner: changed from nobody to mtabbasi
Status: newassigned
Triage Stage: AcceptedReady for checkin

comment:6 by GitHub <noreply@…>, 2 years ago

Resolution: fixed
Status: assignedclosed

In e30d6678:

Fixed #33921 -- Added release note for 5b8699e723d9daf373fff46c6859fed2b780a9bd.

comment:7 by Mariusz Felisiak <felisiak.mariusz@…>, 2 years ago

In c520a5d:

[4.1.x] Fixed #33921 -- Added release note for 5b8699e723d9daf373fff46c6859fed2b780a9bd.

Backport of e30d6678421b7573a1995f61521f14348c9b2a17 from main

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