Skip to content

Commit

Permalink
upgrade python to 3.12 (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
sastels authored Dec 4, 2024
1 parent 5d9d36d commit 61820f0
Show file tree
Hide file tree
Showing 7 changed files with 191 additions and 105 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/vscode/devcontainers/python:0-3.10@sha256:ef9cc483a593c95e1e83f2cf00b6a0e1ec7df43344416a41ccb3a88aef27beac
FROM mcr.microsoft.com/vscode/devcontainers/python:1-3.12

ENV POETRY_VERSION="1.7.1"

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:

steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Set up Python 3.10
- name: Set up Python 3.12
uses: actions/setup-python@b64ffcaf5b410884ad320a9cfac8866006a109aa # v4.8.0
with:
python-version: '3.10'
python-version: '3.12'
- name: Upgrade pip
run: python -m pip install --upgrade pip

Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
working-directory: ${{ github.workspace }}
shell: bash
run: |
mkdir -p "${{ github.workspace }}/env/" && cp -fR $(poetry env list | poetry env info -p)/lib/python3.10/site-packages "${{ github.workspace }}/env/"
mkdir -p "${{ github.workspace }}/env/" && cp -fR $(poetry env list | poetry env info -p)/lib/python3.12/site-packages "${{ github.workspace }}/env/"
- name: Install development .env file
working-directory: ${{ github.workspace }}
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ GIT_COMMIT ?= $(shell git rev-parse HEAD)
run:
FLASK_APP=application.py FLASK_ENV=development poetry run flask run -p 7000

.PHONY: run-gunicorn
run-gunicorn:
PORT=7000 poetry run gunicorn -c gunicorn_config.py application

.PHONY: test
test:
poetry run ruff check --select I .
Expand Down
2 changes: 1 addition & 1 deletion ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.10-alpine3.18@sha256:d5ee9613c89c9bd4c4112465d2136512ea8629bce6ff15fa27144f3cc16b5c6b
FROM python:3.12-alpine3.20@sha256:5049c050bdc68575a10bcb1885baa0689b6c15152d8a56a7e399fb49f783bf98

ENV PYTHONDONTWRITEBYTECODE 1
ARG POETRY_VERSION="1.7.1"
Expand Down
2 changes: 1 addition & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[mypy]
python_version = 3.10
python_version = 3.12

[mypy-flask_env.*]
ignore_missing_imports = True
Expand Down
274 changes: 178 additions & 96 deletions poetry.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.black]
line-length = 110
target-version = ['py37', 'py38', 'py39', 'py310']
target-version = ['py37', 'py38', 'py39', 'py310', 'py312']
include = '(app|tests)/.*\.pyi?$'

[tool.poetry]
Expand All @@ -17,7 +17,7 @@ requires = ["poetry-core>=1.7.1"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.dependencies]
python = "~3.10.9"
python = "~3.12.7"
aws-xray-sdk = "^2.14.0"

awscli-cwlogs = "1.4.6"
Expand All @@ -28,7 +28,7 @@ gevent = "24.2.1"
gunicorn = "22.0.0"
newrelic = "10.3.0"

notifications-utils = { git = "https://github.com/cds-snc/notifier-utils.git", tag = "52.2.7"}
notifications-utils = { git = "https://github.com/cds-snc/notifier-utils.git", tag = "53.0.1"}
pycryptodome = "*"

python-dotenv = "1.0.1"
Expand Down

0 comments on commit 61820f0

Please sign in to comment.