From a36f5c5831741ef1cd660c2f2dd4749899dcb8f7 Mon Sep 17 00:00:00 2001 From: Trevor Manz Date: Sat, 28 Feb 2026 11:39:27 -0500 Subject: [PATCH] Replace pkg_resources with packaging for version parsing `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. --- docs/build.py | 3 +-- docs/conf.py | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/build.py b/docs/build.py index 348d378..d280f02 100644 --- a/docs/build.py +++ b/docs/build.py @@ -2,8 +2,7 @@ # requires-python = ">=3.12" # dependencies = [ # "higlass-python", -# "markupsafe==2.0.1", -# "setuptools", +# "packaging", # "sphinx-js", # "Sphinx", # ] diff --git a/docs/conf.py b/docs/conf.py index 5fd84d5..76a3b89 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -4,7 +4,7 @@ from docutils import nodes from docutils.parsers.rst import Directive, directives -from pkg_resources import parse_version +from packaging.version import Version from higlass import __version__ @@ -70,7 +70,7 @@ # built documents. # # The short X.Y version. -version = parse_version(__version__).base_version +version = Version(__version__).base_version # The full version, including alpha/beta/rc tags. release = __version__