Used Cerberus 1.1:
-
I consulted these documentations:
-
I consulted these sections of the docs (add more lines as necessary):
-
I found nothing relevant to my problem in the docs.
-
I found the documentation not helpful to my problem.
-
I have the capacity to improve the docs when my problem is solved.
-
I have the capacity to submit a patch when a bug is identified.
Use-case abstract
I am trying to add schemas to a custom registry so that I don't clutter the cerberus.schema_registry namespace.
Adding any schema to a newly created Registry object results in an attribute error.
Support request / Bug report
import cerberus r = cerberus.Registry() r.add('non-system user', {'uid': {'min': 1000, 'max': 0xffff}})
results in
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-20-ad8c4bb8a5d2> in <module>()
----> 1 r.add('non-system user', {'uid': {'min': 1000, 'max': 0xffff}})
~/anaconda/envs/athion-forecaster/lib/python3.6/site-packages/cerberus/schema.py in add(self, name, definition)
375 :param definition: The definition.
376 :type definition: any :term:`mapping` """
--> 377 self._storage[name] = self._expand_definition(definition)
378
379 def all(self):
AttributeError: 'Registry' object has no attribute '_expand_definition'