Paul Eipper

Results 92 comments of Paul Eipper

I am working on bringing Calculated Types (aka. Serializable `setters`) into current schematics to better support ORMs - namely SchemAlchemy (https://github.com/schematics/schemalchemy/issues/1). There a few test cases that I am creating...

I think it was not changed to keep compatibility for now. All tests assume None to be equivalent to Undefined in regards to validating required fields. @bintoro might be able...

Hi @chadrik , this is definitely something that would be good to have. I've added type annotations in https://github.com/schematics/schematics/blob/master/schematics/iteration.py , I think going this way should work well for other...

``` print(mls_test.to_primitive(context=Context(app_data={'locale': 'en_US'}))) ```

The latest code by @kstrauser might fix this issue, but we don't have a test for it. Let me know if it's fixed, and if possible please provide a testcase...

Hi, should be the same error interface as when you validate another constraint, for example: #### Example: ```python class Group(Model): name = StringType(required=True,max_length=1) try: g = Group({'name': 'ab'}) g.validate() except...

PS: these exceptions have a `to_primitive` method that makes them json serializable, which their __str__ uses.

@Jbat1Jumper there is no strict JSON type, but you can do a field that accepts anything by using BaseType() @WyseNynja If you want to make sure it is a dictionary,...

If I understand correctly, you can create an empty `whitelist()`, then all fields will be filtered out.

Thanks for the comparison! Are the results the same under Python 2 and 3? I am wary of bringing too many dependencies into schematics, as it becomes harder to maintain...