Conversation
|
All tests are passing now |
|
|
|
@scoder sorry for the delay, I was out for a couple of days! Anyways, I just fixed all the outstanding issues |
scoder
left a comment
There was a problem hiding this comment.
Thanks for the update, no pressure. Looks mostly good now, just a few comments.
| @@ -2372,6 +2372,7 @@ def runtests(options, cmd_args, coverage=None): | |||
|
|
|||
| if options.limited_api: | |||
| CFLAGS.append("-DCYTHON_LIMITED_API=1") | |||
There was a problem hiding this comment.
I think I tried to point this out on the old PR, but: at some point I think this should add "-DPY_LIMITED_API" too, since at present you're only checking that this is internally consistent and not that it actually conforms to the limited API. I don't think it needs to come with this change though - I just think it should be on the TODO list
There was a problem hiding this comment.
Totally! Slowly working towards that direction. Starting with Py_LIMITED_API just made the whole thing explode. I imagine that with these last couple of changes, it should now be manageable to start tackling the remaining parts to get the PY_LIMITED_API flag in!
|
Addressed the last remaining comments. Next up after this change should be to start adding the |
|
Thanks! |
Expands
LIMITED_APIsupport by adding fixes to previously unhandled cases. This now brings down the list of non-working tests inlimited_api_bugs.txtdown to 5. These are the fixes in this PR:Heap types:
Made
CyFunctionTypeandFusedFunctionTypeinto heap types (throughFetchCommonTypeFromSpec). Also, updated the type creation code to now support subclassing throughPyType_FromSpecWithBases.Cythonize multiple files:
The code generator was creating duplicate types when more than one file was cythonized. (i.e. there was an incorrect
for module in modules:). This has moved the code togenerate_c_class_declarationswhere it now generates the types only once.Fixes to cinit:
Fixed some cases where
CYTHON_COMPILING_IN_LIMITED_APIwas hiding the initialization code. To fix this, I reverted back to the original initialization code and updated the function to work with the appropriate type accessors (i.e:PyType_GetSlot).Misc:
Pyx_GlobalsandGetVtableto now work with a module instead of a module dict.Py_LIMITED_APIflag toCYTHON_COMPILING_IN_LIMITED_APICYTHON_PROFILE(just like pypy and pyston)PyObject_GetItemto the correctPyObject_GetAttr-Wno-unused-functionto reduce noise inLIMITED_APItests.See #2542