Skip to content

Commit

Permalink
python3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
KotlinIsland committed Nov 7, 2024
1 parent 61b898a commit 35a949c
Show file tree
Hide file tree
Showing 15 changed files with 79 additions and 75 deletions.
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
4 changes: 2 additions & 2 deletions .github/workflows/deploy-gcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ on:
description: Runtime version
required: true
type: string
default: python312
default: python313

permissions:
contents: read
id-token: write

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: 23.9.1
hooks:
- id: black
language_version: python3.12
language_version: python3.13

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.292
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
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
52 changes: 26 additions & 26 deletions app/requirements.dev.txt
Original file line number Diff line number Diff line change
@@ -1,65 +1,65 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile requirements.dev.in
#
build==1.0.3
# This file was autogenerated by uv via the following command:
# uv pip compile requirements.dev.in
build==1.2.2.post1
# via pip-tools
click==8.1.7
# via pip-tools
coverage[toml]==7.2.7
coverage==7.6.4
# via pytest-cov
iniconfig==2.0.0
# via pytest
mypy==1.4.1
mypy==1.13.0
# via -r requirements.dev.in
mypy-extensions==1.0.0
# via mypy
packaging==23.1
packaging==24.1
# via
# build
# pytest
pip-tools==7.3.0
pip==24.3.1
# via pip-tools
pip-tools==7.4.1
# via -r requirements.dev.in
pluggy==1.2.0
pluggy==1.5.0
# via pytest
pyproject-hooks==1.0.0
# via build
pytest==7.4.0
pyproject-hooks==1.2.0
# via
# build
# pip-tools
pytest==8.3.3
# via
# -r requirements.dev.in
# pytest-cov
# pytest-mock
# pytest-randomly
# pytest-tornado
pytest-cov==4.1.0
pytest-cov==6.0.0
# via -r requirements.dev.in
pytest-mock==3.11.1
pytest-mock==3.14.0
# via -r requirements.dev.in
pytest-randomly==3.12.0
pytest-randomly==3.16.0
# via -r requirements.dev.in
pytest-tornado==0.8.1
# via -r requirements.dev.in
setuptools==75.3.0
# via
# pip-tools
# pytest-tornado
tornado==6.4.1
# via
# -c requirements.txt
# pytest-tornado
types-chardet==5.0.4.6
# via -r requirements.dev.in
types-mock==5.0.0.7
types-mock==5.1.0.20240425
# via -r requirements.dev.in
types-setuptools==68.0.0.0
types-setuptools==75.3.0.20241107
# via -r requirements.dev.in
types-toml==0.10.8.6
types-toml==0.10.8.20240310
# via -r requirements.dev.in
typing-extensions==4.7.0
# via
# -c requirements.txt
# mypy
wheel==0.41.2
wheel==0.44.0
# via pip-tools

# The following packages are considered to be unsafe in a requirements file:
# pip
# setuptools
56 changes: 24 additions & 32 deletions app/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,64 +1,56 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile
#
aiodocker==0.21.0
# This file was autogenerated by uv via the following command:
# uv pip compile requirements.in
aiodocker==0.23.0
# via -r requirements.in
aiohappyeyeballs==2.3.5
aiohappyeyeballs==2.4.3
# via aiohttp
aiohttp==3.10.2
aiohttp==3.10.10
# via aiodocker
aiosignal==1.3.1
# via aiohttp
attrs==23.1.0
attrs==24.2.0
# via aiohttp
cachetools==5.3.1
cachetools==5.5.0
# via google-auth
certifi==2024.7.4
certifi==2024.8.30
# via requests
charset-normalizer==3.1.0
charset-normalizer==3.4.0
# via requests
dataclasses==0.6
dataclasses==0.8
# via -r requirements.in
frozenlist==1.4.1
frozenlist==1.5.0
# via
# aiohttp
# aiosignal
google-auth==2.21.0
google-auth==2.36.0
# via -r requirements.in
idna==3.7
idna==3.10
# via
# requests
# yarl
multidict==6.0.4
multidict==6.1.0
# via
# aiohttp
# yarl
prometheus-client==0.17.0
prometheus-client==0.21.0
# via -r requirements.in
pyasn1==0.5.0
propcache==0.2.0
# via yarl
pyasn1==0.6.1
# via
# pyasn1-modules
# rsa
pyasn1-modules==0.3.0
pyasn1-modules==0.4.1
# via google-auth
requests==2.32.0
requests==2.32.3
# via -r requirements.in
rsa==4.9
# via google-auth
six==1.16.0
# via google-auth
tomli==2.0.1
tomli==2.0.2
# via -r requirements.in
tornado==6.4.1
# via -r requirements.in
typing-extensions==4.7.0
# via aiodocker
urllib3==1.26.19
# via
# google-auth
# requests
yarl==1.9.2
urllib3==2.2.3
# via requests
yarl==1.17.1
# via aiohttp
4 changes: 2 additions & 2 deletions app/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
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 =
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=python313 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:=python313}"

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

0 comments on commit 35a949c

Please sign in to comment.