Skip to content

Commit

Permalink
⬆️ support Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgafni committed Oct 22, 2024
1 parent 684ead0 commit 8e9ea44
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
os:
- Ubuntu
py:
# - "3.12"
- "3.12"
- "3.11"
- "3.10"
- "3.9"
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
run: uv python install ${{ matrix.py }} && uv python pin ${{ matrix.py }} && uv venv --python ${{ matrix.py }}
- name: Override ray==${{ matrix.ray }} dagster==${{ matrix.dagster }}
id: override
run: uv add --no-sync "ray[all]==${{ matrix.ray }}" "dagster==${{ matrix.dagster }}" || echo SKIP=1 >> $GITHUB_OUTPUT
run: (python scripts/check_deps.py --python ${{ matrix.py }} --dagster ${{ matrix.dagster }} --ray ${{ matrix.ray }} && uv add --no-sync "ray[all]==${{ matrix.ray }}" "dagster==${{ matrix.dagster }}") || echo SKIP=1 >> $GITHUB_OUTPUT
- name: Install dependencies
run: uv sync --all-extras --dev
if: ${{ steps.override.outputs.SKIP != '1' }}
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ keywords = [
"distributed",
]
classifiers = [
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries :: Python Modules",
Expand Down
31 changes: 31 additions & 0 deletions scripts/check_deps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
from argparse import ArgumentParser

from packaging.version import Version

parser = ArgumentParser()

parser.add_argument("--python", type=Version, help="Python version")
parser.add_argument("--dagster", type=Version, help="Dagster version")
parser.add_argument("--ray", type=Version, help="Dagster version")


def check_python_312(
python: Version,
dagster: Version,
ray: Version,
):
if python > Version("3.12") and ray < Version("2.37.0"):
raise RuntimeError("Ray version must be at least 2.37.0 for Python 3.12")


def main():
args = parser.parse_args()
check_python_312(
python=args.python,
dagster=args.dagster,
ray=args.ray,
)


if __name__ == "__main__":
main()

0 comments on commit 8e9ea44

Please sign in to comment.