Skip to content

Commit d035a34

Browse files
committed
setup: Add __version__ attribute for the tasklib module
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] pypa/setuptools#510 [2] pypa/setuptools#926
1 parent e0d5a3f commit d035a34

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
install_requirements = ['pytz', 'tzlocal']
44

5-
version = '2.2.0'
5+
version = '2.2.1'
66

77
try:
88
import importlib

tasklib/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
from .backends import TaskWarrior
22
from .task import Task
33
from .serializing import local_zone
4+
5+
__version__ = '2.2.1'

0 commit comments

Comments
 (0)