Skip to content

Commit ed4b6c8

Browse files
committed
doc: use importlib.metadata in favor of pkg_resources in conf.py
As can be found here [1], pkg_resources is deprecated and is removed by default from python 3.12 according to [2]. The used alternative importlib.metadata is available from python 3.8 on according to [3]. [1] https://setuptools.pypa.io/en/latest/pkg_resources.html [2] https://docs.python.org/3/whatsnew/3.12.html [3] https://docs.python.org/3.12/library/importlib.metadata.html Signed-off-by: Leonardo Mörlein <[email protected]>
1 parent 71fe895 commit ed4b6c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import sys
2222
sys.path.insert(0, os.path.abspath('..'))
2323

24-
from pkg_resources import get_distribution
24+
from importlib.metadata import version
2525

2626
# Import read_the_docs theme
2727
import sphinx_rtd_theme
@@ -65,7 +65,7 @@
6565
# built documents.
6666
#
6767
# The full version, including alpha/beta/rc tags.
68-
release = get_distribution('labgrid').version
68+
release = version('labgrid')
6969
# The short X.Y version.
7070
version = '.'.join(release.split('.')[:2])
7171

0 commit comments

Comments
 (0)