GothenburgBitFactory / tasklib

A Python library for interacting with taskwarrior databases.
http://tasklib.readthedocs.org/en/latest/
BSD 3-Clause "New" or "Revised" License
146 stars 27 forks source link

setup: Add __version__ attribute for the tasklib module #85

Closed tbabej closed 4 years ago

tbabej commented 4 years ago

Providing __version__ attribute is a reasonably common convention among packages in the Python ecosystem. Currently the only other reliable alternative is to use pkg_resources.get_distribution method, however, importing pkg_resources is notoriously slow [1,2].

Provide the __version__ attribute to provide an API interface to check the version of tasklib at runtime.

Bump the version in order to reflect module API change.

[1] https://github.com/pypa/setuptools/issues/510 [2] https://github.com/pypa/setuptools/issues/926

tbabej commented 4 years ago

@robgolding This would also need a PyPi release :pray:

coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.01%) to 92.159% when pulling d035a3428c6343b4f218e51340ddf690ad8c57ee on tbabej:develop into e0d5a3f271a18c77e53bc6b2d4c79514d63fe402 on robgolding:develop.