Skip to content

Commit 8111475

Browse files
committed
Use Werkzeug modern version
Request class from Werkzeug now includes json capability by default. See [1] and [2] for more info. [1] pallets/werkzeug@2cd4fa9 [2] pallets/werkzeug@7b52ecd Change-Id: I3c74b26ef4aff07c371364203a5b39c658b552a7
1 parent f9a7871 commit 8111475

4 files changed

Lines changed: 4 additions & 6 deletions

File tree

ironic_python_agent/api/app.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import werkzeug
2121
from werkzeug import exceptions as http_exc
2222
from werkzeug import routing
23-
from werkzeug.wrappers import json as http_json
2423

2524
from ironic_python_agent import encoding
2625

@@ -30,7 +29,7 @@
3029
_DOCS_URL = 'https://docs.openstack.org/ironic-python-agent'
3130

3231

33-
class Request(werkzeug.Request, http_json.JSONMixin):
32+
class Request(werkzeug.Request):
3433
"""Custom request class with JSON support."""
3534

3635

ironic_python_agent/tests/unit/test_api.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
from oslo_config import cfg
1919
from werkzeug import test as http_test
2020
from werkzeug import wrappers
21-
from werkzeug.wrappers import json as http_json
2221

2322
from ironic_python_agent import agent
2423
from ironic_python_agent.api import app
@@ -29,7 +28,7 @@
2928
PATH_PREFIX = '/v1'
3029

3130

32-
class Response(wrappers.Response, http_json.JSONMixin):
31+
class Response(wrappers.Response):
3332
pass
3433

3534

lower-constraints.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Pint==0.5
2-
Werkzeug==1.0.1
2+
Werkzeug==2.0.0
33
bandit==1.1.0
44
coverage==4.0
55
cryptography==2.3

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ requests>=2.14.2 # Apache-2.0
1818
stevedore>=1.20.0 # Apache-2.0
1919
tenacity>=6.2.0 # Apache-2.0
2020
ironic-lib>=5.1.0 # Apache-2.0
21-
Werkzeug>=1.0.1 # BSD License
21+
Werkzeug>=2.0.0 # BSD License
2222
cryptography>=2.3 # BSD/Apache-2.0
2323
tooz>=2.7.2 # Apache-2.0

0 commit comments

Comments
 (0)