Opened 7 years ago

Closed 7 years ago

#18837 closed Cleanup/optimization (fixed)

[py3] Double import of six in django.forms.models

Reported by: Alexey Boriskin Owned by: nobody
Component: Python 3 Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no


There is a double import of six in django.forms.models:

from django.utils import six
from django.utils.text import get_text_list, capfirst
from django.utils.translation import ugettext_lazy as _, ugettext
from django.utils import six

Change History (3)

comment:1 Changed 7 years ago by Alexey Boriskin

Has patch: set

I've created pull request here:

comment:2 Changed 7 years ago by Aymeric Augustin

Patch needs improvement: set
Triage Stage: UnreviewedAccepted

Thanks for the report.

A similar problem was reported in #18791. I suspect it's a side effect of an automated refactoring.

It happens in a four files:

% grep 'from django.utils import six' **/*.py | uniq -c | grep -v '^   1 '
   3 django/contrib/gis/db/models/ django.utils import six
   2 django/db/backends/oracle/ django.utils import six
   2 django/forms/ django.utils import six
   2 django/utils/ django.utils import six

I will commit a fix shortly.

comment:3 Changed 7 years ago by Aymeric Augustin <aymeric.augustin@…>

Resolution: fixed
Status: newclosed

In [5301a9d7b1c2151e9b0496c7e244e8ceb6d273c1]:

[py3] Removed duplicate imports.

Fixed #18837. Refs #18791.

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