All notable changes to this project will be documented in this file.
v5.5.3 (2026-07-11)
- chore(deps): update astral-sh/setup-uv action to v8.3.0 by @renovate[bot] in #1143
- chore(deps): update astral-sh/setup-uv action to v8.3.1 by @renovate[bot] in #1145
- chore(deps): update dependency hypothesis to v6.156.2 by @renovate[bot] in #1147
- chore(deps): update dependency mypy to v2.2.0 by @renovate[bot] in #1148
- chore(deps): update dependency hypothesis to v6.156.3 by @renovate[bot] in #1150
- chore: closes #1144 by @noahnu in #1146
- chore(deps): update astral-sh/setup-uv action to v8.3.2 by @renovate[bot] in #1149
Full Changelog: https://github.com/syrupy-project/syrupy/compare/v5.5.2...v5.5.3
v5.5.2 (2026-07-08)
- fix: Fix detecting
pytest-xdistwhen loaded viaPYTEST_PLUGINSby @mgorny in #1142
- @mgorny made their first contribution in #1142
Full Changelog: https://github.com/syrupy-project/syrupy/compare/v5.5.1...v5.5.2
v5.5.1 (2026-07-06)
- fix: Defer registering
pytest-xdisthookpytest_testnodedownto avoid "unknown hook" error by @edgarrmondragon in #1140
- @edgarrmondragon made their first contribution in #1140
Full Changelog: https://github.com/syrupy-project/syrupy/compare/v5.5.0...v5.5.1
v5.5.0 (2026-07-06)
- feat: detect unused snapshots under pytest-xdist by @frenck in #1132
NOTE: Test suites using pytest-xdist that previously passed due to incomplete snapshot support may now fail if unused snapshots are detected. You can use
--snapshot-warn-unusedto downgrade unused snapshot detection from an error to a warning though it's not recommended.
Full Changelog: https://github.com/syrupy-project/syrupy/compare/v5.4.0...v5.5.0
v5.4.0 (2026-07-01)
- feat: add --snapshot-no-cleanup to keep unused snapshots on update by @frenck in #1126
- fix: honor boolean operators in -k snapshot selection by @frenck in #1127
Full Changelog: https://github.com/syrupy-project/syrupy/compare/v5.3.4...v5.4.0
v5.3.4 (2026-06-26)
- perf: drop per-node kwargs dict from the amber serializer by @frenck in #1122
- perf: give the internal matcher wrapper an explicit signature by @frenck in #1121
- fix: avoid os.environ mutation for color control by @frenck in #1125
Full Changelog: https://github.com/syrupy-project/syrupy/compare/v5.3.3...v5.3.4
v5.3.3 (2026-06-25)
- perf: speed up string serialization in amber serializer by @frenck in #1118
- perf: avoid copying the cycle-detection set on every serialized node by @frenck in #1119
Full Changelog: https://github.com/syrupy-project/syrupy/compare/v5.3.2...v5.3.3
v5.3.2 (2026-06-09)
- fix: overlapping test filenames across directories by @noahnu in #1104
Full Changelog: https://github.com/syrupy-project/syrupy/compare/v5.3.1...v5.3.2
v5.3.1 (2026-05-31)
- fix(test): mark pydantic and attrs as dependencies for running internal tests by @noahnu in #1108 -- This only affects users trying to run the syrupy tests themselves, not consumers of syrupy.
- chore(deps): update astral-sh/setup-uv action to v8.1.0 by @renovate[bot] in #1103
- chore(deps): update python docker tag to v3.14.4 by @renovate[bot] in #1102
- chore(deps): update benchmark-action/github-action-benchmark action to v1.22.1 by @renovate[bot] in #1105
Full Changelog: https://github.com/syrupy-project/syrupy/compare/v5.3.0...v5.3.1
v5.3.0 (2026-05-31)
- feat: add --snapshot-update-new-only flag (#843) by @SAY-5 in #1098
- chore: move release marker by @noahnu in #1095
- chore(deps): update codecov/codecov-action action to v5.5.4 by @renovate[bot] in #1089
- chore(deps): update dependency pytest to v9.0.3 by @renovate[bot] in #1096
- fix: include tests in sdist by @Lovlace777 in #1099
- chore: skip benchmark on forks by @noahnu in #1100
- chore: update dev dependencies by @noahnu in #1101
Full Changelog: https://github.com/syrupy-project/syrupy/compare/v5.2.0...v5.3.0
v5.2.0 (2026-05-16)
- chore(deps): update actions/checkout action to v6.0.2 by @renovate[bot] in #1065
- chore(deps): update actions/setup-python action to v6.2.0 by @renovate[bot] in #1066
- chore(deps): update dependency ruff to v0.14.14 by @renovate[bot] in #1067
- chore(deps): update dependency coverage to v7.13.2 by @renovate[bot] in #1068
- chore: migrate to uv, close #1019 by @noahnu in #1049
- chore(deps): update dependency coverage to v7.13.2 by @renovate[bot] in #1069
- chore(deps): update dependency debugpy to v1.8.19 by @renovate[bot] in #1070
- chore(deps): update dependency mypy to v1.19.1 by @renovate[bot] in #1071
- chore(deps): update dependency ruff to v0.14.14 by @renovate[bot] in #1072
- chore(deps): update python docker tag to v3.14.3 by @renovate[bot] in #1073
- chore(deps): update astral-sh/setup-uv action to v7.3.1 by @renovate[bot] in #1076
- chore: update lock file by @noahnu in #1077
- chore(deps): update benchmark-action/github-action-benchmark action to v1.21.0 by @renovate[bot] in #1078
- chore(deps): update astral-sh/setup-uv action to v7.5.0 by @renovate[bot] in #1080
- fix(#1081): Handle unicode line-endings correctly when serializing by @DRMacIver in #1082
- docs: add DRMacIver as a contributor for bug by @allcontributors[bot] in #1083
- chore: update lockfile by @noahnu in #1086
- chore: migrate off semantic-release to trusted publishing by @noahnu in #1093
- chore: set name/email by @noahnu in #1094
- @DRMacIver made their first contribution in #1082
Full Changelog: https://github.com/syrupy-project/syrupy/compare/v5.1.0...v5.2.0
5.1.2 (2026-04-06)
5.1.1 (2026-04-06)
5.1.0 (2026-01-25)
5.0.0 (2025-09-28)
- Block terminal summary for xdist workers. (#978) (33a848d)
- ensure syrupy's pytest_assertrepr_compare hook is called first. (#984) (eb0024d)
- remove incorrect private underscore prefix from public methods (8cfc905)
- add --snapshot-dirname option, close #810 (27135c7)
- drop support for py3.8, raise min. pytest to v8 (#904) (a879ff1)
- update min. python version to 3.10 (#1024) (16b4113)
- The following methods have been renamed:
SnapshotCollectionStorage
- _read_snapshot_collection -> read_snapshot_collection
- _read_snapshot_data_from_location -> read_snapshot_data_from_location
- _write_snapshot_collection -> write_snapshot_collection
- _get_file_basename -> get_file_basename
- _file_extension -> file_extension
AmberDataSerializer
- _snapshot_sort_key -> snapshot_sort_key
Renamed constants to improve clarity:
constants
- SNAPSHOT_EMPTY_FOSSIL_KEY -> SNAPSHOT_EMPTY_COLLECTION_KEY
- SNAPSHOT_UNKNOWN_FOSSIL_KEY -> SNAPSHOT_UNKNOWN_COLLECTION_KEY
- Min. python version is now 3.10.
- The Syrupy project is switching from Apache 2.0 to a more permissive MIT license. By using Syrupy >=5, you agree to abide by this new license. You can continue to use Syrupy v1 through v4 under Apache 2.0.
- Drops support for Python 3.8 which is end of life as of October 2024. Raises the minimum version of pytest to v8.
4.9.1 (2025-03-24)
- serializer: preserve trailing newlines in ambr serialization (#950) (5897490)
- serializer: preserve trailing newlines in ambr serialization (#950) (5037477)
4.9.0 (2025-03-08)
- add --snapshot-ignore-file-extensions argument to support DVC (#943) (056cc6e)
- add compose_matchers utility for composing 1 or more matchers (#952) (157dbec)
- add SingleFileAmberSnapshotExtension as a single-file variant of the default amber extension (#959) (a753b7a)
- include details about created/updated snapshots in detailed report (#942) (25d37ef)
4.8.3 (2025-03-08)
4.8.2 (2025-02-20)
4.8.1 (2025-01-13)
- check current session's pending-write queue when recalling snapshots (e.g. diffing) (#927) (0f6bb55)
4.8.0 (2024-11-23)
4.7.2 (2024-10-06)
4.7.1 (2024-08-23)
4.7.0 (2024-08-23)
- Added a new CLI flag: --snapshot-patch-pycharm-diff (a4dfcf5)
4.6.4 (2024-08-21)
4.6.3 (2024-08-21)
4.6.2 (2024-08-21)
4.6.2 (2024-08-21)
4.6.1 (2024-02-07)
4.6.0 (2023-10-24)
4.5.0 (2023-09-01)
4.4.0 (2023-08-29)
4.3.0 (2023-08-28)
4.2.2 (2023-08-28)
4.2.1 (2023-08-21)
4.2.0 (2023-08-21)
4.1.1 (2023-08-17)
4.1.0 (2023-08-16)
4.0.8 (2023-07-20)
4.0.7 (2023-07-20)
4.0.6 (2023-07-11)
4.0.5 (2023-07-04)
4.0.4 (2023-06-19)
4.0.3 (2023-06-19)
4.0.2 (2023-04-25)
4.0.1 (2023-02-21)
4.0.0 (2023-02-02)
- defer snapshot writes until end of session (#606) (68f1d5f)
- ensure all pytest options are serializable (#667) (e8ed9f2)
- improve pytest-xdist compatibility (9b9090f)
- lru_cache on snapshot reads (#629) (c1a675f)
- remove legacy path usage to support no:legacypath, closes #677 (#684) (6385979)
- simplify data serializer for ambr (#676) (3d296e1)
- write performance improvements, api clarity (#645) (2c31c39)
- json: serialize None as null, close #622 (c330680)
- numerically sort snapshots if possible, close #657 (4ca0716)
- serializer: preserve key ordering of OrderedDict (0a2289a)
- support overriding the amber serializer class (#683) (662c93f)
- update python version, pytest version (#658) (c360b95)
-
Serializers may now throw a TaintedSnapshotError which will tell the user to regenerate the snapshot even if the underlying data has not changed. This is to support rolling out more subtle changes to the serializers, such as the introduction of serializer metadata.
-
Renamed DataSerializer to AmberDataSerializer.
-
serializer: Key order is now preserved if using OrderedDict in both the Amber serializer and JSON serializer.
-
json: The JSONSnapshotExtension now serializes Python's None as "null" rather than "None".
-
Raise minimum python version to 3.8.1 and min. pytest version to v7.
-
PyTestLocation.filename has been renamed to .basename
-
refactor: add test_location kwarg to get_snapshot_name
-
refactor: get_snapshot_name is now static as a classmethod
-
refactor: remove pre and post read/write hooks
-
Pre and post read/write hooks have been removed without replacement to make internal refactor simpler. Please open a GitHub issue if you have a use case for these hooks.
-
refactor: rename Fossil to Collection
-
The term 'fossil' has been replaced by the clearer term 'collection'.
-
refactor: pass test_location to read_snapshot
-
refactor: remove singular write_snapshot method
-
refactor: dirname property to method
-
refactor: pass test_location to discover_snapshots
-
refactor: remove usage of self.test_location
-
refactor: make write_snapshot a classmethod
-
refactor: do not instantiate extension with test_location
-
Numerous instance methods have been refactored as classmethods.
3.0.6 (2022-12-30)
- ensure all pytest options are serializable (#667) (e320d7b)
- improve pytest-xdist compatibility (8739194)
3.0.5 (2022-11-08)
3.0.4 (2022-11-03)
3.0.3 (2022-11-03)
3.0.2 (2022-09-23)
- update classifiers (no material change) (43d78ec)
3.0.1 (2022-09-23)
3.0.0 (2022-08-11)
- Drop Python 3.6 support due to end of life.
2.3.1 (2022-07-07)
2.3.0 (2022-05-12)
2.2.0 (2022-05-12)
2.1.0 (2022-05-11)
2.0.0 (2022-04-10)
- amber: change serialization to be py syntax like (#505) (b64b965)
- release syrupy v2 (#575) (bc8b3a9)
- amber: update to serialization requires regeneration of snapshots
Migration Guide
pytest --snapshot-updateto regenerate amber snapshots
1.7.4 (2022-02-16)
1.7.3 (2022-01-25)
1.7.2 (2022-01-25)
1.7.1 (2022-01-25)
1.7.0 (2022-01-14)
- ignore, this commit is to force a release (effeadb)
- add JSON extension as alternative to amber (b366082)
1.6.0 (2022-01-14)
1.5.0 (2021-11-03)
1.4.7 (2021-10-13)
1.4.6 (2021-10-06)
1.4.5 (2021-08-29)
1.4.4 (2021-08-20)
1.4.3 (2021-08-20)
1.4.2 (2021-08-18)
1.4.1 (2021-08-18)
1.4.0 (2021-08-02)
1.3.1 (2021-06-20)
1.3.0 (2021-06-05)
1.2.4 (2021-06-01)
1.2.3 (2021-05-12)
1.2.2 (2021-03-18)
1.1.0 (2020-12-01)
1.0.0 (2020-11-13)
- Release v1.0.0
0.9.0 (2020-11-13)
0.8.4 (2020-10-30)
0.8.3 (2020-10-30)
- assertion exception shows error at correct location (#402) (d46bba4)
- only perform session finish on test items ran (#401) (61a670f)
0.8.2 (2020-10-30)
0.8.1 (2020-10-29)
0.8.0 (2020-10-27)
- Line control characters are normalised when snapshots are generated i.e.
\rand\ncharacters are all written as\n. This is to allow interoperability of snapshots between operating systems that use disparate line control characters.
0.7.2 (2020-09-20)
0.7.1 (2020-09-05)
0.7.0 (2020-08-24)
0.6.1 (2020-07-29)
0.6.0 (2020-07-12)
0.5.2 (2020-07-09)
0.5.1 (2020-06-12)
0.5.0 (2020-06-09)
0.4.4 (2020-06-02)
0.4.3 (2020-05-27)
- Update setup.py, so that it allows for any Python 3.6+ version to be used (25c2688)
0.4.2 (2020-04-22)
0.4.1 (2020-04-19)
0.4.0 (2020-04-19)
- remove added trailing whitespace from multiline string (24f3d57)
0.3.12 (2020-04-19)
0.3.11 (2020-04-17)
0.3.10 (2020-04-15)
0.3.9 (2020-04-08)
0.3.8 (2020-04-03)
0.3.7 (2020-03-24)
0.3.6 (2020-03-10)
0.3.5 (2020-03-08)
0.3.4 (2020-03-08)
- Conversion of all
os.pathandos.walkcalls to usepathlibinstead, settingpathlibas the new preferred way of doing path operations (#130) - Add
--snapshot-default-extensionoption to specify extension class via pytest cli (#132) - Fix bug where snapshot diffs were erroneously printed (#135)
- Fix bug where snapshot names were incorrectly matching tests (#136)
- Fix bug where deleted snapshots where incorrectly colored (#136)
- Fix bug where targeting specific test nodes did not filter out unused snapshots (#139)
- Fix bug where snapshot report was printed out before the pytest report (#144)
- Fix bug where untargeted snapshots would be deleted when using pytest in targeted mode (#123)
- Fix bug where snapshot files were not cleaned up when running specific test files (#127)
- Fix bug where targeting specific test nodes in a test file was not supported (#127)
- Fix bug where targeting specific test modules using pyargs was not supported (#127)
- Fix bug where newline control characters were being translated based on platform (#113)
- Adds support for named tuple fields (#108)
- Add trailing commas to class fields (#108)
- Specify explicit version range for pytest peer dependency (#111)
- Fix issue with using hashables as dict keys or in sets (#103)
- Add support for custom objects repr (#101)
- Add support for nested test classes (#99)
- Remove
_snapshot_subdirectory_namefromSnapshotFossilizer(#99)
- Initial release respecting Keep a Changelog.