Aaand we're seeing the first '#setuptools < 82' runtime dependencies in random packages because they are trying hard to workaround breakage due to pkg_resources removal.
Aaand we're seeing the first '#setuptools < 82' runtime dependencies in random packages because they are trying hard to workaround breakage due to pkg_resources removal.
El mismo s铆ntoma, pero meses despu茅s. Ahora es una actualizaci贸n de setuptools la que genera el error del m贸dulo pkg_resource no encontrado. Si presentas este problema, debes fijar la versi贸n de setuptools en 81 o anterior.
https://www.cosmoscalibur.com/es/blog/2025/modulo-pkg-resources-no-encontrado-en-ambientes-uv/
Lessons from this week's removal of the #pkg_resources module:
- If you don't use the `--no-build-isolation` argument of `pip install`, then `--require-hashes` is only partly effective and your builds may break whenever incompatible changes are made to #setuptools or other build dependencies.
- If you use `--no-build-isolation`, you need multiple `pip install` calls: first for all the needed build dependencies (a.k.a. `setup_requires`), then for the packages you actually want.
The planets aligned to make it a very stressful day. Need to patch our installation of a bunch of legacy third-party packages because of the `setuptools` breaking change, and GitHub is not cooperating 馃槱
After literal decades of work, #setuptools maintainers are finally retiring #pkg_resources in v82.0.0. I've been diligent to migrate every package I came across that used it for years, but it's very likely still being used in the wild, so here's a bit of context if you see failing builds in the coming days and don't understand what's happening;
#pkg_resources was shipped alongside #setuptools, which has been the de-facto standard (and only option up until ~2018 (#PEP517)) build backend for #Python packages. #setuptools was *never* part of the standard library, however it used to be (and still is, in many cases) distributed with it for convenience, so many projects have depended on it for ages, some of which have never explicitly declared it as a dependency (neither build-time or runtime). #pkg_resources had the same exact problems, but worse, because you couldn't even find it on #PyPI under its own name. I suspect many Python dev will only learn about this now that the package is suddenly missing.
In many cases, solutions include:
- migrating to importlib.metadata (python>=3.8), or its third party counterpart #importlib_metadata if somehow you still need to support Python 3.7 or older
- migrating to importlib.resources (Python>=3.11), or #importlib_resources for older Pythons
- dropping #setuptools / #pkg_resources completely: if all you need is a dead-simple, well maintained build backend for pure-Python projects, I highly recommend #flit_core. It's trivial to use, only supports static metadata and has never blown my face away after years using it every chance I get.
If you read this far, please boost for reach. Thanks !
#packaging #dependency #dependency_hell #softwaredevelopment
Setuptools deprecated pkg_resources in docs for ~two years, then with a DeprecationWarning for ~two years, then a UserWarning for ~one year.
2021-04: Deprecate in docs (v56.0.0)
https://github.com/pypa/setuptools/commit/8fe85c22cee7fde5e6af571b30f864bad156a010
2023-03: Officially deprecate with DeprecationWarning (v67.5.0)
https://github.com/pypa/setuptools/pull/3843
2025-05: Promote to UserWarning with earliest removal deadline of 2025-11-30 (v80.9.0)
https://github.com/pypa/setuptools/pull/5014
2026-02: Remove (v82.0.0)
https://github.com/pypa/setuptools/pull/5007
Accessing github from work is annoying.
I hope someone else in the world files a bug soon on flake8 not being compatible with a fresh python 3.12+ virtualenv, now that setuptools 82 is out and flake8 is still using the deprecated (now removed) pkg_resources.
I hear that #Python folk are going to enjoy their Monday.
https://setuptools.pypa.io/en/stable/history.html#v82-0-0
Yep, #setuptools removed pkg_resources.
Thanks to Eli Schwartz for the advance warning. We're going to mask it in #Gentoo.
EDIT: I've started a DPO thread for this: https://discuss.python.org/t/pkg-resources-removal-how-to-go-from-there/106079
I need some help packaging a python module that I built. It references a few different python files, and .csv within the folder structure, and searching leads me to examples/tutorials that are either too simple, or way too complex. I can't find anything bridging the gap.
Any blogs, courses, tutorial, or even as a last resort youtube videos, that may help me out? #python #packaging #flit #setuptools #hatchling
The project that I'm trying to package is here - https://git.jmkengineering.com/JMK_Engineering_Inc/JEPL/src/branch/main/jepl