Skip to content

Update Cython for 3.8 compatibility - #275

Closed
dmontagu wants to merge 1 commit into
MagicStack:masterfrom
dmontagu:patch-1
Closed

dmontagu wants to merge 1 commit into
MagicStack:masterfrom
dmontagu:patch-1

Conversation

@dmontagu

Copy link
Copy Markdown

Maybe this solves #266?

@LiraNuna

Copy link
Copy Markdown

Related: Cython's changelog, showing that version 0.29.12 fixed this bug.

@nwalsh1995

Copy link
Copy Markdown

Hi, with the official release of Python 3.8 it would be nice if this got some more action! I was able to get uvloop to compile with the newest version of Cython as well.

@h1nk

h1nk commented Oct 16, 2019

Copy link
Copy Markdown

Even with the Cython version update as made in this PR (insurgency/aioa2squery@48683f0) uvloop installs in a fresh 3.8 environment fail (see). Are these changes confirmed to work for any other 3.8 users?

@atezerjani

Copy link
Copy Markdown

Even with the Cython version update as made in this PR (insurgency/aioa2squery@48683f0) uvloop installs in a fresh 3.8 environment fail (see). Are these changes confirmed to work for any other 3.8 users?

It is also failing for me on python3.8

@dmontagu

dmontagu commented Oct 16, 2019 •

Copy link
Copy Markdown
Author

@h1nk @atezerjani You'd have to build it from scratch (the way it works if you follow the build instructions in the repo). Otherwise, you get the source distribution, which includes the already-cythonized C code, which won't work with python3.8 due to the cython version used to generate it.

You can confirm the build works with this update via:

docker run -it --rm python:3.8 /bin/bash

# Inside container:
cd $HOME
git clone --recursive https://github.com/MagicStack/uvloop.git
cd uvloop

python3.7 -m venv uvloop-dev
source uvloop-dev/bin/activate

cat > requirements.dev.txt <<EOF
Cython==0.29.13
Sphinx>=1.4.1
psutil
pyOpenSSL==18.0.0
flake8>=3.7.5
EOF

pip install -r requirements.dev.txt
make

That said, if you run the tests via:

make test

after the above, several of the tests are failing under 3.8. It's not clear to me yet if it's just a problem with making the tests 3.8-compatible, or if it is the underlying code.

@1st1

1st1 commented Oct 21, 2019

Copy link
Copy Markdown
Member

Could you please rebase on top of latest master?

@dmontagu

dmontagu commented Oct 21, 2019 •

Copy link
Copy Markdown
Author

@1st1 Done -- although feel free to close this PR and merge your own if other minor changes are necessary and you don't want to block on me (I don't need credit for this lol).

Also, note, last I ran the tests (which was admittedly before the most recent PR), they did not all pass. As I said above, I don't know if that is an issue with the test design or the underlying 3.8 compatibility though.

From comments on #277 though it sounds like with just this change it is at least working with 3.8 for a broad set of use cases.

@1st1

1st1 commented Oct 24, 2019

Copy link
Copy Markdown
Member

Updated in 65c1a04

Thank you!

@1st1 1st1 closed this Oct 24, 2019
@dmontagu
dmontagu deleted the patch-1 branch October 24, 2019 23:23
@dmontagu

Copy link
Copy Markdown
Author

Awesome, thank you!

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.

6 participants