-
-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Raise errors for missing structure handlers more eagerly (#577)
* Raise errors for missing structure handlers more eagerly
- Loading branch information
Showing
6 changed files
with
64 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,7 @@ validation | |
preconf | ||
unions | ||
usage | ||
migrations | ||
indepth | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Migrations | ||
|
||
_cattrs_ sometimes changes in backwards-incompatible ways. | ||
This page contains guidance for changes and workarounds for restoring legacy behavior. | ||
|
||
## 24.2.0 | ||
|
||
### The default structure hook fallback factory | ||
|
||
The default structure hook fallback factory was changed to more eagerly raise errors for missing hooks. | ||
|
||
The old behavior can be restored by explicitly passing in the old hook fallback factory when instantiating the converter. | ||
|
||
|
||
```python | ||
>>> from cattrs.fns import raise_error | ||
|
||
>>> c = Converter(structure_fallback_factory=lambda _: raise_error) | ||
# Or | ||
>>> c = BaseConverter(structure_fallback_factory=lambda _: raise_error) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters