Skip to content

Fix update-test-checks.py on Python 3.6 #93116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 23, 2024

Conversation

efriedma-quic
Copy link
Collaborator

re.Match apparently doesn't exist in older versions.

re.Match apparently doesn't exist in older versions.
@llvmbot
Copy link
Member

llvmbot commented May 23, 2024

@llvm/pr-subscribers-testing-tools

Author: Eli Friedman (efriedma-quic)

Changes

re.Match apparently doesn't exist in older versions.


Full diff: https://github.com/llvm/llvm-project/pull/93116.diff

1 Files Affected:

  • (modified) llvm/utils/UpdateTestChecks/common.py (+1-1)
diff --git a/llvm/utils/UpdateTestChecks/common.py b/llvm/utils/UpdateTestChecks/common.py
index 7da16e0f0cb2e..85c129488d950 100644
--- a/llvm/utils/UpdateTestChecks/common.py
+++ b/llvm/utils/UpdateTestChecks/common.py
@@ -1041,7 +1041,7 @@ def get_value_name(self, var: str, check_prefix: str):
         var = var.replace("-", "_")
         return var.upper()
 
-    def get_affixes_from_match(self, match: re.Match):
+    def get_affixes_from_match(self, match):
         prefix = re.match(self.ir_prefix, match.group(2)).group(0)
         suffix = re.search(self.ir_suffix + "$", match.group(2)).group(0)
         return prefix, suffix

Copy link
Collaborator

@jh7370 jh7370 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python 3.6 reached end of life in December 2021, so well over 2 years ago. Do we really need to support it? Is updating to a newer python not an option in this case?

@efriedma-quic efriedma-quic merged commit 779be6f into llvm:main May 23, 2024
5 of 6 checks passed
@efriedma-quic
Copy link
Collaborator Author

Do we really need to support it?

I could probably upgrade my Python my builds use personally. But the documentation still says 3.6, and the build system still enforces 3.6, so we should support 3.6 as long as that's true. If you want to change the minimum, please start a Discourse thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants