[Python-checkins] bpo-35161: Fix stack-use-after-scope in grp.getgr{nam, gid} and pwd.getpw{nam, uid}. (GH-10319)