Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-130740: Move somestdbool.h includes afterPython.h#130738

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
picnixz merged 7 commits intopython:mainfromchouquette:postpone_stdbool
Mar 2, 2025

Conversation

@chouquette
Copy link
Contributor

@chouquettechouquette commentedMar 1, 2025
edited by bedevere-appbot
Loading

Except when "pyconfig.h" is included first, and for platform specific code such as android/emscripten

Following up from#130641 (comment)

Except when "pyconfig.h" is included first, and for platform specificcode such as android/emscripten
@picnixz
Copy link
Member

I see that the original PR didn't have an issue number but I would have been comfortable with one. We can also add a NEWS for build as some people might patch the sources (at least they would be notified of the change even if it's not an important one).

Copy link
Member

@picnixzpicnixz left a comment

Choose a reason for hiding this comment

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

Just to be sure, butPython.h already includesstdbool.h right? So we can just outright remove it or is there a reason not to?

@chouquette
Copy link
ContributorAuthor

Just to be sure, butPython.h already includesstdbool.h right? So we can just outright remove it or is there a reason not to?

It doesn't, or at least not directly

@picnixzpicnixz changed the titleensure Python.h is included first in most circumstancesMovestdbool.h includes afterPython.hMar 1, 2025
@picnixzpicnixz changed the titleMovestdbool.h includes afterPython.hMove somestdbool.h includes afterPython.hMar 1, 2025
Copy link
Member

@picnixzpicnixz left a comment

Choose a reason for hiding this comment

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

It doesn't, or at least not directly

Oh I thought it did. Ok then the changes look good to me. Also, it's still better to include it explicitly.


PEP-7 doesn't say which includes should come first in general; should we treat local imports before standard ones, namely:

#include"Python.h"// include glibc or others system libs// include pycore_*// others?// local includes

so I think we can merge this one, unless someone tells me "no!". Just to be sure, I'll run the build bots on it to see if it causes some compilation failure. Don't commit in the meantime.

@chouquette
Copy link
ContributorAuthor

I added a NEWS entry, although I used the PR number as issue as well. Let me know that's OK enough

@picnixz
Copy link
Member

I added a NEWS entry, although I used the PR number as issue as well. Let me know that's OK enough

I don't think we can do it. We need an issue. I'll create one.

@picnixz
Copy link
Member

Feel free to use this one:#130740

@picnixzpicnixz changed the titleMove somestdbool.h includes afterPython.hgh-130740: Move somestdbool.h includes afterPython.hMar 1, 2025
@picnixz
Copy link
Member

Once you've updated the NEWS entry, I'll run the build bots (as Sam and I aren't sure which one is an issue/not an issue).

…SHR.rstCo-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Copy link
Member

@picnixzpicnixz left a comment

Choose a reason for hiding this comment

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

You need to delete one of the two blurb entries

Copy link
Member

@picnixzpicnixz left a comment

Choose a reason for hiding this comment

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

I'll run the build bots so don't touch the PR, TiA!

@picnixzpicnixz added the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelMar 1, 2025
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@picnixz for commit6a6e5b1 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F130738%2Fmerge

If you want to schedule another build, you need to add the🔨 test-with-buildbots label again.

@bedevere-botbedevere-bot removed the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelMar 1, 2025
@picnixzpicnixz self-assigned thisMar 1, 2025
@picnixzpicnixzenabled auto-merge (squash)March 2, 2025 09:35
@picnixzpicnixz merged commit214562e intopython:mainMar 2, 2025
42 checks passed
@picnixz
Copy link
Member

Thank you!

@picnixzpicnixz added needs backport to 3.12only security fixes needs backport to 3.13bugs and security fixes labelsMar 2, 2025
@miss-islington-app
Copy link

Thanks@chouquette for the PR, and@picnixz for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Thanks@chouquette for the PR, and@picnixz for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry,@chouquette and@picnixz, I could not cleanly backport this to3.12 due to a conflict.
Please backport usingcherry_picker on command line.

cherry_picker 214562ed4ddc248b007f718ed92ebcc0c3669611 3.12

@miss-islington-app
Copy link

Sorry,@chouquette and@picnixz, I could not cleanly backport this to3.13 due to a conflict.
Please backport usingcherry_picker on command line.

cherry_picker 214562ed4ddc248b007f718ed92ebcc0c3669611 3.13

@bedevere-app
Copy link

GH-130756 is a backport of this pull request to the3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelMar 2, 2025
picnixz pushed a commit to picnixz/cpython that referenced this pull requestMar 2, 2025
…hon#130738)Move some `#include <stdbool.h>` after `#include "Python.h"` when `pyconfig.h` is notincluded first and when we are in a platform-agnostic context. This is to avoid havingfeatures defined by `stdbool.h` before those decided by `Python.h`.
@bedevere-app
Copy link

GH-130757 is a backport of this pull request to the3.12 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.12only security fixes labelMar 2, 2025
picnixz added a commit that referenced this pull requestMar 3, 2025
…30738) (#130756)gh-130740: Move some `stdbool.h` includes after `Python.h` (#130738)Move some `#include <stdbool.h>` after `#include "Python.h"` when `pyconfig.h` is notincluded first and when we are in a platform-agnostic context. This is to avoid havingfeatures defined by `stdbool.h` before those decided by `Python.h` (this caused somebuild failures when compiling CPython with `zig cc`).(cherry-picked from commit214562e)---------Co-authored-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
@chouquettechouquette deleted the postpone_stdbool branchMarch 3, 2025 16:59
picnixz added a commit that referenced this pull requestMar 4, 2025
…30738) (#130757)gh-130740: Move some `stdbool.h` includes after `Python.h` (#130738)Move some `#include <stdbool.h>` after `#include "Python.h"` when `pyconfig.h` is notincluded first and when we are in a platform-agnostic context. This is to avoid havingfeatures defined by `stdbool.h` before those decided by `Python.h` (this caused somebuild failures when compiling CPython with `zig cc`).(cherry-picked from commit214562e)---------Co-authored-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
seehwan pushed a commit to seehwan/cpython that referenced this pull requestApr 16, 2025
…hon#130738)Move some `#include <stdbool.h>` after `#include "Python.h"` when `pyconfig.h` is notincluded first and when we are in a platform-agnostic context. This is to avoid havingfeatures defined by `stdbool.h` before those decided by `Python.h`.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@picnixzpicnixzpicnixz approved these changes

@pablogsalpablogsalAwaiting requested review from pablogsalpablogsal is a code owner

@lysnikolaoulysnikolaouAwaiting requested review from lysnikolaoulysnikolaou is a code owner

@gpsheadgpsheadAwaiting requested review from gpsheadgpshead is a code owner

@tirantiranAwaiting requested review from tiran

@iritkatrieliritkatrielAwaiting requested review from iritkatrieliritkatriel is a code owner

@markshannonmarkshannonAwaiting requested review from markshannonmarkshannon is a code owner

Assignees

@picnixzpicnixz

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@chouquette@picnixz@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp