mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Drop support for ubuntu 20.04 and Python 3.8
This commit is contained in:
3
.github/workflows/integration-test.yaml
vendored
3
.github/workflows/integration-test.yaml
vendored
@@ -39,9 +39,6 @@ jobs:
|
|||||||
- name: "Debian 12, Py 3.11"
|
- name: "Debian 12, Py 3.11"
|
||||||
distro_image: "debian:12"
|
distro_image: "debian:12"
|
||||||
extra_flags: ""
|
extra_flags: ""
|
||||||
- name: "Ubuntu 20.04, Py 3.8"
|
|
||||||
distro_image: "ubuntu:20.04"
|
|
||||||
extra_flags: ""
|
|
||||||
- name: "Ubuntu 22.04 Py 3.10"
|
- name: "Ubuntu 22.04 Py 3.10"
|
||||||
distro_image: "ubuntu:22.04"
|
distro_image: "ubuntu:22.04"
|
||||||
extra_flags: ""
|
extra_flags: ""
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ This script is run as:
|
|||||||
|
|
||||||
Constraints:
|
Constraints:
|
||||||
|
|
||||||
- The entire script should be compatible with Python 3.8, which is the default on
|
- The entire script should be compatible with Python 3.9, which is the default on
|
||||||
Ubuntu 20.04.
|
Debian 11.
|
||||||
- The script should parse in Python 3.6 as we print error messages for using
|
- The script should parse in Python 3.8 as we print error messages for using
|
||||||
Ubuntu 18.04 which comes with Python 3.6 by default.
|
Ubuntu 20.04 which comes with Python 3.8 by default.
|
||||||
- The script must depend only on stdlib modules, as no previous installation
|
- The script must depend only on stdlib modules, as no previous installation
|
||||||
of dependencies can be assumed.
|
of dependencies can be assumed.
|
||||||
|
|
||||||
@@ -210,22 +210,22 @@ def ensure_host_system_can_install_tljh():
|
|||||||
Check if TLJH is installable in current host system and exit with a clear
|
Check if TLJH is installable in current host system and exit with a clear
|
||||||
error message otherwise.
|
error message otherwise.
|
||||||
"""
|
"""
|
||||||
# Require Ubuntu 20.04+ or Debian 11+
|
# Require Ubuntu 22.04+ or Debian 11+
|
||||||
distro = get_os_release_variable("ID")
|
distro = get_os_release_variable("ID")
|
||||||
version = get_os_release_variable("VERSION_ID")
|
version = get_os_release_variable("VERSION_ID")
|
||||||
if distro not in ["ubuntu", "debian"]:
|
if distro not in ["ubuntu", "debian"]:
|
||||||
print("The Littlest JupyterHub currently supports Ubuntu or Debian Linux only")
|
print("The Littlest JupyterHub currently supports Ubuntu or Debian Linux only")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
elif distro == "ubuntu" and _parse_version(version) < (20, 4):
|
elif distro == "ubuntu" and _parse_version(version) < (22, 4):
|
||||||
print("The Littlest JupyterHub requires Ubuntu 20.04 or higher")
|
print("The Littlest JupyterHub requires Ubuntu 22.04 or higher")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
elif distro == "debian" and _parse_version(version) < (11,):
|
elif distro == "debian" and _parse_version(version) < (11,):
|
||||||
print("The Littlest JupyterHub requires Debian 11 or higher")
|
print("The Littlest JupyterHub requires Debian 11 or higher")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
# Require Python 3.8+
|
# Require Python 3.9+
|
||||||
if sys.version_info < (3, 8):
|
if sys.version_info < (3, 9):
|
||||||
print(f"bootstrap.py must be run with at least Python 3.8, found {sys.version}")
|
print(f"bootstrap.py must be run with at least Python 3.9, found {sys.version}")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
# Require systemd (systemctl is a part of systemd)
|
# Require systemd (systemctl is a part of systemd)
|
||||||
|
|||||||
@@ -85,9 +85,9 @@ def test_ubuntu_too_old():
|
|||||||
"""
|
"""
|
||||||
Error with a useful message when running in older Ubuntu
|
Error with a useful message when running in older Ubuntu
|
||||||
"""
|
"""
|
||||||
output = _run_bootstrap_in_container("ubuntu:18.04", False)
|
output = _run_bootstrap_in_container("ubuntu:20.04", False)
|
||||||
_stop_container()
|
_stop_container()
|
||||||
assert output.stdout == "The Littlest JupyterHub requires Ubuntu 20.04 or higher\n"
|
assert output.stdout == "The Littlest JupyterHub requires Ubuntu 22.04 or higher\n"
|
||||||
assert output.returncode == 1
|
assert output.returncode == 1
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user