17
0

Accepting request 1322780 from devel:languages:python:jupyter

- update to 0.10.2:
  * Drop Python 3.8, test PyPy 3.10 #323 (@davidbrochart)
  * Gracefully handle explicit transient=None #322
- update to 0.10.1:
  * Run docs on ubuntu #314 (@blink1073)
  * avoid deprecation warning for py313 #320 (@lucascolley)
- drop nbclient-pr315-date-deprecation.patch,
     nbclient-pr317-py313tests.patch: (upstream)

  * gh#jupyter/nbclient#315 gh#jupyter/nbclient#318
- Remove upper bound on pytest.
- Skip more failing tests due to new Exception message format

OBS-URL: https://build.opensuse.org/request/show/1322780
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-nbclient?expand=0&rev=36
This commit is contained in:
2025-12-15 10:58:33 +00:00
committed by Git OBS Bridge
6 changed files with 20 additions and 87 deletions

View File

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

3
nbclient-0.10.2.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:90b7fc6b810630db87a6d0c2250b1f0ab4cf4d3c27a299b0cde78a4ed3fd9193
size 62424

View File

@@ -1,40 +0,0 @@
From eb6aa1fe35a2e7e9d22a7bdba82fd1c7894ac243 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Mon, 10 Jun 2024 17:08:06 +0200
Subject: [PATCH] Avoid a DeprecationWarning on Python 3.13+
...
/usr/lib/python3.13/site-packages/nbclient/jsonutil.py:29: in <module>
datetime.strptime("1", "%d")
/usr/lib64/python3.13/_strptime.py:573: in _strptime_datetime
tt, fraction, gmtoff_fraction = _strptime(data_string, format)
/usr/lib64/python3.13/_strptime.py:336: in _strptime
format_regex = _TimeRE_cache.compile(format)
/usr/lib64/python3.13/_strptime.py:282: in compile
return re_compile(self.pattern(format), IGNORECASE)
/usr/lib64/python3.13/_strptime.py:270: in pattern
warnings.warn("""\
E DeprecationWarning: Parsing dates involving a day of month without a year specified is ambiguious
E and fails to parse leap day. The default behavior will change in Python 3.15
E to either always raise an exception or to use a different default year (TBD).
E To avoid trouble, add a specific year to the input & format.
E See https://github.com/python/cpython/issues/70647.
See also https://github.com/jupyter/jupyter_client/issues/1020
---
nbclient/jsonutil.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nbclient/jsonutil.py b/nbclient/jsonutil.py
index bad0dae..0cd1236 100644
--- a/nbclient/jsonutil.py
+++ b/nbclient/jsonutil.py
@@ -26,7 +26,7 @@
# holy crap, strptime is not threadsafe.
# Calling it once at import seems to help.
-datetime.strptime("1", "%d")
+datetime.strptime("2000-01-01", "%Y-%m-%d")
# -----------------------------------------------------------------------------
# Classes and functions

View File

@@ -1,35 +0,0 @@
From 57222265bfd8bdcf8851997e1dce5cd564e1a573 Mon Sep 17 00:00:00 2001
From: Lumir Balhar <lbalhar@redhat.com>
Date: Wed, 3 Jul 2024 14:21:41 +0200
Subject: [PATCH] Fix compatibility with Python 3.13 beta 2
There are more calls in 3.13 than in previous versions
so the tests are now more permissive.
Fixes: https://github.com/jupyter/nbclient/issues/316
---
tests/test_cli.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/test_cli.py b/tests/test_cli.py
index 04b9887..55ccbd6 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -60,7 +60,7 @@ def test_mult(input_names, relative, inplace, jupyterapp, client, reader, writer
# add suffix if needed
paths = [p.with_suffix(".ipynb") for p in paths]
- assert path_open.mock_calls[::3] == [call(p) for p in paths]
+ assert all(call(p) in path_open.mock_calls for p in paths)
assert reader.call_count == len(paths)
# assert reader.mock_calls == [call(p, as_version=4) for p in paths]
@@ -114,7 +114,7 @@ def test_output(input_names, relative, output_base, jupyterapp, client, reader,
# add suffix if needed
paths = [p.with_suffix(".ipynb") for p in paths]
- assert path_open.mock_calls[::3] == [call(p) for p in paths]
+ assert all(call(p) in path_open.mock_calls for p in paths)
assert reader.call_count == len(paths)
expected = []

View File

@@ -1,3 +1,15 @@
-------------------------------------------------------------------
Sat Dec 13 14:37:39 UTC 2025 - Dirk Müller <dmueller@suse.com>
- update to 0.10.2:
* Drop Python 3.8, test PyPy 3.10 #323 (@davidbrochart)
* Gracefully handle explicit transient=None #322
- update to 0.10.1:
* Run docs on ubuntu #314 (@blink1073)
* avoid deprecation warning for py313 #320 (@lucascolley)
- drop nbclient-pr315-date-deprecation.patch,
nbclient-pr317-py313tests.patch: (upstream)
-------------------------------------------------------------------
Thu Feb 27 12:54:52 UTC 2025 - ecsos <ecsos@opensuse.org>
@@ -13,14 +25,14 @@ Thu Nov 21 18:57:39 UTC 2024 - Ben Greiner <code@bnavigator.de>
- Add nbclient-pr315-date-deprecation.patch
* Avoids DeprecationWarning when importing
* gh#jupyter/nbclient#315 gh#jupyter/nbclient#318
* gh#jupyter/nbclient#315 gh#jupyter/nbclient#318
- Add nbclient-pr317-py313tests.patch gh#jupyter/nbclient#317
* make tests more lenient
-------------------------------------------------------------------
Wed Jun 26 01:36:57 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Remove upper bound on pytest.
- Remove upper bound on pytest.
-------------------------------------------------------------------
Fri Mar 29 18:45:22 UTC 2024 - Ben Greiner <code@bnavigator.de>
@@ -168,7 +180,7 @@ Wed Mar 9 16:47:55 UTC 2022 - Arun Persaud <arun@gmx.de>
-------------------------------------------------------------------
Mon Feb 28 10:17:42 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Skip more failing tests due to new Exception message format
- Skip more failing tests due to new Exception message format
-------------------------------------------------------------------
Thu Feb 17 16:33:39 UTC 2022 - Arun Persaud <arun@gmx.de>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-nbclient
#
# Copyright (c) 2024 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
@@ -34,16 +34,12 @@
%{?sle15_python_module_pythons}
Name: python-nbclient%{psuffix}
Version: 0.10.0
Version: 0.10.2
Release: 0
Summary: A client library for executing notebooks
License: BSD-3-Clause
URL: https://github.com/jupyter/nbclient
Source: https://files.pythonhosted.org/packages/source/n/nbclient/nbclient-%{version}.tar.gz
# PATCH-FIX-UPSTREAM nbclient-pr315-date-deprecation.patch gh#jupyter/nbclient#315 gh#jupyter/nbclient#318
Patch0: nbclient-pr315-date-deprecation.patch
# PATCH-FIX-UPSTREAM nbclient-pr317-py313tests.patch gh#jupyter/nbclient#317
Patch1: nbclient-pr317-py313tests.patch
BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module hatchling >= 1.10.0}
BuildRequires: %{python_module pip}