Conversation
👋 Hello jakub-kocka, we appreciate your contribution to this project! Click to see more instructions ...
Review and merge process you can expect ...
|
66f0663 to
1f4bbeb
Compare
idf-component-manager v3.0.0 does not support Python <= 3.10 https://pypi.org/project/idf-component-manager/3.0.0/
1f4bbeb to
9b91cdf
Compare
…tAdapter exclude_list rows with platform and python but no package version were turned into an AND of inverted markers, which incorrectly dropped the dependency on other OSes for the same Python (e.g. Linux 3.14 when excluding Windows/macOS 3.14). Emit De Morgan form (sys_platform != p or <inverted python>) per platform instead. Added pydantic_core for win32/darwin on Python 3.14 to avoid broken maturin sdists; remove the temporary skip from build_wheels_from_file. Factor python_version marker building into _python_version_marker_fragment_no_package_version and add unit tests. Update the architecture skill note accordingly.
There was a problem hiding this comment.
Pull request overview
Updates the wheel build/test pipeline to avoid known incompatible dependencies, improve resilience to corrupt wheel artifacts, and stabilize dependency resolution during wheel builds.
Changes:
- Extend exclude/marker handling (notably platform ∩ python exclusion without a version) and add new exclude entries.
- Detect and discard corrupt/non-zip “.whl” artifacts during repair and install verification steps.
- Add esptool dependencies into the assembled requirements and introduce a
--force-interpreter-binarybuild mode for dependent wheels.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
exclude_list.yaml |
Adds new exclusions (pydantic_core on Win/macOS + py3.14; idf-component-manager 3.0.0 on older Pythons). |
yaml_list_adapter.py |
Adds intersection-style exclude marker generation for platform+python (no version) and refactors python marker fragment building. |
test_build_wheels.py |
Adds unit tests covering the new platform∩python intersection exclude behavior. |
test_wheels_install.py |
Adds preflight zip validation + pip error classification to discard corrupt wheel artifacts. |
repair_wheels.py |
Adds zip validation before repair and validates repaired output; deletes invalid artifacts. |
build_wheels.py |
Adds tomllib/tomli parsing and appends esptool pyproject.toml dependencies to assembled requirements. |
build_requirements.txt |
Adds tomli for Python < 3.11 to support TOML parsing fallback. |
build_wheels_from_file.py |
Adds --force-interpreter-binary support and per-requirement --no-binary injection (non-Windows). |
_helper_functions.py |
Makes print_color safer on non-UTF8 Windows consoles by sanitizing output text. |
.github/workflows/unit-tests.yml |
Switches unit-test dependency install to -r build_requirements.txt. |
.github/workflows/build-wheels-python-dependent.yml |
Enables --force-interpreter-binary, sets PYO3_USE_ABI3_FORWARD_COMPATIBILITY, and adds an ARMv7 artifact permission fix. |
.github/workflows/build-wheels-platforms.yml |
Adds an ARMv7 artifact permission fix before upload. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # https://pypi.org/project/idf-component-manager/3.0.0/ | ||
| - package_name: 'idf-component-manager' | ||
| version: '==3.0.0' | ||
| python: ['<3.10'] |
There was a problem hiding this comment.
The exclude rule for idf-component-manager says it is unsupported on Python <= 3.10, but the marker python: ['<3.10'] will not match Python 3.10. Use a specifier that covers 3.10 as well (e.g. <3.11 or <=3.10, depending on intent).
| python: ['<3.10'] | |
| python: ['<=3.10'] |
| - package_name: 'mcp' | ||
| python: ['==3.8', '==3.9'] | ||
|
|
||
| # idf-component-manager v3.0.0is not supported by Python <= 3.10 |
There was a problem hiding this comment.
Typo in the comment: v3.0.0is is missing a space.
| # idf-component-manager v3.0.0is not supported by Python <= 3.10 | |
| # idf-component-manager v3.0.0 is not supported by Python <= 3.10 |
| # Download esptool requirements from pyproject.toml file | ||
| res = requests.get(ESPTOOL_PYPROJECT_URL, headers=AUTH_HEADER, timeout=10) | ||
| if check_response(res, "Failed to download esptool pyproject.toml file"): | ||
| pyproject_content = tomllib.loads(res.text) | ||
| esptool_deps = pyproject_content.get("project", {}).get("dependencies", []) | ||
| requirements_txt += [dep for dep in esptool_deps if dep not in requirements_txt] | ||
| print("Added esptool requirements") |
There was a problem hiding this comment.
_download_branch_requirements() downloads esptool's pyproject.toml on every branch iteration, which repeats the same network request N times (and can increase latency / hit GitHub rate limits). Consider fetching and parsing esptool dependencies once (outside the per-branch loop) and merging them into the overall requirements set once.
| Markers (platform and python) are ANDed between and multiple values of the marker are ORed between. | ||
| For exclude=True **without** a package ``version``, platform + python mean “exclude on this OS **and** | ||
| this Python” (intersection): the keep-marker is ``(sys_platform != p or <inverted python>)`` per | ||
| platform, ANDed across listed platforms (De Morgan). Rows **with** a package version keep the | ||
| split-requirement behaviour documented below. |
There was a problem hiding this comment.
Docstring says “multiple values of the marker are ORed between”, but for python lists the code joins fragments with and (see _python_version_marker_fragment_no_package_version() returning " and ".join(parts)). Please align the docstring with the actual semantics (or adjust the implementation if OR is intended).
| expected = Requirement('pydantic_core; (sys_platform != "win32" or (python_version != "3.14"))') | ||
| self.assertEqual(result, {expected}) | ||
|
|
||
| def test_exclude_platform_and_python_intersection_two_os(self): | ||
| yaml_list = [{"package_name": "pydantic_core", "platform": ["win32", "darwin"], "python": "==3.14"}] | ||
| result = self.adapter._yaml_to_requirement(yaml_list, exclude=True) | ||
| expected = Requirement( | ||
| 'pydantic_core; (sys_platform != "win32" or (python_version != "3.14")) and ' | ||
| '(sys_platform != "darwin" or (python_version != "3.14"))' |
There was a problem hiding this comment.
The new expected marker strings use double quotes, while the rest of this test module uses single quotes in marker literals (e.g., sys_platform == 'win32'). For consistency (and to avoid brittle string-format differences), consider using the same quoting style as the other Requirement expectations in this file.
| expected = Requirement('pydantic_core; (sys_platform != "win32" or (python_version != "3.14"))') | |
| self.assertEqual(result, {expected}) | |
| def test_exclude_platform_and_python_intersection_two_os(self): | |
| yaml_list = [{"package_name": "pydantic_core", "platform": ["win32", "darwin"], "python": "==3.14"}] | |
| result = self.adapter._yaml_to_requirement(yaml_list, exclude=True) | |
| expected = Requirement( | |
| 'pydantic_core; (sys_platform != "win32" or (python_version != "3.14")) and ' | |
| '(sys_platform != "darwin" or (python_version != "3.14"))' | |
| expected = Requirement("pydantic_core; (sys_platform != 'win32' or (python_version != '3.14'))") | |
| self.assertEqual(result, {expected}) | |
| def test_exclude_platform_and_python_intersection_two_os(self): | |
| yaml_list = [{"package_name": "pydantic_core", "platform": ["win32", "darwin"], "python": "==3.14"}] | |
| result = self.adapter._yaml_to_requirement(yaml_list, exclude=True) | |
| expected = Requirement( | |
| "pydantic_core; (sys_platform != 'win32' or (python_version != '3.14')) and " | |
| "(sys_platform != 'darwin' or (python_version != '3.14'))" |
660adf7 to
620715a
Compare
620715a to
1fda564
Compare
idf-component-manager v3.0.0 does not support Python <= 3.10 https://pypi.org/project/idf-component-manager/3.0.0/
Description
Because of the failing wheels built due to the idf-component-manager, the package was added to
exclude_list.idf-component-manager v3.0.0 does not support Python <= 3.10 - https://pypi.org/project/idf-component-manager/3.0.0/
Also fixed the BadZipFile / "Bad magic number" errors - PEP 427 (https://github.com/espressif/idf-python-wheels/actions/runs/23427493077/job/68191831315)
As part of this PR, the esptool dependencies are added into the requirements assembly - the packages that will be built
Related
Testing
Checklist
Before submitting a Pull Request, please ensure the following: