Opened 13 years ago

Closed 13 years ago

#18013 closed Cleanup/optimization (fixed)

Use `except ... as ...:` syntax to improve compatibility with Python3.

Reported by: Alex Ogier Owned by: nobody
Component: Python 3 Version: dev
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

We are dropping python 2.5 support in django 1.5, so the old style with commas is no longer needed. This should make the diff with the Py3 guys much smaller.

Also a pull request, https://github.com/django/django/pull/134

Attachments (3)

except_as.diff (135.6 KB ) - added by Alex Ogier 13 years ago.
except_as_noutils.diff (129.4 KB ) - added by Alex Ogier 13 years ago.
Same without modifying utils/simplejson or utils/unittest
except_as_more.diff (1.2 KB ) - added by Alex Ogier 13 years ago.
A few more cases from recent trunk changes

Download all attachments as: .zip

Change History (6)

by Alex Ogier, 13 years ago

Attachment: except_as.diff added

comment:1 by Alex Gaynor, 13 years ago

I see this modifies simplejson/ and unittest2/ those probably shouldn't be modified, as they're external packages.

by Alex Ogier, 13 years ago

Attachment: except_as_noutils.diff added

Same without modifying utils/simplejson or utils/unittest

by Alex Ogier, 13 years ago

Attachment: except_as_more.diff added

A few more cases from recent trunk changes

comment:2 by anonymous, 13 years ago

Triage Stage: UnreviewedAccepted

As soon as deprecated code is removed from trunk, we can begin to commit those sorts of on-the-road-to-python3 patches.

comment:3 by Claude Paroz, 13 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top