lazr/__init__.py should not do a version test

Bug #1407816 reported by Barry Warsaw
6
This bug affects 1 person
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.

Revision history for this message
Barry Warsaw (barry) wrote :

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.

Changed in lazr.config:
importance: Undecided → High
Changed in lazr.delegates:
importance: Undecided → High
Changed in lazr.smtptest:
importance: Undecided → High
Changed in lazr.config:
assignee: nobody → Barry Warsaw (barry)
Changed in lazr.delegates:
assignee: nobody → Barry Warsaw (barry)
Changed in lazr.smtptest:
assignee: nobody → Barry Warsaw (barry)
Barry Warsaw (barry)
Changed in lazr.config:
status: New → In Progress
milestone: none → 2.1
Barry Warsaw (barry)
Changed in lazr.config:
status: In Progress → Fix Committed
Barry Warsaw (barry)
Changed in lazr.config:
status: Fix Committed → Fix Released
Barry Warsaw (barry)
Changed in lazr.delegates:
status: New → In Progress
milestone: none → 2.0.2
Barry Warsaw (barry)
Changed in lazr.delegates:
status: In Progress → Fix Released
Barry Warsaw (barry)
Changed in lazr.smtptest:
status: New → In Progress
milestone: none → 2.0.3
Barry Warsaw (barry)
Changed in lazr.smtptest:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.