Skip to content

Commit 3fc5c7c

Browse files
committed
Updated Python to 3.10 and added Pillow for image processing
1 parent a65237c commit 3fc5c7c

File tree

7 files changed

+1018
-890
lines changed

7 files changed

+1018
-890
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- uses: actions/checkout@v3
1818
- uses: actions/setup-python@v5
1919
with:
20-
python-version: '3.8'
20+
python-version: '3.10'
2121

2222
- name: Install Poetry
2323
uses: snok/install-poetry@v1

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ repos:
2020
# supported by your project here, or alternatively use
2121
# pre-commit's default_language_version, see
2222
# https://pre-commit.com/#top_level-default_language_version
23-
language_version: python3.8
23+
language_version: python3.10
2424
- repo: https://github.com/pycqa/isort
2525
rev: 5.12.0
2626
hooks:

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ This documentation is dedicated for contributors who would like to add new vulne
99

1010
## Configuring the project
1111
The project is developed with the following frameworks and technologies:
12-
* [Python 3.8](https://www.python.org/downloads/release/python-380/)
12+
* [Python 3.10](https://www.python.org/downloads/release/python-380/)
1313
* [Docker](https://www.docker.com/) as a platform for containerisation
1414
* [FastAPI](https://github.com/tiangolo/fastapi) as easy to learn and fast to code web framework
1515
* [PostgreSQL 15.4](https://www.postgresql.org/) as a database
1616
* [Pytest](https://docs.pytest.org/) for code testing
1717
* [pre-commit](https://pre-commit.com/) for maintaining hooks for code style and tests
1818

19-
Configuring a development environment is a straightforward process assuming that `Python>=3.8`, `pip` and `Docker` are already installed:
19+
Configuring a development environment is a straightforward process assuming that `Python>=3.10`, `pip` and `Docker` are already installed:
2020

2121
1. Install `psycopg2` prerequisites as described in the [official documentation](https://www.psycopg.org/install/). For "*nix" distributions, the following command can be used:
2222
```sh

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.8-buster as builder
1+
FROM python:3.10-buster as builder
22

33
RUN pip install poetry==1.4.2
44

@@ -15,7 +15,7 @@ RUN touch README.md
1515
RUN poetry install --no-root --without dev && rm -rf $POETRY_CACHE_DIR
1616

1717
# The runtime image, used to just run the code provided its virtual environment
18-
FROM python:3.8-slim-buster as runtime
18+
FROM python:3.10-slim-buster as runtime
1919

2020
RUN apt-get update
2121
RUN apt-get -y install libpq-dev gcc vim sudo
@@ -36,4 +36,4 @@ RUN echo 'ALL ALL=(ALL) NOPASSWD: /usr/bin/find' | sudo tee /etc/sudoers.d/find_
3636
# for security, we're creating a dedicated non-root user
3737
RUN useradd -m app
3838
RUN chown app .
39-
USER app
39+
USER app

app/apis/healthcheck/service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55

66
@router.get("/healthcheck")
77
def healthcheck(response: Response):
8-
response.headers["X-Powered-By"] = "Python 3.8, FastAPI ^0.103.0"
8+
response.headers["X-Powered-By"] = "Python 3.10, FastAPI ^0.103.0"
99
return {"ok": True}

poetry.lock

Lines changed: 1008 additions & 881 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ license = "MIT"
77
readme = "README.md"
88

99
[tool.poetry.dependencies]
10-
python = "^3.8"
10+
python = "^3.10"
1111
fastapi = "^0.103.0"
1212
uvicorn = {extras = ["standard"], version = "^0.23.2"}
1313
httpx = "^0.24.1"
@@ -24,6 +24,7 @@ pytest-mock = "^3.14.0"
2424
requests-mock = "^1.11.0"
2525
colorama = "^0.4.6"
2626
pytest-json-report = "^1.5.0"
27+
pillow = "^11.1.0"
2728

2829

2930
[tool.poetry.group.dev.dependencies]

0 commit comments

Comments
 (0)