cool-easter-32542
05/14/2024, 1:56 AM[pex].emit_warnings option (https://www.pantsbuild.org/2.20/reference/subsystems/pex#emit_warnings) to be able to surface more warnings from PEX, but building internal PEXes for builtin tools can show the warnings. Users can't do anything about them. This option is thus off by default.
For instance:
cd $(mktemp -d)
cat > pants.toml <<EOF
[GLOBAL]
pants_version = "2.22.0.dev1"
backend_packages = []
[pex]
emit_warnings = true
EOF
touch BUILD
pants update-build-files ::
Running that shows:
11:59:12.71 [INFO] waiting for pantsd to start...
11:59:13.23 [INFO] pantsd started
11:59:13.54 [INFO] Initializing scheduler...
11:59:13.92 [INFO] Scheduler initialized.
11:59:16.88 [WARN] /Users/huon/.cache/pants/named_caches/pex_root/installed_wheels/8d43c1ed16877f3d2ed39e5ef3e92aa8885d4427cd7d9ce62683c922a5c0cd07/pex-2.3.1-py2.py3-none-any.whl/pex/bin/pex.py:947: PEXWarning: Could not calculate a targeted shebang for:
cp310-cp310-macosx_14_0_arm64 interpreter at /Users/huon/.pyenv/versions/3.10.1/bin/python3.10
cp310-cp310-macosx_14_0_arm64 interpreter at /Users/huon/.pyenv/versions/3.10.4/bin/python3.10
cp310-cp310-macosx_14_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_14_0_arm64 interpreter at /Users/huon/.pyenv/versions/3.11.0/bin/python3.11
cp311-cp311-macosx_14_0_arm64 interpreter at /opt/homebrew/Cellar/python@3.11/3.11.9/Frameworks/Python.framework/Versions/3.11/bin/python3.11
cp312-cp312-macosx_14_0_arm64 interpreter at /Users/huon/.pyenv/versions/3.12.0/bin/python3.12
cp312-cp312-macosx_14_0_arm64 interpreter at /opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/bin/python3.12
cp37-cp37m-macosx_14_0_arm64 interpreter at /Users/huon/.pyenv/versions/3.7.13/bin/python3.7
cp38-cp38-macosx_14_0_arm64 interpreter at /Users/huon/.pyenv/versions/3.8.7/bin/python3.8
cp38-cp38-macosx_14_0_arm64 interpreter at /opt/homebrew/Cellar/python@3.8/3.8.19/Frameworks/Python.framework/Versions/3.8/bin/python3.8
cp39-cp39-macosx_14_0_arm64 interpreter at /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/bin/python3.9
cp39-cp39-macosx_14_0_arm64 interpreter at /Users/huon/.pyenv/versions/3.9.1/bin/python3.9
cp39-cp39-macosx_14_0_arm64 interpreter at /Users/huon/.pyenv/versions/3.9.10/bin/python3.9
cp39-cp39-macosx_14_0_arm64 interpreter at /Users/huon/.pyenv/versions/3.9.17/bin/python3.9
cp39-cp39-macosx_14_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(
11:59:16.95 [INFO] Starting: Building black.pex from <resource://pants.backend.python.lint.black/black.lock>
11:59:18.13 [INFO] Completed: Building black.pex from <resource://pants.backend.python.lint.black/black.lock>
11:59:18.54 [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/2.22/docs/releases/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, 2.21, 2.22
This was previously shown by default, which was a regression between that and 2.20.0.dev7 likely related to #20480.
• https://github.com/pantsbuild/pants/releases/tag/release_2.20.0a0
• release_2.20.0.dev7...release_2.20.0a0
We turned down the default level in #20590.
OS
macOS
Additional info
N/A
pantsbuild/pantscool-easter-32542
05/14/2024, 1:56 AMcool-easter-32542
05/14/2024, 1:57 AM