Repository: jupyterhub/nativeauthenticator (language: python)

Issue:
Test failure in main branch
Not yet investigated


Discussion / hints:
`pytest (3.8, jupyterhub==1.* sqlalchemy==1.*)` is currently failing https://github.com/jupyterhub/nativeauthenticator/actions/runs/10257308097/job/28378109882. All other matrix jobs including `pytest (3.9, jupyterhub==2.* sqlalchemy==1.*)` are passing.

Given that JupyterHub 1 is ancient and probably has several CVEs that are fixed in later versions I think we should drop it rather than trying to fix the failing test. Arguably we could drop JupyterHub 2, and maybe 3 too, to reduce the future maintenance burden
:+1: dropping support for jh <4

Fix patch:
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index 6ba7d98..fbd1c38 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -25,7 +25,7 @@ on:
 
 jobs:
   build-release:
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-latest
     permissions:
       # id-token=write is required for pypa/gh-action-pypi-publish, and the PyPI
       # project needs to be configured to trust this workflow.
@@ -38,7 +38,7 @@ jobs:
       - uses: actions/checkout@v4
       - uses: actions/setup-python@v5
         with:
-          python-version: "3.11"
+          python-version: "3.12"
 
       - name: install build package
         run: |
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 06cc9cf..11ed788 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -15,7 +15,7 @@ repos:
     hooks:
       - id: pyupgrade
         args:
-          - --py36-plus
+          - --py39-plus
 
   # Autoformat: Python code
   - repo: https://github.com/PyCQA/autoflake
diff --git a/pyproject.toml b/pyproject.toml
index f3267d2..6cde269 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -16,12 +16,10 @@ remove-unused-variables = true
 [tool.black]
 skip-string-normalization = true
 target_version = [
-    "py36",
-    "py37",
-    "py38",
     "py39",
     "py310",
     "py311",
+    "py312",
 ]
 
 
diff --git a/setup.py b/setup.py
index 7a05b02..8c1feb8 100644
--- a/setup.py
+++ b/setup.py
@@ -25,8 +25,9 @@
             "native = nativeauthenticator:NativeAuthenticator",
         ],
     },
+    python_requires=">=3.9",
     install_requires=[
-        "jupyterhub>=1.3",
+        "jupyterhub>=4.1.6",
         "bcrypt",
         "onetimepass",
     ],


Test patch:
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index ff6d6dd..5eb46da 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -23,26 +23,16 @@ on:
 
 jobs:
   pytest:
-    # FIXME: ubuntu-20.04 comes with py36, but ubuntu-22.04 doesn't, so only
-    #        bump this when we stop testing py36
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-latest
 
     strategy:
       fail-fast: false
       matrix:
         include:
-          - python-version: "3.6"
-            pip-install-spec: "jupyterhub==1.3.* sqlalchemy==1.*"
-          - python-version: "3.7"
-            pip-install-spec: "jupyterhub==1.4.* sqlalchemy==1.*"
-          - python-version: "3.8"
-            pip-install-spec: "jupyterhub==1.* sqlalchemy==1.*"
           - python-version: "3.9"
-            pip-install-spec: "jupyterhub==2.* sqlalchemy==1.*"
-          - python-version: "3.10"
-            pip-install-spec: "jupyterhub==3.*"
-          - python-version: "3.11"
             pip-install-spec: "jupyterhub==4.*"
+          - python-version: "3.12"
+            pip-install-spec: "jupyterhub==5.*"
           - python-version: "3.x"
             pip-install-spec: "--pre jupyterhub"
             accept-failure: true