Uh oh!
There was an error while loading. Please reload this page.
bpo-35081: Rename internal headers - #10275
Conversation
serhiy-storchaka
commented
Nov 1, 2018
Why not use just the underscore prefix for distinguishing from public names, as common in Python? |
vstinner
commented
Nov 1, 2018
I plan to add one or two more subdirectories, so I will need more distinct prefixes, especially for "#ifndef Py_LIMITED_API" code. See: |
vstinner
commented
Nov 1, 2018
I created https://bugs.python.org/issue35134 and PR #10285 which should show better what I would like to do. |
vstinner
commented
Nov 6, 2018
@nascheme, @serhiy-storchaka, @zooba, @ncoghlan: Would you mind to review this PR? I would prefer to not rename/move files multiple times :-) |
vstinner
commented
Nov 8, 2018
Ah. There are now conflicts. I will fix them when this PR will be approved. |
Rename Include/internal/ headers: * pycore_hash.h -> pycore_pyhash.h * pycore_lifecycle.h -> pycore_pylifecycle.h * pycore_mem.h -> pycore_pymem.h * pycore_state.h -> pycore_pystate.h Add missing headers to Makefile.pre.in and PCbuild: * pycore_condvar.h. * pycore_hamt.h * pycore_pyhash.h
vstinner
commented
Nov 9, 2018
I plan to merge this change next week, if I don't get any feedback in the meanwhile. I rebased my change and fixed merge conflicts. |
ncoghlan
left a comment
There was a problem hiding this comment.
Adjust the header names so the regular headers and the pycore headers appear in the same order makes sense to me.
ncoghlan
commented
Nov 11, 2018
Oh, you shouldn't skip the NEWS entry though - NEWS entries are also for folks building from source, and moving header files around can absolutely break third party build scripts. |
vstinner
commented
Nov 11, 2018
Include/internal/ only contains code for Py_BUILD_CORE. This API is strictly private and so can be broken anytime. Do you see anything in Include/internal/ which is not... internal? |
vstinner
commented
Nov 11, 2018
I don't understand what you mean here. |
me:
@ncoghlan: I added again "skip news". Please tell me if I misunderstood you. Do you really want to describe internal changes in the Changelog? Benjamin Peterson documented "bpo-32264: Moved the pygetopt.h header into internal/, since it has no public APIs." This change impacts the "public API", so I agree that it deserves a NEWS entry. But here, I only modify the private internal API. |
vstinner
commented
Nov 12, 2018
Thanks for your review @ncoghlan! |
ncoghlan
commented
Nov 16, 2018
@vstinner For folks consuming source archives (Linux distros, anyone embedding Python in a larger application, etc) rather than prebuilt binaries, the build process is something that can break, even for For those folks, when they pull a new source archive, their builds may break, especially if they're applying additional downstream patches the way Linux distros do. The NEWS entry for this header file rearrangement should go in the Build section (https://github.com/python/cpython/tree/master/Misc/NEWS.d/next/Build) rather than the C API section (since these headers aren't part of the public API at all), but it should still exist. |
Rename Include/internal/ headers:
Add missing headers to Makefile.pre.in and PCbuild:
https://bugs.python.org/issue35081