marshmallow: remove deprecation warning #193
Annotations
7 errors
|
Run tests:
tests/test_custom_fields.py#L1
isort-check
SanitizedUnicode,
TrimmedString,
)
-
from invenio_records_rest.utils import marshmallow_major_version
if marshmallow_major_version >= 3:
|
Run tests:
tests/test_marshmallow_loader.py#L1
isort-check
from helpers import get_json
from invenio_records.models import RecordMetadata
from invenio_rest.serializer import BaseSchema as Schema
-from marshmallow import ValidationError
-from marshmallow import fields
+from marshmallow import ValidationError, fields
from invenio_records_rest.loaders import json_pid_checker
from invenio_records_rest.loaders.marshmallow import (
from invenio_records_rest.schemas import Nested
from invenio_records_rest.schemas.fields import PersistentIdentifier
from invenio_records_rest.utils import marshmallow_major_version
+
class _TestSchema(Schema):
"""Test schema."""
|
Run tests:
tests/test_marshmallow_loader.py#L1
Black format check
--- /home/runner/work/invenio-records-rest/invenio-records-rest/tests/test_marshmallow_loader.py 2024-04-22 14:23:45.224553 +0000
+++ /home/runner/work/invenio-records-rest/invenio-records-rest/tests/test_marshmallow_loader.py 2024-04-22 14:25:17.333747 +0000
@@ -23,10 +23,11 @@
marshmallow_loader,
)
from invenio_records_rest.schemas import Nested
from invenio_records_rest.schemas.fields import PersistentIdentifier
from invenio_records_rest.utils import marshmallow_major_version
+
class _TestSchema(Schema):
"""Test schema."""
title = fields.Str(required=True, attribute="metadata.mytitle")
|
Run tests:
invenio_records_rest/utils.py#L1
isort-check
"""General utility functions module."""
+from functools import partial
+
import pkg_resources
-from functools import partial
-
import six
from flask import abort, current_app, jsonify, make_response, request, url_for
from invenio_pidstore.errors import (
|
Run tests:
invenio_records_rest/utils.py#L1
Black format check
--- /home/runner/work/invenio-records-rest/invenio-records-rest/invenio_records_rest/utils.py 2024-04-22 14:23:45.224553 +0000
+++ /home/runner/work/invenio-records-rest/invenio-records-rest/invenio_records_rest/utils.py 2024-04-22 14:25:58.165674 +0000
@@ -32,11 +32,13 @@
PIDRedirectedRESTError,
PIDUnregisteredRESTError,
)
from .proxies import current_records_rest
-marshmallow_major_version = int(pkg_resources.get_distribution('marshmallow').version[0])
+marshmallow_major_version = int(
+ pkg_resources.get_distribution("marshmallow").version[0]
+)
def build_default_endpoint_prefixes(records_rest_endpoints):
"""Build the default_endpoint_prefixes map."""
pid_types = set()
|
Run tests
The operation was canceled.
|
Loading