https://github.com/python/cpython/commit/9be364568835e467199ccd65bbcd786f9c8171dc
commit: 9be364568835e467199ccd65bbcd786f9c8171dc
branch: main
author: Eric Snow <[email protected]>
committer: ericsnowcurrently <[email protected]>
date: 2025-04-21T16:58:10Z
summary:
gh-132777: Fix Error Message for Duplicates in generate_global_scripts.py
(gh-132780)
The fstring would actually raise a KeyError, which we fix. We also adjust the
text to be correct.
files:
M Tools/build/generate_global_objects.py
diff --git a/Tools/build/generate_global_objects.py
b/Tools/build/generate_global_objects.py
index 29bd995655e0b3..94905b3756d0d8 100644
--- a/Tools/build/generate_global_objects.py
+++ b/Tools/build/generate_global_objects.py
@@ -439,7 +439,7 @@ def get_identifiers_and_strings() -> 'tuple[set[str],
dict[str, str]]':
if string not in strings:
strings[string] = name
elif name != strings[string]:
- raise ValueError(f'string mismatch for {name!r} ({string!r} !=
{strings[name]!r}')
+ raise ValueError(f'name mismatch for string {string!r}
({name!r} != {strings[string]!r}')
overlap = identifiers & set(strings.keys())
if overlap:
raise ValueError(
_______________________________________________
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]