GeezerVison is showing github.com — Deprecation issues in tests with too-new setuptools versions · Issue #24350 · numpy/numpy
Deprecation issues in tests with too-new setuptools versions #24350
Description
There are two deprecation issues when running python -mspin test with Python 3.11:
sre_constants and sre_parse are deprecated. This breaks test collection but can by fixed
by using recent setuptools.
pkg_resources is deprecated in recent setuptools, this causes numpy/distutils/tests/test_system_info.py
to fail
Note that we have several other uses of pkg_resources
- In
tools/npy_tempita/__init__.py
In numpy/_utils/_pep440.py (copied from SciPy)
- In
versioneer.py (going away)
We should fix the usage in the first file.
The easiest quick solution is to upgrade the setuptools version requirement and ignore the test_system_info error.
Activity
charris commented on Aug 6, 2023
We don't use the troublesome parts of tempita, and in fact they don't run :) The version in Cython is no better in that regard. Maybe be can just get rid of much of it.
EDIT: The pkg_resources bit can be removed, our version is not distributed as a package. Or we could just hardwire it to '3.5.2'
charris commented on Aug 7, 2023
We should probably just skip testing numpy/distutils since we need to use a recent version of setuptools to avoid other deprecations. We could, I suppose, make the tests version dependent.
rgommers commented on Aug 7, 2023
Skipping the problematic tests in numpy.distutils when the setuptools version is >= 60.0 on Python 3.11 sounds right to me. That's what we already required.
changed the title
[-]Deprecation issues with meson builds[/-] [+]Deprecation issues in tests with too-new setuptools versions[/+] on Aug 7, 2023rgommers commented on Aug 7, 2023
tools/npy_tempita/__init__.py is only used in the numpy.distutils build, so it's going away - no need to worry about that one. I'll open a PR to make the numpy.distutils tests pass.
added a commit that references this issue
on Aug 7, 2023This issue will close once commit aca2429 is merged into the 'main' branch.aca2429 added a commit that references this issue
on Aug 7, 2023This issue will close once commit 89b62c5 is merged into the 'main' branch.89b62c5 charris commented on Aug 7, 2023
@rgommers
We have setuptools pinned in various ways in several locations
- pyproject.toml.setuppy
- test_requirements.txt
- environment.yml
- azure-pipelines.yml
- benchmarks/asv.conf.json
- benchmarks/asv_compare.conf.json.tpl
- tools/travis-test.sh
I'm wondering if we should change those pins? That essentially locks us into meson builds, but I think that is already the case.
rgommers commented on Aug 7, 2023
I'd much prefer not to touch them right now. Most of that is still needed. We should be able to get rid of all them in a few months.
added a commit that references this issue
on Nov 11, 2023This issue will close once commit ce036a9 is merged into the 'main' branch.ce036a9
Metadata
Metadata
Development
No branches or pull requestsIssue actions