Opened 8 years ago

Closed 8 years ago

#27006 closed Cleanup/optimization (wontfix)

Hints how to update code automatically to support Python3

Reported by: Thomas Güttler Owned by: nobody
Component: Documentation Version: 1.10
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


I refer to this:

I think it would be friendly to new comers, if you give advices how to update your code to support Python3.

Changing from "except MyException as exc:" to "except MyException as exc:" can be automated.

You can update your code automatically with the futurize tool:

futurize --write --nobackups --fix lib2to3.fixes.fix_except your-directory/

What do you think?

Change History (1)

comment:1 by Tim Graham, 8 years ago

Component: UncategorizedDocumentation
Resolution: wontfix
Status: newclosed
Type: UncategorizedCleanup/optimization

I don't think it's the job of Django's documentation to dive into specifics like that. The guide was written based on the experience of porting Django to Python 3 and I suppose we'll probably remove it after Django drops support for Python 2.

Note: See TracTickets for help on using tickets.
Back to Top