diff mbox series

[5/6] requirements: Bump psycopg2-binary, openapi-core

Message ID 20210930105518.487744-5-stephen@that.guru
State Accepted
Headers show
Series [1/6] Revert "docs: prevent build error by rolling back Sphinx version" | expand

Commit Message

Stephen Finucane Sept. 30, 2021, 10:55 a.m. UTC
Once again, openapi-core has moved stuff around internally. Nothing we
can't fix though, as it seems the thing moved is no longer necessary.

Signed-off-by: Stephen Finucane <stephen@that.guru>
---
 patchwork/tests/api/validator.py | 6 +-----
 requirements-test.txt            | 4 ++--
 2 files changed, 3 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git patchwork/tests/api/validator.py patchwork/tests/api/validator.py
index 2b1921a3..96912227 100644
--- patchwork/tests/api/validator.py
+++ patchwork/tests/api/validator.py
@@ -10,8 +10,7 @@  from django.urls import resolve
 import openapi_core
 from openapi_core.contrib.django import DjangoOpenAPIRequestFactory
 from openapi_core.contrib.django import DjangoOpenAPIResponseFactory
-from openapi_core.schema.media_types.exceptions import OpenAPIMediaTypeError
-from openapi_core.schema.parameters.exceptions import OpenAPIParameterError
+from openapi_core.exceptions import OpenAPIParameterError
 from openapi_core.templating import util
 from openapi_core.unmarshalling.schemas.formatters import Formatter
 from openapi_core.validation.request.validators import RequestValidator
@@ -113,9 +112,6 @@  def validate_data(path, request, response, validate_request,
         result = validator.validate(request)
         try:
             result.raise_for_errors()
-        except OpenAPIMediaTypeError:
-            if response.status_code != status.HTTP_400_BAD_REQUEST:
-                raise
         except OpenAPIParameterError:
             # TODO(stephenfin): In API v2.0, this should be an error. As things
             # stand, we silently ignore these issues.
diff --git requirements-test.txt requirements-test.txt
index c8ce258b..7f03b0fc 100644
--- requirements-test.txt
+++ requirements-test.txt
@@ -1,6 +1,6 @@ 
 mysqlclient~=2.0.0
-psycopg2-binary~=2.8.0
+psycopg2-binary~=2.9.0
 sqlparse~=0.4.0
 python-dateutil~=2.8.0
 tblib~=1.7.0
-openapi-core~=0.13.4
+openapi-core~=0.14.2