Code

Opened 2 years ago

Closed 2 years ago

#17764 closed Bug (fixed)

Documentation out-of-date: django.contrib.auth.utils no longer exists.

Reported by: mbt Owned by: PaulM
Component: Documentation Version: 1.4-beta-1
Severity: Release blocker Keywords: authentication documentation easy-pickings
Cc: mbt@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

https://docs.djangoproject.com/en/dev/topics/auth/ in the “Manually managing a user’s password” section, a reference is made to the django.contrib.auth.utils module, but this module does not exist. It was created in response to #14390 in SVN r16456 (or git a51a059899) in June 2011) but then six months later in SVN r17254 (or git 0516dc6741) it was moved to the django.contrib.auth.hashers module.

The documentation shows that this was added for “the development release”, which I assume means the Django 1.4 development cycle, so it should not affect older versions of Django or its documentation.

I _may_ be able to provide a simple patch in a git tree later, depending on how my schedule for today goes, but I wanted to get this reported so that it was known before the Django 1.4 series enters the next iteration of its release process.

I am marking this as a release blocker based on the rationale that:

  • this is not a regression and is a defect in documentation for the new release; and
  • it is a relatively easy defect to fix; and
  • the outdated documentation can easily cost someone an hour of time tracking down a “problem” that does not exist.

Attachments (2)

0001-fixed-17764-bring-docs-up-to-date-with-authenticatio.patch (2.3 KB) - added by mbt 2 years ago.
Commit 1 - fix #17764 by updating documentation
0002-Add-a-versionadded-tag-for-the-check_password-funtio.patch (841 bytes) - added by mbt 2 years ago.
Commit 2 - Add a versionadded tag for function missing it in new hashers module

Download all attachments as: .zip

Change History (11)

comment:1 Changed 2 years ago by claudep

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

Thanks for the precise description of the problem. Patch welcome!

comment:2 Changed 2 years ago by mbt

  • Cc mbt@… added
  • Owner changed from nobody to mbt
  • Status changed from new to assigned

I am working on it now and should have a patch for the documentation ready soon.

comment:3 Changed 2 years ago by mbt

  • Has patch set

I have a pull request on GitHub:

https://github.com/django/django/pull/117

This update to the documentation fixes the problem reported in this ticket as well as one other minor problem (lacking a "new in..." notification around before one of the functions). Someone who has the ability to get this merged in should be able to do so at this point. Please let me know, of course, if there are any problems that need addressed, but the patch is relatively simple and straightforward, so I do not expect that to happen unless I did something blatantly wrong. :-)

Changed 2 years ago by mbt

Commit 1 - fix #17764 by updating documentation

Changed 2 years ago by mbt

Commit 2 - Add a versionadded tag for function missing it in new hashers module

comment:4 Changed 2 years ago by mbt

I have also added the commits as individual patch files here, in the event that someone wants to incorporate them into SVN directly (I don’t know for sure which tool Django is using as its primary, so I am doing it both ways).

comment:5 Changed 2 years ago by mbt

  • Owner changed from mbt to nobody
  • Status changed from assigned to new

comment:6 Changed 2 years ago by aaugustin

  • Owner changed from nobody to PaulM

comment:7 Changed 2 years ago by d0ugal

In a related issue that probably isn't worth its own ticket; The release notes for Django 1.4 also mention django.contrib.auth.utils.

The django.contrib.auth.models.check_password() function has been 
moved to the django.contrib.auth.utils module. Importing it from the 
old location will still work, but you should update your imports.

comment:8 Changed 2 years ago by PaulM

Closed in r17620. Thanks for the patch! For future reference, we can accept either svn or git style diffs. The most convenient way is to attach a unified diff to the tracker issue rather than individual commits.

comment:9 Changed 2 years ago by PaulM

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.