Skip to content
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

[BUG] Error formatting error message in bdist_wheel on Windows #4807

Open
ngoldbaum opened this issue Jan 16, 2025 · 0 comments · May be fixed by #4809
Open

[BUG] Error formatting error message in bdist_wheel on Windows #4807

ngoldbaum opened this issue Jan 16, 2025 · 0 comments · May be fixed by #4809
Labels
bug Needs Triage Issues that need to be evaluated for severity and status.

Comments

@ngoldbaum
Copy link

ngoldbaum commented Jan 16, 2025

setuptools version

75.8.0

Python version

3.13t

OS

Windows

Additional environment information

No response

Description

sys.abiflags is not defined on Windows, so this error message leads to a crash instead of a useful error there:

f"`Py_GIL_DISABLED` ({sys.abiflags=!r}). "

Expected behavior

An error telling me to not set Py_LIMITED_API

How to Reproduce

I think you can hit this doing setup.py bdist_wheel with a free-threaded Python on Windows. I hit it trying to build wheels for bcrypt.

See this CI run: https://github.com/ngoldbaum/bcrypt/actions/runs/12818690186/job/35744737249#step:7:100

Output

    File "C:\hostedtoolcache\windows\Python\3.13.1\x64-freethreaded\Lib\site-packages\setuptools\command\bdist_wheel.py", line 297, in _validate_py_limited_api
      f"`Py_GIL_DISABLED` ({sys.abiflags=!r}). "
                            ^^^^^^^^^^^^
  AttributeError: module 'sys' has no attribute 'abiflags'
@ngoldbaum ngoldbaum added bug Needs Triage Issues that need to be evaluated for severity and status. labels Jan 16, 2025
@ngoldbaum ngoldbaum linked a pull request Jan 17, 2025 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Needs Triage Issues that need to be evaluated for severity and status.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant