[Python-modules-team] Bug#950069: python-cerberus FTBFS with Python 3.8 as supported version
Adrian Bunk
bunk at debian.org
Tue Jan 28 19:16:24 GMT 2020
Source: python-cerberus
Version: 1.2-2
Severity: serious
Tags: ftbfs bullseye sid
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/python-cerberus.html
...
============================= test session starts ==============================
platform linux -- Python 3.8.1, pytest-4.6.9, py-1.8.0, pluggy-0.13.0
rootdir: /build/1st/python-cerberus-1.2, inifile: pytest.ini
collected 210 items
cerberus/tests/test_assorted.py ........ [ 3%]
cerberus/tests/test_customization.py .... [ 5%]
cerberus/tests/test_errors.py ......... [ 10%]
cerberus/tests/test_normalization.py ................................... [ 26%]
.......... [ 31%]
cerberus/tests/test_registries.py .......... [ 36%]
cerberus/tests/test_schema.py ............. [ 42%]
cerberus/tests/test_validation.py ...................................... [ 60%]
....................................................s........F.......... [ 94%]
........... [100%]
=================================== FAILURES ===================================
______________________________ test_nested_oneofs ______________________________
validator = <cerberus.validator.Validator object at 0x7f17c3c581f0>
def test_nested_oneofs(validator):
> validator.schema = {'abc': {
'type': 'dict',
'oneof_schema': [
{'foo': {
'type': 'dict',
'schema': {'bar': {'oneof_type': ['integer', 'float']}}
}},
{'baz': {'type': 'string'}}
]}}
cerberus/tests/test_validation.py:1312:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cerberus/validator.py:509: in schema
self._schema = DefinitionSchema(self, schema)
cerberus/schema.py:69: in __init__
self.validate(schema)
cerberus/schema.py:197: in validate
self._validate(schema)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <[AttributeError("'DefinitionSchema' object has no attribute 'schema'") raised in repr()] DefinitionSchema object at 0x7f17c3f91ac0>
schema = {'abc': {'oneof': [{'schema': {'foo': {'schema': {...}, 'type': 'dict'}}}, {'schema': {'baz': {'type': 'string'}}}], 'type': 'dict'}}
def _validate(self, schema):
""" Validates a schema that defines rules against supported rules.
:param schema: The schema to be validated as a legal cerberus schema
according to the rules of this Validator object.
"""
if isinstance(schema, _str_type):
schema = self.validator.schema_registry.get(schema, schema)
if schema is None:
raise SchemaError(errors.SCHEMA_ERROR_MISSING)
schema = copy(schema)
for field in schema:
if isinstance(schema[field], _str_type):
schema[field] = rules_set_registry.get(schema[field],
schema[field])
if not self.schema_validator(schema, normalize=False):
> raise SchemaError(self.schema_validator.errors)
E cerberus.schema.SchemaError: {'abc': [{'oneof': [{'schema': ['no definitions validate', {'anyof definition 0': [{'foo': [{'schema': ['no definitions validate', {'anyof definition 0': [{'bar': [{'oneof_type': ['unknown rule']}]}], 'anyof definition 1': [{'bar': ['unknown rule']}]}]}]}], 'anyof definition 1': [{'foo': ['unknown rule']}]}]}]}]}
cerberus/schema.py:219: SchemaError
...
More information about the Python-modules-team
mailing list