Fix PyPy wheels and tests#20848
Merged
tacaswell merged 8 commits intomatplotlib:masterfrom Aug 19, 2021
Merged
Conversation
Contributor
Unfortunately that is to be expected. Test suites are typically 2x slower on PyPy since the JIT does not really kick in on small code samples, and the base interpreter is about 2x slower than CPython |
tacaswell
approved these changes
Aug 17, 2021
Contributor
|
Thanks! |
Member
Author
|
This now works around the last failures; if we want to enable PyPy testing (maybe scheduled instead of on every build?), we can. |
PyPy does not correctly define `PyErr_SetFromWindowsErr`: https://foss.heptapod.net/pypy/pypy/-/issues/3533
These tests look at reference counts of objects, which are meaningless for PyPy (and also Jython).
PyPy adds an additional frame for `functools.wraps`, with `_functools` as the name, which causes the code to decide we're no longer in Matplotlib code too early, and not find `print_figure`. This causes warnings about unexpected arguments.
anntzer
reviewed
Aug 19, 2021
anntzer
approved these changes
Aug 19, 2021
Contributor
anntzer
left a comment
There was a problem hiding this comment.
+/- comment on docstrings
In CPython, `inspect.getdoc` returns some default string for `__init__`, but on PyPy, it returns None, when using `-OO`. https://foss.heptapod.net/pypy/pypy/-/issues/3534
It does not support calls to Tkinter from different threads: https://foss.heptapod.net/pypy/pypy/-/issues/1929
Some of these worked (by fluke?) in CPython, but didn't work in PyPy. The NumPy function ensures GC is run enough times on PyPy to be really cleared.
This is necessary to get the latest PyPy, which implements `METH_FASTCALL`.
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.
PR Summary
Test build of wheels is here: https://github.com/QuLogic/matplotlib/actions/runs/1137857541
Fixes #20637.
This also fixes all tests except for the
Animationcleanup ones, which may be a bug in PyPy.Should we enable testing on PyPy in CI? Note, it is quite a bit slower for me, but I don't know how long it will take on CI.
Fixes #19160.
PR Checklist
pytestpasses).flake8on changed files to check).flake8-docstringsand runflake8 --docstring-convention=all).doc/users/next_whats_new/(follow instructions in README.rst there).doc/api/next_api_changes/(follow instructions in README.rst there).