From e4696738b94db19a0ec0abe76c10389dbd8fc0fb Mon Sep 17 00:00:00 2001 From: hauntsaninja Date: Tue, 8 Aug 2023 02:07:37 -0700 Subject: [PATCH 1/2] Fix incorrect use of re function in tests https://github.com/python/cpython/issues/99918#issuecomment-1333382582 --- news/732404DE-8011-4146-8CAD-85D7756D88A6.trivial.rst | 0 tests/lib/__init__.py | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 news/732404DE-8011-4146-8CAD-85D7756D88A6.trivial.rst diff --git a/news/732404DE-8011-4146-8CAD-85D7756D88A6.trivial.rst b/news/732404DE-8011-4146-8CAD-85D7756D88A6.trivial.rst new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/lib/__init__.py b/tests/lib/__init__.py index 7c06feaf38c..89c6aaa59a2 100644 --- a/tests/lib/__init__.py +++ b/tests/lib/__init__.py @@ -1187,7 +1187,7 @@ def create_basic_wheel_for_package( # Fix wheel distribution name by replacing runs of non-alphanumeric # characters with an underscore _ as per PEP 491 - name = re.sub(r"[^\w\d.]+", "_", name, re.UNICODE) + name = re.sub(r"[^\w\d.]+", "_", name, flags=re.UNICODE) archive_name = f"{name}-{version}-py2.py3-none-any.whl" archive_path = script.scratch_path / archive_name From baa5309dc877e1d5c6c377b02e1389f36c119429 Mon Sep 17 00:00:00 2001 From: hauntsaninja Date: Tue, 8 Aug 2023 02:34:03 -0700 Subject: [PATCH 2/2] remove flag --- tests/lib/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/__init__.py b/tests/lib/__init__.py index 89c6aaa59a2..b827f88ba13 100644 --- a/tests/lib/__init__.py +++ b/tests/lib/__init__.py @@ -1187,7 +1187,7 @@ def create_basic_wheel_for_package( # Fix wheel distribution name by replacing runs of non-alphanumeric # characters with an underscore _ as per PEP 491 - name = re.sub(r"[^\w\d.]+", "_", name, flags=re.UNICODE) + name = re.sub(r"[^\w\d.]+", "_", name) archive_name = f"{name}-{version}-py2.py3-none-any.whl" archive_path = script.scratch_path / archive_name