[issue43816] Missing 'extern "C"' for _Py_ctype_table

2021-04-12 Thread Andrew V. Jones
Andrew V. Jones added the comment: > I think the fact that they've been moved to Include/cpython means that user > code shouldn't be using them. > I think it is fine to say that they shouldn't be used, but then we get this from Victor's blog: > It was decided

[issue43816] Missing 'extern "C"' for _Py_ctype_table

2021-04-12 Thread Andrew V. Jones
Andrew V. Jones added the comment: > 1) The Cython-generated code uses `Py_ISSPACE` (and not `_Py_ctype_table`), > but the expansion of the macro `Py_ISSPACE` then adds `_Py_ctype_table` to > the user's code > I wrote this up as a Cython bug here (just to see if the Cyt

[issue43816] Missing 'extern "C"' for _Py_ctype_table

2021-04-12 Thread Andrew V. Jones
Andrew V. Jones added the comment: > I am happy to re-assign this as a Cython bug, but the fact it is fixed with > an `extern "C"` in Python.h, really makes it feel like it is a Python-proper > issue and not a "user" issue. > Just to extend on this: 1

[issue43816] Missing 'extern "C"' for _Py_ctype_table

2021-04-12 Thread Andrew V. Jones
Andrew V. Jones added the comment: > In fact, _Py_ctype_table is limited to the internal parts of the interpreter. > So in this case, this one could not be used in an external tool. > Hmm, so why is this "exposed" by the "world-facing" `Python.h` file? I shou

[issue43816] Missing 'extern "C"' for _Py_ctype_table

2021-04-12 Thread Andrew V. Jones
Change by Andrew V. Jones : -- keywords: +patch pull_requests: +24099 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25365 ___ Python tracker <https://bugs.python.org/issu

[issue43816] Missing 'extern "C"' for _Py_ctype_table

2021-04-12 Thread Andrew V. Jones
New submission from Andrew V. Jones : With Python 3.9.4, and when compiling with Visual Studio 2019, we have noticed that the variable `_Py_ctype_table` is *not* scoped with in an `extern "C"` block, and where the Python library (`python39.lib`) *has* been compiled with a C compi

[issue43351] `RecursionError` during deallocation

2021-04-12 Thread Andrew V. Jones
Andrew V. Jones added the comment: For us, this issue was resolved with moving to 3.9.2. I have closed it as it seems it was an "accidentally fixed" bug. -- stage: -> resolved status: open -> closed ___ Python tracker <http

[issue43351] `RecursionError` during deallocation

2021-03-01 Thread Andrew V. Jones
Andrew V. Jones added the comment: Same logic, but this crashes: ``` def loop(): a_node = boost_python_library.get_linked_list() temp = [] while True: assert a_node is not None temp.append(a_node) prev = a_node # <-- comment this out to make the crash

[issue43351] `RecursionError` during deallocation

2021-03-01 Thread Andrew V. Jones
Andrew V. Jones added the comment: Here's some representative code that triggers the issue: ``` def loop(): a_node = boost_python_library.get_linked_list() all_elems = [] while a_node is not None: # # Uncomment the below to make the crash disa

[issue43351] `RecursionError` during deallocation

2021-03-01 Thread Andrew V. Jones
New submission from Andrew V. Jones : I am currently working with "porting" some code from Python 2.7.14 to Python 3.7.5, but the process running the Python code seems to terminate in the following way: ``` #0 0x2ef63337 in raise () from /lib64/libc.so.6 #1 0x2