summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBlair Bonnett2021-12-05 17:01:18 +0100
committerBlair Bonnett2021-12-05 17:01:18 +0100
commite9e9c5b419334d4f343ff939a08c0a59b0bf7a8b (patch)
tree365d704981b61b9a7cfdbfe03f2d11a8fc6d1d22
parentefdc65659a1a725ed90e08c1485c2ec9bd1f3367 (diff)
downloadaur-e9e9c5b419334d4f343ff939a08c0a59b0bf7a8b.tar.gz
Update to 2.0.0
This includes a patch to make most of the tests use random ports so they can be run on a machine with an existing JupyterHub instance. A few tests which are incompatible with this are disabled.
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD32
-rw-r--r--tests_use_random_ports.patch34
3 files changed, 65 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index bf3eabd7f029..48c147534b51 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = jupyterhub
pkgdesc = Multi-user server for Jupyter notebooks
- pkgver = 1.4.0
+ pkgver = 2.0.0
pkgrel = 1
url = https://jupyter.org/hub
install = jupyterhub.install
@@ -23,18 +23,22 @@ pkgbase = jupyterhub
depends = python-jsonschema
depends = python-jupyter_telemetry
depends = python-oauthlib
+ depends = python-packaging
depends = python-pamela
depends = python-prometheus_client
depends = python-requests
depends = python-sqlalchemy
depends = python-tornado
+ depends = python-traitlets
optdepends = jupyter-notebook: standard notebook server
optdepends = jupyterlab: to use the JupyterLab interface
+ optdepends = python-pycurl: improved HTTP performance
backup = etc/jupyterhub/jupyterhub_config.py
- source = jupyterhub-1.4.0.tar.gz::https://github.com/jupyterhub/jupyterhub/archive/1.4.0.tar.gz
+ source = jupyterhub-2.0.0.tar.gz::https://github.com/jupyterhub/jupyterhub/archive/2.0.0.tar.gz
source = jupyterhub.service
- sha256sums = fc1f52d7073e65cf7e93caff87ebc3eeff65cd18e0aaa734ffaa0c00cbe6a352
+ source = tests_use_random_ports.patch
+ sha256sums = e66e9e4a0975fba6563d8a5351bb2911228a5dd884347da77e3a4387a70d6952
sha256sums = adb4c09c668c35605d9cddc4a4171dd64ed6e74ab82da97f19b3437d26b052b9
+ sha256sums = acba51024276670aabad3d3f2a1c80d4b573809ca7e7ef6594916329d842417f
pkgname = jupyterhub
-
diff --git a/PKGBUILD b/PKGBUILD
index 3eb93c4e44b6..6e963619c1c6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,9 +4,9 @@
# Contributor: Mark Lee <mark at markelee dot com>
pkgname=jupyterhub
-pkgver=1.4.0
+pkgver=2.0.0
pkgrel=1
-pkgdesc="Multi-user server for Jupyter notebooks "
+pkgdesc="Multi-user server for Jupyter notebooks"
url="https://jupyter.org/hub"
arch=(any)
license=('BSD')
@@ -14,8 +14,8 @@ depends=(
'ipython' 'nodejs-configurable-http-proxy' 'python-alembic'
'python-async_generator' 'python-certipy' 'python-entrypoints' 'python-jinja'
'python-jsonschema' 'python-jupyter_telemetry' 'python-oauthlib'
- 'python-pamela' 'python-prometheus_client' 'python-requests'
- 'python-sqlalchemy' 'python-tornado'
+ 'python-packaging' 'python-pamela' 'python-prometheus_client' 'python-requests'
+ 'python-sqlalchemy' 'python-tornado' 'python-traitlets'
)
makedepends=(
'npm' 'python-setuptools'
@@ -27,6 +27,7 @@ checkdepends=(
optdepends=(
'jupyter-notebook: standard notebook server'
'jupyterlab: to use the JupyterLab interface'
+ 'python-pycurl: improved HTTP performance'
)
install=jupyterhub.install
backup=(
@@ -35,12 +36,19 @@ backup=(
source=(
"jupyterhub-${pkgver}.tar.gz::https://github.com/jupyterhub/jupyterhub/archive/${pkgver}.tar.gz"
'jupyterhub.service'
+ 'tests_use_random_ports.patch'
)
sha256sums=(
- 'fc1f52d7073e65cf7e93caff87ebc3eeff65cd18e0aaa734ffaa0c00cbe6a352'
+ 'e66e9e4a0975fba6563d8a5351bb2911228a5dd884347da77e3a4387a70d6952'
'adb4c09c668c35605d9cddc4a4171dd64ed6e74ab82da97f19b3437d26b052b9'
+ 'acba51024276670aabad3d3f2a1c80d4b573809ca7e7ef6594916329d842417f'
)
+prepare() {
+ cd "${srcdir}/jupyterhub-$pkgver"
+ patch -p0 -i "${srcdir}/tests_use_random_ports.patch"
+}
+
build() {
cd "${srcdir}/jupyterhub-$pkgver"
python setup.py build
@@ -58,11 +66,17 @@ check() {
cd "${srcdir}/jupyterhub-$pkgver"
# Run the tests we can. The DB upgrade tests always fail for me (it looks
- # like the virtual environment they set up is not complete) and the others
- # intermittently fail. We'll have to trust the upstream CI on those.
- PYTHONPATH="$PWD/build/lib" pytest -v jupyterhub/tests \
+ # like the virtual environment they set up is not complete). The internal SSL
+ # connections test are broken by our patch to use random ports for testing.
+ # This enables a lot more tests than it breaks so it is a worthwhile
+ # trade-off for now. The test_server_token_role test needs the package
+ # installed so it can find the jupyterhub-singleuser script. The other
+ # specific skipped tests intermittently fail. We'll have to trust the
+ # upstream CI on those.
+ PYTHONPATH="$PWD/build/lib" pytest -v jupyterhub \
--ignore=jupyterhub/tests/test_db.py \
- -k "not test_external_service and not test_single_user_spawner"
+ --ignore=jupyterhub/tests/test_internal_ssl_connections.py \
+ -k "not test_server_token_role and not test_external_service and not test_single_user_spawner"
}
package() {
diff --git a/tests_use_random_ports.patch b/tests_use_random_ports.patch
new file mode 100644
index 000000000000..9c3c0aeff6f7
--- /dev/null
+++ b/tests_use_random_ports.patch
@@ -0,0 +1,34 @@
+--- jupyterhub/tests/mocking.py
++++ jupyterhub/tests/mocking.py
+
+@@ -245,6 +245,8 @@
+ if 'internal_certs_location' in kwargs:
+ cert_location = kwargs['internal_certs_location']
+ kwargs['external_certs'] = ssl_setup(cert_location, 'hub-ca')
++ self.config.JupyterHub.hub_port = random_port()
++ self.config.ConfigurableHTTPProxy.api_url = f'http://127.0.0.1:{random_port()}'
+ 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
+@@ -32,9 +33,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)