-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
'_PyLong_NumBits': identifier not found in 3.13 #119336
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
Comments
In 5846924 Victor restored
It seems reasonable to include |
Will it be restored in the next beta 3.13 release, or will I have to wait until the first 3.14 alpha release? |
This is used in pywin32, and the function being moved to internal headers broke with 3.13. Restore it for now to eventually be considered for being made a public symbol. See also pythongh-112026 (previous restoration) and pythongh-111481 (public replacements)
I cannot make that call, but I made #119418 against 3.14 for now (it can be backported for 3.13 if that's what people decide). Eventually it seems like a good idea to make this public. |
You can modify pywin32 to call the If this function is called by one project, we should consider making it public, rather than restoring the old private function. |
How would I access the built-in |
(Not taking a view on whether that justifies not restoring the function though) |
A code search in PyPI top 7,500 projects found other projects:
pickle5 and zodbpickle contain copies of the Python source code, but MariaDB is a good usage example. So maybe it's worth it to add a function. I created issue gh-119714: [C API] Add PyLong_GetNumBits() function. |
@encukou also identified that panda3d uses it: https://github.com/panda3d/panda3d/blob/adb92428856853019583f398d27c5d34e44a9343/panda/src/putil/bitArray_ext.cxx#L28 |
Function restored by commit e50fac9 |
…19418) It is used by the pywin32 project.
…19418) It is used by the pywin32 project.
Bug report
Bug description:
While fixing pywin32 to let CI builds work in Python 3.13, the build process complained of not being able to find
_PyLong_NumBits
. All other Python versions in the CI built successfully.The function still exists in
main
, apparently inaccessible via the public C API since 3.13. What's the recommended replacement?CPython versions tested on:
3.8, 3.9, 3.10, 3.11, 3.12, 3.13
Operating systems tested on:
Windows
Linked PRs
The text was updated successfully, but these errors were encountered: