summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBlair Bonnett2024-03-20 15:05:07 +0100
committerBlair Bonnett2024-03-20 15:05:07 +0100
commit717af05ebad9b1dd16d194ca3b76f213ab8696ad (patch)
tree3b6fb1a99bd5c808c36596a41700879c264b07ea
parent4e2ccfd194149463cf98fc8f350e3732b11a4faa (diff)
downloadaur-717af05ebad9b1dd16d194ca3b76f213ab8696ad.tar.gz
Update to 4.1.0
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD31
-rw-r--r--tests_use_random_ports.patch24
3 files changed, 32 insertions, 35 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c8879ca63bf7..9985de73b546 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,15 @@
pkgbase = jupyterhub
pkgdesc = Multi-user server for Jupyter notebooks
- pkgver = 4.0.2
+ pkgver = 4.1.0
pkgrel = 1
url = https://jupyter.org/hub
install = jupyterhub.install
arch = any
- license = BSD
+ license = BSD-3-Clause
checkdepends = jupyter-notebook
checkdepends = python-beautifulsoup4
checkdepends = python-pytest
- checkdepends = python-pytest-asyncio
+ checkdepends = python-pytest-rerunfailures
checkdepends = python-requests-mock
checkdepends = python-playwright
makedepends = npm
@@ -40,11 +40,11 @@ pkgbase = jupyterhub
optdepends = python-pycurl: improved HTTP performance
optdepends = python-statsd: send metrics to a StatsD server
backup = etc/jupyterhub/jupyterhub_config.py
- source = jupyterhub-4.0.2.tar.gz::https://github.com/jupyterhub/jupyterhub/archive/4.0.2.tar.gz
+ source = jupyterhub-4.1.0.tar.gz::https://github.com/jupyterhub/jupyterhub/archive/4.1.0.tar.gz
source = jupyterhub.service
source = tests_use_random_ports.patch
- sha256sums = cbc262a0be851803f83f084a8e68435519c171fad2463eb4a379c36aaeb9cfc1
+ sha256sums = 2afed4c1cbd7c83d72ad1015a7955bb0f49e82cbe6ba896ee198ecb049b08749
sha256sums = f851dac9e098afa1dfcf30169b23414e7384559984eb7090aaf3c4f9c1c84997
- sha256sums = 031b504b08c67dfbd6047a31a3cf5555a06cfb04b8c0a637206d548e48845ab1
+ sha256sums = 32d010f9d7656429e02c62b1c28368a67c3c09c5a932c3ce7df83679613912ee
pkgname = jupyterhub
diff --git a/PKGBUILD b/PKGBUILD
index 47b7cd1f3f29..43b30f31fc46 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,12 +4,12 @@
# Contributor: Mark Lee <mark at markelee dot com>
pkgname=jupyterhub
-pkgver=4.0.2
+pkgver=4.1.0
pkgrel=1
pkgdesc="Multi-user server for Jupyter notebooks"
url="https://jupyter.org/hub"
arch=(any)
-license=('BSD')
+license=('BSD-3-Clause')
depends=(
'ipython' 'nodejs-configurable-http-proxy' 'python-alembic'
'python-async_generator' 'python-certipy' 'python-entrypoints' 'python-jinja'
@@ -22,7 +22,7 @@ makedepends=(
)
checkdepends=(
'jupyter-notebook' 'python-beautifulsoup4' 'python-pytest'
- 'python-pytest-asyncio' 'python-requests-mock' 'python-playwright'
+ 'python-pytest-rerunfailures' 'python-requests-mock' 'python-playwright'
)
optdepends=(
'jupyter-notebook: standard notebook server'
@@ -40,9 +40,9 @@ source=(
'tests_use_random_ports.patch'
)
sha256sums=(
- 'cbc262a0be851803f83f084a8e68435519c171fad2463eb4a379c36aaeb9cfc1'
+ '2afed4c1cbd7c83d72ad1015a7955bb0f49e82cbe6ba896ee198ecb049b08749'
'f851dac9e098afa1dfcf30169b23414e7384559984eb7090aaf3c4f9c1c84997'
- '031b504b08c67dfbd6047a31a3cf5555a06cfb04b8c0a637206d548e48845ab1'
+ '32d010f9d7656429e02c62b1c28368a67c3c09c5a932c3ce7df83679613912ee'
)
prepare() {
@@ -80,9 +80,14 @@ check() {
)
local skip_tests=(
- # Needs the package to already be installed.
+ # Needs the package to already be installed to access jupyterhub-singleuser.
'test_server_token_role'
+ # Tries to test errors/warnings, but some of the expected responses are set
+ # to None which pytest fails on.
+ 'test_creating_roles'
+ 'test_delete_roles'
+
# Intermittent failures. For now, trust the upstream CI.
'test_external_service'
'test_single_user_spawner'
@@ -111,7 +116,18 @@ check() {
done
testargs+=('-k' "${karg:5}") # Trim the leading ' and '.
+ # Install into a local temporary virtual environment and run the tests there.
+ #
+ # New versions of pytest-asyncio (including the version in the Arch
+ # repositories) have a breaking change not supported by JupyterHub yet. See
+ # https://github.com/jupyterhub/jupyterhub/pull/4663
+ # https://github.com/jupyterhub/jupyterhub/pull/4664
+ # https://github.com/pytest-dev/pytest-asyncio/issues/718
+ # This is only needed for check(), and is installed to a virtual environment
+ # that will not impact any other processes, hence using pip and not creating
+ # an AUR package with an old version and dealing with package conflicts.
python -m venv --system-site-packages test-env
+ test-env/bin/python -m pip install --no-deps --ignore-installed 'pytest-asyncio>=0.17,<0.23'
test-env/bin/python -m installer "dist/jupyterhub-$pkgver"-*.whl
test-env/bin/python -m pytest -v jupyterhub "${testargs[@]}"
}
@@ -123,6 +139,9 @@ package() {
python -m installer --destdir="$pkgdir" "dist/jupyterhub-$pkgver"-*.whl
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" COPYING.md
+ # Remove unit tests from the final package.
+ rm -rf "$pkgdir/"usr/lib/python*/site-packages/jupyterhub/tests
+
# Remove $srcdir references from npm metadata.
find "$pkgdir" -name package.json -print0 | xargs -r -0 sed -i '/_where/d'
diff --git a/tests_use_random_ports.patch b/tests_use_random_ports.patch
index aa9f4c0ca228..c498170cc362 100644
--- a/tests_use_random_ports.patch
+++ b/tests_use_random_ports.patch
@@ -1,7 +1,7 @@
--- jupyterhub/tests/mocking.py
+++ jupyterhub/tests/mocking.py
-@@ -240,6 +240,8 @@
+@@ -241,6 +241,8 @@
if 'internal_certs_location' in kwargs:
cert_location = kwargs['internal_certs_location']
kwargs['external_certs'] = ssl_setup(cert_location, 'hub-ca')
@@ -10,25 +10,3 @@
super().__init__(*args, **kwargs)
@default('subdomain_host')
-
---- jupyterhub/tests/test_proxy.py
-+++ jupyterhub/tests/test_proxy.py
-
-@@ -12,4 +12,5 @@
- from ..utils import url_path_join as ujoin
- from ..utils import wait_for_http_server
-+from ..utils import random_port
- from .mocking import MockHub
- from .test_api import add_user, api_request
-@@ -31,9 +32,10 @@
- auth_token = 'secret!'
- proxy_ip = '127.0.0.1'
-- proxy_port = 54321
-+ proxy_port = random_port()
- cfg = Config()
- cfg.ConfigurableHTTPProxy.auth_token = auth_token
- cfg.ConfigurableHTTPProxy.api_url = 'http://%s:%i' % (proxy_ip, proxy_port)
- cfg.ConfigurableHTTPProxy.should_start = False
-+ cfg.JupyterHub.hub_port = random_port()
-
- app = MockHub.instance(config=cfg)