Uh oh!
There was an error while loading. Please reload this page.
gh-135906: Use _PyObject_CAST in internal CPython headers - #135892
Conversation
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
picnixz
commented
Jun 24, 2025
Please open an issue in this tracker. |
ZeroIntensity
left a comment
There was a problem hiding this comment.
Please also add a blurb entry, per the bot.
Uh oh!
There was an error while loading. Please reload this page.
ZeroIntensity
left a comment
There was a problem hiding this comment.
I see some similar issues elsewhere:
cpython/Include/internal/pycore_weakref.h
Line 63 in 642e5df
cpython/Include/internal/pycore_weakref.h
Line 90 in 642e5df
Theoretically, we could test for this by including internal headers in test_cppext, but I haven't decided whether I think that's a good idea yet. I'm worried that we're going to be encouraging people to use the private API. Which APIs does Greenlet need?
Uh oh!
There was an error while loading. Please reload this page.
…CWq.rst Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
This: |
ZeroIntensity
commented
Jun 27, 2025
Ok. For 3.15, please open an issue requesting that those private APIs be exposed as unstable APIs. |
Fidget-Spinner
commented
Jun 27, 2025
They don't need to open a new issue. This is a known issue with Cython reporting it as well #130931 |
I would be happy to merge this (I won't block it). However, we should have some way to make sure we don't regress. |
ZeroIntensity
commented
Jun 27, 2025
I think including |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
vstinner
commented
Jul 3, 2025
I wrote test_cppext to test the public C API (headers). Please don't include the internal C API in test_cppext, or add new tests. |
Co-authored-by: Victor Stinner <vstinner@python.org>
ZeroIntensity
commented
Jul 3, 2025
Hm, why not? Wouldn't it be easier if we were able to catch regressions immediately instead of Cython or Greenlet complaining to us later? |
vstinner
commented
Jul 3, 2025
I mean that I would prefer to leave existing test_cppext unchanged. But you can add new tests on the internal C API if you want. |
vstinner
commented
Jul 3, 2025
I wrote #136247 to test the internal C API in test_cext. So far, I failed to test the internal C API with C++, I get many compiler errors from |
ZeroIntensity
commented
Jul 3, 2025
I think we can ignore mimalloc. Nobody--even Cython--is using that with the internal headers. |
vstinner
commented
Jul 3, 2025
|
ZeroIntensity
left a comment
There was a problem hiding this comment.
This change on its own looks good to me. We'll figure out testing this in #136247.
Uh oh!
There was an error while loading. Please reload this page.
Thanks @clin1234 for the PR, and @ZeroIntensity for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
…35892) Fixes build errors encountered in python-greenlet/greenlet#450 when building greenlet on the free-threaded build. --------- (cherry picked from commit fe187fa) Co-authored-by: Charlie Lin <tuug@gmx.us> Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org>
GH-136392 is a backport of this pull request to the 3.14 branch. |
GH-136392) gh-135906: Use `_PyObject_CAST` in internal headers (GH-135892) Fixes build errors encountered in python-greenlet/greenlet#450 when building greenlet on the free-threaded build. --------- (cherry picked from commit fe187fa) Co-authored-by: Charlie Lin <tuug@gmx.us> Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org>
…135892) Fixes build errors encountered in python-greenlet/greenlet#450 when building greenlet on the free-threaded build. --------- Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org>
…135892) Fixes build errors encountered in python-greenlet/greenlet#450 when building greenlet on the free-threaded build. --------- Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org>
…135892) Fixes build errors encountered in python-greenlet/greenlet#450 when building greenlet on the free-threaded build. --------- Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org>
…135892) Fixes build errors encountered in python-greenlet/greenlet#450 when building greenlet on the free-threaded build. --------- Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org>
…135892) Fixes build errors encountered in python-greenlet/greenlet#450 when building greenlet on the free-threaded build. --------- Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org>
Fixes build errors encountered in python-greenlet/greenlet#450 when building greenlet against CPython 3.14.0b3 free-threaded. Resolves#135906