From 4857de3864d062355a70daf1bda3bb632fe8cd70 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Sun, 8 Dec 2024 11:17:59 +0100 Subject: [PATCH] Upgrade: Bump Python to 3.11 This includes a dependency-bump, as it might add/remove polyfill libraries --- .github/workflows/testing.yml | 6 ++-- Dockerfile | 6 ++-- README.md | 4 +-- regression_runner/requirements.txt | 29 ++++++++--------- requirements.txt | 52 +++++++++++++++--------------- 5 files changed, 48 insertions(+), 49 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 84e5ca5..ebdc457 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -14,7 +14,7 @@ jobs: uses: OpenTTD/actions/.github/workflows/rw-entry-testing-docker-py.yml@v5 with: python-path: bananas_api - python-version: 3.8 + python-version: 3.11 regression: name: Regression @@ -23,10 +23,10 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Set up Python 3.8 + - name: Set up Python 3.11 uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.11 - name: Set up packages run: | diff --git a/Dockerfile b/Dockerfile index 7957594..c805538 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.8-slim AS builder +FROM python:3.11-slim AS builder RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ @@ -11,7 +11,7 @@ COPY src /code/src RUN cd /code && python setup.py install && mkdir /result RUN mv /code/build/*/*.so /result/ -FROM python:3.8-slim +FROM python:3.11-slim ARG BUILD_DATE="" ARG BUILD_VERSION="dev" @@ -74,7 +74,7 @@ RUN pip freeze 2>/dev/null > requirements.installed \ || ( echo "!! ERROR !! requirements.txt defined different packages or versions for installation" \ && exit 1 ) 1>&2 -COPY --from=builder /result/*.so /usr/local/lib/python3.8/site-packages/ +COPY --from=builder /result/*.so /usr/local/lib/python3.11/site-packages/ COPY bananas_api /code/bananas_api ENTRYPOINT ["python", "-m", "bananas_api"] diff --git a/README.md b/README.md index f941476..ec2a9c4 100644 --- a/README.md +++ b/README.md @@ -11,13 +11,13 @@ The API is documented on [SwaggerHub](https://app.swaggerhub.com/apis-docs/OpenT ## Development -This API is written in Python 3.8 with aiohttp, and makes strong use of asyncio. +This API is written in Python 3.11 with aiohttp, and makes strong use of asyncio. ### Running a local server #### Dependencies -- Python3.8 or higher. +- Python3.11 or higher. - [tusd](https://github.com/tus/tusd). For example, copy the `tusd` binary in your `~/.local/bin`. #### Preparing your venv diff --git a/regression_runner/requirements.txt b/regression_runner/requirements.txt index 17a894c..3f78db0 100644 --- a/regression_runner/requirements.txt +++ b/regression_runner/requirements.txt @@ -1,21 +1,20 @@ -aiohttp==3.9.5 +aiohappyeyeballs==2.4.4 +aiohttp==3.11.10 aiosignal==1.3.1 -async-timeout==4.0.3 -attrs==23.2.0 -certifi==2024.6.2 -charset-normalizer==3.3.2 +attrs==24.2.0 +certifi==2024.8.30 +charset-normalizer==3.4.0 click==8.1.7 coloredlogs==15.0.1 -frozenlist==1.4.1 -future==1.0.0 +frozenlist==1.5.0 humanfriendly==10.0 -idna==3.7 -multidict==6.0.5 -PyYAML==6.0.1 +idna==3.10 +multidict==6.1.0 +propcache==0.2.1 +PyYAML==6.0.2 requests==2.32.3 -six==1.16.0 -tinydb==4.8.0 -tuspy==1.0.3 -urllib3==1.26.19 +tinydb==4.8.2 +tuspy==1.1.0 +urllib3==2.2.3 verboselogs==1.7 -yarl==1.9.4 +yarl==1.18.3 diff --git a/requirements.txt b/requirements.txt index 70980d4..dda1c59 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,42 +1,42 @@ -aioauth-client==0.28.1 -aiohttp==3.9.5 +aioauth-client==0.29.0 +aiohappyeyeballs==2.4.4 +aiohttp==3.11.10 aiosignal==1.3.1 -anyio==4.4.0 -async-timeout==4.0.3 -attrs==23.2.0 -boto3==1.34.138 -botocore==1.34.138 -certifi==2024.6.2 -cffi==1.16.0 -charset-normalizer==3.3.2 +anyio==4.7.0 +attrs==24.2.0 +boto3==1.35.76 +botocore==1.35.76 +certifi==2024.8.30 +cffi==1.17.1 +charset-normalizer==3.4.0 click==8.1.7 -cryptography==42.0.8 -exceptiongroup==1.2.1 -frozenlist==1.4.1 +cryptography==44.0.0 +frozenlist==1.5.0 gitdb==4.0.11 github3.py==4.0.1 GitPython==3.1.43 h11==0.14.0 -httpcore==1.0.5 -httpx==0.27.0 -idna==3.7 +httpcore==1.0.7 +httpx==0.28.1 +idna==3.10 jmespath==1.0.1 -marshmallow==3.21.3 +marshmallow==3.23.1 marshmallow-enum==1.5.1 -multidict==6.0.5 +multidict==6.1.0 openttd-helpers==1.4.0 -packaging==24.1 +packaging==24.2 +propcache==0.2.1 pycparser==2.22 -PyJWT==2.8.0 +PyJWT==2.10.1 python-dateutil==2.9.0.post0 -PyYAML==6.0.1 +PyYAML==6.0.2 requests==2.32.3 -s3transfer==0.10.2 -sentry-sdk==2.7.1 -six==1.16.0 +s3transfer==0.10.4 +sentry-sdk==2.19.2 +six==1.17.0 smmap==5.0.1 sniffio==1.3.1 typing_extensions==4.12.2 uritemplate==4.1.1 -urllib3==1.26.19 -yarl==1.9.4 +urllib3==2.2.3 +yarl==1.18.3