8000 GitHub - PythonCharmers/autoporter: Tool to automate porting of Python 2-only packages to both Python 2&3 and sending pull requests
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Tool to automate porting of Python 2-only packages to both Python 2&3 and sending pull requests

License

Notifications You must be signed in to change notification settings

PythonCharmers/autoporter

Repository files navigation

autoporter: Porting the universe to Python 2&3

Tool to automate porting of Python 2-only packages to both Python 2&3 and sending pull requests

https://github.com/PythonCharmers/autoporter

Vision:

Automate porting of Py2 packages to Py3 while preserving compatibility with Py2.

Goal 1:

write a script that takes a package name as an argument and does this:

  1. Py3?: Examines whether it already has the Python 3 (or 3.3 or 3.4) trove classifier. If so, exit. DONE in tests/test_package.py (Chee Ming).

  2. GitHub?: Examines whether there is a github link on the PyPI page. If not, exit. DONE in tests/test_package.py.

  3. Env: Creates a virtualenv for the package

  4. Fork: Forks the package repo on GitHub

  5. Clone: Clones the package to the local filesystem

  6. Futurize: Runs futurize --stage1 on the code

  7. Commit: Commits the changes locally

  8. Test: If the package has a test suite, try running it with python setup.py test.

  9. Push: Pushes the changes to the new GitHub repo

  10. PR: Sends a pull request (marked "Work In Progress") upstream

Goal 2:

Run this script over all 47,000 packages on PyPI! :)

We can run this from e.g. an EC2 or Digital Ocean instance that has an SSD disk and is geographically close to the PyPI server.

People:

see docs/CONTRIBUTORS.rst

Tools:

This has routines we can use to extract Trove classifiers (whether a package supports Py3 etc.)

    $ pip install future
    $ futurize --stage1 **/*.py

with recursive globbing (default in zsh, or in bash with shopt -s globstar set).

Tests:

To run tests for the autoporter code base:

python -m unittest discover -v tests

Notes:

  • This will require packages to set Python 2.6 as their minimum supported version.

About

Tool to automate porting of Python 2-only packages to both Python 2&3 and sending pull requests

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages

0