|
|
|
@ -10,42 +10,34 @@ note: the lint level is defined here
|
|
|
|
|
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
|
|
|
|
|
= note: these implicit defaults are being phased out
|
|
|
|
|
= help: 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
|
|
|
|
|
= note: these implicit defaults are being phased out
|
|
|
|
|
= help: add `#[pyo3(signature = (_i, _any=None))]` to this function to silence this warning and keep the current behavior
|
|
|
|
|
--> tests/ui/deprecations.rs:132:4
|
|
|
|
|
--> tests/ui/deprecations.rs:129:4
|
|
|
|
|
|
|
|
|
|
|
132 | fn pyfunction_option_2(_i: u32, _any: Option<i32>) {}
|
|
|
|
|
129 | 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
|
|
|
|
|
= note: these implicit defaults are being phased out
|
|
|
|
|
= help: 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
|
|
|
|
|
--> tests/ui/deprecations.rs:132:4
|
|
|
|
|
|
|
|
|
|
|
135 | fn pyfunction_option_3(_i: u32, _any: Option<i32>, _foo: Option<String>) {}
|
|
|
|
|
132 | 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
|
|
|
|
|
= note: these implicit defaults are being phased out
|
|
|
|
|
= help: 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
|
|
|
|
|
--> tests/ui/deprecations.rs:135:4
|
|
|
|
|
|
|
|
|
|
|
138 | fn pyfunction_option_4(
|
|
|
|
|
135 | 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
|
|
|
|
|
--> tests/ui/deprecations.rs:197:1
|
|
|
|
|
|
|
|
|
|
|
200 | #[pyclass]
|
|
|
|
|
197 | #[pyclass]
|
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
|
|
|
= note: this error originates in the attribute macro `pyclass` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
@ -57,9 +49,9 @@ error: use of deprecated struct `pyo3::PyCell`: `PyCell` was merged into `Bound`
|
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
--> tests/ui/deprecations.rs:42:44
|
|
|
|
|
|
|
|
|
|
|
45 | fn __eq__(&self, #[pyo3(from_py_with = "extract_gil_ref")] _other: i32) -> bool {
|
|
|
|
|
42 | 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
|
|
|
|
@ -93,69 +85,69 @@ error: use of deprecated method `pyo3::deprecations::GilRefs::<T>::function_arg`
|
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
--> tests/ui/deprecations.rs:61:44
|
|
|
|
|
|
|
|
|
|
|
64 | fn pyfunction_with_module_gil_ref(_module: &PyModule) -> PyResult<&str> {
|
|
|
|
|
61 | 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
|
|
|
|
|
--> tests/ui/deprecations.rs:71:19
|
|
|
|
|
|
|
|
|
|
|
74 | fn module_gil_ref(_m: &PyModule) -> PyResult<()> {
|
|
|
|
|
71 | 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
|
|
|
|
|
--> tests/ui/deprecations.rs:76:57
|
|
|
|
|
|
|
|
|
|
|
79 | fn module_gil_ref_with_explicit_py_arg(_py: Python<'_>, _m: &PyModule) -> PyResult<()> {
|
|
|
|
|
76 | 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
|
|
|
|
|
--> tests/ui/deprecations.rs:112:27
|
|
|
|
|
|
|
|
|
|
|
115 | #[pyo3(from_py_with = "extract_gil_ref")] _gil_ref: i32,
|
|
|
|
|
112 | #[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
|
|
|
|
|
--> tests/ui/deprecations.rs:118:29
|
|
|
|
|
|
|
|
|
|
|
121 | fn pyfunction_gil_ref(_any: &PyAny) {}
|
|
|
|
|
118 | 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
|
|
|
|
|
--> tests/ui/deprecations.rs:122:36
|
|
|
|
|
|
|
|
|
|
|
125 | fn pyfunction_option_gil_ref(_any: Option<&PyAny>) {}
|
|
|
|
|
122 | 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
|
|
|
|
|
--> tests/ui/deprecations.rs:147:27
|
|
|
|
|
|
|
|
|
|
|
150 | #[pyo3(from_py_with = "PyAny::len", item("my_object"))]
|
|
|
|
|
147 | #[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
|
|
|
|
|
--> tests/ui/deprecations.rs:157:27
|
|
|
|
|
|
|
|
|
|
|
160 | #[pyo3(from_py_with = "PyAny::len")] usize,
|
|
|
|
|
157 | #[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
|
|
|
|
|
--> tests/ui/deprecations.rs:163:31
|
|
|
|
|
|
|
|
|
|
|
166 | Zip(#[pyo3(from_py_with = "extract_gil_ref")] i32),
|
|
|
|
|
163 | 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
|
|
|
|
|
--> tests/ui/deprecations.rs:170:27
|
|
|
|
|
|
|
|
|
|
|
173 | #[pyo3(from_py_with = "extract_gil_ref")]
|
|
|
|
|
170 | #[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
|
|
|
|
|
--> tests/ui/deprecations.rs:183:13
|
|
|
|
|
|
|
|
|
|
|
186 | let _ = wrap_pyfunction!(double, py);
|
|
|
|
|
183 | 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)
|
|
|
|
|