fix: pin pip on GraalPy (#2955)
This commit is contained in:
@@ -55,7 +55,8 @@ pefile==2024.8.26
|
|||||||
# via
|
# via
|
||||||
# abi3audit
|
# abi3audit
|
||||||
# delvewheel
|
# delvewheel
|
||||||
pip==26.1.2; implementation_name != "graalpy" or platform_system != "Windows"
|
pip==26.1.2; implementation_name != "graalpy"
|
||||||
|
pip==26.1.2; implementation_name == "graalpy" and platform_system != "Windows"
|
||||||
pip==26.0.1; implementation_name == "graalpy" and platform_system == "Windows"
|
pip==26.0.1; implementation_name == "graalpy" and platform_system == "Windows"
|
||||||
# via -r cibuildwheel/resources/constraints.in
|
# via -r cibuildwheel/resources/constraints.in
|
||||||
pkgconf==3.0.1.post0
|
pkgconf==3.0.1.post0
|
||||||
|
|||||||
+15
-8
@@ -70,18 +70,21 @@ def tests(session: nox.Session) -> None:
|
|||||||
# GraalPy (matching `graalpy_marker`) gets `held`, everything else
|
# GraalPy (matching `graalpy_marker`) gets `held`, everything else
|
||||||
# (`other_marker`) tracks the freshly compiled version.
|
# (`other_marker`) tracks the freshly compiled version.
|
||||||
GRAALPY_HELD_BACK = (
|
GRAALPY_HELD_BACK = (
|
||||||
# Newer pip breaks GraalPy on Windows.
|
# Newer pip breaks GraalPy on macOS and Windows.
|
||||||
{
|
{
|
||||||
"package": "pip",
|
"package": "pip",
|
||||||
"held": "26.0.1",
|
"held": ("26.1.2", "26.0.1"),
|
||||||
"graalpy_marker": 'implementation_name == "graalpy" and platform_system == "Windows"',
|
"graalpy_marker": (
|
||||||
"other_marker": 'implementation_name != "graalpy" or platform_system != "Windows"',
|
'implementation_name == "graalpy" and platform_system != "Windows"',
|
||||||
|
'implementation_name == "graalpy" and platform_system == "Windows"',
|
||||||
|
),
|
||||||
|
"other_marker": 'implementation_name != "graalpy"',
|
||||||
},
|
},
|
||||||
# filelock >=3.30 imports errno.ENOTSUP, which GraalPy lacks (fix due ~2026-08).
|
# filelock >=3.30 imports errno.ENOTSUP, which GraalPy lacks (fix due ~2026-08).
|
||||||
{
|
{
|
||||||
"package": "filelock",
|
"package": "filelock",
|
||||||
"held": "3.29.7",
|
"held": ("3.29.7",),
|
||||||
"graalpy_marker": 'implementation_name == "graalpy"',
|
"graalpy_marker": ('implementation_name == "graalpy"',),
|
||||||
"other_marker": 'implementation_name != "graalpy"',
|
"other_marker": 'implementation_name != "graalpy"',
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
@@ -90,11 +93,15 @@ GRAALPY_HELD_BACK = (
|
|||||||
def _pin_graalpy_workarounds(output_file: Path) -> None:
|
def _pin_graalpy_workarounds(output_file: Path) -> None:
|
||||||
text = output_file.read_text()
|
text = output_file.read_text()
|
||||||
for pin in GRAALPY_HELD_BACK:
|
for pin in GRAALPY_HELD_BACK:
|
||||||
|
assert isinstance(pin["package"], str)
|
||||||
package = re.escape(pin["package"])
|
package = re.escape(pin["package"])
|
||||||
|
graalpy_pins = "\n".join(
|
||||||
|
f"{pin['package']}=={pin['held'][i]}; {pin['graalpy_marker'][i]}"
|
||||||
|
for i in range(len(pin["held"]))
|
||||||
|
)
|
||||||
text = re.sub(
|
text = re.sub(
|
||||||
rf"^{package}==(?P<version>[^\s;]+)$",
|
rf"^{package}==(?P<version>[^\s;]+)$",
|
||||||
f"{pin['package']}==\\g<version>; {pin['other_marker']}\n"
|
f"{pin['package']}==\\g<version>; {pin['other_marker']}\n{graalpy_pins}",
|
||||||
f"{pin['package']}=={pin['held']}; {pin['graalpy_marker']}",
|
|
||||||
text,
|
text,
|
||||||
flags=re.MULTILINE,
|
flags=re.MULTILINE,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user