alexmojaki / alexmojaki/outdated

`check_outdated()` errors with Setuptools >= v82.0.0

Abierto
#18 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
27
Forks
7
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Hi there,

And thanks for this package! We've used it for many years in the CD of https://github.com/pyxem/orix and related repos.

outdated v0.2.2 errors with the recently released Setuptools v82.0.0. The reason is that `pkg_resources`, used in the `check_outdated` function, is no longer packaged with Setuptools:

https://github.com/alexmojaki/outdated/blob/26c8c28f135ee459f44f2cb956d5c54e7e95f3a5/outdated/__init__.py#L36

**To reproduce**

Setup in a fresh conda environment

```bash
$ pip install -U outdated
...
$ pip list
Package Version
------------------ --------
certifi 2026.1.4
charset-normalizer 3.4.4
idna 3.11
littleutils 0.2.4
outdated 0.2.2
packaging 26.0
pip 26.0.1
requests 2.32.5
setuptools 82.0.0
urllib3 2.6.3
```

Test `check_outdated()`:

```python
$ python
Python 3.13.12 | packaged by conda-forge | (main, Feb 5 2026, 06:11:05) [Clang 19.1.7 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from outdated import check_outdated
/opt/homebrew/Caskroom/miniforge/base/envs/outdated-test/lib/python3.13/site-packages/outdated/utils.py:14: OutdatedCheckFailedWarning: Failed to check for latest version of package.
Set the environment variable OU
S

>
KeyboardInterrupt
>>> from outdated import check_outdated
>>> check_outdated("orix", "0.14.2")
Traceback (most recent call last):
File "", line 1, in
check_outdated("orix", "0.14.2")
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniforge/base/envs/outdated-test/lib/python3.13/site-packages/outdated/__init__.py", line 36, in check_outdated
from pkg_resources import parse_version
ModuleNotFoundError: No module named 'pkg_resources'
```

If I install `pip install "setuptools<82"`, `check_outdated()` works.

**Solution?**

According to https://github.com/pypa/setuptools/issues/3085, replacing `pkg_resources` with `importlib.metadata` and `importlib.resources` is the way forward.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.