17
0

6 Commits

Author SHA256 Message Date
f1ed6d221c Accepting request 1327291 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1327291
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-inline-snapshot?expand=0&rev=8
2026-01-15 15:43:49 +00:00
7532e09a39 - Update to 0.31.1:
- Format commands with pipelines (using |) now properly fail
    when any command in the pipeline returns a non-zero exit code
    (#320). Previously, only the last command's exit code was
    considered, which could allow formatting to succeed even when
    intermediate commands failed.
- Update to 0.31.0:
  - BREAKING CHANGE: An exception is now raised when you use
    external() in files that are not inside your tests/ directory
    (or any other directory that you can configure with
    tool.inline-snapshot.test-dir).
  - Users are now notified if they use the same UUID for multiple
    external snapshots, which can happen when copying one test as
    a template for a new test. The snapshots should be reset to
    an empty external() and recreated with inline-snapshot.
  - Updated --snapshot flag to --inline-snapshot in session hints.
  - The lookup for external snapshots has been improved.
- Update to 0.30.1:
  - Disable ensure ascii in json.dump to support non-ASCII
    characters in external files
- Update to 0.30.0:
  - The test-dir config option can now also be a list of paths
  - added Python 3.14 support
- Update to 0.29.4:
  - External.run_inline() now uses the same logic as
    External.run_pytest.
  - inline-snapshot now supports different Python file encodings
    and recognizes encoding comments such as # -*- coding:
    windows-1251 -*-.
- Update to 0.29.3:
  - xdist is now detected properly
- Update to 0.29.2:
  - fixed string formatting with black which caused invalid
    snapshots
    assert " a " == snapshot("a")

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-inline-snapshot?expand=0&rev=19
2026-01-14 20:44:45 +00:00
4c2a0910d9 Accepting request 1321489 from devel:languages:python
- Only require pytest-subtests with pytest < 9.

OBS-URL: https://build.opensuse.org/request/show/1321489
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-inline-snapshot?expand=0&rev=7
2025-12-09 11:46:26 +00:00
116f62a24b - Only require pytest-subtests with pytest < 9.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-inline-snapshot?expand=0&rev=17
2025-12-08 04:31:44 +00:00
265a195cdb Accepting request 1308081 from devel:languages:python
- Update to 0.29.1:
  * Added
    + Added get_snapshot_value()
    + Added inline_snapshot.extra.Transformed and
      inline_snapshot.extra.transformation which can be used to transform
      values inside of snapshots.
    + exposed `@declare_unmanaged` which allows you to create your own
      unmanaged types.
    + New `external()` implementation with support for different data
      formats.
    + Ability to declare custom external formats with @register_format.
    + external() can now be used without snapshot().
    + Add/fix reproducible standard repr for functions
  * Changed
    + You now have to specify test-dir in your pyproject.toml when you save
      your tests in a folder other than `tests/` in your project root.
    + **BREAKING CHANGE**: You now have to declare format aliases if you used
      outsource() with a different suffix than .txt or .bin in the past.
    + Added extra information to the reported failure when snapshots are
      fixed or created.
  * Fixed
    + handle cases where pytest_unconfigure is called but not
      pytest_configure
    + pyproject.toml is now also located based on the current directory and
      the pytest-root.
    + Terminal with is preserved.
    + solved incompatibility with pytest_pretty.
    + external_file() now follows the aliases defined by
      register_format_alias().
    + fixed the representation of empty strings in sub-snapshots from

OBS-URL: https://build.opensuse.org/request/show/1308081
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-inline-snapshot?expand=0&rev=6
2025-09-30 15:48:37 +00:00
f6ef72620e - Update to 0.29.1:
* Added
    + Added get_snapshot_value()
    + Added inline_snapshot.extra.Transformed and
      inline_snapshot.extra.transformation which can be used to transform
      values inside of snapshots.
    + exposed `@declare_unmanaged` which allows you to create your own
      unmanaged types.
    + New `external()` implementation with support for different data
      formats.
    + Ability to declare custom external formats with @register_format.
    + external() can now be used without snapshot().
    + Add/fix reproducible standard repr for functions
  * Changed
    + You now have to specify test-dir in your pyproject.toml when you save
      your tests in a folder other than `tests/` in your project root.
    + **BREAKING CHANGE**: You now have to declare format aliases if you used
      outsource() with a different suffix than .txt or .bin in the past.
    + Added extra information to the reported failure when snapshots are
      fixed or created.
  * Fixed
    + handle cases where pytest_unconfigure is called but not
      pytest_configure
    + pyproject.toml is now also located based on the current directory and
      the pytest-root.
    + Terminal with is preserved.
    + solved incompatibility with pytest_pretty.
    + external_file() now follows the aliases defined by
      register_format_alias().
    + fixed the representation of empty strings in sub-snapshots from

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-inline-snapshot?expand=0&rev=15
2025-09-30 04:33:45 +00:00
5 changed files with 93 additions and 34 deletions

Binary file not shown.

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4ea5ed70aa1d652713bbfd750606b94bd8a42483f7d3680433b3e92994495f64
size 2606338

View File

@@ -1,24 +0,0 @@
From 1040f3f5db5ddaf64d4178d9dd4cc53027316812 Mon Sep 17 00:00:00 2001
From: MeggyCal <MeggyCal@users.noreply.github.com>
Date: Tue, 27 May 2025 15:20:41 +0200
Subject: [PATCH] also accept ImportError
---
src/inline_snapshot/pytest_plugin.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/inline_snapshot/pytest_plugin.py b/src/inline_snapshot/pytest_plugin.py
index c6589997..d5d54dbc 100644
--- a/src/inline_snapshot/pytest_plugin.py
+++ b/src/inline_snapshot/pytest_plugin.py
@@ -37,8 +37,8 @@
# fixes #186
try:
import readline # noqa
- except ModuleNotFoundError: # pragma: no cover
- # should fix #189
+ except (ImportError, ModuleNotFoundError): # pragma: no cover
+ # should fix #189 and #245
pass

View File

@@ -1,3 +1,86 @@
-------------------------------------------------------------------
Tue Dec 9 21:37:47 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
- Update to 0.31.1:
- Format commands with pipelines (using |) now properly fail
when any command in the pipeline returns a non-zero exit code
(#320). Previously, only the last command's exit code was
considered, which could allow formatting to succeed even when
intermediate commands failed.
- Update to 0.31.0:
- BREAKING CHANGE: An exception is now raised when you use
external() in files that are not inside your tests/ directory
(or any other directory that you can configure with
tool.inline-snapshot.test-dir).
- Users are now notified if they use the same UUID for multiple
external snapshots, which can happen when copying one test as
a template for a new test. The snapshots should be reset to
an empty external() and recreated with inline-snapshot.
- Updated --snapshot flag to --inline-snapshot in session hints.
- The lookup for external snapshots has been improved.
- Update to 0.30.1:
- Disable ensure ascii in json.dump to support non-ASCII
characters in external files
- Update to 0.30.0:
- The test-dir config option can now also be a list of paths
- added Python 3.14 support
- Update to 0.29.4:
- External.run_inline() now uses the same logic as
External.run_pytest.
- inline-snapshot now supports different Python file encodings
and recognizes encoding comments such as # -*- coding:
windows-1251 -*-.
- Update to 0.29.3:
- xdist is now detected properly
- Update to 0.29.2:
- fixed string formatting with black which caused invalid
snapshots
assert " a " == snapshot("a")
-------------------------------------------------------------------
Mon Dec 8 04:29:16 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Only require pytest-subtests with pytest < 9.
-------------------------------------------------------------------
Tue Sep 30 04:27:54 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Update to 0.29.1:
* Added
+ Added get_snapshot_value()
+ Added inline_snapshot.extra.Transformed and
inline_snapshot.extra.transformation which can be used to transform
values inside of snapshots.
+ exposed `@declare_unmanaged` which allows you to create your own
unmanaged types.
+ New `external()` implementation with support for different data
formats.
+ Ability to declare custom external formats with @register_format.
+ external() can now be used without snapshot().
+ Add/fix reproducible standard repr for functions
* Changed
+ You now have to specify test-dir in your pyproject.toml when you save
your tests in a folder other than `tests/` in your project root.
+ **BREAKING CHANGE**: You now have to declare format aliases if you used
outsource() with a different suffix than .txt or .bin in the past.
+ Added extra information to the reported failure when snapshots are
fixed or created.
* Fixed
+ handle cases where pytest_unconfigure is called but not
pytest_configure
+ pyproject.toml is now also located based on the current directory and
the pytest-root.
+ Terminal with is preserved.
+ solved incompatibility with pytest_pretty.
+ external_file() now follows the aliases defined by
register_format_alias().
+ fixed the representation of empty strings in sub-snapshots from
triple-quotes to single-quotes.
+ fix: changed format-command default to "".
+ The readline module doesn't have to be installed on non-windows
systems.
- Dropped patch no-readline.patch, included upstream.
-------------------------------------------------------------------
Mon May 26 14:14:35 UTC 2025 - Markéta Machová <mmachova@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-inline-snapshot
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -26,14 +26,13 @@
%endif
%{?sle15_python_module_pythons}
Name: python-inline-snapshot%{psuffix}
Version: 0.23.1
Version: 0.31.1
Release: 0
Summary: Create and update inline snapshots in your Python code
License: MIT
URL: https://github.com/15r10nk/inline-snapshot/
Source: https://files.pythonhosted.org/packages/source/i/inline-snapshot/inline_snapshot-%{version}.tar.gz
# PATCH-FIX-UPSTREAM https://github.com/15r10nk/inline-snapshot/pull/245 also accept ImportError when attempting to import readline
Patch: no-readline.patch
BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module hatchling}
BuildRequires: %{python_module pip}
BuildRequires: python-rpm-macros
@@ -49,7 +48,7 @@ BuildRequires: %{python_module pydantic}
BuildRequires: %{python_module pyright >= 1.1.359}
BuildRequires: %{python_module pytest-freezer >= 0.4.8}
BuildRequires: %{python_module pytest-mock >= 3.14.0}
BuildRequires: %{python_module pytest-subtests >= 0.11.0}
BuildRequires: %{python_module pytest-subtests >= 0.11.0 if %python-pytest < 9}
BuildRequires: %{python_module pytest-xdist >= 3.6.1}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module time-machine >= 2.10.0}
@@ -57,7 +56,8 @@ BuildRequires: %{python_module time-machine >= 2.10.0}
# /SECTION
BuildRequires: fdupes
Requires: python-asttokens >= 2.0.5
Requires: python-executing >= 2.0.0
Requires: python-executing >= 2.2.0
Requires: python-pytest >= 8.3.4
Requires: python-rich >= 13.7.1
%if 0%{?python_version_nodots} < 311
Requires: python-tomli >= 2.0.0
@@ -96,7 +96,7 @@ Create and update inline snapshots in your Python code.
%doc README.md CHANGELOG.md
%license LICENSE
%{python_sitelib}/inline_snapshot
%{python_sitelib}/inline_snapshot-%{version}.dist-info
%{python_sitelib}/inline_snapshot-%{version}*-info
%endif
%changelog