Skip to content

fix: Use importlib.metadata instead of pkg_resources#416

Open
riddell-stan wants to merge 5 commits intomainfrom
feature/pkg-resources-gone
Open

fix: Use importlib.metadata instead of pkg_resources#416
riddell-stan wants to merge 5 commits intomainfrom
feature/pkg-resources-gone

Conversation

@riddell-stan
Copy link
Contributor

setuptools 82.0.0 removes pkg_resources, breaking this software. This patch replaces pkg_resources with the recommended importlib.metadata.

PyStan was using pkg_resources for compatibility with versions older than Python 3.12, versions which should use importlib.metadata instead (see https://docs.python.org/3/library/importlib.metadata.html#entry-points).

Also updates pyproject.toml to require Python ≥3.12. Older versions will need to use setuptools < 82.0.0. See pypa/setuptools#5174 for tips on how to deal with broken builds.

Also uncap the version of pysimdjson. The package does not seem to use semantic versioning and users will likely want to use wheels that are (only) being built for newer Pythons.

@riddell-stan riddell-stan force-pushed the feature/pkg-resources-gone branch 2 times, most recently from b1ba4b9 to 3845b1e Compare March 11, 2026 22:14
setuptools 82.0.0 removes pkg_resources, breaking this software. This
patch replaces pkg_resources with the recommended importlib.metadata.

PyStan was using pkg_resources for compatibility with versions older
than Python 3.12, versions which should use importlib.metadata instead
(see https://docs.python.org/3/library/importlib.metadata.html#entry-points).

Also updates pyproject.toml to require Python ≥3.12.
Older versions will need to use setuptools < 82.0.0.
See pypa/setuptools#5174 for tips on
how to deal with broken builds.

Also uncap the version of pysimdjson. The package does not seem to use
semantic versioning and users will likely want to use wheels that are
(only) being built for newer Pythons.
@riddell-stan riddell-stan force-pushed the feature/pkg-resources-gone branch 4 times, most recently from 70388a1 to 4d1050b Compare March 11, 2026 23:07
@riddell-stan riddell-stan force-pushed the feature/pkg-resources-gone branch from 4d1050b to 6ff0dda Compare March 11, 2026 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant