From 21099fc064c61d59c936a2f6a0db3e07cd5c8de5 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Tue, 1 Mar 2022 14:29:54 -0700 Subject: [PATCH] bpo-46712: Let generate_global_objects.py Run on Earlier Python Versions (gh-31637) https://bugs.python.org/issue46712 --- Makefile.pre.in | 2 +- Tools/scripts/generate_global_objects.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.pre.in b/Makefile.pre.in index 0383853901d..7b6f54a9ae0 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -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 ############################################################################ diff --git a/Tools/scripts/generate_global_objects.py b/Tools/scripts/generate_global_objects.py index 639d8fa91c6..867358cda89 100644 --- a/Tools/scripts/generate_global_objects.py +++ b/Tools/scripts/generate_global_objects.py @@ -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():