Skip to content

Commit

Permalink
Merge branch 'python311-and-pip-compile' into 'fix-invisible-capture'
Browse files Browse the repository at this point in the history
Upgrade to Python 3.11 and use pip-compile

See merge request authzsvc/backends/captcha-api!7
  • Loading branch information
maqamylee0 committed Aug 9, 2023
2 parents d10774b + 7a28141 commit fe2d487
Show file tree
Hide file tree
Showing 6 changed files with 141 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: python:3.10-slim
image: python:3.11-slim
variables:
NAMESPACE_PROD: captcha
APP_NAME: captcha-api
Expand Down Expand Up @@ -35,7 +35,7 @@ stages:

### Linting
flake8:
image: python:3.10-slim
image: python:3.11-slim
stage: lint
before_script:
- apt-get update && apt-get install -y -qq gcc
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/library/python:3.10-slim
FROM docker.io/library/python:3.11-slim

RUN apt-get update && apt-get install -y -qq libfreetype6 fontconfig-config espeak ffmpeg libtiff5-dev libopenjp2-7-dev zlib1g-dev python3-tk gcc libfreetype6-dev

Expand Down
2 changes: 1 addition & 1 deletion captcha_api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __call__(self, *args, **kwargs):

celery.Task = ContextTask
else:
app.logger.warn("Celery is disabled!")
app.logger.warning("Celery is disabled!")


def _setup_db(app):
Expand Down
4 changes: 2 additions & 2 deletions captcha_api/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def get(self, captcha_id):
return send_file(
mp3_file,
as_attachment=True,
cache_timeout=-1,
attachment_filename="captcha.mp3",
max_age=-1,
download_name="captcha.mp3",
mimetype="audio/mpeg",
)
16 changes: 16 additions & 0 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Flask==2.1.0
gunicorn==20.1.0
requests==2.23.*
flask-restx==1.1.0
flask_cors==3.0.*
python-dotenv==0.12.0
Flask-SQLAlchemy==2.5.1
SQLAlchemy==1.4.37
pillow==7.2.0
celery==5.3.1
redis==3.5.3
pyttsx3==2.90
flask-migrate==2.5.3
itsdangerous==2.0.1
certifi
werkzeug==2.1.2
131 changes: 119 additions & 12 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,122 @@
Flask==2.1.0
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile
#
alembic==1.8.1
# via flask-migrate
amqp==5.1.1
# via kombu
aniso8601==9.0.1
# via flask-restx
attrs==22.1.0
# via jsonschema
billiard==4.1.0
# via celery
celery==5.3.1
# via -r requirements.in
certifi==2022.9.24
# via
# -r requirements.in
# requests
chardet==3.0.4
# via requests
click==8.1.3
# via
# celery
# click-didyoumean
# click-plugins
# click-repl
# flask
click-didyoumean==0.3.0
# via celery
click-plugins==1.1.1
# via celery
click-repl==0.3.0
# via celery
flask==2.1.0
# via
# -r requirements.in
# flask-cors
# flask-migrate
# flask-restx
# flask-sqlalchemy
flask-cors==3.0.10
# via -r requirements.in
flask-migrate==2.5.3
# via -r requirements.in
flask-restx==1.1.0
# via -r requirements.in
flask-sqlalchemy==2.5.1
# via
# -r requirements.in
# flask-migrate
greenlet==1.1.3.post0
# via sqlalchemy
gunicorn==20.1.0
requests==2.23.*
flask-restx==0.5.1
flask_cors==3.0.*
python-dotenv==0.12.0
Flask-SQLAlchemy==2.5.1
SQLAlchemy==1.4.37
# via -r requirements.in
idna==2.10
# via requests
itsdangerous==2.0.1
# via
# -r requirements.in
# flask
jinja2==3.1.2
# via flask
jsonschema==4.16.0
# via flask-restx
kombu==5.3.1
# via celery
mako==1.2.3
# via alembic
markupsafe==2.1.1
# via
# jinja2
# mako
pillow==7.2.0
celery==4.4.7
redis==3.5.3
# via -r requirements.in
prompt-toolkit==3.0.39
# via click-repl
pyrsistent==0.18.1
# via jsonschema
python-dateutil==2.8.2
# via celery
python-dotenv==0.12.0
# via -r requirements.in
pyttsx3==2.90
flask-migrate==2.5.3
itsdangerous==2.0.1
certifi
# via -r requirements.in
pytz==2022.5
# via flask-restx
redis==3.5.3
# via -r requirements.in
requests==2.23.0
# via -r requirements.in
six==1.16.0
# via
# flask-cors
# python-dateutil
sqlalchemy==1.4.37
# via
# -r requirements.in
# alembic
# flask-sqlalchemy
tzdata==2023.3
# via celery
urllib3==1.25.11
# via requests
vine==5.0.0
# via
# amqp
# celery
# kombu
wcwidth==0.2.6
# via prompt-toolkit
werkzeug==2.1.2
# via
# -r requirements.in
# flask
# flask-restx

# The following packages are considered to be unsafe in a requirements file:
# setuptools

0 comments on commit fe2d487

Please sign in to comment.