Conversation
…to make sure we can repro the error
…licitly install distutils
… .. idk really what difference that could make
|
pypy+cython seems to sort of be a thing: https://docs.cython.org/en/latest/src/userguide/pypy.html |
.github/workflows/ci.yml
Outdated
| python -m pip install --upgrade pip setuptools | ||
| python -m pip install "cython${{ matrix.cython}}" | ||
| - name: install trio | ||
| # use -e? |
There was a problem hiding this comment.
I think editable installs isn't the normal case and those are weird:tm:
So I think it's better to test non-editable installs of trio
There was a problem hiding this comment.
I was randomly using Black's CI as a reference: https://github.com/search?q=repo%3Apsf%2Fblack+%22python+-m+pip+install+-e%22&type=code
I have no clue why they're doing -e tho
There was a problem hiding this comment.
meh we'll find out if we need it
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2942 +/- ##
=======================================
Coverage 99.64% 99.64%
=======================================
Files 117 117
Lines 17564 17564
Branches 3166 3166
=======================================
Hits 17502 17502
Misses 43 43
Partials 19 19
|
A5rocks
left a comment
There was a problem hiding this comment.
If we ever find some way to run the whole test suite under Cython that might be worth switching over (too much effort if it doesn't already exist though), but for now this works.
|
Looking around more for cython+pytest I found https://shwina.github.io/cython-testing/ and after messing around with that for a bit I made some progress and managed to run sync test functions, so "just" need to inject our async magic somewhere in there as well and I might close in on running the full test suite. I also somehow triggered the error from #2908 due to running against an old trio version in my messing around, despite cython being >3, so I wanna track that down and potentially report it upstream. But we can merge this for now, and then I'll open another PR if/when I make progress on running the full test suite. |
after some wrangling I've got Cython going in the CI. Though so much of CI is ~magic I probably have something configured badly.
I vote for testing cython<3 and cython>=3 on latest python, but if @njsmith or @Zac-HD or somebody else has any reasons to test older versions, or on non-ubuntu, or on other python versions (and pypy?). Could even go so far as to add it to
ci.shand test it on everything, which I think would add something like 4-7 seconds.test_cython.pyxcould of course also be much more extensive, though grepping forCythonI'm only getting a hit for the one comment insrc/trio/_core_run.pyso doesn't seem like there's a lot of code that has been specially adapted for Cython. Maybe catch some exceptions? pytest does not seem to be a thing for cython, so running the full test suite or whatever I think is out of the question.