GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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

New issue
Copy link
New issue
Copy link
Closed
#24354
Closed
Deprecation issues in tests with too-new setuptools versions#24350
#24354
Copy link
Labels
17 - Taskcomponent: numpy.distutils

Description

@charris
charris
opened on Aug 6, 2023
Issue body actions

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

  1. charris commented on Aug 6, 2023

    @charris
    charris
    on Aug 6, 2023
    MemberAuthor
    More actions

    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'

  2. charris commented on Aug 7, 2023

    @charris
    charris
    on Aug 7, 2023
    MemberAuthor
    More actions

    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.

  3. rgommers commented on Aug 7, 2023

    @rgommers
    rgommers
    on Aug 7, 2023
    Member
    More actions

    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.

    Reacted by Na Zhang
  4. rgommers
    changed the title [-]Deprecation issues with meson builds[/-] [+]Deprecation issues in tests with too-new setuptools versions[/+] on Aug 7, 2023
  5. rgommers
    added
    17 - Task
    component: numpy.distutils
    on Aug 7, 2023
  6. rgommers commented on Aug 7, 2023

    @rgommers
    rgommers
    on Aug 7, 2023
    Member
    More actions

    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.

  7. rgommers
    added a commit that references this issue on Aug 7, 2023

    TST: fix distutils tests for deprecations in recent setuptools versions

    This issue will close once commit aca2429 is merged into the 'main' branch.
    aca2429
  8. charris
    closed this as completedin #24354on Aug 7, 2023
  9. charris
    added a commit that references this issue on Aug 7, 2023

    TST: fix distutils tests for deprecations in recent setuptools versions

    This issue will close once commit 89b62c5 is merged into the 'main' branch.
    89b62c5
  10. charris commented on Aug 7, 2023

    @charris
    charris
    on Aug 7, 2023
    MemberAuthor
    More actions

    @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.

  11. rgommers commented on Aug 7, 2023

    @rgommers
    rgommers
    on Aug 7, 2023
    Member
    More actions

    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.

  12. charris
    added a commit that references this issue on Nov 11, 2023

    TST: fix distutils tests for deprecations in recent setuptools versions

    This issue will close once commit ce036a9 is merged into the 'main' branch.
    ce036a9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    17 - Taskcomponent: numpy.distutils

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.