[Django] #20913: django.utils.unittest is python 3 incompatable

6 views
Skip to first unread message

Django

unread,
Aug 14, 2013, 2:36:06 AM8/14/13
to django-...@googlegroups.com
#20913: django.utils.unittest is python 3 incompatable
----------------------------+------------------------------
Reporter: plant2@… | Owner: nobody
Type: Bug | Status: new
Component: Python 3 | Version: 1.5
Severity: Normal | Keywords: python3 unittest
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+------------------------------
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

--
Ticket URL: <https://code.djangoproject.com/ticket/20913>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 14, 2013, 2:57:47 AM8/14/13
to django-...@googlegroups.com
#20913: django.utils.unittest is python 3 incompatable
----------------------------------+--------------------------------------
Reporter: plant2@… | Owner: nobody
Type: Bug | Status: closed

Component: Python 3 | Version: 1.5
Severity: Normal | Resolution: invalid

Keywords: python3 unittest | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------
Changes (by bmispelon):

* status: new => closed
* needs_docs: => 0
* resolution: => invalid
* needs_tests: => 0
* needs_better_patch: => 0


Comment:

Hi,

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.

Thanks.

[1] https://docs.djangoproject.com/en/dev/releases/1.3/#unittest2-support

--
Ticket URL: <https://code.djangoproject.com/ticket/20913#comment:1>

Django

unread,
Aug 14, 2013, 3:26:12 AM8/14/13
to django-...@googlegroups.com
#20913: django.utils.unittest is python 3 incompatable
----------------------------------+--------------------------------------
Reporter: plant2@… | Owner: nobody
Type: Bug | Status: closed

Component: Python 3 | Version: 1.5
Severity: Normal | Resolution: invalid

Keywords: python3 unittest | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------

Comment (by aaugustin):

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

--
Ticket URL: <https://code.djangoproject.com/ticket/20913#comment:2>

Reply all
Reply to author
Forward
0 new messages