Skip to content

feat: adding pypy-eol enable group #2393

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

Merged
merged 1 commit into from
May 15, 2025

Conversation

henryiii
Copy link
Contributor

@henryiii henryiii force-pushed the henryiii/feat/pypy-eol branch 2 times, most recently from f61a0e1 to 7d5c6aa Compare May 14, 2025 14:06
Signed-off-by: Henry Schreiner <[email protected]>
@henryiii henryiii force-pushed the henryiii/feat/pypy-eol branch from 7d5c6aa to 9ba08a9 Compare May 14, 2025 18:13
@henryiii henryiii marked this pull request as ready for review May 14, 2025 18:45
@henryiii henryiii requested a review from Copilot May 14, 2025 19:19
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new enable group ("pypy-eol") for end-of-life PyPy versions and updates the build selection logic, tests, docs, and schema accordingly.

  • Updated test cases to cover the new "pypy-eol" group behavior.
  • Modified the BuildSelector logic to separate active PyPy builds from EoL builds.
  • Updated documentation and schema definitions to include the new option.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
unit_test/option_prepare_test.py Added "pypy-eol" to the enable list for cibuildwheel configuration.
unit_test/build_selector_test.py Adjusted test cases to validate build selection for PyPy and PyPyEoL builds.
test/utils.py Updated expected wheel tags ordering based on PyPyEoL and PyPy conditions.
docs/options.md Documented the new "pypy-eol" option for enabling EoL PyPy builds.
cibuildwheel/selector.py Revised build selection conditions to distinguish between PyPy and PyPyEoL builds.
cibuildwheel/resources/cibuildwheel.schema.json Added "pypy-eol" to the schema for valid configuration options.
Comments suppressed due to low confidence (1)

unit_test/build_selector_test.py:92

  • [nitpick] Consider renaming this test function to a more descriptive name (e.g., 'test_build_selector_skip') to clearly convey its purpose.
def test_skip():

@@ -87,7 +88,9 @@ def __call__(self, build_id: str) -> bool:
return False
if EnableGroup.CPythonPrerelease not in self.enable and fnmatch(build_id, "cp314*"):
return False
if EnableGroup.PyPy not in self.enable and fnmatch(build_id, "pp*"):
if EnableGroup.PyPy not in self.enable and fnmatch(build_id, "pp31*"):
Copy link
Preview

Copilot AI May 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding an inline comment to clarify that 'pp31*' is intended to match active PyPy versions, separating them clearly from PyPyEoL builds.

Copilot uses AI. Check for mistakes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd agree with Copilot on this one!

Suggested change
if EnableGroup.PyPy not in self.enable and fnmatch(build_id, "pp31*"):
if EnableGroup.PyPy not in self.enable and fnmatch(build_id, "pp31*"):
# PyPy 3.10 and upwards is considered non-EoL. Other versions like
# PyPy 3.9 are matched in the EoL group below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I missed this. I can add in a follow up, I feel like it is fairly self evident from looking at the code. PyPy and PyPyEoL are right next to each other.

@henryiii henryiii requested a review from joerick May 14, 2025 21:37
Copy link
Contributor

@joerick joerick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@@ -87,7 +88,9 @@ def __call__(self, build_id: str) -> bool:
return False
if EnableGroup.CPythonPrerelease not in self.enable and fnmatch(build_id, "cp314*"):
return False
if EnableGroup.PyPy not in self.enable and fnmatch(build_id, "pp*"):
if EnableGroup.PyPy not in self.enable and fnmatch(build_id, "pp31*"):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd agree with Copilot on this one!

Suggested change
if EnableGroup.PyPy not in self.enable and fnmatch(build_id, "pp31*"):
if EnableGroup.PyPy not in self.enable and fnmatch(build_id, "pp31*"):
# PyPy 3.10 and upwards is considered non-EoL. Other versions like
# PyPy 3.9 are matched in the EoL group below.

@henryiii henryiii merged commit c2cffa3 into pypa:main May 15, 2025
27 checks passed
@henryiii henryiii deleted the henryiii/feat/pypy-eol branch May 15, 2025 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants