Skip to content

Commit a98299c

Browse files
authored
Merge pull request #998 from consideRatio/pr/bump-drop
Drop ubuntu 20.04, require py39, traefik-proxy v2, and ldapauthenticator v2
2 parents 2282e61 + e8602fc commit a98299c

File tree

10 files changed

+36
-38
lines changed

10 files changed

+36
-38
lines changed

.github/integration-test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
TEST_IMAGE_NAME = "test-systemd"
1111

1212

13-
@functools.lru_cache()
13+
@functools.lru_cache
1414
def _get_container_runtime_cli():
1515
runtimes = ["docker", "podman"]
1616
for runtime in runtimes:

.github/workflows/integration-test.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ jobs:
3939
- name: "Debian 12, Py 3.11"
4040
distro_image: "debian:12"
4141
extra_flags: ""
42-
- name: "Ubuntu 20.04, Py 3.8"
43-
distro_image: "ubuntu:20.04"
44-
extra_flags: ""
4542
- name: "Ubuntu 22.04 Py 3.10"
4643
distro_image: "ubuntu:22.04"
4744
extra_flags: ""

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ repos:
1515
hooks:
1616
- id: pyupgrade
1717
args:
18-
- --py36-plus
19-
# We need the bootstrap.py script to be parsable with Python 3.5, so we
18+
- --py39-plus
19+
# We need the bootstrap.py script to be parsable with Python 3.8, so we
2020
# exclude it from the pyupgrade hook that will apply f-strings etc.
2121
exclude: bootstrap/bootstrap.py
2222

bootstrap/bootstrap.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
1010
Constraints:
1111
12-
- The entire script should be compatible with Python 3.8, which is the default on
13-
Ubuntu 20.04.
14-
- The script should parse in Python 3.6 as we print error messages for using
15-
Ubuntu 18.04 which comes with Python 3.6 by default.
12+
- The entire script should be compatible with Python 3.9, which is the default on
13+
Debian 11.
14+
- The script should parse in Python 3.8 as we print error messages for using
15+
Ubuntu 20.04 which comes with Python 3.8 by default.
1616
- The script must depend only on stdlib modules, as no previous installation
1717
of dependencies can be assumed.
1818
@@ -210,22 +210,22 @@ def ensure_host_system_can_install_tljh():
210210
Check if TLJH is installable in current host system and exit with a clear
211211
error message otherwise.
212212
"""
213-
# Require Ubuntu 20.04+ or Debian 11+
213+
# Require Ubuntu 22.04+ or Debian 11+
214214
distro = get_os_release_variable("ID")
215215
version = get_os_release_variable("VERSION_ID")
216216
if distro not in ["ubuntu", "debian"]:
217217
print("The Littlest JupyterHub currently supports Ubuntu or Debian Linux only")
218218
sys.exit(1)
219-
elif distro == "ubuntu" and _parse_version(version) < (20, 4):
220-
print("The Littlest JupyterHub requires Ubuntu 20.04 or higher")
219+
elif distro == "ubuntu" and _parse_version(version) < (22, 4):
220+
print("The Littlest JupyterHub requires Ubuntu 22.04 or higher")
221221
sys.exit(1)
222222
elif distro == "debian" and _parse_version(version) < (11,):
223223
print("The Littlest JupyterHub requires Debian 11 or higher")
224224
sys.exit(1)
225225

226-
# Require Python 3.8+
227-
if sys.version_info < (3, 8):
228-
print(f"bootstrap.py must be run with at least Python 3.8, found {sys.version}")
226+
# Require Python 3.9+
227+
if sys.version_info < (3, 9):
228+
print(f"bootstrap.py must be run with at least Python 3.9, found {sys.version}")
229229
sys.exit(1)
230230

231231
# Require systemd (systemctl is a part of systemd)

integration-tests/test_bootstrap.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ def test_ubuntu_too_old():
8585
"""
8686
Error with a useful message when running in older Ubuntu
8787
"""
88-
output = _run_bootstrap_in_container("ubuntu:18.04", False)
88+
output = _run_bootstrap_in_container("ubuntu:20.04", False)
8989
_stop_container()
90-
assert output.stdout == "The Littlest JupyterHub requires Ubuntu 20.04 or higher\n"
90+
assert output.stdout == "The Littlest JupyterHub requires Ubuntu 22.04 or higher\n"
9191
assert output.returncode == 1
9292

9393

integration-tests/test_extensions.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ def test_labextensions():
2929
# jupyter-labextension writes to stdout and stderr weirdly
3030
proc = subprocess.run(
3131
["/opt/tljh/user/bin/jupyter-labextension", "list"],
32-
stderr=subprocess.PIPE,
33-
stdout=subprocess.PIPE,
32+
capture_output=True,
3433
)
3534

3635
extensions = [

pyproject.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,10 @@ profile = "black"
2525
# target-version should be all supported versions, see
2626
# https://github.com/psf/black/issues/751#issuecomment-473066811
2727
target_version = [
28-
"py36",
29-
"py37",
30-
"py38",
3128
"py39",
3229
"py310",
3330
"py311",
31+
"py312",
3432
]
3533

3634

@@ -67,7 +65,7 @@ omit = [
6765
github_url = "https://github.com/jupyterhub/the-littlest-jupyterhub"
6866

6967
[tool.tbump.version]
70-
current = "1.0.1.dev"
68+
current = "2.0.0.dev"
7169
regex = '''
7270
(?P<major>\d+)
7371
\.

setup.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,24 @@
22

33
setup(
44
name="the-littlest-jupyterhub",
5-
version="1.0.1.dev",
5+
version="2.0.0.dev",
66
description="A small JupyterHub distribution",
77
url="https://github.com/jupyterhub/the-littlest-jupyterhub",
88
author="Jupyter Development Team",
99
author_email="[email protected]",
1010
license="3 Clause BSD",
1111
packages=find_packages(),
1212
include_package_data=True,
13+
python_requires=">=3.9",
1314
install_requires=[
14-
"ruamel.yaml==0.17.*",
15+
"ruamel.yaml==0.18.*",
1516
"jinja2",
1617
"pluggy==1.*",
1718
"backoff",
1819
"filelock",
1920
"requests",
2021
"bcrypt",
21-
"jupyterhub-traefik-proxy==1.*",
22+
"jupyterhub-traefik-proxy==2.*",
2223
],
2324
entry_points={
2425
"console_scripts": [

tests/test_config.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,18 +143,21 @@ def test_remove_from_config_error():
143143

144144

145145
def test_reload_hub():
146-
with mock.patch("tljh.systemd.restart_service") as restart_service, mock.patch(
147-
"tljh.systemd.check_service_active"
148-
) as check_active, mock.patch("tljh.config.check_hub_ready") as check_ready:
146+
with (
147+
mock.patch("tljh.systemd.restart_service") as restart_service,
148+
mock.patch("tljh.systemd.check_service_active") as check_active,
149+
mock.patch("tljh.config.check_hub_ready") as check_ready,
150+
):
149151
config.reload_component("hub")
150152
restart_service.assert_called_with("jupyterhub")
151153
check_active.assert_called_with("jupyterhub")
152154

153155

154156
def test_reload_proxy(tljh_dir):
155-
with mock.patch("tljh.systemd.restart_service") as restart_service, mock.patch(
156-
"tljh.systemd.check_service_active"
157-
) as check_active:
157+
with (
158+
mock.patch("tljh.systemd.restart_service") as restart_service,
159+
mock.patch("tljh.systemd.check_service_active") as check_active,
160+
):
158161
config.reload_component("proxy")
159162
restart_service.assert_called_with("traefik")
160163
check_active.assert_called_with("traefik")

tljh/requirements-hub-env.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
#
1111
jupyterhub>=5.1.0,<6
1212
jupyterhub-systemdspawner>=1.0.1,<2
13-
jupyterhub-firstuseauthenticator>=1.0.0,<2
14-
jupyterhub-nativeauthenticator>=1.2.0,<2
15-
jupyterhub-ldapauthenticator>=1.3.2,<2
13+
jupyterhub-firstuseauthenticator>=1.1.0,<2
14+
jupyterhub-nativeauthenticator>=1.3.0,<2
15+
jupyterhub-ldapauthenticator==2.0.0b2 # FIXME: update to >=2.0.0,<3
1616
jupyterhub-tmpauthenticator>=1.0.0,<2
1717
oauthenticator>=17,<18
18-
jupyterhub-idle-culler>=1.2.1,<2
18+
jupyterhub-idle-culler>=1.4.0,<2
1919

2020
# pycurl is installed to improve reliability and performance for when JupyterHub
2121
# makes web requests. JupyterHub will use tornado's CurlAsyncHTTPClient when
@@ -25,4 +25,4 @@ jupyterhub-idle-culler>=1.2.1,<2
2525
# ref: https://www.tornadoweb.org/en/stable/httpclient.html#module-tornado.simple_httpclient
2626
# ref: https://github.com/jupyterhub/the-littlest-jupyterhub/issues/289
2727
#
28-
pycurl>=7.45.2,<8
28+
pycurl>=7.45.3,<8

0 commit comments

Comments
 (0)