8000 gh-117873: Deprecate grp keyword arguments · vstinner/cpython@b8bde53 · GitHub
[go: up one dir, main page]

Skip to content

Commit b8bde53

Browse files
committed
pythongh-117873: Deprecate grp keyword arguments
1 parent 75eed5b commit b8bde53

File tree

4 files changed

+51
-3
lines changed

4 files changed

+51
-3
lines changed

Doc/whatsnew/3.13.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,10 @@ Deprecated
891891
*root_dir* argument instead.
892892
(Contributed by Barney Gale in :gh:`117337`.)
893893

894+
* :mod:`grp`: Deprecate passing keyword arguments to :func:`grp.getgrgid` and
895+
:func:`grp.getgrnam` functions.
896+
(Contributed by Victor Stinner in :gh:`117873`.)
897+
894898
* :mod:`http.server`: :class:`http.server.CGIHTTPRequestHandler` now emits a
895899
:exc:`DeprecationWarning` as it will be removed in 3.15. Process-based CGI
896900
HTTP servers have been out of favor for a very long time. This code was
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
:mod:`grp`: Deprecate passing keyword arguments to :func:`grp.getgrgid` and
2+
:func:`grp.getgrnam` functions. Patch by Victor Stinner.

Modules/clinic/grpmodule.c.h

Lines changed: 41 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Modules/grpmodule.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ mkgrent(PyObject *module, struct group *p)
114114
grp.getgrgid
115115
116116
id: object
117+
/ [from 3.15]
117118
118119
Return the group database entry for the given numeric group ID.
119120
@@ -122,7 +123,7 @@ If id is not valid, raise KeyError.
122123

123124
static PyObject *
124125
grp_getgrgid_impl(PyObject *module, PyObject *id)
125-
/*[clinic end generated code: output=30797c289504a1ba input=15fa0e2ccf5cda25]*/
126+
/*[clinic end generated code: output=30797c289504a1ba input=37d91205dc746913]*/
126127
{
127128
PyObject *retval = NULL;
128129
int nomem = 0;
@@ -194,6 +195,7 @@ grp_getgrgid_impl(PyObject *module, PyObject *id)
194195
grp.getgrnam
195196
196197
name: unicode
198+
/ [from 3.15]
197199
198200
Return the group database entry for the given group name.
199201
@@ -202,7 +204,7 @@ If name is not valid, raise KeyError.
202204

203205
static PyObject *
204206
grp_getgrnam_impl(PyObject *module, PyObject *name)
205-
/*[clinic end generated code: output=67905086f403c21c input=08ded29affa3c863]*/
207+
/*[clinic end generated code: output=67905086f403c21c input=9006cc8364872920]*/
206208
{
207209
char *buf = NULL, *buf2 = NULL, *name_chars;
208210
int nomem = 0;

0 commit comments

Comments
 (0)
0