<#20577 2.20 shows warnings when building internal...
# github-notifications
c
#20577 2.20 shows warnings when building internal PEXes(?) that seem useless Issue created by huonw Describe the bug In 2.20.x, we're starting to surface more warnings from PEX, which is good, except we seem to be surfacing them even when the user cannot do anything. For instance:
Copy code
cd $(mktemp -d)

cat > pants.toml <<EOF
[GLOBAL]
pants_version = "2.20.0a0"

backend_packages = []
EOF

touch BUILD

pants update-build-files ::
Running that shows:
Copy code
12:48:05.59 [INFO] Initializing scheduler...
12:48:05.78 [INFO] Scheduler initialized.
12:48:07.51 [WARN] /Users/huon/.cache/pants/named_caches/pex_root/installed_wheels/f6be30daab16fbf2c33f0b373caba4bd29f0bbe4ad2245bc2860796d5b1ce49a/pex-2.1.163-py2.py3-none-any.whl/pex/pip/installation.py:235: PEXWarning: The Pip requested for PEX building was pip==23.1.2 but it does not work with 1 out of the 14 targets selected.

Pip 23.1.2 requires Python <3.12,>=3.7 and the following target does not apply:
1. /Users/huon/.pyenv/versions/3.12.0/bin/python3.12

Using Pip 23.2 instead.
  pex_warnings.warn(
/Users/huon/.cache/pants/named_caches/pex_root/installed_wheels/f6be30daab16fbf2c33f0b373caba4bd29f0bbe4ad2245bc2860796d5b1ce49a/pex-2.1.163-py2.py3-none-any.whl/pex/bin/pex.py:923: PEXWarning: Could not calculate a targeted shebang for:
cp310-cp310-macosx_12_0_arm64 interpreter at /Users/huon/.pyenv/versions/3.10.1/bin/python3.10
cp310-cp310-macosx_12_0_arm64 interpreter at /Users/huon/.pyenv/versions/3.10.4/bin/python3.10
cp310-cp310-macosx_12_0_arm64 interpreter at /opt/homebrew/Cellar/python@3.10/3.10.12_1/Frameworks/Python.framework/Versions/3.10/bin/python3.10
cp311-cp311-macosx_12_0_arm64 interpreter at /Users/huon/.pyenv/versions/3.11.0/bin/python3.11
cp311-cp311-macosx_12_0_arm64 interpreter at /opt/homebrew/Cellar/python@3.11/3.11.6/Frameworks/Python.framework/Versions/3.11/bin/python3.11
cp312-cp312-macosx_12_0_arm64 interpreter at /Users/huon/.pyenv/versions/3.12.0/bin/python3.12
cp37-cp37m-macosx_12_0_arm64 interpreter at /Users/huon/.pyenv/versions/3.7.13/bin/python3.7
cp38-cp38-macosx_12_0_arm64 interpreter at /Users/huon/.pyenv/versions/3.8.7/bin/python3.8
cp38-cp38-macosx_12_0_arm64 interpreter at /opt/homebrew/Cellar/python@3.8/3.8.17_1/Frameworks/Python.framework/Versions/3.8/bin/python3.8
cp39-cp39-macosx_12_0_arm64 interpreter at /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/bin/python3.9
cp39-cp39-macosx_12_0_arm64 interpreter at /Users/huon/.pyenv/versions/3.9.1/bin/python3.9
cp39-cp39-macosx_12_0_arm64 interpreter at /Users/huon/.pyenv/versions/3.9.10/bin/python3.9
cp39-cp39-macosx_12_0_arm64 interpreter at /Users/huon/.pyenv/versions/3.9.17/bin/python3.9
cp39-cp39-macosx_12_0_arm64 interpreter at /Users/huon/.pyenv/versions/3.9.7/bin/python3.9

Using shebang: #!/usr/bin/env python3.7
If this is not appropriate, you can specify a custom shebang using the --python-shebang option.
  pex_warnings.warn(

12:48:08.93 [INFO] No required changes to BUILD files found.However, there may still be deprecations that `update-build-files` doesn't know how to fix. See <https://www.pantsbuild.org/v2.20/docs/upgrade-tips> for upgrade tips.
There's a big chunk of PEX warnings, that I don't think I as a normal user can do anything to silence as they seem to be about some PEXes that pants is building internally. (I could change the interpreters I have installed, but that doesn't seem appropriate.) Pants version 2.20.0a0 This seems to be a regression between that and 2.20.0.dev7 likely related to #20480. • https://github.com/pantsbuild/pants/releases/tag/release_2.20.0a0release_2.20.0.dev7...release_2.20.0a0 OS macOS Additional info N/A pantsbuild/pants