Opened 12 years ago

Closed 12 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: dev
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

Description

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 by Alexey Boriskin, 12 years ago

Has patch: set

I've created pull request here: https://github.com/django/django/pull/300

comment:2 by Aymeric Augustin, 12 years ago

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/query.py:from django.utils import six
   2 django/db/backends/oracle/base.py:from django.utils import six
   2 django/forms/models.py:from django.utils import six
   2 django/utils/text.py:from django.utils import six

I will commit a fix shortly.

comment:3 by Aymeric Augustin <aymeric.augustin@…>, 12 years ago

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