[Django] #29939: Change the length of the Group Name from 80 to something much higher like 255

6 views
Skip to first unread message

Django

unread,
Nov 9, 2018, 9:07:26 AM11/9/18
to django-...@googlegroups.com
#29939: Change the length of the Group Name from 80 to something much higher like
255
-------------------------------------+-------------------------------------
Reporter: JohnnyP10 | Owner: nobody
Type: Bug | Status: new
Component: | Version: 2.1
contrib.auth | Keywords: Group, Name,
Severity: Normal | MaxLength
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------+-------------------------------------
Right now the default authorization model has Group with a name field of
80. I recently ran into an issue where my group name is longer than 80
and it just causes Django to error and fail. We use Grouper so the naming
schema can be very long and i would think this would be a non-breaking
change to just increase the model from Maxlength of 80 to 255.

--
Ticket URL: <https://code.djangoproject.com/ticket/29939>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Nov 9, 2018, 10:58:18 AM11/9/18
to django-...@googlegroups.com
#29939: Change the length of the Group Name from 80 to something much higher like
255
-------------------------------------+-------------------------------------
Reporter: John Piotrowski | Owner: Timothy
Type: | Allen
Cleanup/optimization | Status: assigned
Component: contrib.auth | Version: 2.1
Severity: Normal | Resolution:
Keywords: Group, Name, | Triage Stage:
MaxLength | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Timothy Allen):

* owner: nobody => Timothy Allen
* status: new => assigned
* type: Bug => Cleanup/optimization


Comment:

I believe it would be reasonable to increase the max_length to 191, to be
consistent with recent changes to other fields such as `username` on the
`django.contrib.auth` user model. The 191 character limit is a MySQL
limitation for indexing. I will take a shot at making a patch.

--
Ticket URL: <https://code.djangoproject.com/ticket/29939#comment:1>

Django

unread,
Nov 9, 2018, 11:14:39 AM11/9/18
to django-...@googlegroups.com
#29939: Change the length of the Group Name from 80 to something much higher like
255
-------------------------------------+-------------------------------------
Reporter: John Piotrowski | Owner: Timothy
Type: | Allen
Cleanup/optimization | Status: assigned
Component: contrib.auth | Version: 2.1
Severity: Normal | Resolution:
Keywords: Group, Name, | Triage Stage:
MaxLength | Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Timothy Allen):

* has_patch: 0 => 1


Comment:

Patch has been issued as a PR: https://github.com/django/django/pull/10627

--
Ticket URL: <https://code.djangoproject.com/ticket/29939#comment:2>

Django

unread,
Nov 10, 2018, 2:03:34 PM11/10/18
to django-...@googlegroups.com
#29939: Change the length of the Group Name from 80 to something much higher like
255
-------------------------------------+-------------------------------------
Reporter: John Piotrowski | Owner: Timothy
Type: | Allen
Cleanup/optimization | Status: assigned
Component: contrib.auth | Version: 2.1
Severity: Normal | Resolution:
Keywords: Group, Name, | Triage Stage: Accepted
MaxLength |
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Vishvajit Pathak):

* needs_tests: 0 => 1
* stage: Unreviewed => Accepted


Comment:

This request looks reasonable. Although I am not sure about the max_length
to be 191.

--
Ticket URL: <https://code.djangoproject.com/ticket/29939#comment:3>

Django

unread,
Nov 14, 2018, 3:12:33 PM11/14/18
to django-...@googlegroups.com
#29939: Increase Group.name max_length from 80 to 150

-------------------------------------+-------------------------------------
Reporter: John Piotrowski | Owner: Timothy
Type: | Allen
Cleanup/optimization | Status: assigned
Component: contrib.auth | Version: 2.1
Severity: Normal | Resolution:
Keywords: Group, Name, | Triage Stage: Ready for
MaxLength | checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* stage: Accepted => Ready for checkin
* needs_tests: 1 => 0


Comment:

The [https://groups.google.com/d/topic/django-
developers/COgj6sAsVvQ/discussion django-developers discussion] yielded a
consensus to increase the max_length to 150 like the `User.username` and
`User.last_name` fields.

--
Ticket URL: <https://code.djangoproject.com/ticket/29939#comment:4>

Django

unread,
Nov 14, 2018, 3:14:04 PM11/14/18
to django-...@googlegroups.com
#29939: Increase Group.name max_length from 80 to 150
-------------------------------------+-------------------------------------
Reporter: John Piotrowski | Owner: Timothy
Type: | Allen
Cleanup/optimization | Status: closed
Component: contrib.auth | Version: 2.1
Severity: Normal | Resolution: fixed

Keywords: Group, Name, | Triage Stage: Ready for
MaxLength | checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"e81955401885a93a459bcc130642b6ea5bf4ba4d" e8195540]:
{{{
#!CommitTicketReference repository=""
revision="e81955401885a93a459bcc130642b6ea5bf4ba4d"
Fixed #29939 -- Increased Group.name max_length to 150 characters.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29939#comment:5>

Reply all
Reply to author
Forward
0 new messages