Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: master_server
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
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.8-slim
FROM python:3.11-slim

ARG BUILD_DATE=""
ARG BUILD_VERSION="dev"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ These are in a single repository, as they share the same database access.

## Development

The `master_server` and `web_api` are written in Python 3.8, and makes strong use of asyncio and aiohttp.
The `master_server` and `web_api` are written in Python 3.11, and makes strong use of asyncio and aiohttp.

Both make use of the AWS DynamoDB database to store the known servers.

### Running a local server

#### Dependencies

- Python3.8 or higher.
- Python3.11 or higher.
- Docker

#### Preparing your venv
Expand Down
2 changes: 1 addition & 1 deletion master_server/database/redis.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import aioredis
import click
import hashlib
import ipaddress
import json
import logging

from openttd_helpers import click_helper
from redis import asyncio as aioredis

from .interface import DatabaseInterface

Expand Down
14 changes: 7 additions & 7 deletions master_server/openttd/test_receive.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_receive_packet_success(data, result):
[
(b"\x05\x00\x06\x01", PacketInvalidSize),
(b"\x03\x00\x06\x01", PacketInvalidSize),
(b"\x03\x00\xFF", PacketInvalidType),
(b"\x03\x00\xff", PacketInvalidType),
(b"\x03\x00\x00", PacketInvalidType),
],
)
Expand Down Expand Up @@ -68,8 +68,8 @@ def test_receive_PACKET_UDP_CLIENT_GET_LIST_success(ip, data, result):
b"",
b"\x02",
# Too much data
b"\x01\xFF",
b"\x02\x00\xFF",
b"\x01\xff",
b"\x02\x00\xff",
# Invalid version number
b"\x00",
b"\x03",
Expand Down Expand Up @@ -103,8 +103,8 @@ def test_receive_PACKET_UDP_SERVER_REGISTER_success(data, result):
b"OpenTTDRegister\x00\x01\x34",
b"OpenTTDRegister\x00\x02\x34\x12\x01\x00\x00\x00\x00\x00\x00",
# Too much data
b"OpenTTDRegister\x00\x01\x34\x12\xFF",
b"OpenTTDRegister\x00\x02\x34\x12\x01\x00\x00\x00\x00\x00\x00\x00\xFF",
b"OpenTTDRegister\x00\x01\x34\x12\xff",
b"OpenTTDRegister\x00\x02\x34\x12\x01\x00\x00\x00\x00\x00\x00\x00\xff",
# Invalid version number
b"OpenTTDRegister\x00\x00\x34\x12",
b"OpenTTDRegister\x00\x03\x34\x12",
Expand Down Expand Up @@ -138,8 +138,8 @@ def test_receive_PACKET_UDP_SERVER_UNREGISTER_success(data, result):
b"\x01\x34",
b"\x02\x34",
# Too much data
b"\x01\x34\x12\xFF",
b"\x02\x34\x12\xFF",
b"\x01\x34\x12\xff",
b"\x02\x34\x12\xff",
# Invalid version number
b"\x00\x34\x12",
b"\x03\x34\x12",
Expand Down
2 changes: 1 addition & 1 deletion requirements.base
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
aiohttp
aioredis
click
hiredis
sentry-sdk
openttd-helpers
pproxy
PynamoDB
redis
37 changes: 18 additions & 19 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
aiohttp==3.9.5
aioredis==2.0.1
aiosignal==1.3.1
async-timeout==4.0.3
attrs==23.2.0
botocore==1.34.137
certifi==2024.6.2
charset-normalizer==3.3.2
click==8.1.7
frozenlist==1.4.1
hiredis==2.3.2
idna==3.7
aiohappyeyeballs==2.4.6
aiohttp==3.11.12
aiosignal==1.3.2
attrs==25.1.0
botocore==1.36.21
certifi==2025.1.31
click==8.1.8
frozenlist==1.5.0
hiredis==3.1.0
idna==3.10
jmespath==1.0.1
multidict==6.0.5
multidict==6.1.0
openttd-helpers==1.4.0
pproxy==2.7.9
pynamodb==6.0.1
propcache==0.2.1
pynamodb==6.0.2
python-dateutil==2.9.0.post0
sentry-sdk==2.7.1
six==1.16.0
typing_extensions==4.12.2
urllib3==1.26.19
yarl==1.9.4
redis==5.2.1
sentry-sdk==2.21.0
six==1.17.0
urllib3==2.3.0
yarl==1.18.3