[arch-commits] Commit in python-nbval/trunk (2 files)
Chih-Hsuan Yen
yan12125 at gemini.archlinux.org
Sun Feb 13 03:27:35 UTC 2022
Date: Sunday, February 13, 2022 @ 03:27:35
Author: yan12125
Revision: 1133018
python-nbval: use upstream patch for test compatibility
Modified:
python-nbval/trunk/PKGBUILD
Deleted:
python-nbval/trunk/0001-Make-tests-pass-with-ipykernel-6.0.0.patch
-------------------------------------------------+
0001-Make-tests-pass-with-ipykernel-6.0.0.patch | 34 ----------------------
PKGBUILD | 18 ++---------
2 files changed, 4 insertions(+), 48 deletions(-)
Deleted: 0001-Make-tests-pass-with-ipykernel-6.0.0.patch
===================================================================
--- 0001-Make-tests-pass-with-ipykernel-6.0.0.patch 2022-02-13 00:52:01 UTC (rev 1133017)
+++ 0001-Make-tests-pass-with-ipykernel-6.0.0.patch 2022-02-13 03:27:35 UTC (rev 1133018)
@@ -1,34 +0,0 @@
-From 3e1e6c6f31b86f5fb0e79a6901822dbe62af0891 Mon Sep 17 00:00:00 2001
-From: Chih-Hsuan Yen <yan12125 at gmail.com>
-Date: Sat, 21 Aug 2021 11:41:01 +0800
-Subject: [PATCH] Make tests pass with ipykernel >= 6.0.0
-
-Ref: https://github.com/ipython/ipykernel/pull/685
----
- tests/test_ignore.py | 9 ++++++---
- 1 file changed, 6 insertions(+), 3 deletions(-)
-
-diff --git a/tests/test_ignore.py b/tests/test_ignore.py
-index 738c6d2..8e28f95 100644
---- a/tests/test_ignore.py
-+++ b/tests/test_ignore.py
-@@ -22,10 +22,13 @@ def test_conf_ignore_stderr(testdir):
-
- # Setup notebook with stream outputs
- nb = build_nb([
-+ # Since ipykernel 6.0.0, sys.stdout.write and sys.stderr.write functions
-+ # return the number of written bytes. Capture returned values to avoid extra
-+ # text/plain fields.
- "import sys",
-- "sys.stdout.write('test\\n')",
-- "sys.stderr.write('error output\\n')",
-- "sys.stdout.write('test\\n')\nsys.stderr.write('error output\\n')",
-+ "ret = sys.stdout.write('test\\n')",
-+ "ret = sys.stderr.write('error output\\n')",
-+ "ret = sys.stdout.write('test\\n')\nret = sys.stderr.write('error output\\n')",
- ], mark_run=True)
- nb.cells[1].outputs.append(nbformat.v4.new_output(
- 'stream',
---
-2.33.0
-
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-02-13 00:52:01 UTC (rev 1133017)
+++ PKGBUILD 2022-02-13 03:27:35 UTC (rev 1133018)
@@ -15,13 +15,14 @@
makedepends=('python-setuptools')
checkdepends=('python-doit' 'python-matplotlib' 'python-pytest-cov' 'python-sympy')
source=("https://github.com/computationalmodelling/nbval/archive/$pkgver/$pkgname-$pkgver.tar.gz"
- "0001-Make-tests-pass-with-ipykernel-6.0.0.patch")
+ "https://github.com/computationalmodelling/nbval/commit/2f4df51d37ed51f6042f6eb4b75f91b5865df48a.patch")
sha512sums=('ce2122ab490b52537696b2a8e97fd3b604c547af93fccf7d83d82b9180d8bb50b57d002f4e16eb605acabab5b31e961fea97bf2d46bf45b9cd1f8b7fca028df2'
- '04299db828848a1babc6edbcd553300c8c543eccb35ff78eb24352d0c92ef802f6e245832d0412239d1adcab334957a55cab6f87477a8e832669b9f61655d1f7')
+ 'd315b38d0267a3488e53e46daeff04374fe3c5f9e5c8dc0c165cb8e7d2644fa8ecea2fc4642de0ce7ed0687bcec12317981bac1590cb62ffc06483928579f58e')
prepare() {
cd nbval-$pkgver
- patch -Np1 -i ../0001-Make-tests-pass-with-ipykernel-6.0.0.patch
+ # Fix test with newer Python https://github.com/computationalmodelling/nbval/pull/178
+ patch -Np1 -i ../2f4df51d37ed51f6042f6eb4b75f91b5865df48a.patch
}
build() {
@@ -33,17 +34,6 @@
cd nbval-$pkgver
python setup.py egg_info
- # XXX: workarounds for issues in dependencies...
- # 1. ipython uses a function deprecated in matplotlib 3.4 [1]
- # This will be unneeded once the next version of IPython is out [2].
- # Note that matplotlib.MatplotlibDeprecationWarning is inherited from UserWarning
- # instead of DeprecationWarning [3] until its upcoming version [4].
- export PYTHONWARNINGS="ignore::UserWarning"
- # [1] https://github.com/computationalmodelling/nbval/issues/167
- # [2] https://github.com/ipython/ipython/pull/12889
- # [3] https://github.com/matplotlib/matplotlib/blob/v3.4.2/lib/matplotlib/_api/deprecation.py#L19
- # [4] https://github.com/matplotlib/matplotlib/pull/20046
-
PYTHONPATH="$PWD" doit test
}
More information about the arch-commits
mailing list