https://github.com/python/cpython/commit/f3352c275f804252301a7c9de4c3ee3e0556a4af commit: f3352c275f804252301a7c9de4c3ee3e0556a4af branch: 3.15 author: Miss Islington (bot) <[email protected]> committer: JelleZijlstra <[email protected]> date: 2026-10-20T11:13:56-07:00 summary:
[3.15] gh-159739: Track group records for cyclic garbage collection (GH-159778) (#159904) (cherry picked from commit c2deb791c5381b2c97db4b92e0289ad9c60460ff) Co-authored-by: Jelle Zijlstra <[email protected]> Co-authored-by: Jelle Zijlstra <[email protected]> files: A Misc/NEWS.d/next/Library/2026-10-19-20-38-17.gh-issue-159739.bc65da.rst M Modules/grpmodule.c diff --git a/Misc/NEWS.d/next/Library/2026-10-19-20-38-17.gh-issue-159739.bc65da.rst b/Misc/NEWS.d/next/Library/2026-10-19-20-38-17.gh-issue-159739.bc65da.rst new file mode 100644 index 00000000000000..fd831b6907e777 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2026-10-19-20-38-17.gh-issue-159739.bc65da.rst @@ -0,0 +1,2 @@ +Allow cyclic garbage collection to reclaim group records returned by +:mod:`grp`. diff --git a/Modules/grpmodule.c b/Modules/grpmodule.c index 32ead259803614..aa1d739c6cf708 100644 --- a/Modules/grpmodule.c +++ b/Modules/grpmodule.c @@ -111,6 +111,7 @@ mkgrent(PyObject *module, struct group *p) return NULL; } + PyObject_GC_Track(v); return v; } _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
