borgbackup / borgweb

Web UI for Borg Backup
https://borgweb.readthedocs.io/en/latest/
Other
358 stars 40 forks source link

Not compatible with Flask >= 1.0 #116

Closed sebastiendarocha closed 6 years ago

sebastiendarocha commented 6 years ago

Hello,

When I launch borgweb with a fresh install, I run into this problem:

(borg-env) 11:16 seba@seba-N750HU: ~/Sources/borg-env$ bin/borgweb 
Traceback (most recent call last):
  File "bin/borgweb", line 11, in <module>
    load_entry_point('borgweb', 'console_scripts', 'borgweb')()
  File "/home/seba/Sources/borg-env/borgweb/borgweb/app.py", line 29, in main
    application = create_app()
  File "/home/seba/Sources/borg-env/borgweb/borgweb/app.py", line 23, in create_app
    app.error_handler_spec[None][404] = err404
KeyError: None

I've made it work by doing this:

(borg-env) 11:20 seba@seba-N750HU: ~/Sources/borg-env/borgweb$ git diff
diff --git a/setup.py b/setup.py
index 080c906..b81a5ed 100644
--- a/setup.py
+++ b/setup.py
@@ -56,6 +56,6 @@ setup(
     },
     setup_requires=['setuptools_scm>=1.7'],
     install_requires=[
-        'flask',
+        'flask<1.0.0',
     ],
 )

Then it works. If you don't have time to migrate to Flask 1.0.0, I can make a PR with this modification if you want :-)

ThomasWaldmann commented 6 years ago

http://flask.pocoo.org/docs/1.0/upgrading/

strange, I don't see anything special there for 1.0.x.

ThomasWaldmann commented 6 years ago

https://github.com/pallets/flask/commit/b9355a7d5f79cfa06324a72cbaef4b9ec7a299d3

see comment there.

ThomasWaldmann commented 6 years ago

temporarily worked around by requiring flask < 1.0, see #119.