I'm having a problem maintaining the latest package versions via puppet (which runs "pip freeze"). This stems from not allowing underscores in the safe_name function. "pip freeze" returns "package-name", when in fact it should return "package_name". "pip freeze" retrieves the packages from pkg_resources.working_set.
The search/replace is performed by safe_names, which can be found here https://bitbucket.org/tarek/distribute/src/3bf82d0cbc6e0a6d383f177c4def1222f3c3ba46/pkg_resources.py?at=default#cl-1145
One of the packages in question is riak_pb (https://pypi.python.org/pypi/riak_pb)
"Underscores can be used in the module name if it improves readability." http://www.python.org/dev/peps/pep-0008/#package-and-module-names