Commit 672a6434 authored by Robin Sonnabend's avatar Robin Sonnabend

Update requirements to Flask 1.0

parent 2e863a10
FLASK_APP=server.py:app
FLASK_ENV=development
alembic==0.9.8 alembic==0.9.9
amqp==2.2.2 amqp==2.2.2
appdirs==1.4.3 appdirs==1.4.3
APScheduler==3.5.1 APScheduler==3.5.1
argh==0.26.2 argh==0.26.2
bandit==1.4.0
billiard==3.5.0.3 billiard==3.5.0.3
blessings==1.6.1 blessings==1.6.1
blinker==1.4 blinker==1.4
bpython==0.17.1 bpython==0.17.1
caldav==0.5.0 caldav==0.5.0
celery==4.1.0 celery==4.1.0
certifi==2018.1.18 certifi==2018.4.16
chardet==3.0.4 chardet==3.0.4
click==6.7 click==6.7
colorama==0.3.9
coverage==4.5.1 coverage==4.5.1
curtsies==0.3.0 curtsies==0.3.0
enum-compat==0.0.2 enum-compat==0.0.2
eventlet==0.22.1 eventlet==0.23.0
feedgen==0.6.1 feedgen==0.6.1
flake8==3.5.0 Flask==1.0.2
Flask==0.12.2
Flask-Migrate==2.1.1 Flask-Migrate==2.1.1
Flask-Script==2.0.6
Flask-SQLAlchemy==2.3.2 Flask-SQLAlchemy==2.3.2
Flask-WTF==0.14.2 Flask-WTF==0.14.2
fuzzywuzzy==0.16.0 fuzzywuzzy==0.16.0
gitdb2==2.0.3
GitPython==2.1.9
greenlet==0.4.13 greenlet==0.4.13
icalendar==4.0.1 icalendar==4.0.1
idna==2.6 idna==2.6
itsdangerous==0.24 itsdangerous==0.24
Jinja2==2.10 Jinja2==2.10
kombu==4.1.0 kombu==4.1.0
ldap3==2.4.1 ldap3==2.5
lxml==4.1.1 lxml==4.2.1
Mako==1.0.7 Mako==1.0.7
mando==0.6.4
MarkupSafe==1.0 MarkupSafe==1.0
mccabe==0.6.1 mccabe==0.6.1
nose==1.3.7 nose==1.3.7
packaging==16.8 packaging==17.1
pathtools==0.1.2 pathtools==0.1.2
psycopg2==2.7.4 pbr==4.0.2
psycopg2-binary==2.7.4
pyasn1==0.4.2 pyasn1==0.4.2
pycodestyle==2.3.1 pyasn1-modules==0.2.1
pyflakes==1.6.0 pycodestyle==2.4.0
Pygments==2.2.0 Pygments==2.2.0
pyldap==2.4.45 pyldap==3.0.0.post1
pyparsing==2.2.0 pyparsing==2.2.0
python-dateutil==2.7.0 python-dateutil==2.7.3
python-dotenv==0.8.2
python-editor==1.0.3 python-editor==1.0.3
python-engineio==2.0.2 python-engineio==2.1.0
python-ldap==3.0.0
python-Levenshtein==0.12.0 python-Levenshtein==0.12.0
python-pam==1.8.2 python-pam==1.8.3
python-socketio==1.8.4 pytz==2018.4
pytz==2018.3
PyYAML==3.12 PyYAML==3.12
raven==6.6.0 raven==6.7.0
redis==2.10.6 redis==2.10.6
regex==2018.2.8 regex==2018.2.21
requests==2.18.4 requests==2.18.4
six==1.11.0 six==1.11.0
SQLAlchemy==1.2.3 smmap2==2.0.3
SQLAlchemy-Utils==0.33.2 SQLAlchemy==1.2.7
SQLAlchemy-Utils==0.33.3
stevedore==1.28.0
typing==3.6.4 typing==3.6.4
tzlocal==1.5.1 tzlocal==1.5.1
urllib3==1.22 urllib3==1.22
......
...@@ -5,9 +5,9 @@ locale.setlocale(locale.LC_TIME, "de_DE.utf8") ...@@ -5,9 +5,9 @@ locale.setlocale(locale.LC_TIME, "de_DE.utf8")
from flask import ( from flask import (
Flask, request, session, flash, redirect, Flask, request, session, flash, redirect,
url_for, abort, render_template, Response, Markup) url_for, abort, render_template, Response, Markup)
import click
from werkzeug.utils import secure_filename from werkzeug.utils import secure_filename
from flask_script import Manager, prompt from flask_migrate import Migrate
from flask_migrate import Migrate, MigrateCommand
from celery import Celery from celery import Celery
from sqlalchemy import or_ from sqlalchemy import or_
from apscheduler.schedulers.background import BackgroundScheduler from apscheduler.schedulers.background import BackgroundScheduler
...@@ -62,8 +62,6 @@ app = Flask(__name__) ...@@ -62,8 +62,6 @@ app = Flask(__name__)
app.config.from_object(config) app.config.from_object(config)
db.init_app(app) db.init_app(app)
migrate = Migrate(app, db) migrate = Migrate(app, db)
manager = Manager(app)
manager.add_command("db", MigrateCommand)
try: try:
from raven.contrib.flask import Sentry from raven.contrib.flask import Sentry
...@@ -137,7 +135,7 @@ app.jinja_env.globals.update(now=datetime.now) ...@@ -137,7 +135,7 @@ app.jinja_env.globals.update(now=datetime.now)
app.jinja_env.globals["git_revision"] = get_git_revision() app.jinja_env.globals["git_revision"] = get_git_revision()
@manager.command @app.cli.command()
def import_legacy(): def import_legacy():
"""Import the old todos and protocols from an sql dump""" """Import the old todos and protocols from an sql dump"""
filename = prompt("SQL-file") filename = prompt("SQL-file")
...@@ -148,7 +146,7 @@ def import_legacy(): ...@@ -148,7 +146,7 @@ def import_legacy():
import_old_todomails(content) import_old_todomails(content)
@manager.command @app.cli.command()
def recompile_all(): def recompile_all():
for protocol in sorted(Protocol.query.all(), key=lambda p: p.date): for protocol in sorted(Protocol.query.all(), key=lambda p: p.date):
if protocol.is_done(): if protocol.is_done():
...@@ -156,7 +154,7 @@ def recompile_all(): ...@@ -156,7 +154,7 @@ def recompile_all():
tasks.parse_protocol(protocol) tasks.parse_protocol(protocol)
@manager.command @app.cli.command()
def merge_duplicate_todos(): def merge_duplicate_todos():
todo_by_id = {} todo_by_id = {}
todos = Todo.query.all() todos = Todo.query.all()
...@@ -179,25 +177,20 @@ def merge_duplicate_todos(): ...@@ -179,25 +177,20 @@ def merge_duplicate_todos():
todo_by_id[todo_id] = todo todo_by_id[todo_id] = todo
@manager.command @app.cli.command()
def check_config(): def check_config():
# TODO: check how to set return codes # TODO: check how to set return codes
import configproxy import configproxy
return configproxy.check_config() return configproxy.check_config()
@manager.command @app.cli.command()
@click.argument("filename")
def create_example_config(filename): def create_example_config(filename):
import configproxy import configproxy
return configproxy.write_example_config(filename=filename) return configproxy.write_example_config(filename=filename)
@manager.command
def runserver():
app.run()
make_scheduler()
def send_file(file_like, cache_timeout, as_attachment, attachment_filename): def send_file(file_like, cache_timeout, as_attachment, attachment_filename):
""" """
Replaces flask.send_file since that uses an uwsgi function that is buggy. Replaces flask.send_file since that uses an uwsgi function that is buggy.
...@@ -1858,6 +1851,4 @@ def check_and_send_reminders(): ...@@ -1858,6 +1851,4 @@ def check_and_send_reminders():
protocol, -day_difference, protocol, -day_difference,
config.MAX_PAST_INDEX_DAYS_BEFORE_REMINDER) config.MAX_PAST_INDEX_DAYS_BEFORE_REMINDER)
make_scheduler()
if __name__ == "__main__":
manager.run()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment