Opened 11 years ago
Closed 11 years ago
#21362 closed Bug (fixed)
Django 1.4.9 breaks Python 2.5 compatibility
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Python 2 | Version: | 1.4 |
Severity: | Release blocker | Keywords: | |
Cc: | github@… | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
File "/usr/local/lib/python2.5/site-packages/django/utils/crypto.py", line 137 password += b'\x00' * (inner.block_size - len(password)) ^ SyntaxError: invalid syntax
According to http://docs.python.org/2/whatsnew/2.6.html#pep-3112-byte-literals the b notation was introduced in Python 2.6.
Change History (6)
comment:1 by , 11 years ago
Severity: | Normal → Release blocker |
---|---|
Triage Stage: | Unreviewed → Accepted |
follow-up: 3 comment:2 by , 11 years ago
comment:3 by , 11 years ago
Replying to claudep:
I think the fix is as simple as removing the
b
prefix on 1.4, as Python 3 compatibility is not an issue on 1.4.
Yes, that should work. The question is, are there other instances of bytes literals anywhere else?
We should also fix our CI server to include python2.5 as part of the automated testing.
comment:4 by , 11 years ago
Note also that hmac.trans36
does not exist on Python 2.5. I wonder if commit [1e4f53a6eb8d181] should not simply be reverted...
comment:5 by , 11 years ago
Cc: | added |
---|
comment:6 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I think the fix is as simple as removing the
b
prefix on 1.4, as Python 3 compatibility is not an issue on 1.4.