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

python3.13 #780

Merged
merged 1 commit into from
Dec 13, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/add-mypy-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
description: Python version
required: true
type: string
default: "3.12"
default: "3.13"

permissions:
contents: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.12']
python-version: ['3.13']
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-gcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ permissions:

env:
MYPY_VERSION: ${{ github.event.inputs.mypy_version || 'master' }}
RUNTIME: ${{ github.event.inputs.runtime || 'python312' }}
RUNTIME: ${{ github.event.inputs.runtime || 'python313' }}

jobs:
gcp-deploy:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repos:
rev: 24.10.0
hooks:
- id: black
language_version: python3.12
language_version: python3.13

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.2
Expand Down
2 changes: 1 addition & 1 deletion app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.12-alpine
FROM python:3.13-alpine

ENV PYTHONUNBUFFERED=1

Expand Down
2 changes: 1 addition & 1 deletion app/Dockerfile-prod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ COPY ./frontend/ /app/
RUN npm run build


FROM python:3.12-alpine
FROM python:3.13-alpine

ENV PYTHONUNBUFFERED=1

Expand Down
4 changes: 2 additions & 2 deletions app/config.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
debug = "1"
enable-prometheus = "1"

default-python-version = "3.12"
python-versions = ["3.9", "3.10", "3.11", "3.12"]
default-python-version = "3.13"
python-versions = ["3.9", "3.10", "3.11", "3.12", "3.13"]
mypy-versions = [
["mypy latest", "latest"],
["basedmypy latest", "basedmypy-latest"],
Expand Down
16 changes: 14 additions & 2 deletions app/mypy_playground/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,25 @@
define(
"default_python_version",
type=str,
default="3.12",
default="3.13",
help="Default Python version",
)
define(
"python_versions",
type=str,
default=["3.12", "3.11", "3.10", "3.9", "3.8", "3.7", "3.6", "3.5", "3.4", "2.7"],
default=[
"3.13",
"3.12",
"3.11",
"3.10",
"3.9",
"3.8",
"3.7",
"3.6",
"3.5",
"3.4",
"2.7",
],
multiple=True,
help="Python versions",
)
Expand Down
4 changes: 2 additions & 2 deletions app/mypy_playground/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from pathlib import Path
from typing import Any, cast

import tomli
import tomllib
from tornado.options import options


Expand Down Expand Up @@ -73,7 +73,7 @@ def parse_toml_file(path: Path) -> None:
if not path.is_file():
return
with open(path, "rb") as f:
config = tomli.load(f)
config = tomllib.load(f)
for option_name in options._options:
value = config.get(option_name)
if value is None:
Expand Down
2 changes: 1 addition & 1 deletion app/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.mypy]
python_version = '3.12'
python_version = '3.13'
strict = true

[[tool.mypy.overrides]]
Expand Down
2 changes: 0 additions & 2 deletions app/requirements.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
aiodocker>=0.13.0,<1.0
dataclasses
google-auth
prometheus_client<1
requests # Until google-auth supports asyncio
tomli
tornado>=6,<7
8 changes: 2 additions & 6 deletions app/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# This file is autogenerated by pip-compile with Python 3.13
# by the following command:
#
# pip-compile
Expand All @@ -20,13 +20,11 @@ certifi==2024.8.30
# via requests
charset-normalizer==3.4.0
# via requests
dataclasses==0.6
# via -r requirements.in
frozenlist==1.5.0
# via
# aiohttp
# aiosignal
google-auth==2.36.0
google-auth==2.37.0
# via -r requirements.in
idna==3.10
# via
Expand All @@ -52,8 +50,6 @@ requests==2.32.3
# via -r requirements.in
rsa==4.9
# via google-auth
tomli==2.2.1
# via -r requirements.in
tornado==6.4.2
# via -r requirements.in
urllib3==2.2.3
Expand Down
6 changes: 3 additions & 3 deletions app/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
envlist =
mypy
pre-commit
py311
py313
skipsdist = true

[gh-actions]
python =
3.12: mypy, pre-commit, py312
3.13: mypy, pre-commit, py313

[testenv]
deps =
-r {toxinidir}/requirements.txt
-r {toxinidir}/requirements.dev.txt
commands = pytest --cov=mypy_playground tests
commands = python -m pytest --cov=mypy_playground tests

[testenv:mypy]
commands = mypy .
Expand Down
2 changes: 1 addition & 1 deletion sandbox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $ ./update_latest.sh 0.930

### Deploy to Cloud Functions
```console
$ RUNTIME=python311 REGION=us-central1 INVOKER_MEMBER=serviceAccount:... SERVICE_ACCOUNT=... ./deploy.sh latest
$ RUNTIME=python312 REGION=us-central1 INVOKER_MEMBER=serviceAccount:... SERVICE_ACCOUNT=... ./deploy.sh latest
```

### Build all Docker images
Expand Down
2 changes: 1 addition & 1 deletion sandbox/add_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ mkdir "$docker_dir"
cd "$docker_dir"
cp "${cloud_functions_dir}/requirements.in" ./
cp "${cloud_functions_dir}/requirements.txt" ./
echo 'FROM python:3.12-slim
echo 'FROM python:3.13-slim

WORKDIR /tmp
COPY ./requirements.txt /tmp/
Expand Down
2 changes: 1 addition & 1 deletion sandbox/cloud_functions/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cd "$(dirname "$0")"
: "${MAX_INSTANCES:=3}"
: "${MEMORY:=1024MB}"
: "${REGION:=asia-northeast1}"
: "${RUNTIME:=python311}"
: "${RUNTIME:=python312}"

deploy() {
VERSION="$1"
Expand Down
Loading