Uh oh!
There was an error while loading. Please reload this page.
gh-116984: Install mimalloc headers - #116985
Conversation
c0f3b47 to
deef17cCompare
colesbury
left a comment
There was a problem hiding this comment.
I think we should only install the headers if Python is built with mimalloc (i.e., not configured with --without-mimalloc).
3d63aa4 to
a969e35Comparea969e35 to
78c228bCompareUh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
colesbury
left a comment
There was a problem hiding this comment.
This looks good to me, but I'll wait for other people to leave their feedback.
As written in the devguide, for users, the internal API is sometimes "the best workaround for a thorny problem", so we want it to compile successfully in an Python installation.
At the same time, we don't always prefix names with Py or _Py in the internal API, so including CPython internal headers can lead to language level name conflicts. In this case, if an extensions includes our internal headers and bundles mimalloc, they could run into problems. While not ideal, I don't think that's a reason not to make the internal headers compile at all in installations.
oraluben
commented
Apr 23, 2024
Hi @vstinner , would you like to help landing this? |
erlend-aasland
commented
Apr 23, 2024
Thanks @oraluben and @colesbury! |
This PR installs mimalloc headers and allow extensions that access
pycore_*.hcontinue working.Such extensions need to explicitly add
internal/mimallocto its header search path.