-
Notifications
You must be signed in to change notification settings - Fork 792
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
Remove self-dev-dependency from Cargo.toml #1817
Comments
I think a doctests / example would still need an alternative solution. Could just put |
Hmm, this actually makes the problem worse - it means that the tests even stop building without the I'm not sure we can resolve easily without upstream support in Cargo? |
I think the "easiest" solution would be to either move those tests to |
I agree that's the most theoretically correct path, however it also seems impractical for PyO3's general maintenance. The Pretty much all of the unit tests and doctests in PyO3 need to interact with the Python interpreter, so unless every test added boilerplate to initialize the GIL (i.e. a call to I also think that most users and maintainers rightly expect that Indeed the issue which spawned this discussion uses My personal opinion here is that it's extremely desirable to have I'd really like any solution we explore here to maintain the current usefulness of bare Perhaps there's scope for an API like I don't particularly like the name |
I think this would be an acceptable workaround for the problem we have in Fedora packaging, as it's trivially easy to just add this flag in our packaging. |
From the discussion in #1811, it sounds like the use of
path = .
dev-dependency is ill-advised.pyo3/Cargo.toml
Line 41 in 79c7e28
@decathorpe - the use of this arose because
cargo test
without the features enabled by the self-dev-dependency is more-or-less pointless - we need theauto-initialize
feature enabled else every test will fail when trying to get the Python interpreter. Perhaps I can come up with a better solution for that.FWIW this was recommended in rust-lang/cargo#2911 (comment)
The text was updated successfully, but these errors were encountered: