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 — gh-116738: Make pwd module thread-safe by yoney · Pull Request #136695 · python/cpython

Conversation

@yoney

@yoney yoney commented Jul 15, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Make the pwd module functions getpwuid(), getpwnam(), and getpwall() thread-safe. These changes apply to scenarios where the GIL is disabled or in subinterpreter use cases.

  • PR removes Py_LIMITED_API to use PyMutex, necessary for both FT-Python and subinterpreter use cases, similar to changes in the grp module (gh-126316: Make grp.getgrall() thread-safe: add a mutex #127055).

cc: @mpage @colesbury @Yhg1s

  • Issue: Audit all built-in modules for thread safety #116738

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-app bedevere-app Bot mentioned this pull request Jul 15, 2025
Audit all built-in modules for thread safety #116738
Open
@yoney

yoney commented Jul 15, 2025

Copy link
Copy Markdown
Contributor Author

Note: I am not sure if there is a CI setup where getpwuid_r()/getpwnam_r() are not available. I tested those manually on my local machine.

All reactions

Sorry, something went wrong.

Uh oh!

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

@yoney
pythongh-116738: Make pwd module thread-safe
3a5cb3c
@yoney
yoney force-pushed the ft_pwdmodule branch from a2f9c72 to 3a5cb3c Compare July 15, 2025 22:34
@yoney
yoney marked this pull request as ready for review July 15, 2025 22:59
@yoney
yoney requested a review from ericsnowcurrently as a code owner July 15, 2025 22:59
@bedevere-app bedevere-app Bot added the awaiting review label Jul 15, 2025
@kumaraditya303 kumaraditya303 added the topic-free-threading label Jul 16, 2025
@mpage
mpage requested review from Yhg1s, colesbury and mpage July 16, 2025 17:06
mpage
mpage approved these changes Jul 16, 2025
View reviewed changes

@mpage mpage left a comment

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.

Looks great! I'll wait to merge for a day or two to give other folks a chance to look.

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Jul 16, 2025
colesbury
colesbury approved these changes Jul 16, 2025
View reviewed changes
kumaraditya303
kumaraditya303 approved these changes Jul 17, 2025
View reviewed changes
@mpage
mpage merged commit eddc8c0 into python:main Jul 17, 2025
@bedevere-app bedevere-app Bot removed the awaiting merge label Jul 17, 2025
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
@yoney @taegyunkim
pythongh-116738: Make pwd module thread-safe (python#136695)
daf19e5
Make the pwd module functions getpwuid(), getpwnam(), and getpwall() thread-safe. These changes apply to scenarios where the GIL is disabled or in subinterpreter use cases.
Agent-Hellboy pushed a commit to Agent-Hellboy/cpython that referenced this pull request Aug 19, 2025
@yoney @Agent-Hellboy
pythongh-116738: Make pwd module thread-safe (python#136695)
88a064a
Make the pwd module functions getpwuid(), getpwnam(), and getpwall() thread-safe. These changes apply to scenarios where the GIL is disabled or in subinterpreter use cases.
@yoney
yoney deleted the ft_pwdmodule branch October 19, 2025 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@mpage mpage mpage approved these changes
@colesbury colesbury colesbury approved these changes
@kumaraditya303 kumaraditya303 kumaraditya303 approved these changes
@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently is a code owner
@Yhg1s Yhg1s Awaiting requested review from Yhg1s

Uh oh!

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

Assignees

No one assigned

Labels

topic-free-threading

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

@yoney @mpage @colesbury @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.