Skip to content

Commit 1227a11

Browse files
author
Jeny Sadadia
committed
Add support for Python 3.11
Upgrade Python version to 3.11 for API. Update docker recipe that is being used for Developer mode to use `Python 3.11` image. Update requirements version to enable support for Python 3.11. Below are the required changes: 1. `httptools` that is a requirement for `uvicorn`, failed to build for existing package version that was `0.28.1`. ``` gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.11 -I/tmp/pip-install-o_24u7rm/httptools_8955220ea3f34d0bae14ed2b27b468ae/vendor/http-parser -c httptools/parser/parser.c -o build/temp.linux-x86_64-cpython-311/httptools/parser/parser.o -O2 httptools/parser/parser.c:212:12: fatal error: longintrepr.h: No such file or directory 212 | #include "longintrepr.h" | ^~~~~~~~~~~~~~~ compilation terminated. error: command '/usr/bin/gcc' failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for httptools ``` Fix it by using `uvicorn` version with Python 3.11 support. 2. Since `uvicorn` is one of the requirements of `fastapi`, we need to update its version to use python 3.11 compatible version of `uvicorn`. 3. Also, upgrade `motor` version to use it with python 3.11. Signed-off-by: Jeny Sadadia <jeny.sadadia@collabora.com>
1 parent b89d167 commit 1227a11

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

docker/api/Dockerfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# SPDX-License-Identifier: LGPL-2.1-or-later
22
#
3-
# Copyright (C) 2021 Collabora Limited
3+
# Copyright (C) 2021-2024 Collabora Limited
44
# Author: Guillaume Tucker <guillaume.tucker@collabora.com>
5+
# Author: Jeny Sadadia <jeny.sadadia@collabora.com>
56

6-
FROM python:3.10
7+
FROM python:3.11
78
MAINTAINER "KernelCI TSC" <kernelci-tsc@groups.io>
89

910
RUN apt-get update && apt-get install --no-install-recommends -y git

docker/api/requirements.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
cloudevents==1.9.0
2-
fastapi[all]==0.68.1
2+
fastapi[all]==0.99.1
33
fastapi-pagination==0.9.3
44
fastapi-users[beanie, oauth]==10.4.0
55
fastapi-versioning==0.10.0
66
MarkupSafe==2.0.1
7-
motor==2.5.1
7+
motor==3.3.2
88
passlib==1.7.4
99
pydantic==1.10.5
1010
pymongo-migrate==0.11.0
1111
python-jose[cryptography]==3.3.0
1212
pyyaml==5.3.1
1313
redis==5.0.1
14-
uvicorn[standard]==0.13.4
14+
uvicorn[standard]==0.28.1

0 commit comments

Comments
 (0)