Enable pypy as a required Travis test#3392
Conversation
|
I guess the change from optional to required might be controversial, but even if that's the case, hopefully updating the bug list and fixing some of the very easy tests is useful |
Cython/Utility/ModuleSetupCode.c
Outdated
| #define __Pyx_PyDict_GetItemWithError PyDict_GetItemWithError | ||
| #define __Pyx_PyDict_GetItemWithError_ErrOccurred PyErr_Occurred | ||
| #else | ||
| #define __Pyx_PyDict_GetItemWithError PyDict_GetItem |
There was a problem hiding this comment.
That's the thing – this function isn't equivalent to PyDict_GetItemWithError(), because it does not properly report all errors (i.e. exceptions). Thus the actual call to d.get() in Optimize.c, for example. The WithError C-API function was added later for exactly this reason.
Also, such a change definitely shouldn't be part of an "enable pypy in tests" PR. :)
There was a problem hiding this comment.
Yes that makes sense. I'll get rid of this.
|
IMHO very worthwhile going in this direction. Would be nice if at least one pypy test job could report actual regressions during development, rather than always being broken. |
Reasoning being that this make it easier to catch pypy3
regressions as they happen.
* Fixed some very simple pypy3 failures (largely to do with
different exception strings)
* Splits pypy3_bugs.txt into three files
- one for bugs that cause hard crashes (which we don't want to
run in Travis at all);
- one for bugs that are probably unfixable because they're just
due to implementation details (e.g. when destructors are
called).
- all other bugs remain in pypy3_bugs.txt
(The categorization has been done fairly quickly, so some bugs
may be in the wrong place)
* Made sure (hopefully) all bugs are now categorized, so a basic
runtests.py with pypy3 should hopefully pass
* Changed pypy3 to be required in Travis
* Added an extra (optional) test that runs through pypy3_bugs.txt.
The majority of this is expected to fail. This requires an
extra option to runtest.py "--listfile", which just runs through
the tests listed in the file.
I haven't made pypy2 a required test in this commit - since
Python2 support is deprecated soon, there seemed limited value in
putting much effort into pypy2.
Tests weren't failing on my PC because I was using a later version. I'm not expecting this to fix everything, but I'm hoping this will make the list of failures more managable to read
Mostly tests that fail on PyPy3 on travis but not on the version I'm using. Also did a little bit of re-organizing utilitycode using PyDict_GetItemWithError to use it in pypy when supported, and to reduce a little code duplication between python 2 and 3 utilitycode
In utilitycode
Undid the changes to Optimize and ModuleSetupCode in favour of more modest changes. Added faulthandler to runtests in the hope of being able to pin-down segmentation faults better on Travis
|
I've added tried to use the built-in faulthandler module where available. The hope is that it'll catch segmentation faults a little more clearly on Travis instead of just silently running forever. |
|
Looks good to me so far, just one comment on test inclusion. |
Uses the same mechanism as is used for processing string passed on commandline
since it seemed pretty close already. Fixed one text matching issue, and added a specific bugs file for pypy2
|
A number of pypy2 tests are currently having to be excluded because of https://foss.heptapod.net/pypy/pypy/issues/3185. For now I'm just disabling them - I don't see a way round this without a fix from pypy. |
|
@scoder Can I ping this? Mostly because it'll need re-doing if it sits too long and other PRs break pypy stuff while it's waiting. |
|
Thanks! |
Reasoning being that this make it easier to catch pypy
regressions as they happen.
different exception strings)
run in Travis at all);
due to implementation details (e.g. when destructors are
called).
(The categorization has been done fairly quickly, so some bugs
may be in the wrong place)
runtests.py with pypy should hopefully pass
The majority of this is expected to fail. This requires an
extra option to runtest.py "--listfile", which just runs through
the tests listed in the file.
I haven't made pypy2 a required test in this commit - sincePython2 support is deprecated soon, there seemed limited value in
putting much effort into pypy2.