Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-48977: Update to Python 3.13 #408

Merged
merged 1 commit into from
Feb 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"

- name: Run pre-commit
uses: pre-commit/[email protected]
Expand All @@ -38,7 +38,7 @@ jobs:
strategy:
matrix:
python:
- "3.12"
- "3.13"

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
if: steps.filter.outputs.docs == 'true' || github.event_name == 'workflow_dispatch'
uses: lsst-sqre/run-tox@v1
with:
python-version: "3.12"
python-version: "3.13"
tox-envs: docs
tox-plugins: tox-uv
cache-key-prefix: docs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/periodic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
python:
- "3.12"
- "3.13"

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repos:
- id: check-toml

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.2
rev: v0.9.6
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# - Runs a non-root user.
# - Sets up the entrypoint and port.

FROM python:3.12.7-slim-bookworm AS base-image
FROM python:3.13.2-slim-bookworm AS base-image

# Update system packages
COPY scripts/install-base-packages.sh .
Expand Down
14 changes: 2 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ help:
@echo "make run - Run development instance of server"
@echo "make update - Update pinned dependencies and run make init"
@echo "make update-deps - Update pinned dependencies"
@echo "make update-deps-no-hashes - Pin dependencies without hashes"

.PHONY: init
init:
Expand All @@ -28,16 +27,7 @@ update-deps:
pip install --upgrade uv
uv pip install pre-commit
pre-commit autoupdate
uv pip compile --upgrade --generate-hashes \
uv pip compile --upgrade --universal --generate-hashes \
--output-file requirements/main.txt requirements/main.in
uv pip compile --upgrade --generate-hashes \
--output-file requirements/dev.txt requirements/dev.in

# Useful for testing against a Git version of a dependency.
.PHONY: update-deps-no-hashes
update-deps-no-hashes:
pip install --upgrade uv
uv pip compile --upgrade \
--output-file requirements/main.txt requirements/main.in
uv pip compile --upgrade \
uv pip compile --upgrade --universal --generate-hashes \
--output-file requirements/dev.txt requirements/dev.in
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ classifiers = [
"Operating System :: POSIX",
"Typing :: Typed",
]
requires-python = ">=3.12"
requires-python = ">=3.13"
# Use requirements/main.in for runtime dependencies instead.
dependencies = []
dynamic = ["version"]
Expand Down
793 changes: 445 additions & 348 deletions requirements/dev.txt

Large diffs are not rendered by default.

472 changes: 231 additions & 241 deletions requirements/main.txt

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import respx
import safir.logging
import structlog
import websockets
from asgi_lifespan import LifespanManager
from fastapi import FastAPI
from httpx import ASGITransport, AsyncClient
Expand Down Expand Up @@ -237,7 +238,7 @@ async def mock_connect(
) -> AsyncGenerator[MockJupyterWebSocket]:
yield mock_jupyter_websocket(url, extra_headers, jupyter_mock)

with patch("rubin.nublado.client.nubladoclient.websocket_connect") as mock:
with patch.object(websockets, "connect") as mock:
mock.side_effect = mock_connect
# Register some code we call over and over and over...
jupyter_mock.register_python_result(_GET_NODE, "Node1")
Expand Down
Loading