#20913 closed Bug (invalid)
django.utils.unittest is python 3 incompatable
Reported by: | 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 |
Description
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 by , 11 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 11 years ago
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.
Hi,
The
unittest
module shipped by django is a backport of the newunittest2
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.
Thanks.
[1] https://docs.djangoproject.com/en/dev/releases/1.3/#unittest2-support