-
Notifications
You must be signed in to change notification settings - Fork 57
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
Build broken on Python 3.10 #46
Comments
To work around issues like MagicStack/immutables#46
You should use Py_SET_SIZE() which is available since Python 3.9. To support Python 3.8 and older, you can use:
My goal is to move slowly C extensions towards the limited C API, and so use the stable ABI. For the rationale, see: |
Sorry, it's not a good idea to use
I proposed python/cpython#20610 to enhance the documentation to explain how to port existing code to Py_SET_SIZE(): to propose this macro for backward compatibility. |
I created PR #52 to add Python 3.10 support to immutables. |
I tested manually on Fedora 33 with Python 3.10.0a2:
It's now possible to build immutables on Python 3.10 and the test suite pass ("75 passed, 77 skipped in 4.45s"). |
That's probably the C tests that were skipped. So there might be still some problem why the C extension wasn't built under 3.10 |
Oh. When tests are run from the source tree, "immutables._map" cannot be imported. If I create a venv and run the venv Python outside the source tree, I can import the extension. So the issue is just how I ran tests. immutables are not installed by pip. So I'm not sure what is the safe way to install it and then run tests? I had to remove immutables/ directory from the source tree to keep tests and be able to import immutables._map. |
I usually create a venv and do |
New Features * Add support for Python 3.10 and more tests (by @vstinner in 45105ec for #46, @hukkinj1 in d7f3eeb, f0b4fd4) * Make __repr__ more similar to other mapping types (by @ofek in 8af1502 for #17) Misc * Minor docs and CI fixes (by @MisterKeefe in 76e491c for #32, @fantix in 1282379 for #39)
New Features * Add support for Python 3.10 and more tests (by @vstinner in 45105ec for #46, @hukkinj1 in d7f3eeb, f0b4fd4) * Make __repr__ more similar to other mapping types (by @ofek in 8af1502 for #17) Misc * Minor docs and CI fixes (by @MisterKeefe in 76e491c for #32, @fantix in 1282379 for #39)
New Features * Add support for Python 3.10 and more tests (by @vstinner in 45105ec for #46, @hukkinj1 in d7f3eeb, f0b4fd4) * Make __repr__ more similar to other mapping types (by @ofek in 8af1502 for #17) Misc * Minor docs and CI fixes (by @MisterKeefe in 76e491c for #32, @fantix in 1282379 for #39)
python/cpython#20429
@vstinner If the motivation is to make PyObject* opaque in the limited ABI, then why did you also make this change in the non-limited ABI?
The text was updated successfully, but these errors were encountered: