Antonio Rojas pushed to branch main at Arch Linux / Packaging / Packages /
jupyter-nbclient
Commits:
5fbdccf6 by Antonio Rojas at 2024-12-03T18:41:40+01:00
upgpkg: 0.10.1-2: Python 3.13 rebuild
- - - - -
3 changed files:
- .SRCINFO
- PKGBUILD
- + python-3.13.patch
Changes:
=====================================
.SRCINFO
=====================================
@@ -1,7 +1,7 @@
pkgbase = jupyter-nbclient
pkgdesc = A tool for running Jupyter Notebooks in different execution
contexts
pkgver = 0.10.1
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/jupyter/nbclient
arch = any
license = BSD-3-Clause
@@ -11,6 +11,7 @@ pkgbase = jupyter-nbclient
checkdepends = python-pytest-asyncio
checkdepends = python-testpath
checkdepends = python-xmltodict
+ makedepends = git
makedepends = python-build
makedepends = python-hatchling
makedepends = python-installer
@@ -19,7 +20,9 @@ pkgbase = jupyter-nbclient
depends = python-jupyter-client
depends = python-jupyter-core
depends = python-traitlets
- source =
https://github.com/jupyter/nbclient/archive/v0.10.1/jupyter-nbclient-0.10.1.tar.gz
- sha256sums =
a912f708e847fb2d0c46866457dbe936661c301d5d87e46664647c4076f992d7
+ source = git+https://github.com/jupyter/nbclient#tag=v0.10.1
+ source = python-3.13.patch
+ sha256sums =
b5832ad491b77af8688246fd6797190b41258d02589b732a2918ad155daaab93
+ sha256sums =
98b8c0ea25a02de822e1f3b1a96e677dac729e23397bf9674383e83f145ee5d5
pkgname = jupyter-nbclient
=====================================
PKGBUILD
=====================================
@@ -3,7 +3,7 @@
pkgname=jupyter-nbclient
pkgver=0.10.1
-pkgrel=1
+pkgrel=2
pkgdesc='A tool for running Jupyter Notebooks in different execution contexts'
arch=(any)
url='https://github.com/jupyter/nbclient'
@@ -13,7 +13,8 @@ depends=(jupyter-nbformat
python-jupyter-client
python-jupyter-core
python-traitlets)
-makedepends=(python-build
+makedepends=(git
+ python-build
python-hatchling
python-installer)
checkdepends=(jupyter-nbconvert
@@ -22,21 +23,28 @@ checkdepends=(jupyter-nbconvert
python-pytest-asyncio
python-testpath
python-xmltodict)
-source=(https://github.com/jupyter/nbclient/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
-sha256sums=('a912f708e847fb2d0c46866457dbe936661c301d5d87e46664647c4076f992d7')
+source=(git+https://github.com/jupyter/nbclient#tag=v$pkgver
+ python-3.13.patch)
+sha256sums=('b5832ad491b77af8688246fd6797190b41258d02589b732a2918ad155daaab93'
+ '98b8c0ea25a02de822e1f3b1a96e677dac729e23397bf9674383e83f145ee5d5')
+
+prepare() {
+ cd nbclient
+ patch -p1 -i ../python-3.13.patch
+}
build() {
- cd nbclient-$pkgver
+ cd nbclient
python -m build --wheel --no-isolation
}
check() {
- cd nbclient-$pkgver
+ cd nbclient
pytest -v -k 'not test_cli_simple' # fails on build server
}
package() {
- cd nbclient-$pkgver
+ cd nbclient
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
=====================================
python-3.13.patch
=====================================
@@ -0,0 +1,35 @@
+From 57222265bfd8bdcf8851997e1dce5cd564e1a573 Mon Sep 17 00:00:00 2001
+From: Lumir Balhar <[email protected]>
+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 it on GitLab:
https://gitlab.archlinux.org/archlinux/packaging/packages/jupyter-nbclient/-/commit/5fbdccf6ea85eadb659fed5114b1648c641f07a3
--
View it on GitLab:
https://gitlab.archlinux.org/archlinux/packaging/packages/jupyter-nbclient/-/commit/5fbdccf6ea85eadb659fed5114b1648c641f07a3
You're receiving this email because of your account on gitlab.archlinux.org.