Skip to content

New external tool upgrade script #22064

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

Draft
wants to merge 27 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
bdf38dd
Revert "Temporarily remove external_tool_versions script"
grihabor Mar 8, 2025
6d89a14
Explicitly set makeself known_versions
grihabor Mar 8, 2025
7e1cd0d
Replace works, but ugly
grihabor Mar 8, 2025
d12fc79
Preserve original formatting
grihabor Mar 8, 2025
80242df
Add a test
grihabor Mar 8, 2025
1acfe90
Fix the script
grihabor Mar 9, 2025
5f83638
Explicitly set PyenvPythonProviderSubsystem versions
grihabor Mar 9, 2025
4ac147e
Explicitly set PexCli default_known_versions
grihabor Mar 9, 2025
42c1236
Fix Cue version substitution
grihabor Mar 9, 2025
8b1c91a
Fix bugs, set github token
grihabor Mar 9, 2025
d8ba751
Strip tag v prefix in github versions
grihabor Mar 9, 2025
c3c0ccf
Use ExternalToolVersion properly
grihabor Mar 9, 2025
9746a2f
Rename the tool, move to a separate resolve
grihabor Mar 9, 2025
4d863ef
Move python ast code to a separate module
grihabor Mar 9, 2025
1cfa40a
Fix pyenv fetch
grihabor Mar 9, 2025
e73e90b
Add mode option
grihabor Mar 9, 2025
a8de875
Set default mode
grihabor Mar 9, 2025
c87e4c7
Sort known versions in descending order
grihabor Mar 9, 2025
72a0121
Move the test
grihabor Mar 9, 2025
6d78d92
Exclude Protoc
grihabor Mar 10, 2025
bbc4cb1
Fix PexCli versions
grihabor Mar 12, 2025
b930a90
Update comments
grihabor Mar 13, 2025
85c36ae
Add docstring test
grihabor Mar 17, 2025
81b5ae2
Revert pex_cli for now
grihabor Mar 17, 2025
369391d
Fix linters
grihabor Mar 17, 2025
76af2ab
Merge pyenv change from upstream
grihabor Mar 19, 2025
c6840d6
Fix mypy
grihabor Mar 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions 3rdparty/python/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ python_requirements(
resolve="pbs-script",
)

python_requirements(
name="external-tool-upgrade",
source="external-tool-upgrade-requirements.txt",
resolve="external-tool-upgrade",
)

