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
Copy file name to clipboardExpand all lines: guide/src/migration.md
+35Lines changed: 35 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,41 @@
3
3
This guide can help you upgrade code through breaking changes from one PyO3 version to the next.
4
4
For a detailed list of all changes, see the [CHANGELOG](changelog.md).
5
5
6
+
## from 0.21.* to 0.22
7
+
8
+
### Deprecation of implicit default for trailing optional arguments
9
+
<detailsopen>
10
+
<summary><small>Click to expand</small></summary>
11
+
12
+
With `pyo3` 0.22 the implicit `None` default for trailing `Option<T>` type argument is deprecated. To migrate, place a `#[pyo3(signature = (...))]` attribute on affected functions or methods and specify the desired behavior.
13
+
The migration warning specifies the corresponding signature to keep the current behavior. With 0.23 the signature will be required for any function containing `Option<T>` type parameters to prevent accidental
14
+
and unnoticed changes in behavior. With 0.24 this restriction will be lifted again and `Option<T>` type arguments will be treated as any other argument _without_ special handling.
0 commit comments