alexmojaki / alexmojaki/outdated

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

Aberta
#18 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Python
Estrelas
27
Forks
7
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.