154 lines
7.9 KiB
Plaintext
154 lines
7.9 KiB
Plaintext
error: use of deprecated constant `pyo3::deprecations::PYMETHODS_NEW_DEPRECATED_FORM`: use `#[new]` instead of `#[__new__]`
|
|
--> tests/ui/deprecations.rs:12:7
|
|
|
|
|
12 | #[__new__]
|
|
| ^^^^^^^
|
|
|
|
|
note: the lint level is defined here
|
|
--> tests/ui/deprecations.rs:1:9
|
|
|
|
|
1 | #![deny(deprecated)]
|
|
| ^^^^^^^^^^
|
|
|
|
error: use of deprecated constant `MyClass::__pymethod_set_set_option__::SIGNATURE`: This function has implicit defaults for the trailing `Option<T>` arguments. These implicit defaults are being phased out. Add `#[pyo3(signature = (_value=None)]` to this function to silence this warning and keep the current behavior
|
|
--> tests/ui/deprecations.rs:43:8
|
|
|
|
|
43 | fn set_option(&self, _value: Option<i32>) {}
|
|
| ^^^^^^^^^^
|
|
|
|
error: use of deprecated constant `__pyfunction_pyfunction_option_2::SIGNATURE`: This function has implicit defaults for the trailing `Option<T>` arguments. These implicit defaults are being phased out. Add `#[pyo3(signature = (_i, _any=None)]` to this function to silence this warning and keep the current behavior
|
|
--> tests/ui/deprecations.rs:132:4
|
|
|
|
|
132 | fn pyfunction_option_2(_i: u32, _any: Option<i32>) {}
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: use of deprecated constant `__pyfunction_pyfunction_option_3::SIGNATURE`: This function has implicit defaults for the trailing `Option<T>` arguments. These implicit defaults are being phased out. Add `#[pyo3(signature = (_i, _any=None, _foo=None)]` to this function to silence this warning and keep the current behavior
|
|
--> tests/ui/deprecations.rs:135:4
|
|
|
|
|
135 | fn pyfunction_option_3(_i: u32, _any: Option<i32>, _foo: Option<String>) {}
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: use of deprecated constant `__pyfunction_pyfunction_option_4::SIGNATURE`: This function has implicit defaults for the trailing `Option<T>` arguments. These implicit defaults are being phased out. Add `#[pyo3(signature = (_i, _any=None, _foo=None)]` to this function to silence this warning and keep the current behavior
|
|
--> tests/ui/deprecations.rs:138:4
|
|
|
|
|
138 | fn pyfunction_option_4(
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: use of deprecated constant `SimpleEnumWithoutEq::__pyo3__generated____richcmp__::DEPRECATION`: Implicit equality for simple enums is deprecated. Use `#[pyclass(eq, eq_int)` to keep the current behavior.
|
|
--> tests/ui/deprecations.rs:200:1
|
|
|
|
|
200 | #[pyclass]
|
|
| ^^^^^^^^^^
|
|
|
|
|
= note: this error originates in the attribute macro `pyclass` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error: use of deprecated struct `pyo3::PyCell`: `PyCell` was merged into `Bound`, use that instead; see the migration guide for more info
|
|
--> tests/ui/deprecations.rs:23:30
|
|
|
|
|
23 | fn method_gil_ref(_slf: &PyCell<Self>) {}
|
|
| ^^^^^^
|
|
|
|
error: use of deprecated method `pyo3::deprecations::GilRefs::<T>::from_py_with_arg`: use `&Bound<'_, PyAny>` as the argument for this `from_py_with` extractor
|
|
--> tests/ui/deprecations.rs:45:44
|
|
|
|
|
45 | fn __eq__(&self, #[pyo3(from_py_with = "extract_gil_ref")] _other: i32) -> bool {
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
error: use of deprecated method `pyo3::deprecations::GilRefs::<T>::function_arg`: use `&Bound<'_, T>` instead for this function argument
|
|
--> tests/ui/deprecations.rs:18:33
|
|
|
|
|
18 | fn cls_method_gil_ref(_cls: &PyType) {}
|
|
| ^
|
|
|
|
error: use of deprecated method `pyo3::deprecations::GilRefs::<T>::function_arg`: use `&Bound<'_, T>` instead for this function argument
|
|
--> tests/ui/deprecations.rs:23:29
|
|
|
|
|
23 | fn method_gil_ref(_slf: &PyCell<Self>) {}
|
|
| ^
|
|
|
|
error: use of deprecated method `pyo3::deprecations::GilRefs::<T>::function_arg`: use `&Bound<'_, T>` instead for this function argument
|
|
--> tests/ui/deprecations.rs:28:36
|
|
|
|
|
28 | fn static_method_gil_ref(_any: &PyAny) {}
|
|
| ^
|
|
|
|
error: use of deprecated method `pyo3::deprecations::GilRefs::<T>::from_py_with_arg`: use `&Bound<'_, PyAny>` as the argument for this `from_py_with` extractor
|
|
--> tests/ui/deprecations.rs:31:53
|
|
|
|
|
31 | fn set_foo_gil_ref(&self, #[pyo3(from_py_with = "extract_gil_ref")] _value: i32) {}
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
error: use of deprecated method `pyo3::deprecations::GilRefs::<T>::function_arg`: use `&Bound<'_, T>` instead for this function argument
|
|
--> tests/ui/deprecations.rs:37:39
|
|
|
|
|
37 | fn set_bar_gil_ref(&self, _value: &PyAny) {}
|
|
| ^
|
|
|
|
error: use of deprecated method `pyo3::deprecations::GilRefs::<T>::function_arg`: use `&Bound<'_, T>` instead for this function argument
|
|
--> tests/ui/deprecations.rs:64:44
|
|
|
|
|
64 | fn pyfunction_with_module_gil_ref(_module: &PyModule) -> PyResult<&str> {
|
|
| ^
|
|
|
|
error: use of deprecated method `pyo3::deprecations::GilRefs::<T>::function_arg`: use `&Bound<'_, T>` instead for this function argument
|
|
--> tests/ui/deprecations.rs:74:19
|
|
|
|
|
74 | fn module_gil_ref(_m: &PyModule) -> PyResult<()> {
|
|
| ^^
|
|
|
|
error: use of deprecated method `pyo3::deprecations::GilRefs::<T>::function_arg`: use `&Bound<'_, T>` instead for this function argument
|
|
--> tests/ui/deprecations.rs:79:57
|
|
|
|
|
79 | fn module_gil_ref_with_explicit_py_arg(_py: Python<'_>, _m: &PyModule) -> PyResult<()> {
|
|
| ^^
|
|
|
|
error: use of deprecated method `pyo3::deprecations::GilRefs::<T>::from_py_with_arg`: use `&Bound<'_, PyAny>` as the argument for this `from_py_with` extractor
|
|
--> tests/ui/deprecations.rs:115:27
|
|
|
|
|
115 | #[pyo3(from_py_with = "extract_gil_ref")] _gil_ref: i32,
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
error: use of deprecated method `pyo3::deprecations::GilRefs::<T>::function_arg`: use `&Bound<'_, T>` instead for this function argument
|
|
--> tests/ui/deprecations.rs:121:29
|
|
|
|
|
121 | fn pyfunction_gil_ref(_any: &PyAny) {}
|
|
| ^
|
|
|
|
error: use of deprecated method `pyo3::deprecations::OptionGilRefs::<std::option::Option<T>>::function_arg`: use `Option<&Bound<'_, T>>` instead for this function argument
|
|
--> tests/ui/deprecations.rs:125:36
|
|
|
|
|
125 | fn pyfunction_option_gil_ref(_any: Option<&PyAny>) {}
|
|
| ^^^^^^
|
|
|
|
error: use of deprecated method `pyo3::deprecations::GilRefs::<T>::from_py_with_arg`: use `&Bound<'_, PyAny>` as the argument for this `from_py_with` extractor
|
|
--> tests/ui/deprecations.rs:150:27
|
|
|
|
|
150 | #[pyo3(from_py_with = "PyAny::len", item("my_object"))]
|
|
| ^^^^^^^^^^^^
|
|
|
|
error: use of deprecated method `pyo3::deprecations::GilRefs::<T>::from_py_with_arg`: use `&Bound<'_, PyAny>` as the argument for this `from_py_with` extractor
|
|
--> tests/ui/deprecations.rs:160:27
|
|
|
|
|
160 | #[pyo3(from_py_with = "PyAny::len")] usize,
|
|
| ^^^^^^^^^^^^
|
|
|
|
error: use of deprecated method `pyo3::deprecations::GilRefs::<T>::from_py_with_arg`: use `&Bound<'_, PyAny>` as the argument for this `from_py_with` extractor
|
|
--> tests/ui/deprecations.rs:166:31
|
|
|
|
|
166 | Zip(#[pyo3(from_py_with = "extract_gil_ref")] i32),
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
error: use of deprecated method `pyo3::deprecations::GilRefs::<T>::from_py_with_arg`: use `&Bound<'_, PyAny>` as the argument for this `from_py_with` extractor
|
|
--> tests/ui/deprecations.rs:173:27
|
|
|
|
|
173 | #[pyo3(from_py_with = "extract_gil_ref")]
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
error: use of deprecated method `pyo3::deprecations::GilRefs::<pyo3::Python<'_>>::is_python`: use `wrap_pyfunction_bound!` instead
|
|
--> tests/ui/deprecations.rs:186:13
|
|
|
|
|
186 | let _ = wrap_pyfunction!(double, py);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: this error originates in the macro `wrap_pyfunction` (in Nightly builds, run with -Z macro-backtrace for more info)
|