8000 Deprecation issues in tests with too-new setuptools versions · Issue #24350 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

Deprecation issues in tests with too-new setuptools versions #24350

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
charris opened this issue Aug 6, 2023 · 6 comments · Fixed by #24354
Closed

Deprecation issues in tests with too-new setuptools versions #24350

charris opened this issue Aug 6, 2023 · 6 comments · Fixed by #24354

Comments

@charris
Copy link
Member
charris commented Aug 6, 2023

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.

@charris
Copy link
Member Author
charris commented 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
Copy link
Member Author
charris commented 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
Copy link
Member
rgommers commented 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.

@rgommers rgommers changed the title Deprecation issues with meson builds Deprecation issues in tests with too-new setuptools versions Aug 7, 2023
@rgommers
Copy link
Member
rgommers commented 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.

@charris
Copy link
Member Author
charris commented 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
Copy link
Member
rgommers commented 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.

charris pushed a commit to charris/numpy that referenced this issue Nov 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
0