Skip to content

gh-156261: Use the uid_t and gid_t converters in the pwd and grp modules - #156294

Open
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:clinic-uid-gid-converters
Open

gh-156261: Use the uid_t and gid_t converters in the pwd and grp modules#156294
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:clinic-uid-gid-converters

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Aug 23, 2026

Copy link
Copy Markdown
Member

The uid_t and gid_t converters are moved to Argument Clinic, so that pwd.getpwuid() and grp.getgrgid() can declare the type of their parameter instead of converting it in the "impl" function.

pwd.getpwuid() now raises OverflowError instead of KeyError for a user id out of the range of uid_t, as grp.getgrgid() already did.

…p modules

They are moved to Argument Clinic, so that pwd.getpwuid() and
grp.getgrgid() can declare the type of their parameter instead of
converting it in the "impl" function.

pwd.getpwuid() now raises OverflowError instead of KeyError for a user id
out of the range of uid_t, as grp.getgrgid() already did.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant