Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#20913 closed Bug (invalid)

django.utils.unittest is python 3 incompatable

Reported by: plant2@… Owned by: nobody
Component: Python 3 Version: 1.5
Severity: Normal Keywords: python3 unittest
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


I have seen two incompatibilities:

django.utils.unittest.results imports StringIO directly (moved in python 3.x)
django.utils.unittest.loader uses cmp (built-in in python 2.x)

Django 1.5.1 on python 3.3.1

Change History (2)

comment:1 Changed 5 years ago by Baptiste Mispelon

Resolution: invalid
Status: newclosed


The unittest module shipped by django is a backport of the new unittest2 and is only there for compatibility with old python versions [1].

Therefore, the code in there will only actually be used if you run a python version older than 2.7 so python3 compatibility is not needed.



comment:2 Changed 5 years ago by Aymeric Augustin

For the same reasons, this backport was removed from Django when it dropped support for Python 2.6.

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