Skip to content

Commit fc2f620

Browse files
Debian 12 support
Drop python 3.5, 3.6 support Add python 3.9, 3.11 support Test debian:bookworm support
2 parents aef087d + 62628de commit fc2f620

11 files changed

Lines changed: 44 additions & 45 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,26 @@ jobs:
88

99
steps:
1010
- name: Checkout code
11-
uses: actions/checkout@v2
11+
uses: actions/checkout@v4
1212

1313
- name: Run tests with pytest
14-
run: docker-compose run --rm tester
14+
run: docker compose run --rm tester
1515

1616
- name: Stop containers
1717
if: always()
18-
run: docker-compose stop
18+
run: docker compose stop
1919

2020
lint:
2121
runs-on: ubuntu-latest
2222

2323
steps:
2424
- name: Checkout code
25-
uses: actions/checkout@v2
25+
uses: actions/checkout@v4
2626

2727
- name: Setup python
28-
uses: actions/setup-python@v2
28+
uses: actions/setup-python@v5
2929
with:
30-
python-version: 3.7
30+
python-version: 3.11
3131

3232
- name: Install requirements
3333
run: |

.travis.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
sudo: false
22
language: python
33
python:
4-
- "3.5"
5-
- "3.6"
4+
# support debian 9, 10, 11
65
- "3.7"
6+
- "3.9"
7+
- "3.11"
78
cache:
89
pip: true
910
install:
10-
- docker-compose up
11+
- docker compose up
1112
- pip install -Ur tests/requirements.txt
1213
script:
1314
- cd tests && pytest

docker/backend/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:10
1+
FROM debian:bookworm
22

33
# install dependencies
44
RUN apt-get update -qq && \
@@ -10,7 +10,8 @@ RUN mkdir code
1010
WORKDIR /code
1111
COPY requirements.txt ./
1212

13-
RUN pip3 install -Ur requirements.txt
13+
# --break-system-packages to allow pip to install inside of the docker container
14+
RUN pip3 install -Ur requirements.txt --break-system-packages
1415

1516
# run app
1617
EXPOSE 5000

docker/tester/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:buster-20210408-slim
1+
FROM debian:bookworm
22

33
# install dependencies
44
RUN apt-get update -qq && \
@@ -16,11 +16,12 @@ RUN apt-get update -qq && \
1616
# build app
1717
RUN mkdir code
1818
WORKDIR /code
19-
2019
COPY requirements.txt /requirements.txt
2120
COPY tests/requirements.txt /requirements.tests.txt
22-
RUN pip3 -q install -Ur /requirements.txt
23-
RUN pip3 -q install -Ur /requirements.tests.txt
21+
22+
# --break-system-packages to allow pip to install inside of the docker container
23+
RUN pip3 -q install -Ur /requirements.txt --break-system-packages
24+
RUN pip3 -q install -Ur /requirements.tests.txt --break-system-packages
2425

2526
# run app
2627
ENTRYPOINT ["pytest"]

high_templar/authentication.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,9 @@ class Permission(frozendict):
1414
Make a comparable object from permission
1515
"""
1616

17-
def __init__(self, *args, **kwargs):
18-
super().__init__(*args, **kwargs)
19-
self.key_set = set(self.keys())
20-
2117
def __lt__(self, other: 'Permission'):
2218
# If the keys are not the same, we can not compare then
23-
if self.key_set != other.key_set:
19+
if set(self.keys()) != set(other.keys()):
2420
return False
2521

2622
has_diff = False

high_templar/backend_adapter/binder.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ def __init__(self, app):
2525
self.base_url = app.config['API_URL']
2626
self.forward_ip = app.config.get('FORWARD_IP')
2727
self.header_definition = {**DEFAULT_HEADERS, **app.config.get('CONNECTION_HEADERS', {})}
28-
self.headers = {}
2928

3029
async def get_authentication(self, websocket) -> Authentication:
3130

requirements.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
python-dotenv>= 0.6.3
2-
aio-pika==6.4.1
3-
hypercorn== 0.9.0
1+
python-dotenv==0.21.1
2+
aio-pika==9.3.1
3+
hypercorn==0.14.3
44
quart== 0.11.2
5-
aiohttp_requests==0.1.2
6-
frozendict==1.2
5+
frozendict==2.4.6
6+
aiohttp==3.11.10
7+
Jinja2==3.0.3
8+
werkzeug==2.1.2

run

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if [ "$1" = "--no-build" ]
66
then
77
echo "Skipping build"
88
else
9-
docker-compose build --parallel $SERVICES
9+
docker compose build --parallel $SERVICES
1010
fi
1111

12-
docker-compose up "$@" $SERVICES
12+
docker compose up "$@" $SERVICES

setup.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,21 @@
2727
'Intended Audience :: Developers',
2828
'License :: OSI Approved :: MIT License',
2929
'Operating System :: OS Independent',
30-
'Programming Language :: Python :: 3',
31-
'Programming Language :: Python :: 3.3',
32-
'Programming Language :: Python :: 3.4',
33-
'Programming Language :: Python :: 3.5',
34-
'Programming Language :: Python :: 3.6',
30+
'Programming Language :: Python :: 3.7',
31+
'Programming Language :: Python :: 3.9',
32+
'Programming Language :: Python :: 3.11',
3533
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
3634
'Topic :: Software Development :: Libraries :: Python Modules'
3735
],
3836
install_requires=[
39-
'python-dotenv >= 0.6.3',
40-
'aio-pika==6.4.1',
41-
'hypercorn >= 0.9.0',
37+
'python-dotenv == 0.21.1',
38+
'aio-pika == 9.3.1',
39+
'hypercorn == 0.14.3',
4240
'quart == 0.11.2',
43-
'aiohttp >= 3.6.2',
44-
'aiohttp_requests>=0.1.2',
45-
'frozendict==1.2',
41+
'frozendict == 2.4.6',
42+
'aiohttp == 3.11.10',
43+
'Jinja2 == 3.0.3',
44+
'werkzeug == 2.1.2',
4645
],
4746
test_suite='tests'
4847
)

test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
set -e
33

4-
docker-compose run tester "$@"
4+
docker compose run tester "$@"

0 commit comments

Comments
 (0)