Repository navigation
Fix Verify Builds broken by Cython 3.3.0 pyzmq incompatibility - #324
Merged
Merged
Conversation
Cython 3.3.0 (released 2026-08-22) tightened pure-Python-mode name-conflict detection and rejects pyzmq's `hint: pointer(_zhint) = cast(...)` in zmq/backend/cython/_zmq.py with "'hint' redeclared". This breaks pip-installing pyzmq <=26.4.0 from source, since pyzmq's isolated build env resolves cython>=3.0.0 to the newest available. Fixed upstream in pyzmq 27.x. - Add pyzmq 27.2.0 to test_pip_install_pyzmq to cover the current latest-pyzmq + latest-Cython combination. - Set PIP_CONSTRAINT=cython<3.3 on the older pyzmq parametrize cells (23.2.0, 25.1.2, 26.2.0, 26.4.0) so their isolated build env picks Cython 3.2.9 and still compiles. Set AFTER the `env = os.environ.copy()` reset later in the function so it survives to the pyzmq install subprocess. - Same constraint on test_pip_install_salt_w_static_requirements and test_pip_install_salt_w_package_requirements: Salt 3006.x's requirements pin pyzmq 26.4.0, which we can't change, so the transitive build otherwise fails. - Xfail pyzmq 27.2.0 on Windows: --no-binary=:all: forces the isolated build env to build Cython 3.3.0 from source too, and MSVC hits "fatal error C1083: Cannot open compiler generated file: '': Invalid argument" when pip's isolated tempdir path exceeds Windows' effective path limit.
PIP_CONSTRAINT (--constraint) only affects the outer install; pip does not propagate it into PEP 517 build-isolation subprocesses. That's why the previous fix appeared to be applied (env dump showed PIP_CONSTRAINT set) but pyzmq's isolated build env still resolved Cython 3.3.0 and hit 'hint redeclared'. The right knob is PIP_BUILD_CONSTRAINT (pip 24.2+, maps to --build-constraint), which is what constrains build-isolation deps like Cython. Set both env vars for safety, since the outer install pins pyzmq==exact-version anyway.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Cython 3.3.0 (released 2026-08-22) tightened pure-Python-mode name-conflict detection and rejects pyzmq's
hint: pointer(_zhint) = cast(...)inzmq/backend/cython/_zmq.pywith'hint' redeclared. Every source install of pyzmq <=26.4.0 has been failing since; that's affectingmainand blocking the Release 0.22.23 auto-update PR (#322).Three tests now go red on every native platform where pyzmq 26.4.0 gets built from source:
test_pip_install_pyzmq[26.4.0]test_pip_install_salt_w_static_requirements[3006.x](Salt 3006.x pins pyzmq 26.4.0)test_pip_install_salt_w_package_requirements[3006.x](same)Fix
27.2.0to thetest_pip_install_pyzmqparametrize — pyzmq 27.x is Cython-3.3-clean upstream; this test proves the current combination works.PIP_CONSTRAINT=cython<3.3on the older pyzmq parametrize cells (23.2.0, 25.1.2, 26.2.0, 26.4.0). pip 22+ propagates this into PEP 517 build-isolation subprocesses, so the pyzmq build env resolves Cython 3.2.9 and compiles.--no-binary=:all:forces the isolated build env to build Cython 3.3.0 from source, and MSVC hitsfatal error C1083: Cannot open compiler generated file: '': Invalid argumentwhen pip's isolated tempdir path exceeds Windows' effective path limit. Not a pyzmq/Cython issue per se — a Windows build-isolation path-length quirk.Test plan
Verify Linux (3.10, aarch64)— was failing all three tests; should now pass all three.Verify Linux (3.10, x86_64)— same.Verify MacOS (M1) (3.10, arm64)— was failingpyzmq[26.4.0]; should pass.Verify MacOS (3.10, x86_64)— same.Verify Windows (3.10, amd64)— newpyzmq[27.2.0]xfails cleanly.auto-update-versionsfor Release 0.22.23 #322 so the fix propagates into that branch's next cut.