Opened 13 years ago
Closed 12 years ago
#18269 closed Cleanup/optimization (fixed)
From __future__ import unicode_literals
Reported by: | Claude Paroz | Owned by: | nobody |
---|---|---|---|
Component: | Python 3 | Version: | 1.3 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
To the road to Python3, a possible next step would be to use the from __future__ import unicode_literals
and remove the u''
prefixes, as it is not supported in Python3 (may be added in 3.3 for compatibility reasons).
I made a branch which has strong inspiration from Vinay Sajip Python3 branch of Django (https://bitbucket.org/vinay.sajip/django):
https://github.com/claudep/django/tree/unicode_literals
Change History (10)
comment:1 by , 13 years ago
comment:2 by , 12 years ago
I know about PEP 414, however we must decide if we want to support 3.2 or not...
comment:3 by , 12 years ago
I thought that decision had bee made, in favor of supporting 3.2. In this message: http://groups.google.com/group/django-developers/msg/49572ac23eb3267f from Carl Meyer:
I think the fact that the next Ubuntu LTS will include Python 3.2, and
it won't be possible to make use of PEP 314 on Python 3.2 without
install-time-transformation hacks, is a strong argument in favor of
sticking with a working unicode_literals port rather than reworking it
to use PEP 314.
I do not see any follow-up disagreeing with that position.
follow-up: 6 comment:5 by , 12 years ago
If I understand correctly (far from granted in this area):
- if we only support 3.3+, we can use u"" and b"" for unicode and bytes (resp.)
- to support 3.2, we have to use "" and b""
This doesn't make a big difference, so I agree with Karen and Carl that we should support 3.2.
I suppose automatic tools exist to help the conversion?
comment:6 by , 12 years ago
Replying to aaugustin:
(...)
I suppose automatic tools exist to help the conversion?
The conversion is already done (more or less automatically) in my branch (see link in the description).
comment:7 by , 12 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:9 by , 12 years ago
I just updated the branch (rebased) and created a pull request for better review: https://github.com/django/django/pull/86
comment:10 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
http://www.python.org/dev/peps/pep-0414/