bpo-46712: Let generate_global_objects.py Run on Earlier Python Versions (gh-31637)

https://bugs.python.org/issue46712
This commit is contained in:
Eric Snow 2022-03-01 14:29:54 -07:00 committed by GitHub
parent 3b0f1c5a71
commit 21099fc064
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -1176,7 +1176,7 @@ regen-importlib: regen-frozen
# Global objects
.PHONY: regen-global-objects
regen-global-objects: $(srcdir)/Tools/scripts/generate_global_objects.py
regen-global-objects: regen-deepfreeze $(srcdir)/Tools/scripts/generate_global_objects.py
$(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_global_objects.py
############################################################################

View File

@ -259,7 +259,7 @@ def generate_runtime_init(identifiers, strings):
printer.write(after)
def get_identifiers_and_strings() -> tuple[set[str], dict[str, str]]:
def get_identifiers_and_strings() -> 'tuple[set[str], dict[str, str]]':
identifiers = set(IDENTIFIERS)
strings = dict(STRING_LITERALS)
for name, string, *_ in iter_global_strings():