Getting notified of build failures in your Python Packages
We wrote a bit about the PyPM Index build notification feature in the previous blog post (PyPM Index for Python Developers: Nov. 10), and specifically the ability to subscribe to a RSS feed of recent build failures for a particular Python package. This enables one to quickly act on broken releases (eg: missing files in sdist) or platform-specific install regressions. But this is not ideal if you publish and maintain more than one package in PyPI. So we implemented a way to subscribe to all of your Python packages in one feed. In the author page (eg: Ian Bicking - see below), you will find a link to the page (the round red strikethough icon) listing only your recently failing packages. There is an RSS link in the right sidebar that you can use to subscribe.
What can I
import from this package?
Which Python package provides this
Python distribution names and their imports do not always match. For example, although you may know that "
import MySQLdb" is the import for a popular MySQL binding, it has a different distribution name (or package name) - "MySQL-python". Maintaining a build farm of all Python packages in PyPI enables us to provide this feature: you can now search for a package by its import namespace, for example - searching for "
import:MySQLdb" (case insensitive) will redirect you to the mysql-python package page.
If more than one Python package provides the same import, PyPM Index will instead show you the list of those packages. This led to some interesting observations of cases of distributions providing the same import leading to install-time conflicts.
- How many packages, do you think, create a "
tests" importable package in your site-packages directory? We counted 87 of them.
- 19 projects copy ez_setup.py (setuptools' bootstrap module) by accident.
- 6 include their setup.py script itself.
- 7 projects provide an "examples" package — feature or bug?
- And, while we are it, why not include a global __init__.py file as well (even though it is meaningless to do so)?
And there are more of them.
Packages required to run a recipe
Some Python recipes require third-party packages. Using the
import data (as explained above), we link to the exact package from such recipes. Take this particular recipe for instance, that imports two third-party modules: MySQLdb and boto. The "Required Modules" section (on the right) which lists the list of imports, now also links to the respective package page on PyPM Index.
Each package in turn links back to the recipes that include them. Try the "MySQL-python recipes" link in the MySQL-python page.
Other changes include:
- Gravatar images in author pages: We use the email address from one of the author's latest releases to retrieve their Gravatar image.
- Package names now preserve case: i.e., we now show
M2Cryptoinstead of the lower-cased
- Link to reddit posts mentioning the package.