Skip to content

Releases: syrupy-project/syrupy

v5.0.0

28 Sep 21:15

Choose a tag to compare

Syrupy 5.0.0

(2025-09-28)

This release introduces new features, bug fixes, and a major license change. It also includes several breaking changes, so please review those carefully before upgrading.


New Features ✨

  • Add --snapshot-dirname option: A new option, --snapshot-dirname, is now available to change the default directory snapshots are stored in. ([#810](#810))
  • Remove private underscore prefix: The unnecessary underscore prefixes have been removed from public methods for better code clarity. ([8cfc905](8cfc905))

Bug Fixes 🐛

  • Fix terminal summary for xdist workers: Resolves an issue where the terminal summary was not displayed correctly with xdist workers. ([#978](#978))
  • Ensure pytest_assertrepr_compare hook is called first: This change ensures that Syrupy's assertion hook takes precedence, improving compatibility with other plugins. ([#984](#984))

Breaking Changes ⚠️

  • License change: The project has switched to the more permissive MIT license. This change applies to all versions from 5.0.0 and beyond. If you need to use the previous Apache 2.0 license, you must continue to use Syrupy versions 4.x or earlier. ([#945](#945))

  • Python and pytest version requirements: Syrupy now requires Python 3.10 or higher. Support for Python 3.8 has been dropped as it reached its end of life in October 2024. The minimum required version of pytest is v8. ([#904](#904), [#1024](#1024))

  • Method and constant name changes: Several methods and constants have been renamed for improved clarity and to align with public API standards.

    • 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
    • Constants

      • SNAPSHOT_EMPTY_FOSSIL_KEY -> SNAPSHOT_EMPTY_COLLECTION_KEY
      • SNAPSHOT_UNKNOWN_FOSSIL_KEY -> SNAPSHOT_UNKNOWN_COLLECTION_KEY
      • SNAPSHOT_DIRNAME has been removed in favour of the property on the SnapshotCollectionStorage class and associated CLI option.

New Contributors

Full Changelog: v4.9.1...v5.0.0

v4.9.1

24 Mar 01:36

Choose a tag to compare

4.9.1 (2025-03-24)

Bug Fixes

  • serializer: preserve trailing newlines in ambr serialization (#950) (5897490)
  • serializer: preserve trailing newlines in ambr serialization (#950) (5037477)

v4.9.0

08 Mar 19:08

Choose a tag to compare

4.9.0 (2025-03-08)

Bug Fixes

  • serializer: raise TypeError when serializing non-byte like object in binary mode (#951) (2bd0f54)

Features

  • 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)

v4.8.3

08 Mar 18:42

Choose a tag to compare

4.8.3 (2025-03-08)

Bug Fixes

  • snapshots of deselected parametrized tests wrongly marked as unused (#965) (52f3bb2)

v4.8.2

20 Feb 17:25

Choose a tag to compare

4.8.2 (2025-02-20)

Bug Fixes

  • avoid unnecessary env updates to reduce chances of segfault (#956) (7fdffd9)

v4.8.1

13 Jan 12:09

Choose a tag to compare

4.8.1 (2025-01-13)

Bug Fixes

  • check current session's pending-write queue when recalling snapshots (e.g. diffing) (#927) (0f6bb55)

v4.8.0

23 Nov 23:34

Choose a tag to compare

4.8.0 (2024-11-23)

Features

v4.7.2

06 Oct 01:32

Choose a tag to compare

4.7.2 (2024-10-06)

Bug Fixes

v4.7.1

23 Aug 04:48

Choose a tag to compare

4.7.1 (2024-08-23)

Bug Fixes

v4.7.0

23 Aug 04:12

Choose a tag to compare

4.7.0 (2024-08-23)

What's Changed

New Contributors

Full Changelog: v4.6.4...v4.7.0