Opened 3 years ago

Closed 3 years ago

#18013 closed Cleanup/optimization (fixed)

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

Reported by: Clueless Owned by: nobody
Component: Python 3 Version: master
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 Clueless 3 years ago.
except_as_noutils.diff (129.4 KB) - added by Clueless 3 years ago.
Same without modifying utils/simplejson or utils/unittest
except_as_more.diff (1.2 KB) - added by Clueless 3 years ago.
A few more cases from recent trunk changes

Download all attachments as: .zip

Change History (6)

Changed 3 years ago by Clueless

comment:1 Changed 3 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

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

Changed 3 years ago by Clueless

Same without modifying utils/simplejson or utils/unittest

Changed 3 years ago by Clueless

A few more cases from recent trunk changes

comment:2 Changed 3 years ago by anonymous

  • Triage Stage changed from Unreviewed to Accepted

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 Changed 3 years ago by claudep

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.
Back to Top