-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Catch exception for PyPy #8803
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
Catch exception for PyPy #8803
Conversation
lib/matplotlib/cbook/deprecation.py
Outdated
except AttributeError: | ||
pass # cls.__doc__ is not writeable on Py2. | ||
except (AttributeError, TypeError): | ||
pass # cls.__doc__ is not writeable on Py2. TypeError occurs on PyPy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is now too long 😞
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 to code, line wrapping needs to be fixed before it is merged.
How close in Matplotlib to passing tests on pypy? |
Fixed comment line being too long. |
You'll need to placate the style checker... see bottom of https://travis-ci.org/matplotlib/matplotlib/jobs/247129775 |
@tacaswell Here is a pastebin with output from running matplotlib tests on PyPy: https://pastebin.com/uVeGPwuk L.E. I forgot to mention that I managed to compile matplotlib on PyPy with graphical backend provided by https://bitbucket.org/amauryfa/wxpython-cffi |
Skimming those issues a bunch of them look to be the pypy numpy not handling strings, a few places where we are checking refcounts, and one place where weakdicts work differently? |
Yes, you are right. From my point of view the results of the tests are quite good. |
Can you force pypy to trigger the gc at some point (collecting everything that is unaccessible?) That would solve the weakdict issue; the getrefcount issue could probably be solved in a similar manner. |
thanks |
PR Summary
Catch additional exception, specific for PyPy (equivalent of Python 2.7).
Because in python 2.7
obj.__doc__
is read only, PyPy will throw an TypeError exception(somehow equivalent to AttributeError from CPython)PR Checklist