Skip to content
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

setuptools.command.test deprecated (is now a stub) #105

Closed
vishwin opened this issue Aug 11, 2024 · 5 comments
Closed

setuptools.command.test deprecated (is now a stub) #105

vishwin opened this issue Aug 11, 2024 · 5 comments

Comments

@vishwin
Copy link

vishwin commented Aug 11, 2024

suds/setup.py

Line 411 in ff8a698

from setuptools.command.test import (normalize_path as _normalize_path,

package now fails to build because setuptools.command.test became a stub to serve as a softer but still forceful deprecation notice, see pypa/setuptools#4522 pypa/setuptools#4519 pypa/setuptools#4520

@phillbaker
Copy link
Member

phillbaker commented Aug 13, 2024 via email

@vishwin
Copy link
Author

vishwin commented Aug 13, 2024

The stub refers to 72.1.0. The error here becomes an ImportError on _normalize_path rather than an outright not found on setuptools.command.test, so building still fails.

@vishwin
Copy link
Author

vishwin commented Aug 13, 2024

Still fails on 72.2.0.

@phillbaker
Copy link
Member

phillbaker commented Aug 13, 2024 via email

@vishwin
Copy link
Author

vishwin commented Aug 13, 2024

In this case setup.py config, but literally any setup.py invocation will fail in the same manner, simply because the referenced code exists.

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "setup.py", line 509, in <module>
    from setuptools.command.test import (normalize_path as _normalize_path,
ImportError: cannot import name 'normalize_path' from 'setuptools.command.test' (/usr/local/lib/python3.11/site-packages/setuptools/command/test.py)

The entire testing "framework" in setup.py needs removed in order to fix this. pytest et al can and should be invoked outside of setuptools anyway.

phillbaker added a commit that referenced this issue Aug 20, 2024
`setuptools.command.test` after version 72 of setuptools has been replaced with a stub. Due to this, imports like `from setuptools.command.test import ...` no longer work. Since setup.py test has been deprecated for years, remove it in favor of directly installing dependencies and invoking pytest locally and in CI.

Closes #105
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants