Skip to content

Commit

Permalink
add migration guide entry
Browse files Browse the repository at this point in the history
  • Loading branch information
Icxolu committed May 9, 2024
1 parent 0cfb93c commit eac6a44
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions guide/src/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
This guide can help you upgrade code through breaking changes from one PyO3 version to the next.
For a detailed list of all changes, see the [CHANGELOG](changelog.md).

## from 0.21.* to 0.22

### Deprecation of implicit default for trailing optional arguments
<details open>
<summary><small>Click to expand</small></summary>

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.
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
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.

</details>

## from 0.20.* to 0.21
<details open>
<summary><small>Click to expand</small></summary>
Expand Down

0 comments on commit eac6a44

Please sign in to comment.