Skip to content
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

Fix compilation with Cython 3 #1603

Merged
merged 3 commits into from
May 6, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Go back to pinning Cython < 3.
This is because the memory leak tests failed: https://travis-ci.org/github/gevent/gevent/jobs/683782800
  • Loading branch information
jamadden committed May 6, 2020
commit c8459495fc81ccbfbd44fc671f1d2cf2375ab8fa
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ jobs:
# First, the build dependencies (see setup.cfg)
# so that we don't have to use build isolation and can better use the cache;
# Note that we can't use -U for cffi and greenlet on PyPy.
- &build-gevent-deps pip install -U setuptools wheel twine && pip install -U 'faulthandler; python_version == "2.7" and platform_python_implementation == "CPython"' 'cffi;platform_python_implementation=="CPython"' 'cython>=3.0a4' 'greenlet;platform_python_implementation=="CPython"'
- &build-gevent-deps pip install -U setuptools wheel twine && pip install -U 'faulthandler; python_version == "2.7" and platform_python_implementation == "CPython"' 'cffi;platform_python_implementation=="CPython"' 'cython<3' 'greenlet;platform_python_implementation=="CPython"'
# Next, build the wheel *in place*. This helps ccache, and also lets us cache the configure
# output (pip install uses a random temporary directory, making this difficult)
- python setup.py bdist_wheel
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ build_script:
# Build the compiled extension
# Try to get some things that don't wind up in the pip cache as
# built wheels if they're built during an isolated build.
- "%CMD_IN_ENV% %PYEXE% -m pip install -U --pre wheel cython setuptools cffi"
- "%CMD_IN_ENV% %PYEXE% -m pip install -U wheel cython setuptools cffi"
- if not "%GWHEEL_ONLY%"=="true" %PYEXE% -m pip install -U -e .[test]

test_script:
Expand Down
3 changes: 3 additions & 0 deletions docs/changes/1599.bugfix
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ gevent can now be built using Cython 3.0a2 and newer.

The libev extension was incompatible with this. As part of this,
certain internal, undocumented names have been changed.

However, up through at least 3.0a4 compiling with Cython 3 results in
gevent's test for memory leaks failing.
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ requires = [
# name to be created so that we can have both foo.py and _foo.so
# at the same time. 0.29 fixes some issues with Python 3.7,
# and adds the 3str mode for transition to Python 3. 0.29.14+ is
# required for Python 3.8.
"Cython >= 3.0a4",
# required for Python 3.8. 3.0a2 introduced a change that prevented
# us from compiling (https://github.com/gevent/gevent/issues/1599)
# but once that was fixed, 3.0a4 led to all of our leak tests
# failing in Python 2 (https://travis-ci.org/github/gevent/gevent/jobs/683782800)
"Cython >= 0.29.14, < 3",
# See version requirements in setup.py
"cffi >= 1.12.3 ; platform_python_implementation == 'CPython'",
# Python 3.7 requires at least 0.4.14, which is ABI incompatible with earlier
Expand Down