Sync from SUSE:SLFO:Main python-inline-snapshot revision 2efe04ce2ba94f8e873839e128b081bb

This commit is contained in:
2025-06-27 15:42:54 +02:00
parent 3100a8de05
commit 1e917444d7
5 changed files with 52 additions and 4 deletions

BIN
inline_snapshot-0.19.3.tar.gz (Stored with Git LFS)

Binary file not shown.

BIN
inline_snapshot-0.23.1.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

24
no-readline.patch Normal file
View File

@@ -0,0 +1,24 @@
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,25 @@
-------------------------------------------------------------------
Mon May 26 14:14:35 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Update to 0.23.1
* pytest assert rewriting works now together with inline-snapshot
if you use cpython>=3.11
* ... is now a special value to create snapshot values. The value
change in assert [5,4] == snapshot([5,...]) is now a create
(previously it was a fix)
* Tests with failed snapshot comparisons now always result in a
pytest Error, even if snapshots have been fixed or created.
* inline-snapshot uses now --inline-snapshot=disable during CI runs
by default
* The default flags have changed for cpython >= 3.11
* The categories in the terminal output are now links to the documentation
if it is supported by the terminal
* You can now use the config option skip-snapshot-updates-for-now
to skip the reporting of updates
* snapshot updates are now disabled by default. They be enabled with
show-updates=true in your config
- Add no-readline.patch to fix test error in pydantic-core
-------------------------------------------------------------------
Wed Jan 29 02:19:19 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>

View File

@@ -26,12 +26,14 @@
%endif
%{?sle15_python_module_pythons}
Name: python-inline-snapshot%{psuffix}
Version: 0.19.3
Version: 0.23.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 hatchling}
BuildRequires: %{python_module pip}
BuildRequires: python-rpm-macros