Skip to content

Commit

Permalink
Upgrade: Bump Python to 3.11 (#488)
Browse files Browse the repository at this point in the history
This includes a dependency-bump, as it might add/remove polyfill libraries
  • Loading branch information
TrueBrain authored Dec 8, 2024
1 parent 1abe554 commit c38bd43
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 49 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: |
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand All @@ -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"
Expand Down Expand Up @@ -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"]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
29 changes: 14 additions & 15 deletions regression_runner/requirements.txt
Original file line number Diff line number Diff line change
@@ -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
52 changes: 26 additions & 26 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c38bd43

Please sign in to comment.