Skip to content

Commit

Permalink
OS-7190. Update to Python 3.12.3
Browse files Browse the repository at this point in the history
## Description

Update to Python 3.12.1
Bulldozer and Acree to Python 3.11.7

## Related issue number

OS-7190

## Checklist

* [ ] The pull request title is a good summary of the changes
* [ ] Unit tests for the changes exist
* [ ] New and existing unit tests pass locally

---------

Co-authored-by: Max B <[email protected]>
  • Loading branch information
sd-hystax and Max B authored Apr 26, 2024
1 parent f36f27c commit 9f81c7a
Show file tree
Hide file tree
Showing 192 changed files with 394 additions and 576 deletions.
2 changes: 1 addition & 1 deletion arcee/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9.16-slim
FROM python:3.12.3-slim
LABEL org.opencontainers.image.authors="Hystax"

WORKDIR /usr/src/app/
Expand Down
8 changes: 4 additions & 4 deletions arcee/arcee_receiver/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
aiohttp==3.8.6
sanic==23.6.0
sanic-ext==23.6.0
motor==3.0.0
aiohttp==3.9.3
sanic==23.12.1
sanic-ext==23.12.0
motor==3.4.0
python-etcd==0.4.5
mongodb-migrations==1.2.1
pydantic==2.4.2
Expand Down
9 changes: 0 additions & 9 deletions auth/.noserc

This file was deleted.

2 changes: 1 addition & 1 deletion auth/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9.16-slim
FROM python:3.12.3-slim
LABEL org.opencontainers.image.authors="Hystax"

WORKDIR /usr/src/app/
Expand Down
2 changes: 1 addition & 1 deletion auth/Dockerfile_tests
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LABEL org.opencontainers.image.authors="Hystax"
COPY tools/check_alembic_down_revisions tools/check_alembic_down_revisions
COPY optscale_client/auth_client /usr/src/app/optscale_client/auth_client
COPY auth/test-requirements.txt auth/test-requirements.txt
COPY auth/.pylintrc auth/.noserc auth/.coveragerc ./auth/
COPY auth/.pylintrc auth/.coveragerc ./auth/
RUN pip install --no-cache-dir -r auth/test-requirements.txt

COPY auth/auth_server/tests auth/auth_server/tests
13 changes: 7 additions & 6 deletions auth/auth_server/write_spec.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import re
import os.path
import yaml
from apispec import APISpec, utils
from apispec import APISpec, yaml_utils
import auth.auth_server.server as server

# Spec reference:
Expand Down Expand Up @@ -30,7 +30,7 @@


def main():
settings = yaml.load(OPENAPI_SPEC)
settings = yaml.safe_load(OPENAPI_SPEC)
title = settings['info'].pop('title')
spec_version = settings['info'].pop('version')
openapi_version = settings.pop('swagger')
Expand All @@ -53,18 +53,19 @@ def main():
path = re.sub(r"\(.*?<(.*?)>.*?\)", r"{\1}", urlspec[0])
operations = dict()
operations_advanced = dict()
for method_name in utils.PATH_KEYS:
for method_name in yaml_utils.PATH_KEYS:
method = getattr(urlspec[1], method_name)
operation_data = utils.load_yaml_from_docstring(method.__doc__)
operation_data = yaml_utils.load_yaml_from_docstring(
method.__doc__)
if operation_data:
hidden = operation_data.pop('x-hidden', False)
if not hidden:
operations[method_name] = operation_data
operations_advanced[method_name] = operation_data
if len(operations) > 0:
spec.add_path(path=path, operations=operations)
spec.path(path=path, operations=operations)
if len(operations_advanced) > 0:
spec_advanced.add_path(path=path, operations=operations_advanced)
spec_advanced.path(path=path, operations=operations_advanced)
else:
print("Warning: docstrings for '" + urlspec[0] + "' are not found")

Expand Down
8 changes: 4 additions & 4 deletions auth/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
SQLAlchemy==1.3.24
mysql-connector-python==8.1.0
tornado==6.3.3
alembic==0.8.9
alembic==1.13.1
pymacaroons==0.9.2
ordered-set==2.0.2
apispec==0.39.0
ordered-set==4.1.0
apispec==6.3.1
google-auth==1.23.0
requests==2.31.0
PyJWT>=2.4.0
cryptography==42.0.4
pyyaml==5.4.1
pyyaml==6.0.1
zcrmsdk==3.1.0
# OptScale packages
-e tools/optscale_exceptions
Expand Down
8 changes: 4 additions & 4 deletions auth/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ docker run -i --rm ${TEST_IMAGE} bash -c \
"tools/check_alembic_down_revisions/check_alembic_down_revisions.py --alembic_versions_path auth/auth_server/alembic/versions"
echo "<<Alembic down revision tests"

echo "Nose tests>>>"
echo "Unit tests>>>"
docker run -i --rm ${TEST_IMAGE} \
bash -c "cd auth && nosetests --config .noserc"
echo "<<Nose tests"
bash -c "python3 -m unittest discover ./auth/auth_server/tests"
echo "<<Unit tests"

