From 2909b0f1f8eb94a3271169c7167972c289eb3fa4 Mon Sep 17 00:00:00 2001 From: Adam Souzis Date: Tue, 29 Oct 2024 22:33:08 -0700 Subject: [PATCH] build: update requirements --- pyproject.toml | 2 +- requirements.txt | 6 ++---- server-requirements.txt | 2 +- tosca-package/pyproject.toml | 2 +- unfurl/server/serve.py | 8 ++------ 5 files changed, 7 insertions(+), 13 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4afd3d95..162a2a23 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ dynamic = ["readme", "dependencies", "optional-dependencies", "version"] [build-system] requires = [ - "setuptools>=61.0.0", + "setuptools>=70.0.0", "wheel", "setuptools-rust>=1.7.0", "pbr", diff --git a/requirements.txt b/requirements.txt index 4ebb56d6..ac7ec7bb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,14 +9,12 @@ GitPython==3.1.41; python_version>='3.7' # BSD rich==12.4.4 # MIT rich-click>=1.8.0 # MIT # the following are all Apache 2.0 (note: don't put comments on -r lines) -itsdangerous==2.0.1 # newer version broken with moto (using old flask) MarkupSafe<=2.1.1 # newer version broken with jinja2 jinja2==3.1.3 # BSD 3-clause typing_extensions>=4.7 -flask<=2.1.3 # BSD 3-clause +flask==2.3.3 # BSD 3-clause flask-caching<=2.0.1 # BSD 3-clause -flask_cors==3.0.10 -werkzeug==2.2.3 # needed by flask 2.1 (which is needed by moto) (later versions of werkzeug hang tests) +flask_cors==5.0.0 uvicorn<=0.18.2 # BSD 3-clause python-gitlab==3.13.0 tosca>=0.0.8 diff --git a/server-requirements.txt b/server-requirements.txt index 71a8ce1b..ec2101ed 100644 --- a/server-requirements.txt +++ b/server-requirements.txt @@ -1,2 +1,2 @@ -gunicorn==20.1.0 +gunicorn==22.0.0 redis==4.3.5 diff --git a/tosca-package/pyproject.toml b/tosca-package/pyproject.toml index 924443be..8a6a5c62 100644 --- a/tosca-package/pyproject.toml +++ b/tosca-package/pyproject.toml @@ -15,7 +15,7 @@ classifiers = [ dependencies = [ "black>=24.3.0", "typing_extensions>=4.7.1", - "RestrictedPython>=7.0", + "RestrictedPython>=7.4", ] [build-system] diff --git a/unfurl/server/serve.py b/unfurl/server/serve.py index 0d6963ec..b58a5d71 100644 --- a/unfurl/server/serve.py +++ b/unfurl/server/serve.py @@ -1256,12 +1256,8 @@ def json_response(obj, pretty, **dump_args): else: dump_args.setdefault("separators", (",", ":")) - dumps = flask.json.dumps - mimetype = current_app.config["JSONIFY_MIMETYPE"] - # XXX in flask 2.2+: - # dumps = current_app.json.dumps - # mimetype= current_app.json.mimetype - return current_app.response_class(f"{dumps(obj, **dump_args)}\n", mimetype=mimetype) + dumps = current_app.json.dumps + return current_app.response_class(f"{dumps(obj, **dump_args)}\n", mimetype="application/json") # /export?format=environments&include_all_deployments=true&latest_commit=foo&project_id=bar&branch=main