Update pyo3 to v0.22 and update code to use pyo3 Bound
types
#689
clippy
26 errors, 1 warning
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 26 |
Warning | 1 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.79.0 (129f3b996 2024-06-10)
- cargo 1.79.0 (ffa9cf99a 2024-06-03)
- clippy 0.1.79 (129f3b9 2024-06-10)
Annotations
Check failure on line 410 in src/lib.rs
github-actions / clippy
the trait bound `&pyo3::prelude::PyModule: std::convert::From<pyo3::impl_::pymethods::BoundRef<'_, '_, pyo3::prelude::PyModule>>` is not satisfied
error[E0277]: the trait bound `&pyo3::prelude::PyModule: std::convert::From<pyo3::impl_::pymethods::BoundRef<'_, '_, pyo3::prelude::PyModule>>` is not satisfied
--> src/lib.rs:410:1
|
410 | #[pymodule]
| ^^^^^^^^^^^ the trait `std::convert::From<pyo3::impl_::pymethods::BoundRef<'_, '_, pyo3::prelude::PyModule>>` is not implemented for `&pyo3::prelude::PyModule`, which is required by `pyo3::impl_::pymethods::BoundRef<'_, '_, pyo3::prelude::PyModule>: std::convert::Into<_>`
|
= note: required for `pyo3::impl_::pymethods::BoundRef<'_, '_, pyo3::prelude::PyModule>` to implement `std::convert::Into<&pyo3::prelude::PyModule>`
= note: this error originates in the attribute macro `pymodule` (in Nightly builds, run with -Z macro-backtrace for more info)
Check failure on line 421 in src/lib.rs
github-actions / clippy
no method named `add_class` found for reference `&pyo3::prelude::PyModule` in the current scope
error[E0599]: no method named `add_class` found for reference `&pyo3::prelude::PyModule` in the current scope
--> src/lib.rs:421:7
|
421 | m.add_class::<Inventory>()?;
| ^^^^^^^^^ method not found in `&PyModule`
Check failure on line 419 in src/lib.rs
github-actions / clippy
no method named `add_class` found for reference `&pyo3::prelude::PyModule` in the current scope
error[E0599]: no method named `add_class` found for reference `&pyo3::prelude::PyModule` in the current scope
--> src/lib.rs:419:7
|
419 | m.add_class::<NodeInfo>()?;
| ^^^^^^^^^ method not found in `&PyModule`
Check failure on line 418 in src/lib.rs
github-actions / clippy
no method named `add_class` found for reference `&pyo3::prelude::PyModule` in the current scope
error[E0599]: no method named `add_class` found for reference `&pyo3::prelude::PyModule` in the current scope
--> src/lib.rs:418:7
|
418 | m.add_class::<NodeInfoMeta>()?;
| ^^^^^^^^^ method not found in `&PyModule`
Check failure on line 416 in src/lib.rs
github-actions / clippy
no method named `add_class` found for reference `&pyo3::prelude::PyModule` in the current scope
error[E0599]: no method named `add_class` found for reference `&pyo3::prelude::PyModule` in the current scope
--> src/lib.rs:416:7
|
416 | m.add_class::<CompatFlag>()?;
| ^^^^^^^^^ method not found in `&PyModule`
Check failure on line 415 in src/lib.rs
github-actions / clippy
no method named `add_class` found for reference `&pyo3::prelude::PyModule` in the current scope
error[E0599]: no method named `add_class` found for reference `&pyo3::prelude::PyModule` in the current scope
--> src/lib.rs:415:7
|
415 | m.add_class::<Config>()?;
| ^^^^^^^^^ method not found in `&PyModule`
Check failure on line 413 in src/lib.rs
github-actions / clippy
no method named `add_class` found for reference `&pyo3::prelude::PyModule` in the current scope
error[E0599]: no method named `add_class` found for reference `&pyo3::prelude::PyModule` in the current scope
--> src/lib.rs:413:7
|
413 | m.add_class::<Reclass>()?;
| ^^^^^^^^^ method not found in `&PyModule`
Check failure on line 342 in src/lib.rs
github-actions / clippy
the trait bound `&pyo3::types::PyType: std::convert::From<pyo3::impl_::pymethods::BoundRef<'_, '_, pyo3::types::PyType>>` is not satisfied
error[E0277]: the trait bound `&pyo3::types::PyType: std::convert::From<pyo3::impl_::pymethods::BoundRef<'_, '_, pyo3::types::PyType>>` is not satisfied
--> src/lib.rs:342:35
|
342 | pub fn set_thread_count(_cls: &PyType, count: usize) {
| ^ the trait `std::convert::From<pyo3::impl_::pymethods::BoundRef<'_, '_, pyo3::types::PyType>>` is not implemented for `&pyo3::types::PyType`, which is required by `pyo3::impl_::pymethods::BoundRef<'_, '_, pyo3::types::PyType>: std::convert::Into<_>`
|
= note: required for `pyo3::impl_::pymethods::BoundRef<'_, '_, pyo3::types::PyType>` to implement `std::convert::Into<&pyo3::types::PyType>`
Check failure on line 314 in src/lib.rs
github-actions / clippy
the trait bound `&pyo3::types::PyType: std::convert::From<pyo3::impl_::pymethods::BoundRef<'_, '_, pyo3::types::PyType>>` is not satisfied
error[E0277]: the trait bound `&pyo3::types::PyType: std::convert::From<pyo3::impl_::pymethods::BoundRef<'_, '_, pyo3::types::PyType>>` is not satisfied
--> src/lib.rs:314:26
|
314 | fn from_config(_cls: &PyType, config: Config) -> PyResult<Self> {
| ^ the trait `std::convert::From<pyo3::impl_::pymethods::BoundRef<'_, '_, pyo3::types::PyType>>` is not implemented for `&pyo3::types::PyType`, which is required by `pyo3::impl_::pymethods::BoundRef<'_, '_, pyo3::types::PyType>: std::convert::Into<_>`
|
= note: required for `pyo3::impl_::pymethods::BoundRef<'_, '_, pyo3::types::PyType>` to implement `std::convert::Into<&pyo3::types::PyType>`
Check failure on line 298 in src/lib.rs
github-actions / clippy
the trait bound `&pyo3::types::PyType: std::convert::From<pyo3::impl_::pymethods::BoundRef<'_, '_, pyo3::types::PyType>>` is not satisfied
error[E0277]: the trait bound `&pyo3::types::PyType: std::convert::From<pyo3::impl_::pymethods::BoundRef<'_, '_, pyo3::types::PyType>>` is not satisfied
--> src/lib.rs:298:14
|
298 | cls: &PyType,
| ^ the trait `std::convert::From<pyo3::impl_::pymethods::BoundRef<'_, '_, pyo3::types::PyType>>` is not implemented for `&pyo3::types::PyType`, which is required by `pyo3::impl_::pymethods::BoundRef<'_, '_, pyo3::types::PyType>: std::convert::Into<_>`
|
= note: required for `pyo3::impl_::pymethods::BoundRef<'_, '_, pyo3::types::PyType>` to implement `std::convert::Into<&pyo3::types::PyType>`
Check failure on line 359 in src/types/mapping.rs
github-actions / clippy
no function or associated item named `new` found for struct `pyo3::types::PyDict` in the current scope
error[E0599]: no function or associated item named `new` found for struct `pyo3::types::PyDict` in the current scope
--> src/types/mapping.rs:359:28
|
359 | let dict = PyDict::new(py);
| ^^^ function or associated item not found in `PyDict`
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `list::List` defines an item `new`, perhaps you need to implement it
--> src/list/mod.rs:6:1
|
6 | pub trait List {
| ^^^^^^^^^^^^^^
Check failure on line 164 in src/types/from.rs
github-actions / clippy
no method named `get_type` found for reference `&pyo3::PyAny` in the current scope
error[E0599]: no method named `get_type` found for reference `&pyo3::PyAny` in the current scope
--> src/types/from.rs:164:23
|
164 | value.get_type().name()?
| ^^^^^^^^ method not found in `&PyAny`
Check failure on line 157 in src/types/from.rs
github-actions / clippy
no method named `extract` found for reference `&pyo3::PyAny` in the current scope
error[E0599]: no method named `extract` found for reference `&pyo3::PyAny` in the current scope
--> src/types/from.rs:157:31
|
157 | let v = value.extract::<f64>()?;
| ^^^^^^^ method not found in `&PyAny`
Check failure on line 153 in src/types/from.rs
github-actions / clippy
no method named `extract` found for reference `&pyo3::PyAny` in the current scope
error[E0599]: no method named `extract` found for reference `&pyo3::PyAny` in the current scope
--> src/types/from.rs:153:31
|
153 | let v = value.extract::<bool>()?;
| ^^^^^^^ method not found in `&PyAny`
Check failure on line 141 in src/types/from.rs
github-actions / clippy
no method named `downcast` found for reference `&pyo3::PyAny` in the current scope
error[E0599]: no method named `downcast` found for reference `&pyo3::PyAny` in the current scope
--> src/types/from.rs:141:34
|
141 | let dict = value.downcast::<PyDict>()?;
| ^^^^^^^^ method not found in `&PyAny`
Check failure on line 133 in src/types/from.rs
github-actions / clippy
no method named `downcast` found for reference `&pyo3::PyAny` in the current scope
error[E0599]: no method named `downcast` found for reference `&pyo3::PyAny` in the current scope
--> src/types/from.rs:133:31
|
133 | let v = value.downcast::<PySequence>()?;
| ^^^^^^^^ method not found in `&PyAny`
Check failure on line 129 in src/types/from.rs
github-actions / clippy
no method named `extract` found for reference `&pyo3::PyAny` in the current scope
error[E0599]: no method named `extract` found for reference `&pyo3::PyAny` in the current scope
--> src/types/from.rs:129:31
|
129 | let v = value.extract::<&str>()?;
| ^^^^^^^ method not found in `&PyAny`
Check failure on line 127 in src/types/from.rs
github-actions / clippy
no method named `get_type` found for reference `&pyo3::PyAny` in the current scope
error[E0599]: no method named `get_type` found for reference `&pyo3::PyAny` in the current scope
--> src/types/from.rs:127:21
|
127 | match value.get_type().name()? {
| ^^^^^^^^ method not found in `&PyAny`
Check failure on line 192 in src/node/nodeinfo.rs
github-actions / clippy
no function or associated item named `new` found for struct `pyo3::types::PyDict` in the current scope
error[E0599]: no function or associated item named `new` found for struct `pyo3::types::PyDict` in the current scope
--> src/node/nodeinfo.rs:192:28
|
192 | let dict = PyDict::new(py);
| ^^^ function or associated item not found in `PyDict`
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `list::List` defines an item `new`, perhaps you need to implement it
--> src/list/mod.rs:6:1
|
6 | pub trait List {
| ^^^^^^^^^^^^^^
Check failure on line 180 in src/node/nodeinfo.rs
github-actions / clippy
no function or associated item named `new` found for struct `pyo3::types::PyDict` in the current scope
error[E0599]: no function or associated item named `new` found for struct `pyo3::types::PyDict` in the current scope
--> src/node/nodeinfo.rs:180:28
|
180 | let dict = PyDict::new(py);
| ^^^ function or associated item not found in `PyDict`
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `list::List` defines an item `new`, perhaps you need to implement it
--> src/list/mod.rs:6:1
|
6 | pub trait List {
| ^^^^^^^^^^^^^^
Check failure on line 89 in src/inventory.rs
github-actions / clippy
no function or associated item named `new` found for struct `pyo3::types::PyDict` in the current scope
error[E0599]: no function or associated item named `new` found for struct `pyo3::types::PyDict` in the current scope
--> src/inventory.rs:89:36
|
89 | let reclass_dict = PyDict::new(py);
| ^^^ function or associated item not found in `PyDict`
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `list::List` defines an item `new`, perhaps you need to implement it
--> src/list/mod.rs:6:1
|
6 | pub trait List {
| ^^^^^^^^^^^^^^
Check failure on line 83 in src/inventory.rs
github-actions / clippy
no function or associated item named `new` found for struct `pyo3::types::PyDict` in the current scope
error[E0599]: no function or associated item named `new` found for struct `pyo3::types::PyDict` in the current scope
--> src/inventory.rs:83:34
|
83 | let nodes_dict = PyDict::new(py);
| ^^^ function or associated item not found in `PyDict`
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `list::List` defines an item `new`, perhaps you need to implement it
--> src/list/mod.rs:6:1
|
6 | pub trait List {
| ^^^^^^^^^^^^^^
Check failure on line 80 in src/inventory.rs
github-actions / clippy
no function or associated item named `new` found for struct `pyo3::types::PyDict` in the current scope
error[E0599]: no function or associated item named `new` found for struct `pyo3::types::PyDict` in the current scope
--> src/inventory.rs:80:28
|
80 | let dict = PyDict::new(py);
| ^^^ function or associated item not found in `PyDict`
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `list::List` defines an item `new`, perhaps you need to implement it
--> src/list/mod.rs:6:1
|
6 | pub trait List {
| ^^^^^^^^^^^^^^
Check failure on line 286 in src/config.rs
github-actions / clippy
the trait bound `&pyo3::types::PyDict: pyo3::impl_::extract_argument::PyFunctionArgument<'_, '_>` is not satisfied
error[E0277]: the trait bound `&pyo3::types::PyDict: pyo3::impl_::extract_argument::PyFunctionArgument<'_, '_>` is not satisfied
--> src/config.rs:286:17
|
286 | config: &PyDict,
| ^ the trait `pyo3::PyClass` is not implemented for `&pyo3::types::PyDict`, which is required by `&pyo3::types::PyDict: pyo3::impl_::extract_argument::PyFunctionArgument<'_, '_>`
|
= help: the following other types implement trait `pyo3::impl_::extract_argument::PyFunctionArgument<'a, 'py>`:
&'a Reclass
&'a config::CompatFlag
&'a config::Config
&'a inventory::Inventory
&'a mut Reclass
&'a mut config::CompatFlag
&'a mut config::Config
&'a mut inventory::Inventory
and 6 others
= note: required for `&pyo3::types::PyDict` to implement `pyo3::FromPyObject<'_>`
= note: required for `&pyo3::types::PyDict` to implement `pyo3::conversion::FromPyObjectBound<'_, '_>`
= note: required for `&pyo3::types::PyDict` to implement `pyo3::impl_::extract_argument::PyFunctionArgument<'_, '_>`
note: required by a bound in `pyo3::impl_::extract_argument::extract_argument`
--> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pyo3-0.22.0/src/impl_/extract_argument.rs:119:8
|
113 | pub fn extract_argument<'a, 'py, T>(
| ---------------- required by a bound in this function
...
119 | T: PyFunctionArgument<'a, 'py>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `extract_argument`
Check failure on line 284 in src/config.rs
github-actions / clippy
the trait bound `&pyo3::types::PyType: std::convert::From<pyo3::impl_::pymethods::BoundRef<'_, '_, pyo3::types::PyType>>` is not satisfied
error[E0277]: the trait bound `&pyo3::types::PyType: std::convert::From<pyo3::impl_::pymethods::BoundRef<'_, '_, pyo3::types::PyType>>` is not satisfied
--> src/config.rs:284:15
|
284 | _cls: &PyType,
| ^ the trait `std::convert::From<pyo3::impl_::pymethods::BoundRef<'_, '_, pyo3::types::PyType>>` is not implemented for `&pyo3::types::PyType`, which is required by `pyo3::impl_::pymethods::BoundRef<'_, '_, pyo3::types::PyType>: std::convert::Into<_>`
|
= note: required for `pyo3::impl_::pymethods::BoundRef<'_, '_, pyo3::types::PyType>` to implement `std::convert::Into<&pyo3::types::PyType>`