Skip to content

Commit db89c31

Browse files
Merge pull request #96 from wazo-platform/bookworm
bookworm upgrade python 3.11 and bookworm update python dependencies test: ignore ownership of mounted volumes debian: fix styling issue fix lintian issues Reviewed-by: wazo-community-zuul[bot]
2 parents 2d7506b + 5eaaeda commit db89c31

12 files changed

Lines changed: 38 additions & 36 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ repos:
1515
rev: v3.20.0
1616
hooks:
1717
- id: pyupgrade
18-
args: [--py39-plus]
18+
args: [--py311-plus]
1919
# Automatically sort and format imports (in black compatible way)
2020
- repo: https://github.com/pycqa/isort
2121
rev: 6.0.1

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.9-slim-bullseye AS compile-image
1+
FROM python:3.11-slim-bookworm AS compile-image
22
LABEL maintainer="Wazo Maintainers <dev@wazo.community>"
33

44
RUN python -m venv /opt/venv
@@ -16,7 +16,7 @@ RUN python setup.py install
1616
RUN pip install pyparsing
1717
RUN pip install appdirs
1818

19-
FROM python:3.9-slim-bullseye AS build-image
19+
FROM python:3.11-slim-bookworm AS build-image
2020
COPY --from=compile-image /opt/venv /opt/venv
2121

2222
COPY ./etc/wazo-plugind /etc/wazo-plugind

debian/control

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Source: wazo-plugind
22
Section: python
3-
Priority: extra
3+
Priority: optional
44
Maintainer: Wazo Maintainers <dev+pkg@wazo.community>
55
Build-Depends: debhelper (>= 12), dh-python, python3-all, python3-setuptools
66
Standards-Version: 3.9.6
7-
X-Python3-Version: >= 3.9
7+
X-Python3-Version: >= 3.11
88

99
Package: wazo-plugind
1010
Architecture: all
@@ -20,6 +20,7 @@ Depends:
2020
python3-flask,
2121
python3-flask-cors,
2222
python3-flask-restful,
23+
python3-jinja2,
2324
python3-kombu,
2425
python3-marshmallow,
2526
python3-netifaces,
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
wazo-plugind: script-not-executable usr/lib/wazo-plugind/templates/postinst.jinja
2-
wazo-plugind: script-not-executable usr/lib/wazo-plugind/templates/postrm.jinja
3-
wazo-plugind: script-not-executable usr/lib/wazo-plugind/templates/prerm.jinja
4-
wazo-plugind: shell-script-fails-syntax-check usr/lib/wazo-plugind/templates/postrm.jinja
1+
wazo-plugind: script-not-executable [usr/lib/wazo-plugind/templates/postinst.jinja]
2+
wazo-plugind: script-not-executable [usr/lib/wazo-plugind/templates/postrm.jinja]
3+
wazo-plugind: script-not-executable [usr/lib/wazo-plugind/templates/prerm.jinja]
4+
wazo-plugind: shell-script-fails-syntax-check [usr/lib/wazo-plugind/templates/postrm.jinja]

debian/wazo-plugind.postinst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ case "$1" in
3434
chmod 755 "${BACKUP_RULES_DIR}"
3535

3636
if [[ -z "${previous_version}" ]]; then
37-
ln -sf /etc/nginx/locations/https-available/$DAEMONNAME \
38-
/etc/nginx/locations/https-enabled/$DAEMONNAME
37+
ln -sf /etc/nginx/locations/https-available/$DAEMONNAME \
38+
/etc/nginx/locations/https-enabled/$DAEMONNAME
3939
fi
4040

4141
chown -R "$USER:$GROUP" "$HOMEDIR"

integration_tests/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ FROM wazoplatform/wazo-plugind
33
COPY . /usr/src/wazo-plugind
44
WORKDIR /usr/src/wazo-plugind
55

6+
# Mounted volume won't have same owner than container
7+
RUN echo "[safe]\ndirectory = *" > /etc/gitconfig
8+
69
ENV PYTHONDONTWRITEBYTECODE='true'
710

811
RUN python3 -m pip install -e .

integration_tests/assets/docker-compose.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ services:
1212
volumes:
1313
- "../..:/usr/src/wazo-plugind"
1414
- "./etc/wazo-plugind/conf.d/50-default.yml:/etc/wazo-plugind/conf.d/50-default.yml"
15-
# - "${LOCAL_GIT_REPOS}/wazo-bus/wazo_bus:/opt/venv/lib/python3.9/site-packages/wazo_bus"
16-
# - "${LOCAL_GIT_REPOS}/xivo-lib-python/xivo:/opt/venv/lib/python3.9/site-packages/xivo"
17-
# - "${LOCAL_GIT_REPOS}/wazo-market-client/wazo_market_client:/opt/venv/lib/python3.9/site-packages/wazo_market_client"
15+
# - "${LOCAL_GIT_REPOS}/wazo-bus/wazo_bus:/opt/venv/lib/python3.11/site-packages/wazo_bus"
16+
# - "${LOCAL_GIT_REPOS}/xivo-lib-python/xivo:/opt/venv/lib/python3.11/site-packages/xivo"
17+
# - "${LOCAL_GIT_REPOS}/wazo-market-client/wazo_market_client:/opt/venv/lib/python3.11/site-packages/wazo_market_client"
1818
ports:
1919
- "9503"
2020

2121
market:
22-
image: "python:3.9-slim-bullseye"
22+
image: "python:3.11-slim-bookworm"
2323
ports:
2424
- "8000"
2525
command: ["bash", "-c", "cd /var/www && python -m http.server"]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
deb http://mirror.wazo.community/debian/ wazo-dev-bullseye main
1+
deb http://mirror.wazo.community/debian/ wazo-dev-bookworm main

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ exclude = [
1616

1717
[tool.isort]
1818
profile = "black"
19-
py_version = 39
19+
py_version = 311

requirements.txt

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,16 @@ https://github.com/wazo-platform/wazo-bus/archive/master.zip
55
https://github.com/wazo-platform/xivo-lib-python/archive/master.zip
66
https://github.com/wazo-platform/wazo-market-client/archive/master.zip
77
cheroot==9.0.0
8-
flask-cors==3.0.9
9-
flask-restful==0.3.8
10-
flask==1.1.2
11-
itsdangerous==1.1.0 # from flask
12-
jinja2==3.0.3 # from flask
13-
kombu==5.0.2
14-
markupsafe==2.0.1 # from jinja
8+
flask-cors==3.0.10
9+
flask-restful==0.3.9
10+
flask==2.2.2
11+
jinja2==3.1.2
12+
kombu==5.2.4
1513
marshmallow==3.18.0
16-
netifaces==0.10.9
14+
netifaces==0.11.0
1715
python-consul==1.1.0
18-
pyyaml==5.3.1
19-
requests==2.25.1
16+
pyyaml==6.0
17+
requests==2.28.1
2018
stevedore==4.0.2
21-
unidecode==1.2.0
22-
werkzeug==1.0.1
19+
unidecode==1.3.6
20+
werkzeug==2.2.2

0 commit comments

Comments
 (0)