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
While updating vtext crate from Pyo3 0.8 to 0.10 (and following the migration guide) I am getting the following error,
error[E0271]: type mismatch resolving `<tokenize::BaseTokenizer as pyo3::PyTypeInfo>::Initializer == pyo3::pyclass_init::PyNativeTypeInitializer<tokenize::BaseTokenizer>`
--> src/tokenize.rs:40:1
|
40 | #[pymethods]
| ^^^^^^^^^^^^ expected struct `pyo3::PyClassInitializer`, found struct `pyo3::pyclass_init::PyNativeTypeInitializer`
|
= note: expected struct `pyo3::PyClassInitializer<tokenize::BaseTokenizer>`
found struct `pyo3::pyclass_init::PyNativeTypeInitializer<tokenize::BaseTokenizer>`
= note: required because of the requirements on the impl of `std::convert::From<tokenize::UnicodeSegmentTokenizer>` for `pyo3::PyClassInitializer<tokenize::UnicodeSegmentTokenizer>`
= note: required because of the requirements on the impl of `std::convert::Into<pyo3::PyClassInitializer<tokenize::UnicodeSegmentTokenizer>>` for `tokenize::UnicodeSegmentTokenizer`
= note: required because of the requirements on the impl of `pyo3::derive_utils::IntoPyNewResult<tokenize::UnicodeSegmentTokenizer, tokenize::UnicodeSegmentTokenizer>` for `tokenize::UnicodeSegmentTokenizer`
= note: required by `pyo3::derive_utils::IntoPyNewResult::into_pynew_result`
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
🌍 Environment
Your operating system and version: Linux 5.0.0-38-generic Ubuntu 19.04
Your python version: 3.7.4
How did you install python? Conda with a conda virtualenv
Your Rust version (rustc --version): rustc 1.45.0-nightly (5fd2f06e9 2020-05-31)
Your PyO3 version: v0.10.1
Have you tried using latest PyO3 master (replace version = "0.x.y" with git = "https://github.com/PyO3/pyo3")?: I get the same error on master
I saw nothing related in the issue tracker, if anyone has pointer of for where to look that would be very much appreciated. It does seem to be related to the addition of the new #[pyclass] system in #683
Edit: could that issue be that the rust struct and the PyO3 struct that wraps it has the same name? Certainly not ideal, but it used to work before..
The text was updated successfully, but these errors were encountered:
While updating vtext crate from Pyo3 0.8 to 0.10 (and following the migration guide) I am getting the following error,
🌍 Environment
rustc --version
): rustc 1.45.0-nightly (5fd2f06e9 2020-05-31)version = "0.x.y"
withgit = "https://github.com/PyO3/pyo3")?
: I get the same error on master💥 Reproducing
Sorry not a minimal example, but this can be reproduced by running
pip install -e . -v
in rth/vtext#69 where the problematic class in question is for instance https://github.com/rth/vtext/blob/2337529bed5caf42221df01df686ed0c69ed3f58/python/src/tokenize.rs#L12-L54I saw nothing related in the issue tracker, if anyone has pointer of for where to look that would be very much appreciated. It does seem to be related to the addition of the new #[pyclass] system in #683
Edit: could that issue be that the rust struct and the PyO3 struct that wraps it has the same name? Certainly not ideal, but it used to work before..
The text was updated successfully, but these errors were encountered: