Fix flask send_file arguments

The deprecated attachment_filename was removed in a recent flask release
and is superseded by download_name [1].

[1]: https://github.com/pallets/flask/pull/4667
2 files changed, 3 insertions(+), 3 deletions(-)

M hgsrht/blueprints/api/data.py
M hgsrht/blueprints/repo.py
M hgsrht/blueprints/api/data.py +1 -1
@@ 160,5 160,5 @@ def repo_raw_GET(username, reponame, pat
         fname = os.path.basename(path)
         return send_file(BytesIO(data),
                 as_attachment=is_binary,
-                attachment_filename=fname,
+                download_name=fname,
                 mimetype="text/plain" if not is_binary else None)

          
M hgsrht/blueprints/repo.py +2 -2
@@ 356,7 356,7 @@ def raw_file(owner, repo, path):
         fname = os.path.basename(path)
         return send_file(BytesIO(data),
                 as_attachment=is_binary,
-                attachment_filename=fname,
+                download_name=fname,
                 mimetype="text/plain" if not is_binary else None)
 
 @repo.route("/<owner>/<repo>/log", defaults={"path": ""})

          
@@ 655,5 655,5 @@ def archive(owner, repo, rev):
 
         return send_file(f,
                 as_attachment=True,
-                attachment_filename=f"{basename}.tar.gz",
+                download_name=f"{basename}.tar.gz",
                 mimetype="application/tar+gzip")