{{ message }}
gh-110119: Fix test_importlib --disable-gil Windows test failures - #110422
Merged
Merged
Conversation
…ures Use "t" in the expected tag for `--disable-gil` builds in test_tagged_suffix.
colesbury
requested review from
brettcannon,
ericsnowcurrently,
ncoghlan and
warsaw
as code owners
October 5, 2023 18:53
Contributor
Author
vstinner
reviewed
Oct 5, 2023
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())) |
Member
There was a problem hiding this comment.
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"
vstinner
approved these changes
Oct 5, 2023
Member
There was a problem hiding this comment.
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?
Contributor
Author
There was a problem hiding this comment.
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.
Member
There was a problem hiding this comment.
We can maybe change that in Python 3.13 to make it consistent.
vstinner
enabled auto-merge (squash)
October 5, 2023 19:43
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Use "t" in the expected tag for
--disable-gilbuilds in test_tagged_suffix.--disable-giltest failures due to ABI flag #110119