__dependents_rules__(
( # Only the explorer server may depend on these libraries
(
Expand Down
5 changes: 5 additions & 0 deletions 3rdparty/python/external-tool-upgrade-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
packaging>=24.2
requests>=2.28.1
tqdm>=4.67.1
types-requests
types-tqdm
316 changes: 316 additions & 0 deletions 3rdparty/python/external-tool-upgrade.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,316 @@
// This lockfile was autogenerated by Pants. To regenerate, run:
//
// pants generate-lockfiles --resolve=external-tool-upgrade
//
// --- BEGIN PANTS LOCKFILE METADATA: DO NOT EDIT OR REMOVE ---
// {
// "version": 3,
// "valid_for_interpreter_constraints": [
// "CPython==3.11.*"
// ],
// "generated_with_requirements": [
// "packaging>=24.2",
// "requests>=2.28.1",
// "tqdm>=4.67.1",
// "types-requests",
// "types-tqdm"
// ],
// "manylinux": "manylinux2014",
// "requirement_constraints": [],
// "only_binary": [],
// "no_binary": []
// }
// --- END PANTS LOCKFILE METADATA ---

{
"allow_builds": true,
"allow_prereleases": false,
"allow_wheels": true,
"build_isolation": true,
"constraints": [],
"elide_unused_requires_dist": false,
"excluded": [],
"locked_resolves": [
{
"locked_requirements": [
{
"artifacts": [
{
"algorithm": "sha256",
"hash": "ca78db4565a652026a4db2bcdf68f2fb589ea80d0be70e03929ed730746b84fe",
"url": "https://files.pythonhosted.org/packages/38/fc/bce832fd4fd99766c04d1ee0eead6b0ec6486fb100ae5e74c1d91292b982/certifi-2025.1.31-py3-none-any.whl"
},
{
"algorithm": "sha256",
"hash": "3d5da6925056f6f18f119200434a4780a94263f10d1c21d032a6f6b2baa20651",
"url": "https://files.pythonhosted.org/packages/1c/ab/c9f1e32b7b1bf505bf26f0ef697775960db7932abeb7b516de930ba2705f/certifi-2025.1.31.tar.gz"
}
],
"project_name": "certifi",
"requires_dists": [],
"requires_python": ">=3.6",
"version": "2025.1.31"
},
{
"artifacts": [
{
"algorithm": "sha256",
"hash": "d98b1668f06378c6dbefec3b92299716b931cd4e6061f3c875a71ced1780ab85",
"url": "https://files.pythonhosted.org/packages/0e/f6/65ecc6878a89bb1c23a086ea335ad4bf21a588990c3f535a227b9eea9108/charset_normalizer-3.4.1-py3-none-any.whl"
},
{
"algorithm": "sha256",
"hash": "44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3",
"url": "https://files.pythonhosted.org/packages/16/b0/572805e227f01586461c80e0fd25d65a2115599cc9dad142fee4b747c357/charset_normalizer-3.4.1.tar.gz"
},
{
"algorithm": "sha256",
"hash": "4d86f7aff21ee58f26dcf5ae81a9addbd914115cdebcbb2217e4f0ed8982e146",
"url": "https://files.pythonhosted.org/packages/28/a3/a42e70d03cbdabc18997baf4f0227c73591a08041c149e710045c281f97b/charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_i686.whl"
},
{
"algorithm": "sha256",
"hash": "234ac59ea147c59ee4da87a0c0f098e9c8d169f4dc2a159ef720f1a61bbe27cd",
"url": "https://files.pythonhosted.org/packages/37/ed/be39e5258e198655240db5e19e0b11379163ad7070962d6b0c87ed2c4d39/charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl"
},
{
"algorithm": "sha256",
"hash": "237bdbe6159cff53b4f24f397d43c6336c6b0b42affbe857970cefbb620911c8",
"url": "https://files.pythonhosted.org/packages/3d/7b/82865ba54c765560c8433f65e8acb9217cb839a9e32b42af4aa8e945870f/charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_x86_64.whl"
},
{
"algorithm": "sha256",
"hash": "c96836c97b1238e9c9e3fe90844c947d5afbf4f4c92762679acfe19927d81d77",
"url": "https://files.pythonhosted.org/packages/68/85/f4288e96039abdd5aeb5c546fa20a37b50da71b5cf01e75e87f16cd43304/charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_aarch64.whl"
},
{
"algorithm": "sha256",
"hash": "f08ff5e948271dc7e18a35641d2f11a4cd8dfd5634f55228b691e62b37125eb3",
"url": "https://files.pythonhosted.org/packages/71/64/d24ab1a997efb06402e3fc07317e94da358e2585165930d9d59ad45fcae2/charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl"
},
{
"algorithm": "sha256",
"hash": "8bfa33f4f2672964266e940dd22a195989ba31669bd84629f05fab3ef4e2d125",
"url": "https://files.pythonhosted.org/packages/72/80/41ef5d5a7935d2d3a773e3eaebf0a9350542f2cab4eac59a7a4741fbbbbe/charset_normalizer-3.4.1-cp311-cp311-macosx_10_9_universal2.whl"
},
{
"algorithm": "sha256",
"hash": "28bf57629c75e810b6ae989f03c0828d64d6b26a5e205535585f96093e405ed1",
"url": "https://files.pythonhosted.org/packages/7a/28/0b9fefa7b8b080ec492110af6d88aa3dea91c464b17d53474b6e9ba5d2c5/charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl"
},
{
"algorithm": "sha256",
"hash": "09b5e6733cbd160dcc09589227187e242a30a49ca5cefa5a7edd3f9d19ed53fd",
"url": "https://files.pythonhosted.org/packages/85/e4/65699e8ab3014ecbe6f5c71d1a55d810fb716bbfd74f6283d5c2aa87febf/charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_ppc64le.whl"
},
{
"algorithm": "sha256",
"hash": "fd4ec41f914fa74ad1b8304bbc634b3de73d2a0889bd32076342a573e0779e00",
"url": "https://files.pythonhosted.org/packages/88/83/489e9504711fa05d8dde1574996408026bdbdbd938f23be67deebb5eca92/charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"
},
{
"algorithm": "sha256",
"hash": "5777ee0881f9499ed0f71cc82cf873d9a0ca8af166dfa0af8ec4e675b7df48e6",
"url": "https://files.pythonhosted.org/packages/b1/82/8e9fe624cc5374193de6860aba3ea8070f584c8565ee77c168ec13274bd2/charset_normalizer-3.4.1-cp311-cp311-musllinux_1_2_s390x.whl"
},
{
"algorithm": "sha256",
"hash": "eea6ee1db730b3483adf394ea72f808b6e18cf3cb6454b4d86e04fa8c4327a12",
"url": "https://files.pythonhosted.org/packages/c6/c7/32da20821cf387b759ad24627a9aca289d2822de929b8a41b6241767b461/charset_normalizer-3.4.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl"
}
],
"project_name": "charset-normalizer",
"requires_dists": [],
"requires_python": ">=3.7",
"version": "3.4.1"
},
{
"artifacts": [
{
"algorithm": "sha256",
"hash": "946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3",
"url": "https://files.pythonhosted.org/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl"
},
{
"algorithm": "sha256",
"hash": "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9",
"url": "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz"
}
],
"project_name": "idna",
"requires_dists": [
"flake8>=7.1.1; extra == \"all\"",
"mypy>=1.11.2; extra == \"all\"",
"pytest>=8.3.2; extra == \"all\"",
"ruff>=0.6.2; extra == \"all\""
],
"requires_python": ">=3.6",
"version": "3.10"
},
{
"artifacts": [
{
"algorithm": "sha256",
"hash": "09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759",
"url": "https://files.pythonhosted.org/packages/88/ef/eb23f262cca3c0c4eb7ab1933c3b1f03d021f2c48f54763065b6f0e321be/packaging-24.2-py3-none-any.whl"
},
{
"algorithm": "sha256",
"hash": "c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f",
"url": "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz"
}
],
"project_name": "packaging",
"requires_dists": [],
"requires_python": ">=3.8",
"version": "24.2"
},
{
"artifacts": [
{
"algorithm": "sha256",
"hash": "70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6",
"url": "https://files.pythonhosted.org/packages/f9/9b/335f9764261e915ed497fcdeb11df5dfd6f7bf257d4a6a2a686d80da4d54/requests-2.32.3-py3-none-any.whl"
},
{
"algorithm": "sha256",
"hash": "55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760",
"url": "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz"
}
],
"project_name": "requests",
"requires_dists": [
"PySocks!=1.5.7,>=1.5.6; extra == \"socks\"",
"certifi>=2017.4.17",
"chardet<6,>=3.0.2; extra == \"use-chardet-on-py3\"",
"charset-normalizer<4,>=2",
"idna<4,>=2.5",
"urllib3<3,>=1.21.1"
],
"requires_python": ">=3.8",
"version": "2.32.3"
},
{
"artifacts": [
{
"algorithm": "sha256",
"hash": "26445eca388f82e72884e0d580d5464cd801a3ea01e63e5601bdff9ba6a48de2",
"url": "https://files.pythonhosted.org/packages/d0/30/dc54f88dd4a2b5dc8a0279bdd7270e735851848b762aeb1c1184ed1f6b14/tqdm-4.67.1-py3-none-any.whl"
},
{
"algorithm": "sha256",
"hash": "f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2",
"url": "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz"
}
],
"project_name": "tqdm",
"requires_dists": [
"colorama; platform_system == \"Windows\"",
"ipywidgets>=6; extra == \"notebook\"",
"nbval; extra == \"dev\"",
"pytest-asyncio>=0.24; extra == \"dev\"",
"pytest-cov; extra == \"dev\"",
"pytest-timeout; extra == \"dev\"",
"pytest>=6; extra == \"dev\"",
"requests; extra == \"discord\"",
"requests; extra == \"telegram\"",
"slack-sdk; extra == \"slack\""
],
"requires_python": ">=3.7",
"version": "4.67.1"
},
{
"artifacts": [
{
"algorithm": "sha256",
"hash": "25f2cbb5c8710b2022f8bbee7b2b66f319ef14aeea2f35d80f18c9dbf3b60a0b",
"url": "https://files.pythonhosted.org/packages/99/26/645d89f56004aa0ba3b96fec27793e3c7e62b40982ee069e52568922b6db/types_requests-2.32.0.20250306-py3-none-any.whl"
},
{
"algorithm": "sha256",
"hash": "0962352694ec5b2f95fda877ee60a159abdf84a0fc6fdace599f20acb41a03d1",
"url": "https://files.pythonhosted.org/packages/09/1a/beaeff79ef9efd186566ba5f0d95b44ae21f6d31e9413bcfbef3489b6ae3/types_requests-2.32.0.20250306.tar.gz"
}
],
"project_name": "types-requests",
"requires_dists": [
"urllib3>=2"
],
"requires_python": ">=3.9",
"version": "2.32.0.20250306"
},
{
"artifacts": [
{
"algorithm": "sha256",
"hash": "8af97deb8e6874af833555dc1fe0fcd456b1a789470bf6cd8813d4e7ee4f6c5b",
"url": "https://files.pythonhosted.org/packages/22/47/1132d6c02e3bf1a66b7b1a57b8a62e0120f24b31fb770e0f9f3168ccdbfe/types_tqdm-4.67.0.20250301-py3-none-any.whl"
},
{
"algorithm": "sha256",
"hash": "5e89a38ad89b867823368eb97d9f90d2fc69806bb055dde62716a05da62b5e0d",
"url": "https://files.pythonhosted.org/packages/f1/e5/f4b821e6685702587a48af181476955384fc69262fc04f2d74da5602b111/types_tqdm-4.67.0.20250301.tar.gz"
}
],
"project_name": "types-tqdm",
"requires_dists": [
"types-requests"
],
"requires_python": ">=3.9",
"version": "4.67.0.20250301"
},
{
"artifacts": [
{
"algorithm": "sha256",
"hash": "1cee9ad369867bfdbbb48b7dd50374c0967a0bb7710050facf0dd6911440e3df",
"url": "https://files.pythonhosted.org/packages/c8/19/4ec628951a74043532ca2cf5d97b7b14863931476d117c471e8e2b1eb39f/urllib3-2.3.0-py3-none-any.whl"
},
{
"algorithm": "sha256",
"hash": "f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d",
"url": "https://files.pythonhosted.org/packages/aa/63/e53da845320b757bf29ef6a9062f5c669fe997973f966045cb019c3f4b66/urllib3-2.3.0.tar.gz"
}
],
"project_name": "urllib3",
"requires_dists": [
"brotli>=1.0.9; platform_python_implementation == \"CPython\" and extra == \"brotli\"",
"brotlicffi>=0.8.0; platform_python_implementation != \"CPython\" and extra == \"brotli\"",
"h2<5,>=4; extra == \"h2\"",
"pysocks!=1.5.7,<2.0,>=1.5.6; extra == \"socks\"",
"zstandard>=0.18.0; extra == \"zstd\""
],
"requires_python": ">=3.9",
"version": "2.3.0"
}
],
"platform_tag": null
}
],
"only_builds": [],
"only_wheels": [],
"overridden": [],
"path_mappings": {},
"pex_version": "2.33.1",
"pip_version": "25.0.1",
"prefer_older_binary": false,
"requirements": [
"packaging>=24.2",
"requests>=2.28.1",
"tqdm>=4.67.1",
"types-requests",
"types-tqdm"
],
"requires_python": [
"==3.11.*"
],
"resolver_version": "pip-2020-resolver",
"style": "universal",
"target_systems": [
"linux",
"mac"
],
"transitive": true,
"use_pep517": null,
"use_system_time": false
}
Loading
Loading