lazr/__init__.py should not do a version test
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lazr.config |
Fix Released
|
High
|
Barry Warsaw | ||
lazr.delegates |
Fix Released
|
High
|
Barry Warsaw | ||
lazr.smtptest |
Fix Released
|
High
|
Barry Warsaw |
Bug Description
lazr/__init__.py registers pre-PEP 420 namespace packages but does only for Python versions < 3.3. Python 3.3 is where PEP 420 was introduced so the version test attempts to avoid the old-style registration for Pythons that support PEP 420. This is broken however because the mere presence of lazr/__init__.py disables PEP 420 namespace packages. While Debian packaging tools will remove the lazr/__init__.py from all namespace portions when they build the >= Python 3.3 binary packages, if you are using something like `python3.4 setup.py install` on a project that is dependent on lazr.* packages, the lazr/__init__.py file will not get deleted, and thus neither PEP 420 nor old-style registration will happen. This makes lazr packages unimportable.
Since the upstream Python packaging tools have no inherent way of removing the lazr/__init__.py file, the solution is just to remove the version test and always use the old-style registration code.
Changed in lazr.config: | |
status: | New → In Progress |
milestone: | none → 2.1 |
Changed in lazr.config: | |
status: | In Progress → Fix Committed |
Changed in lazr.config: | |
status: | Fix Committed → Fix Released |
Changed in lazr.delegates: | |
status: | New → In Progress |
milestone: | none → 2.0.2 |
Changed in lazr.delegates: | |
status: | In Progress → Fix Released |
Changed in lazr.smtptest: | |
status: | New → In Progress |
milestone: | none → 2.0.3 |
Changed in lazr.smtptest: | |
status: | In Progress → Fix Released |
This bug may affect other lazr.* packages too. I'll try to take a look but right now lazr.{smtptest, config, delegates} is my highest priority for releasing a fix.