Skip to content

Commit 292743e

Browse files
authored
Fix vulnerabilities. Set minimum Python version to 3.6.8 (#576)
* Fix vulnerabilities. Set minimum Python version to 3.6.8 * Fix tests
1 parent b9aebc4 commit 292743e

6 files changed

Lines changed: 182 additions & 134 deletions

File tree

hydrus/app_factory.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@
22
import uuid
33
from flask_cors import CORS
44
from flask_restful import Api
5-
from hydrus_logger import HydrusLogger
65
from hydrus.resources import (Index, Vocab, Contexts, Entrypoint,
76
ItemCollection, Item, Items, ItemMember)
87

9-
logger = HydrusLogger().get_logger()
10-
118

129
def app_factory(api_name: str = "api", vocab_route: str = "vocab") -> Flask:
1310
"""
@@ -23,16 +20,6 @@ def app_factory(api_name: str = "api", vocab_route: str = "vocab") -> Flask:
2320
app.url_map.strict_slashes = False
2421
api = Api(app)
2522

26-
@app.after_request
27-
def logging_request_response(response):
28-
if response.location and response.status_code != 302:
29-
logger.info(" {} {}:{} Object_created_at : {}, status_code : {} "
30-
.format(uuid.uuid4(), request.method, request.path, response.location, response.status))
31-
else:
32-
logger.info(" {} {}:{} status_code : {} "
33-
.format(uuid.uuid4(), request.method, request.path, response.status))
34-
return response
35-
3623
# Redirecting root_path to root_path/api_name
3724
if api_name:
3825
@app.route("/")

hydrus/hydrus_logger.py

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)