From cf6924c2f3c6298b81c6c81529127420bb91fc37 Mon Sep 17 00:00:00 2001 From: Md Safiyat Reza Date: Tue, 16 Jul 2024 09:01:53 +0530 Subject: [PATCH 1/3] Updated jinja2 to <=3.1.2. Signed-off-by: Md Safiyat Reza --- assets/requirements.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/requirements.txt b/assets/requirements.txt index b655887..a291758 100644 --- a/assets/requirements.txt +++ b/assets/requirements.txt @@ -1,3 +1,3 @@ # Application Requirements -Jinja2>=2.10.1,<3.0.0 +Jinja2>=2.10.1,<=3.1.2 Flask-RESTful>=0.3.6 diff --git a/setup.py b/setup.py index b93a88d..8fb8421 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ license="MIT", long_description=long_description, install_requires=[ - "Jinja2>=2.10.1,<3.0.0", + "Jinja2>=2.10.1,<=3.1.2", "Flask-RESTful>=0.3.6", ], ) From 41fe9cb7c9e9add36629c96f84a6d7a8216ac6d2 Mon Sep 17 00:00:00 2001 From: Md Safiyat Reza Date: Tue, 16 Jul 2024 09:11:31 +0530 Subject: [PATCH 2/3] Added markupsafe==2.0.1 to dev requirements. Newer versions of it break. Signed-off-by: Md Safiyat Reza --- assets/requirements-dev.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/requirements-dev.txt b/assets/requirements-dev.txt index a77eb5c..c701c44 100644 --- a/assets/requirements-dev.txt +++ b/assets/requirements-dev.txt @@ -3,7 +3,8 @@ bandit>=1.6.2,<1.7.0 bs4>=0.0.1,<0.1.0 commitizen>=0.9.11,<1.17.0 isort>=4.3.21,<4.4.0 -flake8>=3.7.9,<3.8.0s +flake8>=3.7.9,<3.8.0 +markupsafe==2.0.1 mock>=3.0.5,<3.1.0 pytest>=4.6.9,<5.3.0 pytest-cov>=2.8.1,<2.9.0 From 0dcf26476a57ab5936dbfda08d59bdcb880601ba Mon Sep 17 00:00:00 2001 From: Md Safiyat Reza Date: Tue, 16 Jul 2024 09:15:15 +0530 Subject: [PATCH 3/3] Re-ordered blueprint registration. Signed-off-by: Md Safiyat Reza --- tests/test_get_current_registry.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_get_current_registry.py b/tests/test_get_current_registry.py index 8925212..cf24d26 100644 --- a/tests/test_get_current_registry.py +++ b/tests/test_get_current_registry.py @@ -40,8 +40,8 @@ class MockResource(Resource): def get(self): return "OK", 200, {"Access-Control-Allow-Origin": "*"} - app.register_blueprint(my_blueprint1, url_prefix="") api1.add_resource(MockResource, "/some/urls") + app.register_blueprint(my_blueprint1, url_prefix="") with app.test_request_context(path="some_path.html"): registry = _get_current_registry(api=api1) @@ -101,7 +101,6 @@ def test_get_current_registry_request_features_and_docs(): app = Flask(__name__) app.config["basePath"] = "/abc/123" my_blueprint1 = Blueprint("my_blueprint1", __name__) - app.register_blueprint(my_blueprint1, url_prefix="") _ = swagger.docs( Api(my_blueprint1), apiVersion="0.1", @@ -111,6 +110,7 @@ def test_get_current_registry_request_features_and_docs(): api_spec_url="/api/spec", description="Blueprint1 Description", ) + app.register_blueprint(my_blueprint1, url_prefix="") with app.test_request_context(path="some_path.html"): registry = _get_current_registry()