-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Post a deprecation warning for distutils configs #10218
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
Conversation
Since we can't do anything about them in the transition (CPython is dropping support for those entirely), there's nothing we can do but to tell users to not use them. This also accounts for Homebrew and Linuxbrew for now. Hopefully they will come up with better solutions that don't trigger the location mismatch warning.
16eb9dd
to
dac6068
Compare
Pinging people reported this in #10151 for testing. Use this to install pip from this PR:
@ayusha98 @getcake @jakobbg @janesmae @joelfrederico @luckman212 @ondohotola @q2r5 @tg @thehiddenone @timecode @weaselskinghenry @webdeck @yermulnik @zhovner |
Note: You will still see a warning, but it should say |
Seems like error persists.
|
@jakobbg You need to install a version of pip patched with this PR - the PR hasn't been merged or released yet. |
Yes, sorry for the confusion. I have updated my previous comment to include the instruction. |
@uranusjr Would installing patched version of Thanks for looking into this. |
If you’re seeing the warning message presented in #10151, you are already not running Linuxbrew’s pip installation (or perhaps it means Linuxbrew doesn’t patch pip at all in the first place, I honestly have no idea), so in any case you wouldn’t break anything beyond what they are right now. An alternative way to test this, if you really don’t want to install things into your brewed Python, is |
The command which produced warnings for me was:
And same for when I use So I used Looks good, right? |
@yermulnik Yup, lgtm. Thanks for trying this out! |
Pinging people reported this in #10151 for testing. Use this to install pip from this PR:
2021-07-28 08:56:00+0800: @noplanman @akhst7 @dchassin @EGOBrainiac 2021-07-30 09:17:00+0800: @retorquere @PompeiaPaetenari @lgeiger @drossqfd @Kevinoh47 @nskobelevs @intelliot You will still see a warning, but it should say DEPRECATION instead of WARNING and tell you to visit a Homebrew issue. This is because Homebrew is doing something that will soon be deprecated, and pip needs it to fix things on their side. |
I still get a warning on M1 Apple Silicon Macbook Air:
|
Installed using: python3 -m pip install --upgrade --user https://github.com/uranusjr/pip/archive/refs/heads/locations-distutils-cfg-warning.zip
Collecting https://github.com/uranusjr/pip/archive/refs/heads/locations-distutils-cfg-warning.zip
Downloading https://github.com/uranusjr/pip/archive/refs/heads/locations-distutils-cfg-warning.zip
| 9.2 MB 885 kB/s
WARNING: Value for prefixed-purelib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /private/var/folders/65/vgssmjps1wj8j28cpfxsr2zw0000gn/T/pip-build-env-g8yyf_04/normal/lib/python3.8/site-packages
sysconfig: /Library/Python/3.8/site-packages
WARNING: Value for prefixed-platlib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /private/var/folders/65/vgssmjps1wj8j28cpfxsr2zw0000gn/T/pip-build-env-g8yyf_04/normal/lib/python3.8/site-packages
sysconfig: /Library/Python/3.8/site-packages
WARNING: Additional context:
user = False
home = None
root = None
prefix = '/private/var/folders/65/vgssmjps1wj8j28cpfxsr2zw0000gn/T/pip-build-env-g8yyf_04/normal'
WARNING: Value for prefixed-purelib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /private/var/folders/65/vgssmjps1wj8j28cpfxsr2zw0000gn/T/pip-build-env-g8yyf_04/overlay/lib/python3.8/site-packages
sysconfig: /Library/Python/3.8/site-packages
WARNING: Value for prefixed-platlib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /private/var/folders/65/vgssmjps1wj8j28cpfxsr2zw0000gn/T/pip-build-env-g8yyf_04/overlay/lib/python3.8/site-packages
sysconfig: /Library/Python/3.8/site-packages
WARNING: Additional context:
user = False
home = None
root = None
prefix = '/private/var/folders/65/vgssmjps1wj8j28cpfxsr2zw0000gn/T/pip-build-env-g8yyf_04/overlay'
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Building wheels for collected packages: pip
Building wheel for pip (PEP 517) ... done
Created wheel for pip: filename=pip-21.3.dev0-py3-none-any.whl size=1552819 sha256=6914313b9c2822fd70dac23ce63e3a5a56bf093740c3ad1a350af682f39c28ba
Stored in directory: /Users/gtrabanco/Library/Caches/pip/wheels/ae/9b/f4/420a66e1382bc125fa909f9fb1a9db0a1212dabf3616840bcd
Successfully built pip
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 21.2.1
Uninstalling pip-21.2.1:
Successfully uninstalled pip-21.2.1
WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /Users/gtrabanco/Library/Python/3.8/include/python3.8/pip
sysconfig: /Users/gtrabanco/Library/Python/3.8/include/pip
WARNING: Additional context:
user = True
home = None
root = None
prefix = None
WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /Users/gtrabanco/Library/Python/3.8/include/python3.8/UNKNOWN
sysconfig: /Users/gtrabanco/Library/Python/3.8/include/UNKNOWN
Successfully installed pip-21.3.dev0 Now when executing: python3 -m pip install --upgrade --user pip System: MacOS Big Sur 11.4 using zsh shell (5.8) Show no errors... So seems that this worked fine. Thanks @uranusjr for the patch! |
This accounts to the Homebrew/Linuxbrew part of #10208.
Since we can't do anything about them in the transition (CPython is dropping support for those entirely), there's nothing we can do but to tell users to not use them.
This also accounts for Homebrew and Linuxbrew for now. Hopefully they will come up with better solutions that don't trigger the location mismatch warning.