GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bpo-35134: Create Include/cpython/ subdirectory by vstinner · Pull Request #10624 · python/cpython

Conversation

@vstinner

@vstinner vstinner commented Nov 20, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Include/.h should be the "portable Python API", whereas
Include/cpython/
.h should be the "CPython API": CPython
implementation details.

Changes:

  • Create Include/cpython/ subdirectory
  • "make install" now creates $prefix/include/cpython and copy
    Include/cpython/* to $prefix/include/cpython
  • Create Include/cpython/objimpl.h: move objimpl.h code
    surrounded by "#ifndef Py_LIMITED_API" to cpython/objimpl.h.
  • objimpl.h now includes cpython/objimpl.h

https://bugs.python.org/issue35134

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@vstinner
vstinner requested review from ncoghlan and serhiy-storchaka November 20, 2018 22:37
@vstinner
vstinner requested a review from a team as a code owner November 20, 2018 22:37
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Nov 20, 2018
@bedevere-bot bedevere-bot added the awaiting merge label Nov 20, 2018
@vstinner vstinner mentioned this pull request Nov 20, 2018
[WIP] bpo-35134: Create Include/pycapi/ subdirectory #10285
Closed
@vstinner
vstinner requested a review from ericsnowcurrently November 20, 2018 22:48
@vstinner

vstinner commented Nov 20, 2018

Copy link
Copy Markdown
Member Author

I rebased my change on top of master to retrieve PR #10626 bugfix.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented Nov 21, 2018

Copy link
Copy Markdown
Member Author

@ncoghlan, @serhiy-storchaka, @pitrou, @zooba, @ericsnowcurrently: Would you mind to review this PR? I created a new Include/unstable/ subdirectory for all "#ifndef Py_LIMITED_API" APIs. See https://bugs.python.org/issue35134 for the rationale.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented Nov 21, 2018

Copy link
Copy Markdown
Member Author

I plan to merge this PR next week.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ncoghlan
ncoghlan approved these changes Nov 22, 2018
View reviewed changes
Comment thread Include/unstable/objimpl.h Outdated

@ncoghlan ncoghlan Nov 22, 2018

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to quibble about the directory name, but given this style of inclusion (i.e. only implicitly via the public header file when Py_LIMITED_API is not defined), I think 'unstable' is OK.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@vstinner vstinner Nov 22, 2018

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mostly wrote this #error to prevent the risk of bikeshedding, LOL!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ncoghlan reacted with laugh emoji
All reactions
  • 😄 1 reaction
@vstinner

vstinner commented Nov 22, 2018

Copy link
Copy Markdown
Member Author

@ncoghlan: You approved the PR but proposed a different directory name. Are you ok with "unstable" name? https://bugs.python.org/issue35134#msg330261

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented Nov 22, 2018

Copy link
Copy Markdown
Member Author

Note: this PR is my second attempt, the first one was PR #10285 which wasn't properly designed.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@zooba

zooba commented Nov 22, 2018

Copy link
Copy Markdown
Member

There's no real easy way to test it, but Tools/msi/dev/dev.wixproj is going to need its <InstallFiles Include="$(PySourcePath)include\*.h"> line changed to <InstallFiles Include="$(PySourcePath)include\**\*.h"> (or a semi-colon separated list of directories to include in the installer).

Better to make the change now and cause the installer build to break than to accidentally ship without necessary headers. If it doesn't work, I'll fix it up.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented Nov 22, 2018

Copy link
Copy Markdown
Member Author

@zooba: Aha, I was looking for the code of the Windows installer.

Tools/msi/dev/dev.wixproj is going to need its line changed to

Right now, Include/internal/ is not installed (on Unix at least). I just proposed to install these headers as well: https://bugs.python.org/issue35296

Would it be possible to only update the MSI installer once this PR and PR #10665 are merged?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner vstinner changed the title bpo-35134: Create Include/unstable/ subdirectory bpo-35134: Create Include/cpython/ subdirectory Nov 23, 2018
@vstinner

vstinner commented Nov 23, 2018

Copy link
Copy Markdown
Member Author

I renamed the subdirectory from Include/unstable/ to Include/cpython/.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@zooba

zooba commented Nov 23, 2018

Copy link
Copy Markdown
Member

@vstinner If you're willing to keep reminding me to do it once this is merged until it's done, sure.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner
bpo-35134: Create Include/cpython/ subdirectory
9aa3567
Include/*.h should be the "portable Python API", whereas
Include/cpython/*.h should be the "CPython API": CPython
implementation details.

Changes:

* Create Include/cpython/ subdirectory
* "make install" now creates $prefix/include/cpython and copy
  Include/cpython/* to $prefix/include/cpython
* Create Include/cpython/objimpl.h: move objimpl.h code
  surrounded by "#ifndef Py_LIMITED_API" to cpython/objimpl.h.
* objimpl.h now includes cpython/objimpl.h
* Windows installer (MSI) now also install Include/ subdirectories:
  Include/cpython/ and Include/internal/.
@vstinner

vstinner commented Nov 23, 2018

Copy link
Copy Markdown
Member Author

@vstinner If you're willing to keep reminding me to do it once this is merged until it's done, sure.

I merged my PR #10665 (make install now installs the internal API) and I udpated this PR to apply your proposed change in MSI (copy Include/**/*.h).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner
vstinner merged commit e421106 into python:master Nov 23, 2018
@bedevere-bot bedevere-bot removed the awaiting merge label Nov 23, 2018
@vstinner
vstinner deleted the unstable_api branch November 23, 2018 16:00
@ncoghlan

ncoghlan commented Nov 24, 2018

Copy link
Copy Markdown
Contributor

@vstinner While I preferred "cpython" as the directory name, I was OK with "unstable", hence the original approval. I'm happy you decided to switch the name anyway, though :)

vstinner reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner vstinner mentioned this pull request Apr 10, 2022
Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details #79315
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ncoghlan ncoghlan ncoghlan approved these changes
@serhiy-storchaka serhiy-storchaka Awaiting requested review from serhiy-storchaka
@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@vstinner @zooba @ncoghlan @the-knights-who-say-ni @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.