docker rmi ${TEST_IMAGE}
docker rmi ${TEST_IMAGE}
3 changes: 1 addition & 2 deletions auth/test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
pycodestyle==2.11.1
pylint==3.0.2
pylint==3.0.3
coverage==4.2
nose==1.3.7
freezegun==0.3.8

# OptScale packages
Expand Down
2 changes: 1 addition & 1 deletion bi_exporter/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9.16-slim
FROM python:3.12.3-slim
LABEL org.opencontainers.image.authors="Hystax"

ENV PYTHONUNBUFFERED 1
Expand Down
6 changes: 3 additions & 3 deletions bi_exporter/bumblebi/exporter/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
kombu==4.6.8
boto3==1.18.9
clickhouse-driver==0.2.2
kombu==5.3.4
boto3==1.34.7
clickhouse-driver==0.2.6
pymongo==4.6.3

# OptScale packages
Expand Down
6 changes: 3 additions & 3 deletions bi_exporter/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
kombu==4.6.8
boto3==1.18.9
kombu==5.3.4
boto3==1.34.7
azure-storage-blob==12.16.0
clickhouse-driver==0.2.2
clickhouse-driver==0.2.6
pymongo==4.6.3

# OptScale packages
Expand Down
2 changes: 1 addition & 1 deletion bulldozer/bulldozer_api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9.16-slim
FROM python:3.12.3-slim
LABEL org.opencontainers.image.authors="Hystax"

WORKDIR /usr/src/app
Expand Down
10 changes: 5 additions & 5 deletions bulldozer/bulldozer_api/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
aiohttp==3.8.6
sanic==22.6.2
motor==3.0.0
websockets==10.4
kombu==4.6.8
aiohttp==3.9.3
sanic==23.12.1
motor==3.4.0
websockets==12.0
kombu==5.3.4
mongodb-migrations==1.2.1
# OptScale packages
-e optscale_client/config_client
Expand Down
2 changes: 1 addition & 1 deletion bulldozer/bulldozer_worker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9.16-slim
FROM python:3.12.3-slim
LABEL org.opencontainers.image.authors="Hystax"

RUN mkdir -p /var/lib/bulldozer
Expand Down
5 changes: 2 additions & 3 deletions bulldozer/bulldozer_worker/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

kombu==4.6.8
boto3==1.18.9
kombu==5.3.4
boto3==1.34.7
retrying==1.3.3
pymustache==0.3
# OptScale packages
Expand Down
2 changes: 1 addition & 1 deletion bumischeduler/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9.16-slim
FROM python:3.12.3-slim
LABEL org.opencontainers.image.authors="Hystax"

WORKDIR /usr/src/app/
Expand Down
4 changes: 2 additions & 2 deletions bumischeduler/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tornado==6.3.3
kombu==4.6.8
kombu==5.3.4
# OptScale packages
-e optscale_client/config_client
-e optscale_client/rest_api_client
-e optscale_client/rest_api_client
6 changes: 3 additions & 3 deletions bumischeduler/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ docker run -i --rm ${TEST_IMAGE} bash -c \
"pylint --rcfile=bumischeduler/.pylintrc --fail-under=9 --fail-on=E,F ./bumischeduler"
echo "<<Pylint tests"

echo "Nose tests>>>"
echo "Unit tests>>>"
docker run -i --rm ${TEST_IMAGE} \
bash -c "nosetests --config .noserc"
echo "<<Nose tests"
bash -c "python3 -m unittest discover ./bumischeduler/bumischeduler/tests"
echo "<<Unit tests"

docker rmi ${TEST_IMAGE}
1 change: 0 additions & 1 deletion bumischeduler/test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
coverage==4.2
nose==1.3.7
pycodestyle==2.11.1
pylint==3.0.2
2 changes: 1 addition & 1 deletion bumiworker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9.16-slim
FROM python:3.12.3-slim
LABEL org.opencontainers.image.authors="Hystax"

WORKDIR /usr/src/app/
Expand Down
6 changes: 3 additions & 3 deletions bumiworker/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pymongo==4.6.3
kombu==4.6.8
boto3==1.18.9
clickhouse-driver==0.2.2
kombu==5.3.4
boto3==1.34.7
clickhouse-driver==0.2.6
# OptScale packages
-e tools/cloud_adapter
-e optscale_client/config_client
Expand Down
1 change: 0 additions & 1 deletion bumiworker/test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
coverage==4.2
nose==1.3.7
pycodestyle==2.11.1
pylint==3.0.2
freezegun==0.3.8
Expand Down
9 changes: 0 additions & 9 deletions diproxy/.noserc

This file was deleted.

2 changes: 1 addition & 1 deletion diproxy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9.16-slim
FROM python:3.12.3-slim
LABEL org.opencontainers.image.authors="Hystax"

WORKDIR /usr/src/app/
Expand Down
2 changes: 1 addition & 1 deletion diproxy/Dockerfile_tests
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ ARG BUILDTAG=build
FROM diproxy:${BUILDTAG}
LABEL org.opencontainers.image.authors="Hystax"

