Skip to content

Commit

Permalink
Migrate to python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
matti-lamppu committed Jan 31, 2024
1 parent 41bafd6 commit 092f096
Show file tree
Hide file tree
Showing 6 changed files with 198 additions and 396 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
DEBUG=True
ALLOWED_HOSTS=*
APP_LOGGING_LEVEL=INFO
SECRET_KEY=secret

DATABASE_URL=postgis://tvp:[email protected]:5555/tvp
REDIS_URL=redis://127.0.0.1:6379/0
ELASTICSEARCH_URL=http://localhost:9200

CORS_ALLOWED_ORIGINS=http://localhost:8000,https://local-tilavaraus.hel.fi:3000,https://local-tilavaraus.hel.fi:3001
CSRF_TRUSTED_ORIGINS=http://localhost:8000,https://local-tilavaraus.hel.fi:3000,https://local-tilavaraus.hel.fi:3001
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ jobs:
name: "Run tests and SonarCloud scan"
runs-on: ubuntu-latest

defaults:
run:
shell: bash

services:
postgres:
image: postgis/postgis:13-3.3-alpine
Expand Down Expand Up @@ -66,7 +70,7 @@ jobs:
id: setup-python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"

- name: "Install poetry"
run: curl -sSL https://install.python-poetry.org | POETRY_VERSION=1.6.1 python - -y
Expand Down
4 changes: 2 additions & 2 deletions common/typing.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import TYPE_CHECKING, TypeAlias, Union
from typing import TYPE_CHECKING, Union

from django.contrib.auth.models import AnonymousUser
from django.core.handlers.wsgi import WSGIRequest
Expand All @@ -12,7 +12,7 @@
"GQLInfo",
]

AnyUser: TypeAlias = Union["User", AnonymousUser]
type AnyUser = Union["User", AnonymousUser] # noqa: UP007


class UserHintedWSGIRequest(WSGIRequest):
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11-slim-bullseye AS base
FROM python:3.12-slim-bullseye AS base

# Make sure we build as the root user.
USER root
Expand Down
Loading

0 comments on commit 092f096

Please sign in to comment.