Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix PyPy wheels and tests#20848

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
tacaswell merged 8 commits intomatplotlib:masterfromQuLogic:pypy
Aug 19, 2021
Merged

Fix PyPy wheels and tests#20848

tacaswell merged 8 commits intomatplotlib:masterfromQuLogic:pypy
Aug 19, 2021

Conversation

QuLogic
Copy link
Member

@QuLogicQuLogic commentedAug 17, 2021
edited
Loading

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 theAnimation cleanup 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

  • Has pytest style unit tests (andpytest passes).
  • IsFlake 8 compliant (runflake8 on changed files to check).
  • [n/a] New features are documented, with examples if plot related.
  • [n/a] Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).
  • [n/a] Conforms to Matplotlib style conventions (installflake8-docstrings and runflake8 --docstring-convention=all).
  • [n/a] New features have an entry indoc/users/next_whats_new/ (follow instructions in README.rst there).
  • [n/a] API changes documented indoc/api/next_api_changes/ (follow instructions in README.rst there).

@mattip
Copy link
Contributor

Note, it is quite a bit slower for me

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

@mattip
Copy link
Contributor

Thanks!

@QuLogic
Copy link
MemberAuthor

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 meaninglessfor 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 inMatplotlib code too early, and not find `print_figure`. This causeswarnings about unexpected arguments.
Copy link
Contributor

@anntzeranntzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

+/- 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
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 reallycleared.
This is necessary to get the latest PyPy, which implements`METH_FASTCALL`.
@tacaswelltacaswell merged commita4e81e7 intomatplotlib:masterAug 19, 2021
@QuLogicQuLogic deleted the pypy branchAugust 19, 2021 23:16
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@tacaswelltacaswelltacaswell approved these changes

@anntzeranntzeranntzer approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.5.0
Development

Successfully merging this pull request may close these issues.

PyPy wheels are pinned to v3.3, so pypy-based wheels for latest versions are not available pypy failures
4 participants
@QuLogic@mattip@tacaswell@anntzer

[8]ページ先頭

©2009-2025 Movatter.jp