-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
gh-127405: Emit a deprecation warning about a future change of sys.abiflags
availability on Windows
#131717
base: main
Are you sure you want to change the base?
Conversation
…ailability on Windows
sys.abiflags
availability on Windowssys.abiflags
availability on Windows
This reverts commit 143145f.
Given the alternative of using I don't feel particularly strongly about this, so if @zooba thinks this is a good approach, then it's fine with me. |
The The recent update of the export PYTHON_TAG="$(
echo 'import sys, sysconfig; print(
"{0.name[0]}p{1.major}{1.minor}{2}".format(
sys.implementation,
sys.version_info,
getattr(sys, "abiflags", "t" if sysconfig.get_config_var("Py_GIL_DISABLED") else ""),
).lower(),
)' | ${{ env.PYTHON }} -
)" This would benefit from a valid The incoming |
In regular release builds, Ref: https://docs.python.org/3/library/exceptions.html#DeprecationWarning
Ref: https://docs.python.org/3/library/warnings.html#default-warning-filter
|
@@ -333,7 +334,12 @@ def get_makefile_filename(): | |||
if _PYTHON_BUILD: | |||
return os.path.join(_PROJECT_BASE, "Makefile") | |||
|
|||
if hasattr(sys, 'abiflags'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any details about the existence of sys.abiflags
for cross-compiling for Windows on Ubuntu? I found it might be non-trivial to replace the following with one another:
hasattr(sys, 'abiflags')
os.name == 'nt' # os.name != 'posix'
not sys.platform.startswith('win')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This requires a full-fledged What's New entry + possibly under the incompatible changes / porting to Python 3.14 code or something like that.
Emit a deprecation warning when accessing the
sys.abiflags
member if it is absent:See also:
sys.abiflags
on Windows to make check free-threaded/debug builds easier #127405 (comment)sys.abiflags
on Windows to make check free-threaded/debug builds easier #127405 (comment)📚 Documentation preview 📚: https://cpython-previews--131717.org.readthedocs.build/
sys.abiflags
on Windows to make check free-threaded/debug builds easier #127405