[issue40704] PyIter_Check fails when compiling in the Limited API

2020-06-19 Thread Stefan Behnel
Stefan Behnel added the comment: You can see it from the tags on the commit, it was fixed in Py3.8. Duplicate of issue 33738. -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.6, Python 3.7

[issue40704] PyIter_Check fails when compiling in the Limited API

2020-06-19 Thread Maxwell Bernstein
Maxwell Bernstein added the comment: Oh, it looks like this has been done: https://github.com/python/cpython/commit/ea62ce7f4fefc66bc0adba16bcd7666d5bbd5b44 Although I am not sure what version this made it into. So maybe this does not affect versions 3.9/3.10. I've seen it in 3.6/6, for

[issue40704] PyIter_Check fails when compiling in the Limited API

2020-06-19 Thread Maxwell Bernstein
Change by Maxwell Bernstein : -- keywords: +patch pull_requests: +20165 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/7477 ___ Python tracker

[issue40704] PyIter_Check fails when compiling in the Limited API

2020-06-19 Thread Stefan Behnel
Stefan Behnel added the comment: It should be replaced with an actual function, which can be inline in the non-limited case. -- nosy: +scoder stage: -> needs patch type: -> compile error versions: +Python 3.10, Python 3.9 -Python 3.6, Python 3.7

[issue40704] PyIter_Check fails when compiling in the Limited API

2020-05-20 Thread Maxwell Bernstein
Maxwell Bernstein added the comment: See for example the following C program: ``` #define Py_LIMITED_API #include "Python.h" int main() { Py_Initialize(); PyObject* foo; PyIter_Check(foo); } ``` when compiled (gcc test.c `pkg-config --cflags python3`) produces: ``` In file included

[issue40704] PyIter_Check fails when compiling in the Limited API

2020-05-20 Thread Maxwell Bernstein
New submission from Maxwell Bernstein : PyIter_Check is itself marked as available in the Limited API but: a) it's a macro, and b) it pokes directly at tp_iternext This means that it's functionally impossible to use PyIter_Check when working with the Limited API. -- components: C API