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 — [3.13] gh-136759: rename `lock.h` to `pylock.h` (GH-137041) by aisk · Pull Request #137075 · python/cpython

Conversation

@aisk

@aisk aisk commented Jul 24, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Rename lock.h to pylock.h to avoid conflicts with headers of other projects. (cherry picked from commit ec02db5)

  • Issue: <lock.h> filename is too generic #136759

Sorry, something went wrong.

Uh oh!

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

All reactions
@aisk
[3.13] pythongh-136759: rename lock.h to pylock.h (pythonGH-137041)
14bf176
Rename `lock.h` to `pylock.h` to avoid conflicts with headers of other projects.
(cherry picked from commit ec02db5)

Co-authored-by: AN Long <[email protected]>
@aisk
aisk requested a review from a team as a code owner July 24, 2025 13:22
@bedevere-app bedevere-app Bot added the awaiting review label Jul 24, 2025
This was referenced Jul 24, 2025
<lock.h> filename is too generic #136759
Closed
gh-136759: Rename lock.h to pylock.h #137041
Merged
kumaraditya303
kumaraditya303 approved these changes Jul 24, 2025
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Jul 24, 2025
@kumaraditya303 kumaraditya303 added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jul 24, 2025
@bedevere-bot

bedevere-bot commented Jul 24, 2025

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @kumaraditya303 for commit 14bf176 🤖

Results will be shown at:

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

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jul 24, 2025
@kumaraditya303
kumaraditya303 merged commit 74503ac into python:3.13 Jul 24, 2025
@bedevere-app bedevere-app Bot removed the awaiting merge label Jul 24, 2025
@aisk
aisk deleted the backport-ec02db5-3.13 branch July 24, 2025 23:51
@zooba

zooba commented Jul 28, 2025

Copy link
Copy Markdown
Member

Oh no no no, this is way too big a change for 3.13. The file system layout is fixed from beta 1 - changing in 3.14rc2 is a big enough breach of our compatibility policy, but this one should definitely be reverted (as annoying as that is for people with other projects that provide this file).

Our own references to the header should be relative (i.e. #include "lock.h" rather than <lock.h>), and so putting the Python headers below the other headers should work fine.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app

bedevere-app Bot commented Jul 28, 2025

Copy link
Copy Markdown

GH-137166 is a backport of this pull request to the 3.13 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

kumaraditya303 added a commit to kumaraditya303/cpython that referenced this pull request Jul 28, 2025
@kumaraditya303
Revert "[3.13] pythongh-136759: rename lock.h to pylock.h (python…
b3f790f
…GH-137041) (python#137075)"

This reverts commit 74503ac.
@kumaraditya303

kumaraditya303 commented Jul 28, 2025

Copy link
Copy Markdown
Contributor

Oh no no no, this is way too big a change for 3.13. The file system layout is fixed from beta 1 - changing in 3.14rc2 is a big enough breach of our compatibility policy, but this one should definitely be reverted (as annoying as that is for people with other projects that provide this file).

Sorry, I created the revert PR here #137166 but it does mean that this issue will be forever in 3.13.

All reactions

Sorry, something went wrong.

Uh oh!

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

@zooba

zooba commented Jul 28, 2025

Copy link
Copy Markdown
Member

it does mean that this issue will be forever in 3.13.

Yeah, that's the nature of compatibility! It also means that anyone whose #include <lock.h> currently works will continue working, which is the more important side of things.

All reactions

Sorry, something went wrong.

Uh oh!

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

kumaraditya303 added a commit that referenced this pull request Jul 28, 2025
@kumaraditya303
[3.13] gh-136759: revert rename lock.h to pylock.h (GH-137041) (#…
3f57d9b
…137075) (#137166)

Revert "[3.13] gh-136759: rename `lock.h` to `pylock.h` (GH-137041) (#137075)"

This reverts commit 74503ac.
@dehnert dehnert mentioned this pull request Aug 2, 2025
Python 3.13 compatibility mit-athena/python-afs#6
Open
dehnert added a commit to dehnert/nixathena that referenced this pull request Aug 3, 2025
@dehnert
python-afs: Compatibility with Python 3.13
6ea4835
Python 3.13 introduces a header <lock.h>, which conflicts with OpenAFS's
identically-named header. Python 3.15 will probably rename it to
pylock.h[1], but it's here for Python 3.13 and probably Python 3.14[2].

In the interim, force OpenAFS's headers to come before Python's when
building python-afs. This is a little tricky, because Python's headers
use -I by default while OpenAFS's use -isystem, and -I headers all come
before -isystem ones. However, if we add Python headers with -isystem at
the start of the compiler command, Python's -I will be treated as a dup
of a system header, and Python's headers will be moved to the system
section of the search path. *However*, because they're at the *start* of
the search path, they'll still beat OpenAFS, so we need to also add
-isystem for OpenAFS at the start of the compiler command, so the
relative order among the system section is correct.

Upstream mit-athena/python-afs has an issue for this[3], but because Nix
builds weirdly, the patch I wrote there doesn't work for Nix.

[1] python/cpython#136759
[2] python/cpython#137075 (comment)
[3] mit-athena/python-afs#6
@aisk aisk mentioned this pull request Aug 12, 2025
[3.14] gh-136759: rename lock.h to pylock.h (GH-137041) #137072
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@kumaraditya303 kumaraditya303 kumaraditya303 approved these changes

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.

4 participants

@aisk @bedevere-bot @zooba @kumaraditya303
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.