Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1716491
Summary: | python-cerberus fails to build with Python 3.8 | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Miro Hrončok <mhroncok> |
Component: | python-cerberus | Assignee: | Miro Hrončok <mhroncok> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | igor.raits, lbalhar, pkopkan |
Target Milestone: | --- | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
URL: | https://copr.fedorainfracloud.org/coprs/g/python/python3.8/package/python-cerberus/ | ||
Whiteboard: | |||
Fixed In Version: | python-cerberus-1.3.1-2.fc32 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-08-21 10:35:21 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1686977 |
Description
Miro Hrončok
2019-06-03 14:37:50 UTC
______________________________ test_nested_oneofs ______________________________ validator = <cerberus.validator.Validator object at 0x7ff323303880> 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 0x7ff32331c910> 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 I think this has been fixed in latest release (1.3.1) which is building in rawhide now. ______________________________ test_nested_oneofs ______________________________ validator = <cerberus.validator.Validator object at 0x7f6ccf22a0a0> 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:1522: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cerberus/validator.py:562: in schema self._schema = DefinitionSchema(self, schema) cerberus/schema.py:82: in __init__ self.validate(schema) cerberus/schema.py:259: in validate self._validate(schema) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <[AttributeError("'DefinitionSchema' object has no attribute 'schema'") raised in repr()] DefinitionSchema object at 0x7f6ccf22acd0> schema = {'abc': {'oneof': [{'schema': {'foo': {'schema': {...}, 'type': 'dict'}}}, {'schema': {'baz': {'type': 'string'}}}], 'type': 'dict'}} def _validate(self, schema): 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:275: SchemaError The issue is fixed. Now it depends whether we want to use the patch downstream or wait for the 1.3.2 release. This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle. Changing version to '31'. This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle. Changing version to 31. Python 3.8 will happen in Fedora 32, changing back to rawhide. The coordinated rebuild of Python 3.8 has started in the `f32-python` side tag. If you figure out how to rebuild this package, please don't rebuild it in regular rawhide, but use the side tag instead: on branch master: $ fedpkg build --target=f32-python To wait for a build to show up in the side tag, do: $ koji wait-repo f32-python --build=<nvr> Where <nvr> is name-version-release of the source package, e.g. python-foo-1.1-2.fc32. An updated mock config is posted at: http://copr.fedorainfracloud.org/coprs/g/python/python3.8/ Note that it will take a while before the essential packages are rebuilt, so don't expect all your dependencies to be available right away. Thanks. Let us know if you need up to date info, or if you have any questions. PS this message is mass posted to all the bugs that block the PYTHON38 bug. If this is also a Fedora 31 FTBFS bug and you manage to fix it, you can do a f31 build as usual: on branch f31: $ fedpkg build Will be fixed at 1.3.2 https://github.com/pyeve/cerberus/issues/504#issuecomment-520155112 Fix backported. |