-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add compile errors for abi3 builds #8
Comments
I've just noticed that PyDateTime itself is available only non |
The Py_LIMITED_API cfg is generated in pyo3's build.rs and doesn't apply to dependent crates like pyo3-chrono. And we can't check the abi3 feature either because crates can only gate on their own features: I don't think there's anything pyo3-chrono can reasonably implement to catch this error. Except note the gotcha in the documentation, I guess |
Folks on the Rust community server said the following (link):
Soo, try the master branch of pyo3 I guess? |
Thanks for the response, especially for going the extra mile by looking for alternative solutions. I didn't realize we can't check for features of dependencies. I'd say that pyo3_build_config would be the best way to go as it seems that it exists exactly for cases like this. I've seen some issues in pyo3 from which it seemed like the maintainers explicitly do not want to support chrono directly but I might have overlooked some later issues. |
This crate depends on traits that state
Available on non-Py_LIMITED_API only
. This basically means that pyo3 must not have theabi3
feature enabled as far as I understand it, but my knowledge here is limited.If there is a good reason for this, I would propose to at least add
compile_error!
macros to the crate because now I was left a bit stumped when the compilation ofpyo3-chrono
failed with 10 errors about non-existing types frompyo3
.An example of the error (there are more but basically the same with different types):
The text was updated successfully, but these errors were encountered: