After releasing changes earlier this morning for 0.1.3 on PyPI I was doing ad-hoc testing and realized there were still two problems with star imports that hadn't been caught:
The __all__ definitions for sub-packages (pycallnumber.units, pycallnumber.units.callnumbers, and pycallnumber.units.dates) needed to be updated to lists of strings, as well.
Python 2 didn't like star imports because the main init.py file imported unicode_literals from __future__; so the strings in __all__ ended up being unicode objects instead of strings, and Python 2 wants them to be strings. Removing unicode_literals from this file (and the relevant test files, once I created the tests) fixed the problem and didn't seem to have any bad side-effects.
I also added tests to test importing * for the main package and each of the sub-packages, which I should have done in the first place...
After releasing changes earlier this morning for 0.1.3 on PyPI I was doing ad-hoc testing and realized there were still two problems with star imports that hadn't been caught:
__all__
definitions for sub-packages (pycallnumber.units
,pycallnumber.units.callnumbers
, andpycallnumber.units.dates
) needed to be updated to lists of strings, as well.unicode_literals
from__future__
; so the strings in__all__
ended up being unicode objects instead of strings, and Python 2 wants them to be strings. Removingunicode_literals
from this file (and the relevanttest
files, once I created the tests) fixed the problem and didn't seem to have any bad side-effects.I also added tests to test importing * for the main package and each of the sub-packages, which I should have done in the first place...