[Python-ideas] namespace for backported stdlib modules?

Victor Stinner victor.stinner at gmail.com
Tue Oct 21 10:09:02 CEST 2014


Hi,

2014-10-21 3:18 GMT+02:00 Robert Collins <robertc at robertcollins.net>:
> We've currently got the unittest2 and mock as modules on pypi, and
> clearly we can add another e.g. traceback2 as a way to get the
> traceback changes out there.

Why not contributing to the unittest2 module instead of creating yet
another project?

Would it be possible to work on unittest2 and mock to make them "compatible"?

> I'm wondering though if perhaps putting up a namespace package on pypi
> for things in the stdlib - e.g. 'stdlib' (or stdlib2 or something)
> would make sense. In particular that might permit relative imports to
> automatically pick up the other also backported modules without source
> changes.

In my experience, namespaces with Python < 3.3 only means pain. I only
got issues with the "oslo" namespace created with a hack in a .pth
file for oslo.config, oslo.rootwrap, etc.

FYI there a list on the Python wiki:
https://wiki.python.org/moin/StandardLibraryBackports

Victor


More information about the Python-ideas mailing list