Context
#599 revealed that setuptools >= 82 removes pkg_resources, requiring
us to pin setuptools < 82.0.0 as a workaround. This is a temporary fix —
pinning setuptools blocks security patches and future setuptools improvements.
Goal
Remove the setuptools < 82.0.0 pin by eliminating all pkg_resources
usage from eDisGo and its dependencies.
Steps
-
Audit eDisGo's own codebase for any pkg_resources usage (currently
none found, but should be confirmed in CI).
-
Audit direct dependencies for pkg_resources usage:
- Run
grep -r "import pkg_resources" $(pip show <dep> -f | ...) for
each dependency in setup.py.
- Candidates to check:
egoio, saio, workalendar, demandlib,
descartes, pypower, pypsa, oedialect.
-
For each offending dependency:
- Open an upstream issue / PR to migrate from
pkg_resources to
importlib.metadata (Python 3.9+ standard library).
- Or update the version pin in
setup.py once a fixed release is
available.
-
Once all dependencies are clean, remove "setuptools < 82.0.0"
from setup.py.
References
Context
#599 revealed that
setuptools >= 82removespkg_resources, requiringus to pin
setuptools < 82.0.0as a workaround. This is a temporary fix —pinning setuptools blocks security patches and future setuptools improvements.
Goal
Remove the
setuptools < 82.0.0pin by eliminating allpkg_resourcesusage from eDisGo and its dependencies.
Steps
Audit eDisGo's own codebase for any
pkg_resourcesusage (currentlynone found, but should be confirmed in CI).
Audit direct dependencies for
pkg_resourcesusage:grep -r "import pkg_resources" $(pip show <dep> -f | ...)foreach dependency in
setup.py.egoio,saio,workalendar,demandlib,descartes,pypower,pypsa,oedialect.For each offending dependency:
pkg_resourcestoimportlib.metadata(Python 3.9+ standard library).setup.pyonce a fixed release isavailable.
Once all dependencies are clean, remove
"setuptools < 82.0.0"from
setup.py.References
pkg_resourcesin v82