unt-libraries / pycallnumber

Parse, model, and manipulate any type of call number string.
BSD 3-Clause "New" or "Revised" License
64 stars 9 forks source link

Finish fixing all star imports #28

Closed jthomale closed 6 years ago

jthomale commented 6 years ago

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:

  1. 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.
  2. 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...