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

Stephen Finucane stephen at that.guru
Thu Sep 30 20:55:17 AEST 2021


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 at that.guru>
---
 patchwork/tests/api/validator.py | 6 +-----
 requirements-test.txt            | 4 ++--
 2 files changed, 3 insertions(+), 7 deletions(-)

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
-- 
2.31.1



More information about the Patchwork mailing list