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

[BUG] 75.x.x cannot import config from distutils #4654

Closed
thehesiod opened this issue Sep 20, 2024 · 2 comments
Closed

[BUG] 75.x.x cannot import config from distutils #4654

thehesiod opened this issue Sep 20, 2024 · 2 comments
Labels
bug Needs Triage Issues that need to be evaluated for severity and status.

Comments

@thehesiod
Copy link

setuptools version

75.0.0

Python version

python3.11

OS

Windows 11 WSL 2 Debian

Additional environment information

No response

Description

all the recent 75.x.x versions introduced an error which prevents pipenv locking from working on projects which were setting the DEFAULT_REPOSITORY:

from distutils import config
config.PyPIRCCommand.DEFAULT_REPOSITORY = 'internal'

with the error:

 "ImportError: cannot import name 'config' from 'distutils' (/home/amohr/venv/lib/python3.11/site-packages/setuptools/_distutils/__init__.py)\n"

I didn't see any release notes about 75.x stating this functionality had been removed. Was this functionality removed on purpose?

Expected behavior

no error

How to Reproduce

create package with above source in the setup.py

Output

 "ImportError: cannot import name 'config' from 'distutils' (/home/amohr/venv/lib/python3.11/site-packages/setuptools/_distutils/__init__.py)\n"
@thehesiod thehesiod added bug Needs Triage Issues that need to be evaluated for severity and status. labels Sep 20, 2024
@thehesiod
Copy link
Author

thehesiod commented Sep 20, 2024

fyi we use this to prevent devs from accidentally uploading internal packages to the public pypi repo

@abravalheri
Copy link
Contributor

abravalheri commented Sep 21, 2024

I didn't see any release notes about 75.x stating this functionality had been removed. Was this functionality removed on purpose?

Hi @thehesiod , this is mentioned in the changelogs

v75.0.0
...
Deprecations and Removal
..

Merge with pypa/distutils@7283751. Removed the register and upload commands and the config module that backs them (pypa/distutils#294).

Because setuptools and distutils no longer handle uploads (as deprecated for a while), this module no longer provides any functionality for setuptools/distutils themselves and was removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Needs Triage Issues that need to be evaluated for severity and status.
Projects
None yet
Development

No branches or pull requests

2 participants