An experiment: PyPi without betas

So recenlty I pushed WebOb 1.1beta1 to PyPi. It’s a mostly backwards-comatible release (other than dropping Python 2.4 support), but there’s still an opinion that beta releases don’t belong to PyPi.

There’s a reason for that — pip, easy_install and others pick the latest version when installing and sometimes it’s beta. I once spent a couple days trying to figure out what is causing segfaults in production only to find that the deployment process was creating virtualenv with the latest versions of everything, and in that case a beta release of lxml was causing those segfaults at random times.

So one solution is to stop everyone from uploading beta releases to PyPi. That’s not gonna work though, because some people will not comply. I personally prefer every release to go to PyPi, and there should be another way. The safest solution is to use your private PyPi mirror / snapshot / eggs directory. This is the most reliable solution to the problem.

pypi-stable

Sometimes you might want the most recent versions of everything but would prefer to avoid betas. Think testing, development environment etc. Setting up a mirror as described above and picking specific versions manually is too much of a chore. Thankfully there’s a simpler way to do this: pypi-stable.

This is a webapp that emulates PyPi simple index but filters out beta and alpha releases (well, it’s actually a bit smarter that that: if the most stable available release is beta, it does shows betas, etc). See lxml listing for example.

To use it, you need to specify it as an index to your pkg installation tool:

pip install -i http://pypi-stable.maluke.com/simple WebOb --upgrade

This is an expriment I hacked together in a couple hours, so let me know if it breaks, misbehaves etc.

Also make sure to let me know if you start actually using it, that will influence if I will work on it some more or not.

See also: related thread in catalog-sig.