COPY diproxy/test-requirements.txt diproxy/.pylintrc diproxy/.noserc diproxy/.coveragerc diproxy/
COPY diproxy/test-requirements.txt diproxy/.pylintrc diproxy/.coveragerc diproxy/
RUN pip install --no-cache-dir -r diproxy/test-requirements.txt
COPY diproxy/diproxy/tests diproxy/diproxy/tests
11 changes: 6 additions & 5 deletions diproxy/diproxy/write_spec.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os.path
import re
import yaml
from apispec import APISpec, utils
from apispec import APISpec, yaml_utils

import diproxy.diproxy.main as server

Expand All @@ -28,7 +28,7 @@


def main():
settings = yaml.load(OPENAPI_SPEC, Loader)
settings = yaml.safe_load(OPENAPI_SPEC)
title = settings['info'].pop('title')
spec_version = settings['info'].pop('version')
openapi_version = settings.pop('swagger')
Expand All @@ -43,13 +43,14 @@ def main():
for urlspec in server.get_handlers(dict()):
path = re.sub(r"\(.*?<(.*?)>.*?\)", r"{\1}", urlspec[0])
operations = dict()
for method_name in utils.PATH_KEYS:
for method_name in yaml_utils.PATH_KEYS:
method = getattr(urlspec[1], method_name)
operation_data = utils.load_yaml_from_docstring(method.__doc__)
operation_data = yaml_utils.load_yaml_from_docstring(
method.__doc__)
if operation_data:
operations[method_name] = operation_data
if len(operations) > 0:
spec.add_path(path=path, operations=operations)
spec.path(path=path, operations=operations)
else:
print("Warning: docstrings for '" + urlspec[0] + "' are not found")

Expand Down
4 changes: 2 additions & 2 deletions diproxy/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
tornado==6.3.3
requests==2.31.0
async_lru==1.0.3
apispec==0.39.0
pyyaml==5.4.1
apispec==6.3.1
pyyaml==6.0.1
# OptScale packages
-e optscale_client/config_client
-e optscale_client/rest_api_client
7 changes: 4 additions & 3 deletions diproxy/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ docker run -i --rm ${TEST_IMAGE} bash -c \
"pylint --rcfile=diproxy/.pylintrc --fail-under=9 --fail-on=E,F ./diproxy"
echo "<<Pylint tests"

echo "Nose tests>>>"
docker run -i --rm ${TEST_IMAGE} bash -c "nosetests --config diproxy/.noserc"
echo "<<Nose tests"
echo "Unit tests>>>"
docker run -i --rm ${TEST_IMAGE} bash -c \
"python3 -m unittest discover ./diproxy/diproxy/tests"
echo "<<Unit tests"

docker rmi ${TEST_IMAGE}
1 change: 0 additions & 1 deletion diproxy/test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
coverage==4.2
nose==1.3.7
pycodestyle==2.11.1
pylint==3.0.2
2 changes: 1 addition & 1 deletion diworker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9.16-slim
FROM python:3.12.3-slim
WORKDIR /src
ENV PYTHONPATH=/src

Expand Down
8 changes: 4 additions & 4 deletions diworker/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
pymongo==4.6.3
kombu==4.6.8
boto3==1.18.9
kombu==5.3.4
boto3==1.34.7
mongodb-migrations==0.7.0
retrying==1.3.3
pandas == 1.3.3
pandas==2.1.4
pyarrow==14.0.1
clickhouse-driver==0.2.2
clickhouse-driver==0.2.6
pyrabbit==1.1.0
# OptScale packages
-e tools/cloud_adapter
Expand Down
2 changes: 1 addition & 1 deletion docker_images/bi_scheduler/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9.16-slim
FROM python:3.12.3-slim

WORKDIR /usr/src/app/
ENV PYTHONPATH /usr/src/app/
Expand Down
4 changes: 2 additions & 2 deletions docker_images/bi_scheduler/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
kombu==4.6.8
kombu==5.3.4
# OptScale packages
-e optscale_client/config_client
-e optscale_client/rest_api_client
-e optscale_client/rest_api_client
2 changes: 1 addition & 1 deletion docker_images/booking_observer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9.16-slim
FROM python:3.12.3-slim

ENV PYTHONPATH /usr/src/app/

Expand Down
2 changes: 1 addition & 1 deletion docker_images/booking_observer/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
kombu==4.6.8
kombu==5.3.4
pymongo==4.6.3
# OptScale packages
-e optscale_client/config_client
Expand Down
2 changes: 1 addition & 1 deletion docker_images/calendar_observer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9.16-slim
FROM python:3.12.3-slim

ENV PYTHONPATH /usr/src/app/
WORKDIR /usr/src/app/
Expand Down
2 changes: 1 addition & 1 deletion docker_images/calendar_observer/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
kombu==4.6.8
kombu==5.3.4
# OptScale packages
-e optscale_client/config_client
-e optscale_client/rest_api_client
Loading

0 comments on commit 9f81c7a

Please sign in to comment.