Update pyo3 to v0.22 and update code to use pyo3 Bound
types
#688
clippy
6 errors, 12 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 6 |
Warning | 12 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.78.0 (9b00956e5 2024-04-29)
- cargo 1.78.0 (54d8815d0 2024-03-26)
- clippy 0.1.78 (9b00956 2024-04-29)
Annotations
Check warning on line 411 in src/lib.rs
github-actions / clippy
use of deprecated method `pyo3::deprecations::GilRefs::<T>::function_arg`: use `&Bound<'_, T>` instead for this function argument
warning: use of deprecated method `pyo3::deprecations::GilRefs::<T>::function_arg`: use `&Bound<'_, T>` instead for this function argument
--> src/lib.rs:411:28
|
411 | fn reclass_rs(_py: Python, m: &PyModule) -> PyResult<()> {
| ^
Check warning on line 342 in src/lib.rs
github-actions / clippy
use of deprecated method `pyo3::deprecations::GilRefs::<T>::function_arg`: use `&Bound<'_, T>` instead for this function argument
warning: use of deprecated method `pyo3::deprecations::GilRefs::<T>::function_arg`: use `&Bound<'_, T>` instead for this function argument
--> src/lib.rs:342:35
|
342 | pub fn set_thread_count(_cls: &PyType, count: usize) {
| ^
Check warning on line 314 in src/lib.rs
github-actions / clippy
use of deprecated method `pyo3::deprecations::GilRefs::<T>::function_arg`: use `&Bound<'_, T>` instead for this function argument
warning: use of deprecated method `pyo3::deprecations::GilRefs::<T>::function_arg`: use `&Bound<'_, T>` instead for this function argument
--> src/lib.rs:314:26
|
314 | fn from_config(_cls: &PyType, config: Config) -> PyResult<Self> {
| ^
Check warning on line 298 in src/lib.rs
github-actions / clippy
use of deprecated method `pyo3::deprecations::GilRefs::<T>::function_arg`: use `&Bound<'_, T>` instead for this function argument
warning: use of deprecated method `pyo3::deprecations::GilRefs::<T>::function_arg`: use `&Bound<'_, T>` instead for this function argument
--> src/lib.rs:298:14
|
298 | cls: &PyType,
| ^
Check warning on line 359 in src/types/mapping.rs
github-actions / clippy
use of deprecated associated function `pyo3::types::PyDict::new`: `PyDict::new` will be replaced by `PyDict::new_bound` in a future PyO3 version
warning: use of deprecated associated function `pyo3::types::PyDict::new`: `PyDict::new` will be replaced by `PyDict::new_bound` in a future PyO3 version
--> src/types/mapping.rs:359:28
|
359 | let dict = PyDict::new(py);
| ^^^
Check failure on line 156 in src/types/from.rs
github-actions / clippy
mismatched types
error[E0308]: mismatched types
--> src/types/from.rs:156:21
|
127 | match value.get_type().name()? {
| ------------------------ this expression has type `std::borrow::Cow<'_, str>`
...
156 | "int" | "float" => {
| ^^^^^^^ expected `Cow<'_, str>`, found `&str`
|
= note: expected enum `std::borrow::Cow<'_, str>`
found reference `&'static str`
help: try wrapping the pattern in `std::borrow::Cow::Borrowed`
|
156 | "int" | std::borrow::Cow::Borrowed("float") => {
| +++++++++++++++++++++++++++ +
Check failure on line 156 in src/types/from.rs
github-actions / clippy
mismatched types
error[E0308]: mismatched types
--> src/types/from.rs:156:13
|
127 | match value.get_type().name()? {
| ------------------------ this expression has type `std::borrow::Cow<'_, str>`
...
156 | "int" | "float" => {
| ^^^^^ expected `Cow<'_, str>`, found `&str`
|
= note: expected enum `std::borrow::Cow<'_, str>`
found reference `&'static str`
help: try wrapping the pattern in `std::borrow::Cow::Borrowed`
|
156 | std::borrow::Cow::Borrowed("int") | "float" => {
| +++++++++++++++++++++++++++ +
Check failure on line 152 in src/types/from.rs
github-actions / clippy
mismatched types
error[E0308]: mismatched types
--> src/types/from.rs:152:13
|
127 | match value.get_type().name()? {
| ------------------------ this expression has type `std::borrow::Cow<'_, str>`
...
152 | "bool" => {
| ^^^^^^ expected `Cow<'_, str>`, found `&str`
|
= note: expected enum `std::borrow::Cow<'_, str>`
found reference `&'static str`
help: try wrapping the pattern in `std::borrow::Cow::Borrowed`
|
152 | std::borrow::Cow::Borrowed("bool") => {
| +++++++++++++++++++++++++++ +
Check failure on line 140 in src/types/from.rs
github-actions / clippy
mismatched types
error[E0308]: mismatched types
--> src/types/from.rs:140:13
|
127 | match value.get_type().name()? {
| ------------------------ this expression has type `std::borrow::Cow<'_, str>`
...
140 | "dict" => {
| ^^^^^^ expected `Cow<'_, str>`, found `&str`
|
= note: expected enum `std::borrow::Cow<'_, str>`
found reference `&'static str`
help: try wrapping the pattern in `std::borrow::Cow::Borrowed`
|
140 | std::borrow::Cow::Borrowed("dict") => {
| +++++++++++++++++++++++++++ +
Check failure on line 132 in src/types/from.rs
github-actions / clippy
mismatched types
error[E0308]: mismatched types
--> src/types/from.rs:132:13
|
127 | match value.get_type().name()? {
| ------------------------ this expression has type `std::borrow::Cow<'_, str>`
...
132 | "list" => {
| ^^^^^^ expected `Cow<'_, str>`, found `&str`
|
= note: expected enum `std::borrow::Cow<'_, str>`
found reference `&'static str`
help: try wrapping the pattern in `std::borrow::Cow::Borrowed`
|
132 | std::borrow::Cow::Borrowed("list") => {
| +++++++++++++++++++++++++++ +
Check failure on line 128 in src/types/from.rs
github-actions / clippy
mismatched types
error[E0308]: mismatched types
--> src/types/from.rs:128:13
|
127 | match value.get_type().name()? {
| ------------------------ this expression has type `std::borrow::Cow<'_, str>`
128 | "str" => {
| ^^^^^ expected `Cow<'_, str>`, found `&str`
|
= note: expected enum `std::borrow::Cow<'_, str>`
found reference `&'static str`
help: try wrapping the pattern in `std::borrow::Cow::Borrowed`
|
128 | std::borrow::Cow::Borrowed("str") => {
| +++++++++++++++++++++++++++ +
Check warning on line 192 in src/node/nodeinfo.rs
github-actions / clippy
use of deprecated associated function `pyo3::types::PyDict::new`: `PyDict::new` will be replaced by `PyDict::new_bound` in a future PyO3 version
warning: use of deprecated associated function `pyo3::types::PyDict::new`: `PyDict::new` will be replaced by `PyDict::new_bound` in a future PyO3 version
--> src/node/nodeinfo.rs:192:28
|
192 | let dict = PyDict::new(py);
| ^^^
Check warning on line 180 in src/node/nodeinfo.rs
github-actions / clippy
use of deprecated associated function `pyo3::types::PyDict::new`: `PyDict::new` will be replaced by `PyDict::new_bound` in a future PyO3 version
warning: use of deprecated associated function `pyo3::types::PyDict::new`: `PyDict::new` will be replaced by `PyDict::new_bound` in a future PyO3 version
--> src/node/nodeinfo.rs:180:28
|
180 | let dict = PyDict::new(py);
| ^^^
Check warning on line 89 in src/inventory.rs
github-actions / clippy
use of deprecated associated function `pyo3::types::PyDict::new`: `PyDict::new` will be replaced by `PyDict::new_bound` in a future PyO3 version
warning: use of deprecated associated function `pyo3::types::PyDict::new`: `PyDict::new` will be replaced by `PyDict::new_bound` in a future PyO3 version
--> src/inventory.rs:89:36
|
89 | let reclass_dict = PyDict::new(py);
| ^^^
Check warning on line 83 in src/inventory.rs
github-actions / clippy
use of deprecated associated function `pyo3::types::PyDict::new`: `PyDict::new` will be replaced by `PyDict::new_bound` in a future PyO3 version
warning: use of deprecated associated function `pyo3::types::PyDict::new`: `PyDict::new` will be replaced by `PyDict::new_bound` in a future PyO3 version
--> src/inventory.rs:83:34
|
83 | let nodes_dict = PyDict::new(py);
| ^^^
Check warning on line 80 in src/inventory.rs
github-actions / clippy
use of deprecated associated function `pyo3::types::PyDict::new`: `PyDict::new` will be replaced by `PyDict::new_bound` in a future PyO3 version
warning: use of deprecated associated function `pyo3::types::PyDict::new`: `PyDict::new` will be replaced by `PyDict::new_bound` in a future PyO3 version
--> src/inventory.rs:80:28
|
80 | let dict = PyDict::new(py);
| ^^^
Check warning on line 284 in src/config.rs
github-actions / clippy
use of deprecated method `pyo3::deprecations::GilRefs::<T>::function_arg`: use `&Bound<'_, T>` instead for this function argument
warning: use of deprecated method `pyo3::deprecations::GilRefs::<T>::function_arg`: use `&Bound<'_, T>` instead for this function argument
--> src/config.rs:284:15
|
284 | _cls: &PyType,
| ^
Check warning on line 286 in src/config.rs
github-actions / clippy
use of deprecated method `pyo3::deprecations::GilRefs::<T>::function_arg`: use `&Bound<'_, T>` instead for this function argument
warning: use of deprecated method `pyo3::deprecations::GilRefs::<T>::function_arg`: use `&Bound<'_, T>` instead for this function argument
--> src/config.rs:286:17
|
286 | config: &PyDict,
| ^
|
= note: `#[warn(deprecated)]` on by default