[issue39599] ABI breakage between Python 3.7.4 and 3.7.5: change in PyGC_Head structure

2020-04-09 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-40241: "[C API] Make PyGC_Head structure opaque, or even more it to the internal C API". -- ___ Python tracker ___

[issue39599] ABI breakage between Python 3.7.4 and 3.7.5: change in PyGC_Head structure

2020-03-03 Thread Julien Danjou
Julien Danjou added the comment: Right, though if you read the code I linked, the PyGC_Head size is never used. AFAICS the Cython code does not access it either (at least not directly). The code segfaults at import time. I'm not even sure it's possible and the problem isn't in something in

[issue39599] ABI breakage between Python 3.7.4 and 3.7.5: change in PyGC_Head structure

2020-03-03 Thread STINNER Victor
STINNER Victor added the comment: > The problem is that AFAIK the wheel system does not allow you to specify and > provide a wheel for each minor Python version. The alternative is to identify which part of your code depends on PyGC_Head size, and handle the different sizes there.

[issue39599] ABI breakage between Python 3.7.4 and 3.7.5: change in PyGC_Head structure

2020-03-03 Thread Julien Danjou
Julien Danjou added the comment: The problem is that AFAIK the wheel system does not allow you to specify and provide a wheel for each minor Python version. For references, the code that segfaults is: https://github.com/DataDog/dd-trace-py/blob/master/ddtrace/profile/collector/stack.pyx

[issue39599] ABI breakage between Python 3.7.4 and 3.7.5: change in PyGC_Head structure

2020-02-29 Thread STINNER Victor
STINNER Victor added the comment: > This happens on a custom C module (built via Cython) when using including > with -DPy_BUILD_CORE. I'm not sure it'd happen otherwise. If you opt-in for the internal C API, you should be prepared to have such issues. --

[issue39599] ABI breakage between Python 3.7.4 and 3.7.5: change in PyGC_Head structure

2020-02-29 Thread Ned Deily
Ned Deily added the comment: Mark: > Or am I misunderstanding? No, you are not misunderstanding :) > ABI breakage shouldn't happen *at all* in bugfix releases, whether stable ABI > or not. Absolutely. Victor: > Julien: You cannot use the same wheel package for all Python 3.7.x versions:

[issue39599] ABI breakage between Python 3.7.4 and 3.7.5: change in PyGC_Head structure

2020-02-29 Thread STINNER Victor
STINNER Victor added the comment: > Understood; thanks. I agree that there shouldn't be a guarantee for private > undocumented calls. I concur. That's a good summary. We don't provide ABI stability for Julien's use case. Julien: You cannot use the same wheel package for all Python 3.7.x

[issue39599] ABI breakage between Python 3.7.4 and 3.7.5: change in PyGC_Head structure

2020-02-23 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39599] ABI breakage between Python 3.7.4 and 3.7.5: change in PyGC_Head structure

2020-02-12 Thread Mark Dickinson
Mark Dickinson added the comment: > _Py_AS_GC and all APIs to get PyGC_Head from PyObject* are not only unstable, > but also private. Understood; thanks. I agree that there shouldn't be a guarantee for private undocumented calls. -- ___ Python

[issue39599] ABI breakage between Python 3.7.4 and 3.7.5: change in PyGC_Head structure

2020-02-11 Thread Inada Naoki
Inada Naoki added the comment: https://github.com/python/cpython/blob/95905ce0f41fd42eb1ef60ddb83f057401c3d52f/Include/cpython/objimpl.h#L89 _Py_AS_GC and all APIs to get PyGC_Head from PyObject* are not only unstable, but also private. I thought PyGC_Head must not be used directly from

[issue39599] ABI breakage between Python 3.7.4 and 3.7.5: change in PyGC_Head structure

2020-02-11 Thread Mark Dickinson
Mark Dickinson added the comment: [Julien Danjou] > As you said, if it's not part of the stable ABI it makes sense. I think this is a misunderstanding of what the stable ABI is for. I'm not sure whether this is spelled out explicitly anywhere, but my understanding was that ABI breakage

[issue39599] ABI breakage between Python 3.7.4 and 3.7.5: change in PyGC_Head structure

2020-02-11 Thread STINNER Victor
STINNER Victor added the comment: > The sad part if that my code does not access PyGC_Head at all. It's just a > side effect when loading the code that makes it crash. :( Python stores pointers to PyObject*. If your code doesn't access PyGC_Head directly, maybe it does acess it indirectly?

[issue39599] ABI breakage between Python 3.7.4 and 3.7.5: change in PyGC_Head structure

2020-02-11 Thread Julien Danjou
Julien Danjou added the comment: > If you want to ship wheel package, another compromise would be to require > Python 3.7.5 or newer, and check early the Python version. Yes, this is what I do now to avoid getting a segmentation fault. I'm fine with closing this as wontfix or reject, your

[issue39599] ABI breakage between Python 3.7.4 and 3.7.5: change in PyGC_Head structure

2020-02-11 Thread STINNER Victor
STINNER Victor added the comment: > This happens on a custom C module (built via Cython) when using including > with -DPy_BUILD_CORE. I'm not sure it'd happen otherwise. By the way, I don't think that wheel packages are designed to C extensions accessing Python internals. The internal C

[issue39599] ABI breakage between Python 3.7.4 and 3.7.5: change in PyGC_Head structure

2020-02-11 Thread STINNER Victor
STINNER Victor added the comment: The PyObject structure is part of the stable ABI, but PyGC_Head is not. https://www.python.org/dev/peps/pep-0384/#structures I can understand that it's annoying to not be able to use the same wheel package on Python 3.7 <= 3.7.4 and Python Python 3.7 >=

[issue39599] ABI breakage between Python 3.7.4 and 3.7.5: change in PyGC_Head structure

2020-02-10 Thread STINNER Victor
Change by STINNER Victor : -- title: ABI breakage between 3.7.4 and 3.7.5 -> ABI breakage between Python 3.7.4 and 3.7.5: change in PyGC_Head structure ___ Python tracker ___