#3 Merged
Repository
Deleted repository
Branch
default (dfc8d2d07e21)
Repository
amentajo/lib3to2 lib3to2
Branch
default

Add Distutils Build and Some Fixer Enhancements

Author
  1. blink1073 avatarblink1073
Reviewers
Description

Thanks for 3to2! I used it to port a pretty complex library to Python 2.7 (https://github.com/blink1073/lantz), and added things to 3to2 along the way.

Changes:

  • build.py - mimics the build process for 2to3, I successfully added it to the setup.py in lantz
  • main.py - printing unicode characters to stdout caused an error, so I used 'str'.encode('utf-8')

Fixer Enhancements:

  • super() will now look for a base class and use 'super(Base, self)'
  • imports spanning multiple lines are now properly caught
  • classes with parentheses but no explicit class now inherit from 'object'
  • metaclasses now will inherit from 'object' if there is no given class

All tests are passing.

Comments (0)

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.