Skip to content

Commit 70adcce

Browse files
authored
🔥 drop support for Python 3.9 (#229)
1 parent 9a10991 commit 70adcce

13 files changed

Lines changed: 46 additions & 508 deletions

File tree

.github/workflows/CI.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ jobs:
5959
- "3.12"
6060
- "3.11"
6161
- "3.10"
62-
- "3.9"
6362
ray:
6463
- "2.46.0"
6564
dagster:
@@ -110,7 +109,7 @@ jobs:
110109
os:
111110
- Ubuntu
112111
py:
113-
- "3.9"
112+
- "3.10"
114113
steps:
115114
- uses: actions/checkout@v4
116115
- name: Install uv
@@ -132,7 +131,7 @@ jobs:
132131
os:
133132
- Ubuntu
134133
py:
135-
- "3.9"
134+
- "3.10"
136135
steps:
137136
- uses: actions/checkout@v4
138137
- name: Install uv

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.10

docs/contributing/documentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ docs/
2525

2626
### Prerequisites
2727

28-
1. **Python Environment**: Ensure you have Python 3.9+ installed
28+
1. **Python Environment**: Ensure you have Python 3.10+ installed
2929
2. **UV Package Manager**: The project uses `uv` for dependency management
3030

3131
### Setup Steps

flake.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
system = "x86_64-linux";
1111
};
1212
lib = pkgs.lib;
13-
python = pkgs.python39;
13+
python = pkgs.python310;
1414
in {
1515
default = pkgs.mkShell {
1616
buildInputs = [
@@ -30,7 +30,7 @@
3030
pkgs.gcc-unwrapped.lib
3131
pkgs.glibc
3232
pkgs.glib
33-
pkgs.python39
33+
pkgs.python310
3434
];
3535
UV_PYTHON = "${python}/bin/python";
3636
shellHook = ''

pyproject.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ authors = [
66
{name = "Daniel Gafni", email = "danielgafni16@gmail.com"},
77
]
88
license = {text = "Apache-2.0"}
9-
requires-python = ">=3.9,<3.13"
9+
requires-python = ">=3.10,<3.13"
1010
readme = "README.md"
1111
keywords = [
1212
"dagster",
@@ -15,7 +15,6 @@ keywords = [
1515
"distributed",
1616
]
1717
classifiers = [
18-
"Programming Language :: Python :: 3.9",
1918
"Programming Language :: Python :: 3.10",
2019
"Programming Language :: Python :: 3.11",
2120
"Programming Language :: Python :: 3.12",
@@ -65,7 +64,6 @@ dev = [
6564
"pytest<8.0.0,>=7.3.1",
6665
"ruff>=0.3.0,<1.0.0",
6766
"pre-commit>=4.3.0,<4.4.0",
68-
"dagit<2.0.0,>=1.3.9",
6967
"pytest-cases<4.0.0,>=3.6.14",
7068
"pytest-kubernetes<1.0.0,>=0.3.1",
7169
"blacken-docs<2.0.0,>=1.16.0",
@@ -76,6 +74,7 @@ dev = [
7674
"ipython>=8.12.3",
7775
"syrupy>=4.9.1",
7876
"pytest-env>=1.1.3",
77+
"dagster-webserver>=1.10.2",
7978
]
8079
docs = [
8180
"griffe>=1.14.0",
@@ -102,7 +101,7 @@ log_cli = true
102101
log_level = "INFO"
103102

104103
[tool.ruff]
105-
target-version = "py39"
104+
target-version = "py310"
106105
line-length = 120
107106
src = [
108107
"src",
@@ -145,7 +144,7 @@ ban-relative-imports = "all"
145144
banned-module-level-imports = ["ray", "kubernetes", "torch"]
146145

147146
[tool.pyright]
148-
pythonVersion = "3.9"
147+
pythonVersion = "3.10"
149148
typeCheckingMode = "standard"
150149
failOnWarnings = false
151150
reportPropertyTypeMismatch = true

src/dagster_ray/executor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import annotations
22

33
from collections.abc import Iterator
4-
from typing import TYPE_CHECKING, Any, Optional, cast
4+
from typing import TYPE_CHECKING, Any, cast
55

66
import dagster as dg
77
from dagster._core.definitions.executor_definition import multiple_process_executor_requirements
@@ -184,7 +184,7 @@ def launch_step(self, step_handler_context: StepHandlerContext) -> Iterator[Dags
184184
else:
185185
remote_job_origin = run.external_job_origin # type: ignore
186186

187-
remote_job_origin = cast(Optional[RemoteJobOrigin], remote_job_origin)
187+
remote_job_origin = cast(RemoteJobOrigin | None, remote_job_origin)
188188

189189
if remote_job_origin:
190190
labels["dagster/code-location"] = remote_job_origin.repository_origin.code_location_origin.location_name

src/dagster_ray/kuberay/client/raycluster/client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@
55
import subprocess
66
import threading
77
import time
8-
from collections.abc import Iterator
8+
from collections.abc import Callable, Iterator
99
from contextlib import contextmanager
1010
from io import FileIO
1111
from queue import Queue
1212
from typing import (
1313
TYPE_CHECKING,
1414
Any,
15-
Callable,
1615
TypedDict,
1716
)
1817

src/dagster_ray/kuberay/resources/raycluster.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from typing import Optional
2-
31
import dagster as dg
42
from pydantic import Field, PrivateAttr
53
from typing_extensions import override
@@ -16,8 +14,8 @@
1614
class KubeRayClusterClientResource(dg.ConfigurableResource[RayClusterClient]):
1715
"""This configurable resource provides a `dagster_ray.kuberay.client.RayClusterClient`."""
1816

19-
kube_context: Optional[str] = None
20-
kube_config: Optional[str] = None
17+
kube_context: str | None = None
18+
kube_config: str | None = None
2119

2220
def create_resource(self, context: dg.InitResourceContext) -> RayClusterClient:
2321
load_kubeconfig(context=self.kube_context, config_file=self.kube_config)

src/dagster_ray/kuberay/resources/rayjob.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import TYPE_CHECKING, Literal, Optional
1+
from typing import TYPE_CHECKING, Literal
22

33
import dagster as dg
44
from pydantic import Field, PrivateAttr
@@ -22,8 +22,8 @@
2222
class KubeRayJobClientResource(dg.ConfigurableResource[RayJobClient]):
2323
"""This configurable resource provides a `dagster_ray.kuberay.client.RayJobClient`."""
2424

25-
kube_context: Optional[str] = None
26-
kube_config: Optional[str] = None
25+
kube_context: str | None = None
26+
kube_config: str | None = None
2727

2828
def create_resource(self, context: dg.InitResourceContext):
2929
load_kubeconfig(context=self.kube_context, config_file=self.kube_config)

src/dagster_ray/run_launcher.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import logging
44
import sys
5-
from typing import TYPE_CHECKING, Any, Optional, cast
5+
from typing import TYPE_CHECKING, Any, cast
66

77
import dagster as dg
88
from dagster._cli.api import ExecuteRunArgs # type: ignore
@@ -170,7 +170,7 @@ def _launch_ray_job(self, submission_id: str, entrypoint: str, run: DagsterRun):
170170
else:
171171
remote_job_origin = run.external_job_origin # type: ignore
172172

173-
remote_job_origin = cast(Optional[RemoteJobOrigin], remote_job_origin)
173+
remote_job_origin = cast(RemoteJobOrigin | None, remote_job_origin)
174174

175175
if remote_job_origin:
176176
labels["dagster/code-location"] = remote_job_origin.repository_origin.code_location_origin.location_name

0 commit comments

Comments
 (0)