From c4da9bae1d9a494c77c4af32483cd95c7c45a786 Mon Sep 17 00:00:00 2001 From: John Sirois Date: Wed, 21 Feb 2024 20:11:36 -0800 Subject: [PATCH 1/2] Upgrade to 3.13.0a4. It was released on February 15th: https://www.python.org/downloads/release/python-3130a4/ --- docker/base/install_pythons.sh | 12 ++++++++++-- pex/interpreter_constraints.py | 5 ++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/docker/base/install_pythons.sh b/docker/base/install_pythons.sh index 7cca4b7f6..87d9ed8cf 100755 --- a/docker/base/install_pythons.sh +++ b/docker/base/install_pythons.sh @@ -2,8 +2,16 @@ set -xeuo pipefail +# TODO(John Sirois): Delete this definition when we upgarde past 3.13.0a4. Pyenv needed to revert +# 3.13.0a4 due to Mac build issues which don't affect us. +# See: +# + https://github.com/pyenv/pyenv/pull/2903 +# + https://github.com/pyenv/pyenv/commit/f9a2bb81b69bc2fc45753f7da5d246bc2706f01d +PYENV_SHA=932dc464f5550e3c6af7f705891c1797c4ab004d + export PYENV_ROOT=/pyenv + # N.B.: The 1st listed version will supply the default `python` on the PATH; otherwise order does # not matter. PYENV_VERSIONS=( @@ -16,7 +24,7 @@ PYENV_VERSIONS=( 3.9.18 3.10.13 3.12.2 - 3.13.0a3 + 3.13.0a4 pypy2.7-7.3.15 pypy3.5-7.0.0 pypy3.6-7.3.3 @@ -27,7 +35,7 @@ PYENV_VERSIONS=( ) git clone https://github.com/pyenv/pyenv.git "${PYENV_ROOT}" && ( - cd "${PYENV_ROOT}" && src/configure && make -C src + cd "${PYENV_ROOT}" && git checkout "${PYENV_SHA:-HEAD}" && src/configure && make -C src ) PATH="${PATH}:${PYENV_ROOT}/bin" diff --git a/pex/interpreter_constraints.py b/pex/interpreter_constraints.py index 1dab16c21..da267b58c 100644 --- a/pex/interpreter_constraints.py +++ b/pex/interpreter_constraints.py @@ -317,12 +317,11 @@ def iter_compatible_versions( PythonVersion(Lifecycle.EOL, 3, 5, 10), PythonVersion(Lifecycle.EOL, 3, 6, 15), PythonVersion(Lifecycle.EOL, 3, 7, 17), - # ^-- EOL --^ PythonVersion(Lifecycle.STABLE, 3, 8, 18), PythonVersion(Lifecycle.STABLE, 3, 9, 18), PythonVersion(Lifecycle.STABLE, 3, 10, 13), - PythonVersion(Lifecycle.STABLE, 3, 11, 7), - PythonVersion(Lifecycle.STABLE, 3, 12, 1), + PythonVersion(Lifecycle.STABLE, 3, 11, 8), + PythonVersion(Lifecycle.STABLE, 3, 12, 2), PythonVersion(Lifecycle.DEV, 3, 13, 0), ) From 141d5076e295ada0778bbfb7bf4e6725b7e2608d Mon Sep 17 00:00:00 2001 From: John Sirois Date: Thu, 22 Feb 2024 10:09:16 -0800 Subject: [PATCH 2/2] Skip test_wheel_file_url_dep for exactly 3.13.0a4. --- tests/integration/test_issue_2038.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/integration/test_issue_2038.py b/tests/integration/test_issue_2038.py index 58dd4e205..0a58e5494 100644 --- a/tests/integration/test_issue_2038.py +++ b/tests/integration/test_issue_2038.py @@ -20,8 +20,14 @@ @pytest.mark.skipif( - sys.version_info[:2] < (3, 7), - reason="This test needs to run Poetry which requires at least Python 3.7", + sys.version_info[:2] < (3, 7) or sys.version_info == (3, 13, 0, "alpha", 4), + reason=( + "This test needs to run Poetry which requires at least Python 3.7. " + "Poetry also indirectly depends on msgpack (1.0.7 currently), which uses the " + "_PyCFunctionFastWithKeywords ~private CPython API which was mistakenly yanked (typo) by " + "https://github.com/python/cpython/pull/114627 just before the 3.13.0a4 release and " + "restored by https://github.com/python/cpython/pull/115561 just after." + ), ) def test_wheel_file_url_dep(tmpdir): # type: (Any) -> None