testtools does not conform to PEP 396
Bug #1452436 reported by
David Riddle
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
testtools |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
For our package management we use automated tooling to extract version numbers from python packages. I would like to request that you change the __version__ attribute so that it conforms to PEP 396. Currently __version__ returns a tuple according to PEP 396 it should return a string. From what I have seen it is common for the tuple form to be stored in __version_info__.
PEP 396 states:
#. When a module (or package) includes a version number, the version
SHOULD be available in the ``__version__`` attribute.
#. The ``__version__`` attribute's value SHOULD be a string.
To post a comment you must log in.
So, yes, we're not following PEP-396. That said, we've had the current version layout for a long time, and there may well be code depending on it out there.
I'm at best ambivalent about changing this without a major version bump.
Many many packages do not have PEP-396 comaptible version attributes, because it requires opt-in. The distutils database is a much more reliable way to extract version data - everything that is installable is present there. Have you considered using that?