GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||
GeezerVison is showing github.com — gh-110119: Fix test_importlib `--disable-gil` Windows test failures by colesbury · Pull Request #110422 · python/cpython Conversation
|
|
cc @itamaro - this fixes one of the two Windows (EDIT: s/test_importlib/test_peg_generator) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| 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())) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
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"
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| 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 "" |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
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?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
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.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
We can maybe change that in Python 3.13 to make it consistent.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…ures (python#110422) Use "t" in the expected tag for `--disable-gil` builds in test_tagged_suffix.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.