Skip to content

Commit 811e2c5

Browse files
committed
Drop 3.8 not compatible with latest jupyter_events
1 parent 048f16f commit 811e2c5

File tree

5 files changed

+13
-22
lines changed

5 files changed

+13
-22
lines changed

.github/workflows/python-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
os: [ubuntu-latest, windows-latest, macos-latest]
21-
python-version: ["3.8", "3.11"]
21+
python-version: ["3.9", "3.11", "3.12", "3.13"]
2222
include:
2323
- os: windows-latest
2424
python-version: "3.9"
2525
- os: ubuntu-latest
26-
python-version: "pypy-3.8"
26+
python-version: "pypy-3.9"
2727
- os: macos-latest
2828
python-version: "3.10"
2929
- os: ubuntu-latest
@@ -180,7 +180,7 @@ jobs:
180180
fail-fast: false
181181
matrix:
182182
os: [ubuntu-latest]
183-
python-version: ["3.8", "3.9", "3.10", "3.11"]
183+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
184184
steps:
185185
- uses: actions/checkout@v4
186186
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
@@ -194,7 +194,7 @@ jobs:
194194
- uses: actions/checkout@v4
195195
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
196196
with:
197-
python_version: "pypy-3.8"
197+
python_version: "pypy-3.9"
198198
- name: Run the tests
199199
run: hatch -v run test:nowarn --integration_tests=true
200200

examples/simple/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "jupyter-server-example"
77
description = "Jupyter Server Example"
88
readme = "README.md"
99
license = ""
10-
requires-python = ">=3.8"
10+
requires-python = ">=3.9"
1111
dependencies = [
1212
"jinja2",
1313
"jupyter_server",

jupyter_server/serverapp.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2552,8 +2552,6 @@ def init_mime_overrides(self) -> None:
25522552
# ensure css, js are correct, which are required for pages to function
25532553
mimetypes.add_type("text/css", ".css")
25542554
mimetypes.add_type("application/javascript", ".js")
2555-
# for python <3.8
2556-
mimetypes.add_type("application/wasm", ".wasm")
25572555

25582556
def shutdown_no_activity(self) -> None:
25592557
"""Shutdown server on timeout when there are no kernels or terminals."""
@@ -2718,7 +2716,7 @@ def _init_asyncio_patch() -> None:
27182716
at least until asyncio adds *_reader methods
27192717
to proactor.
27202718
"""
2721-
if sys.platform.startswith("win") and sys.version_info >= (3, 8):
2719+
if sys.platform.startswith("win"):
27222720
import asyncio
27232721

27242722
try:

jupyter_server/utils.py

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
import sys
1212
import warnings
1313
from _frozen_importlib_external import _NamespacePath
14+
from collections.abc import Generator, Sequence
1415
from contextlib import contextmanager
1516
from pathlib import Path
16-
from typing import Any, Generator, NewType, Sequence
17+
from typing import Any, NewType
1718
from urllib.parse import (
1819
SplitResult,
1920
quote,
@@ -378,17 +379,9 @@ def filefind(filename: str, path_dirs: Sequence[str]) -> str:
378379
# os.path.abspath resolves '..', but Path.absolute() doesn't
379380
# Path.resolve() does, but traverses symlinks, which we don't want
380381
test_path = Path(os.path.abspath(test_path))
381-
if sys.version_info >= (3, 9):
382-
if not test_path.is_relative_to(path):
383-
# points outside root, e.g. via `filename='../foo'`
384-
continue
385-
else:
386-
# is_relative_to is new in 3.9
387-
try:
388-
test_path.relative_to(path)
389-
except ValueError:
390-
# points outside root, e.g. via `filename='../foo'`
391-
continue
382+
if not test_path.is_relative_to(path):
383+
# points outside root, e.g. via `filename='../foo'`
384+
continue
392385
# make sure we don't call is_file before we know it's a file within a prefix
393386
# GHSA-hrw6-wg82-cm62 - can leak password hash on windows.
394387
if test_path.is_file():

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ classifiers = [
2121
"Programming Language :: Python :: 3",
2222
"Programming Language :: Python :: 3 :: Only",
2323
]
24-
requires-python = ">=3.8"
24+
requires-python = ">=3.9"
2525
dependencies = [
2626
"anyio>=3.1.0",
2727
"argon2-cffi>=21.1",
@@ -208,7 +208,7 @@ pydist_resource_paths = ["jupyter_server/static/style/bootstrap.min.css", "jupyt
208208
post-version-spec = "dev"
209209

210210
[tool.mypy]
211-
python_version = "3.8"
211+
python_version = "3.9"
212212
explicit_package_bases = true
213213
strict = true
214214
pretty = true

0 commit comments

Comments
 (0)