You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Another suggestion is implementing num-bigint for Py_LIMITED_API. Since it is already using ffi::_PyLong_FromByteArray, using a python call through int.from_bytes and int.to_bytes will makes sense (with additional overhead).
I am sorry if this is a silly idea. Is this expected to be implemented on user side?
The text was updated successfully, but these errors were encountered:
In #3185 we are in the process of fixing a different abi3 case where support for num-complex diverged. Similarly here I would happily accept a PR where we used a lower performance fallback to add support here. (Most likely using int.from_bytes and int.to_bytes as you propose.)
Bug Description
It happens because num_bigint.rs has
#![cfg(all(feature = "num-bigint", not(any(Py_LIMITED_API))))]
on the top, right?If the features are actually not compatible, could there be any error or warning?
Steps to Reproduce
num-bigint
features and use the conversion features.abi3
Backtrace
No response
Your operating system and version
MacOS / 13.3.1
Your Python version (
python --version
)Python 3.11.1
Your Rust version (
rustc --version
)rustc 1.69.0 (84c898d65 2023-04-16)
Your PyO3 version
0.19.0
How did you install python? Did you use a virtualenv?
pyenv install 3.11.1 && pyenv virtualenv 3.11.1 pyo3 && pyenv local pyo3
Additional Info
Another suggestion is implementing num-bigint for Py_LIMITED_API. Since it is already using
ffi::_PyLong_FromByteArray
, using a python call throughint.from_bytes
andint.to_bytes
will makes sense (with additional overhead).I am sorry if this is a silly idea. Is this expected to be implemented on user side?
The text was updated successfully, but these errors were encountered: