FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-110119: Fix test_importlib `--disable-gil` Windows test failures by colesbury · Pull Request #110422 · python/cpython · GitHub

Repository navigation

gh-110119: Fix test_importlib --disable-gil Windows test failures - #110422

Merged
vstinner merged 2 commits into
python:mainfrom
colesbury:disable_gil_win
Oct 5, 2023
Merged

vstinner merged 2 commits into
python:mainfrom
colesbury:disable_gil_win

Conversation

colesbury commented Oct 5, 2023 •
edited
Loading

Copy link
Copy Markdown
Contributor

Use "t" in the expected tag for --disable-gil builds in test_tagged_suffix.

…ures

Use "t" in the expected tag for `--disable-gil` builds in test_tagged_suffix.

colesbury commented Oct 5, 2023 •
edited
Loading

Copy link
Copy Markdown
Contributor Author

cc @itamaro - this fixes one of the two Windows --disable-gil buildbot failures. I'm still trying to reproduce the test_peg_generator failures.

(EDIT: s/test_importlib/test_peg_generator)

colesbury requested a review from vstinner October 5, 2023 18:54
Comment thread Lib/test/test_importlib/test_windows.py Outdated
Comment on lines 115 to 118
threading_tag = "t" if sysconfig.get_config_var("Py_NOGIL") else ""
expected_tag = ".cp{0.major}{0.minor}{1}-{2}.pyd".format(sys.version_info,
threading_tag,
re.sub('[^a-zA-Z0-9]', '_', get_platform()))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This code looks too complicated for what it is. I suggest:

        abi_flags = "t" if sysconfig.get_config_var("Py_NOGIL") else ""
        ver = sys.version_info
        platform = re.sub('[^a-zA-Z0-9]', '_', get_platform())
        expected_tag = f".cp{ver.major}{ver.minor}{abi_flags}-{platform}.pyd"

colesbury requested a review from vstinner October 5, 2023 19:20

vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

suffixes = self.machinery.EXTENSION_SUFFIXES
expected_tag = ".cp{0.major}{0.minor}-{1}.pyd".format(sys.version_info,
re.sub('[^a-zA-Z0-9]', '_', get_platform()))
abi_flags = "t" if sysconfig.get_config_var("Py_NOGIL") else ""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Now I'm confused. On Windows, sys.abiflags doesn't exist? It doesn't look practical that sys.abiflags doesn't exist to look for PYD files :-(

Maybe we should now add this flag?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The awkward bit is that debug libraries are indicated as a _d prefix like, foo_d.cp313t-win_amd64.pyd instead of as part of the abiflags. Still might be useful.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

We can maybe change that in Python 3.13 to make it consistent.

vstinner enabled auto-merge (squash) October 5, 2023 19:43
vstinner merged commit 3c2f321 into python:main Oct 5, 2023
colesbury deleted the disable_gil_win branch October 6, 2023 15:40
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
…ures (python#110422)

Use "t" in the expected tag for `--disable-gil` builds in test_tagged_suffix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL