Skip to content

Commit ca5fb56

Browse files
authored
Replace pkg_resources with packaging for version parsing (#206)
`pkg_resources` from `setuptools` is unavailable in Python 3.13, breaking the docs build with Sphinx 9. This switches to the `packaging` library which provides the same `Version.base_version` API and is the modern standard replacement. Also drops the stale `markupsafe==2.0.1` pin which was a workaround for an old Jinja2 compatibility issue.
1 parent 536f4bb commit ca5fb56

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

docs/build.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
# requires-python = ">=3.12"
33
# dependencies = [
44
# "higlass-python",
5-
# "markupsafe==2.0.1",
6-
# "setuptools",
5+
# "packaging",
76
# "sphinx-js",
87
# "Sphinx",
98
# ]

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from docutils import nodes
66
from docutils.parsers.rst import Directive, directives
7-
from pkg_resources import parse_version
7+
from packaging.version import Version
88

99
from higlass import __version__
1010

@@ -70,7 +70,7 @@
7070
# built documents.
7171
#
7272
# The short X.Y version.
73-
version = parse_version(__version__).base_version
73+
version = Version(__version__).base_version
7474
# The full version, including alpha/beta/rc tags.
7575
release = __version__
7676

0 commit comments

Comments
 (0)