All kinds of contributions are welcome - code, tests, documentation, bug reports, ideas, etc.
Minor releases of pip (e.g. 1.1, 1.2, 1.3...) occur every four months (beginning with the release of pip 1.0 on April 4, 2011). Two weeks before a scheduled release, a new branch release/X.Y is created for release testing and preparation. This branch is only open to bugfixes.
First of all, you need to fork the the official repository, which is https://github.com/pypa/pip.
Log in to Github, go to the pip repository page, follow the fork link, wait for Github to copy the repository and then clone your fork, like:
$ git clone https://github.com/YOU_USER_NAME/pip
Now you can change whatever you want, commit, push to your fork and when your contribution is done, follow the pull request link and send us a request explaining what you did and why.
Pip uses the git-flow branching model. The default branch on GitHub is develop, and all development work (new features and bugfixes) should happen in that branch. The master branch is stable, and reflects the last released state.
Almost all changes to pip should be accompanied by automated tests - especially ones adding new behavior.
Nose is used to find and run all tests. Take a look at running-tests to see what you need and how you should run the tests.
Before sending us a pull request, please, be sure all tests pass.
Pip supports Python versions 2.5, 2.6, 2.7, 3.1, and 3.2, from a single codebase (without use of 2to3 translation). Untested contributions frequently break Python 3.x compatibility. Please run the tests on at least 3.2 and report your results when sending a pull request.
Pip uses some system tools - VCS related tools - in its tests, so you need to intall them (Linux):
sudo apt-get install subversion bzr git-core mercurial
After all requirements (system and python) are installed, just run the following command:
$ python setup.py test
If you want to run only a selection of the tests, you’ll need to run them directly with nose instead. Create a virtualenv, and install required packages:
pip install nose virtualenv scripttest mock
Or select just a single test to run:
cd tests; nosetests test_upgrade.py:test_uninstall_rollback
There was a problem with locales configuration when running tests in a Hudson CI Server that broke some tests. The problem was not with pip, but with locales configuration. Hudson was not setting LANG environment variable correctly, so the solution to fix it was changing default language to en_US.UTF-8. The following has been done in a Ubuntu Server 9.10 machine:
$ sudo locale-gen en_US en_US.UTF-8 $ sudo dpkg-reconfigure locales $ sudo update-locale LANG=en_US.UTF-8
Pip’s test coverage is not as good as we would like, so contributions of additional tests are welcome. You can contribute these the same way you would contribute any other kind of code: see the Contributing with Code section.
Pip project is hosted at Github and uses its issue tracker system.
If you have found a bug and want to report it, go to pip issue tracker page, click Create new, add a descriptive title (so we can easily identify what the bug is) and fill the description box explaining how you got the bug, what pip version you were using and what is your operating system, so we can reproduce the bug to try fixing it.