Commit 7458724
adam
py-inline-snapshot: updated to 0.32.1
0.32.1 — 2026-02-17
Fixed
- Fixed handling of `datetime` and `time` objects with timezone information. The `tzinfo` parameter is now properly included in snapshots, and `timezone.utc` is represented with the correct import (`from datetime import timezone`).
- Fixed customize hook registration to properly check if objects are functions before inspecting the `inline_snapshot_impl` attribute, preventing potential attribute errors when scanning conftest modules.
0.32.0 — 2026-02-13
Removed
- removed support for python 3.8 because it is end-of-life
Added
- `pathlib.Path/PurePath` values are now never stored as `Posix/WindowsPath` or their Pure variants, which improves the writing of platform independent tests.
- Support for [import statement generation](https://15r10nk.github.io/inline-snapshot/latest/plugin/#inline_snapshot.plugin.Builder.create_code) for all types and user-customized code.
- Added a new way to customize snapshot creation with [`@customize`](https://15r10nk.github.io/inline-snapshot/latest/plugin/#inline_snapshot.plugin.InlineSnapshotPluginSpec.customize).
- Added a [plugin system](https://15r10nk.github.io/inline-snapshot/latest/plugin/#creating-a-plugin-package) which allows you to reuse customizations across multiple projects.
- Added support for [conditional external](https://15r10nk.github.io/inline-snapshot/latest/plugin/#conditional-external-objects) storage to automatically store values in external files based on custom criteria (e.g., string length, data size).
- Added built-in handlers for `datetime.datetime`, `date`, `time`, and `timedelta` that generate clean snapshots with proper imports.
- Generates `__file__` instead of the filename string of the current source file.
- Uses dirty-equals `IsNow()` instead of the current datetime when the time value equals the current time.
Deprecated
- Deprecated `@customize_repr` which can be replaced with `@customize`.
Fixed
- `raises` catches BaseException instead of Exception. This ensures that SystemExit and KeyboardInterrupt are also caught.
- pytest --color flag is now respected1 parent f27b7bb commit 7458724
3 files changed
Lines changed: 59 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
28 | 13 | | |
29 | 14 | | |
30 | 15 | | |
| |||
40 | 25 | | |
41 | 26 | | |
42 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
43 | 58 | | |
44 | 59 | | |
45 | 60 | | |
| |||
103 | 118 | | |
104 | 119 | | |
105 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
106 | 124 | | |
107 | 125 | | |
108 | 126 | | |
| |||
115 | 133 | | |
116 | 134 | | |
117 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
118 | 139 | | |
119 | 140 | | |
120 | 141 | | |
| |||
124 | 145 | | |
125 | 146 | | |
126 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
127 | 151 | | |
128 | 152 | | |
129 | 153 | | |
| |||
163 | 187 | | |
164 | 188 | | |
165 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
166 | 199 | | |
167 | 200 | | |
168 | 201 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments