Skip to content

Commit

Permalink
Update packages and version to Python 3.12 (#1530)
Browse files Browse the repository at this point in the history
  • Loading branch information
petechd authored Oct 30, 2024
1 parent 2f23ff4 commit 190e3cf
Show file tree
Hide file tree
Showing 9 changed files with 1,017 additions and 1,003 deletions.
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ persistent=yes

# Minimum Python version to use for version dependent checks. Will default to
# the version used to run pylint.
py-version=3.11
py-version=3.12

# Discover python modules and packages in the file system subtree.
recursive=no
Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.11.4
3.12.6
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11-slim-bullseye
FROM python:3.12-slim-bullseye

EXPOSE 5000

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"

eval "$(pyenv init -)"
```
Python versions can be changed with the `pyenv local` or `pyenv global` commands suffixed with the desired version (e.g. 3.11.4). Different versions of Python can be installed first with the `pyenv install` command. Refer to the pyenv project Readme [here](https://github.com/pyenv/pyenv). To avoid confusion, check the current Python version at any given time using `python --version` or `python3 --version`.
Python versions can be changed with the `pyenv local` or `pyenv global` commands suffixed with the desired version (e.g. 3.12.6). Different versions of Python can be installed first with the `pyenv install` command. Refer to the pyenv project Readme [here](https://github.com/pyenv/pyenv). To avoid confusion, check the current Python version at any given time using `python --version` or `python3 --version`.

#### Python & dependencies

Expand Down
3 changes: 2 additions & 1 deletion app/questionnaire/placeholder_transforms.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from collections.abc import Sized
from datetime import date, datetime, timezone
from decimal import Decimal
from typing import TYPE_CHECKING, Literal, Mapping, Sequence, Sized
from typing import TYPE_CHECKING, Literal, Mapping, Sequence
from urllib.parse import quote

from babel.dates import format_datetime
Expand Down
2 changes: 1 addition & 1 deletion app/questionnaire/rules/operations.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from collections.abc import Sized
from copy import deepcopy
from datetime import date
from decimal import Decimal
Expand All @@ -6,7 +7,6 @@
Iterable,
Mapping,
Sequence,
Sized,
TypeAlias,
TypedDict,
TypeVar,
Expand Down
2,002 changes: 1,007 additions & 995 deletions poetry.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ flake8-quotes = "^3.4.0"

[tool.poetry.dependencies]
# update dependabot.yaml when adding new dependencies
python = "^3.11.4"
python = "^3.12.6"
colorama = "^0.4.6"
flask = "^3.0.2"
flask-babel = "^4.0.0"
Expand Down Expand Up @@ -94,6 +94,7 @@ ordered-set = "^4.1.0"
cachetools = "^5.3.0.7"
gevent = "^24.2.1"
babel = "==2.14.0" # Temporarily pinned - problem for translations found in v2.15.0, see: https://github.com/ONSdigital/eq-questionnaire-runner/pull/1384
wtforms = "==3.1.2" # Temporarily pinned - problem for breaking changes in v3.2.0, see: https://github.com/pallets-eco/wtforms/releases/tag/3.2.0

[build-system]
requires = ["poetry-core"]
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ inline-quotes = double
multiline-quotes = double
docstring-quotes = double
avoid-escape = True
ignore = E704,W503,E203
ignore = E704,W503,E203,E902

0 comments on commit 190e3cf

Please sign in to comment.