#19038 closed Uncategorized (fixed)
Add Experimental Support for Python 3.3
Reported by: | Ian Clelland | Owned by: | nobody |
---|---|---|---|
Component: | Python 3 | Version: | dev |
Severity: | Release blocker | Keywords: | |
Cc: | ojiidotch@…, aenor.realm@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The installation documentation currently claims that Django has "experimental" support for Python 3.2 and 3.3. Python 3.2 support is pretty solid, but there are several test cases that fail on 3.3 (Even with the hash randomization patch from #17758)
The major differences that are causing test failures in 3.3 are:
- threading._Event has been renamed to threading.Event (This stops the test runner from even staring)
- The technical error view attempts to apply source character encoding twice when using a PEP 302 loader
- Several Python exceptions have had their messages reworded, and we are (recklessly) depending on the exact error message text in tests
There are some import errors that I haven't tracked down as well
Change History (19)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Severity: | Normal → Release blocker |
---|
Either we can support 3.3 in the 1.5 release, or we should remove the claim for Python 3.3 support.
comment:3 by , 12 years ago
I know of one in the ORM where dict-ordering will be a problem:
qs.filter(m2m__somefield=F('m2m__somefield'), m2m__otherfield='foo')
The query generated is different depending on the order the clauses are applied, and that again is dict ordering dependant. This is tracked in #18375, see in particular comment 3 for details.
IMO this needs some solution for Python 3.3... Unfortunately solving this will result in backwards incompatible change no matter what is done.
comment:4 by , 12 years ago
Is #18375, then, a hash randomization issue or a Python 3.3 issue? I think that the two issues are separable, at least in principle.
(It's certainly up for discussion whether we would want to claim that "experimental" support means that you have to change the Python runtime defaults to get it to work)
If it's just related to the dictionary ordering, can we link that issue instead to #17758?
comment:6 by , 12 years ago
The import errors were also just a matter of Python changing the exception messages. An import error now surrounds the name of the module which did not load in single quotes; it was bare before.
comment:7 by , 12 years ago
My github branch now passes the complete test suite under 3.3.0b1, with one exception, which is being tracked in #19039 -- I'd like to get some input on that before closing it out.
comment:8 by , 12 years ago
Cc: | added |
---|
comment:9 by , 12 years ago
Has patch: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:11 by , 12 years ago
Cc: | added |
---|
comment:12 by , 12 years ago
I've rebased the patch to not depend on the fix for #17758. WIth hash randomization disabled, this passes the entire test suite, except for the issue in #19039.
Pull request sent. (https://github.com/django/django/pull/435)
comment:18 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:19 by , 12 years ago
Forgot to mention on this ticket - I merged the pull request from clelland, thanks.
I'm tracking this on my github fork at https://github.com/clelland/django/tree/ticket_19038
It's based on my fix for 17758, but if it helps get this in, I can rebase it off of master (and we can all turn off hash randomization to run Python 3.3)