gentle-oil-40187
08/12/2025, 5:54 PM./pants run build-support/bin/generate_builtin_lockfiles.py -- pytest
The pip_version changes to 20.3.4-patched instead of changing to the expected 25.1.1. This started happening midway during my development. I checked out the last commit I had where the lockfile had "pip_version": "25.1.1", and tried regenerating the lockfile (without any code changes) - the pip_version changed to the patched version again, making me think something has changed within my dev environment. Any ideas what could be triggering this? generate_builtin_lockfiles.py sets --python-pip-version=latest, so surprised this isn't carrying over to the lockfile generation.
cc @happy-kitchen-89482fast-nail-55400
08/12/2025, 6:01 PMbuild-support/bin/generate_builtin_lockfiles.py, it creates a temporary buildroot and runs from there (i.e., it does not use the main Pants pants.toml)fast-nail-55400
08/12/2025, 6:01 PMfast-nail-55400
08/12/2025, 6:01 PMfast-nail-55400
08/12/2025, 6:02 PMfast-nail-55400
08/12/2025, 6:03 PMfast-nail-55400
08/12/2025, 6:03 PMgentle-oil-40187
08/12/2025, 6:03 PMfast-nail-55400
08/12/2025, 6:04 PMlatest)fast-nail-55400
08/12/2025, 6:05 PM20.3.4-patched is the pip version vendored inside pex.gentle-oil-40187
08/12/2025, 6:05 PMfast-nail-55400
08/12/2025, 6:07 PMgentle-oil-40187
08/12/2025, 6:07 PM20.3.4-patched is the vendored version, but I'm not sure why two weeks ago I was seeing 25.1.1 as the pip version in the lockfile, and in prod the version is 24.2 so it seems like it's expected that the vendored version get's overriden in favor of latest versionfast-nail-55400
08/12/2025, 6:08 PMfast-nail-55400
08/12/2025, 6:08 PM--keep-sandboxes=always to the Pants command run by the script and should be available then)gentle-oil-40187
08/12/2025, 6:19 PM['lock', 'create', '--tmpdir', '.tmp', '--no-emit-warnings', '--python-path', '/Users/ben.wilen/.pyenv/versions/2.7.18/bin:/Users/ben.wilen/.pyenv/versions/3.10.13/bin:/Users/ben.wilen/.pyenv/versions/3.11.9/bin:/Users/ben.wilen/.pyenv/versions/3.12.10/bin:/Users/ben.wilen/.pyenv/versions/3.8.18/bin:/Users/ben.wilen/.pyenv/versions/3.9.18/bin:/private/var/folders/t7/1d_xfv9s5nl33bs1sf_p5p1c0000gp/T/pants-sandbox-c2UKpM/.cache/pex_root/venvs/1/c103e30403fc818218c3301254360719661cbbea/5380d517d90ca2de95dd5b43313c6bedfe87c47f/bin:/Users/ben.wilen/.cache/pants/pants_dev_deps/fe2d7dc6846a5cbc52083d73263bec9cf29e69e3.venv/bin:/Users/ben.wilen/.cargo/bin:/Users/ben.wilen/.pyenv/shims:/opt/homebrew/opt/virtualenv/bin:/Users/ben.wilen/dd/data-eng-tools/bin:/Users/ben.wilen/go/bin:/Users/ben.wilen/dd/devtools/bin:/opt/homebrew/opt/coreutils/libexec/gnubin:/Users/ben.wilen/.rbenv/shims:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/usr/local/munki:/Users/ben.wilen/.volta/bin:/opt/homebrew/opt/scala@2.12//bin:/usr/local/src/spark-3.4.2-bin-hadoop3/bin', '--output=lock.json', '--style=universal', '--pip-version', 'latest', '--resolver-version', 'pip-2020-resolver', '--preserve-pip-download-log', 'pex-pip-download.log', '--target-system', 'linux', '--target-system', 'mac', '--indent=2', '--python-path=/Users/ben.wilen/.pyenv/versions/3.8.18/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8', '--no-pypi', '--index=<https://pypi.org/simple/>', '--manylinux', 'manylinux2014', '--interpreter-constraint', 'CPython<4,>=3.8', 'pytest-cov!=2.12.1,<3.1,>=2.12', 'pytest-xdist<3,>=2.5', 'pytest==8.3.5']gentle-oil-40187
08/12/2025, 6:25 PM--python-path=/Users/ben.wilen/.pyenv/versions/3.8.18/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8. I changed this to 3.9 in my shell and now seeing the correct pip version. Let me run a few more tests and confirm!gentle-oil-40187
08/12/2025, 6:25 PMfast-nail-55400
08/12/2025, 6:27 PMfast-nail-55400
08/12/2025, 6:27 PMfast-nail-55400
08/12/2025, 6:28 PMfast-nail-55400
08/12/2025, 6:28 PMfast-nail-55400
08/12/2025, 6:29 PMgentle-oil-40187
08/12/2025, 6:48 PMalso, is there any negative effect from having the tool lockfiles generated with Pex's vendored pip?Yeah, looks like that pip_version is incompatible with Python 3.12+
The Pip requested was pip@ git+<https://github.com/pex-tool/pip@6e5e5a40c9fc8622f5a3e4c9b173b018bf089cb9> but it does not work with the interpreter selected which is CPython 3.12.10 at /Users/ben.wilen/.pyenv/versions/3.12.10/bin/python3.12. Pip 20.3.4-patched requires Python <3.12.fast-nail-55400
08/12/2025, 6:53 PMfast-nail-55400
08/12/2025, 6:54 PMgentle-oil-40187
08/12/2025, 7:02 PM