Opened 4 years ago

Closed 4 years ago

#18837 closed Cleanup/optimization (fixed)

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

Reported by: void 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 4 years ago by void

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

I've created pull request here:

comment:2 Changed 4 years ago by aaugustin

  • Patch needs improvement set
  • Triage Stage changed from Unreviewed to Accepted

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 4 years ago by Aymeric Augustin <aymeric.augustin@…>

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

In [5301a9d7b1c2151e9b0496c7e244e8ceb6d273c1]:

[py3] Removed duplicate imports.

Fixed #18837. Refs #18791.

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