Skip to content

Commit a009e43

Browse files
authored
breaking: require Python 3.9 (#428)
* breaking: require Python 3.9 maintainer tools doesn't work with Python 3.8 and can't be easily worked around * run autoformat after base Python update
1 parent ff5270b commit a009e43

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,8 @@ jobs:
2828
fail-fast: false
2929
matrix:
3030
os: [ubuntu-latest, windows-latest, macos-latest]
31-
python-version: ["3.8", "3.12", "3.13"]
31+
python-version: ["3.9", "3.12", "3.13"]
3232
include:
33-
- os: windows-latest
34-
python-version: "3.9"
3533
- os: ubuntu-latest
3634
python-version: "3.11"
3735
- os: ubuntu-latest

jupyter_core/paths.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515
import sys
1616
import tempfile
1717
import warnings
18+
from collections.abc import Iterator
1819
from contextlib import contextmanager
1920
from pathlib import Path
20-
from typing import Any, Iterator, Literal, Optional, overload
21+
from typing import Any, Literal, Optional, overload
2122

2223
import platformdirs
2324

jupyter_core/utils/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
import sys
1010
import threading
1111
import warnings
12+
from collections.abc import Awaitable
1213
from contextvars import ContextVar
1314
from pathlib import Path
1415
from types import FrameType
15-
from typing import Any, Awaitable, Callable, TypeVar, cast
16+
from typing import Any, Callable, TypeVar, cast
1617

1718

1819
def ensure_dir_exists(path: str | Path, mode: int = 0o777) -> None:

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ classifiers = [
1414
"Programming Language :: Python",
1515
"Programming Language :: Python :: 3"
1616
]
17-
requires-python = ">=3.8"
17+
requires-python = ">=3.9"
1818
dependencies = [
1919
"platformdirs>=2.5",
2020
"traitlets>=5.3",
@@ -102,7 +102,7 @@ build = [
102102

103103
[tool.mypy]
104104
files = "jupyter_core"
105-
python_version = "3.8"
105+
python_version = "3.9"
106106
strict = true
107107
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
108108
warn_unreachable = true

tests/test_migrate.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,9 @@ def notice_m_dir(src, dst):
132132
called["migrate_dir"] = True
133133
return migrate_dir(src, dst)
134134

135-
with patch.object(migrate_mod, "migrate_file", notice_m_file), patch.object(
136-
migrate_mod, "migrate_dir", notice_m_dir
135+
with (
136+
patch.object(migrate_mod, "migrate_file", notice_m_file),
137+
patch.object(migrate_mod, "migrate_dir", notice_m_dir),
137138
):
138139
assert migrate_one(src, dst)
139140
assert called == {"migrate_file": True}

0 commit comments

Comments
 (0)