[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

pyclean and namespaces



(oops, resending to correct ML address)

Hello,

I found a potential issue while finishing to package a newer version zc.lockfile.

Since pycompile/pyclean does some namespace handling with what is defined /usr/share/python/ns, I thought I could remove the dummy python-zc binary package that was done in zc.lockfile

However, pyclean does not check whether other packages still need the same namespaces.

In other words:
- install python-zc.lockfile (with my local changes, so that it only relies on pycompile/pyclean for zc/__init__.py)
- install python-zc.customdoctests, which actually over-writes zc/__init__.py but that's not an issue at installation
- remove 1 of the above 2 packages
- zc/__init__.py gone, whereas there are still folders in /usr/lib/python2.7/dist-packages/zc

But that still seems to work:
$ python
Python 2.7.12+ (default, Sep  1 2016, 20:27:38) 
[GCC 6.2.0 20160927] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import zc.lockfile
>>> zc.__path__
['/usr/lib/python2.7/dist-packages/zc']

(because of /usr/lib/python2.7/dist-packages/zc.lockfile-1.2.1-nspkg.pth)

Tested with the last version python-minimal (2.7.11-2).

Regards,
Julien


Reply to: