gh-135437: Account For Duplicate Names in _PyCode_SetUnboundVarCounts() (gh-135438)

This commit is contained in:
Eric Snow 2025-06-13 16:47:49 -06:00 committed by GitHub
parent c7f4a80079
commit 56eabea056
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 40 additions and 5 deletions

View file

@ -701,6 +701,7 @@ def test_local_kinds(self):
'checks': CO_FAST_LOCAL,
'res': CO_FAST_LOCAL,
},
defs.spam_with_global_and_attr_same_name: {},
defs.spam_full_args: {
'a': POSONLY,
'b': POSONLY,
@ -955,6 +956,10 @@ def new_var_counts(*,
purelocals=5,
globalvars=6,
),
defs.spam_with_global_and_attr_same_name: new_var_counts(
globalvars=2,
attrs=1,
),
defs.spam_full_args: new_var_counts(
posonly=2,
posorkw=2,