-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Urlfield before Stringfield produces an error #20
Comments
Looks like URLField has a default required value of false, as does UUIDField. All other fields are required equals true by default. Need to review whether I did that intentionally for some reason. If not, I will correct it. Thanks for the heads up. |
Also, if you are curious about the root cause, it’s a “feature” of the underlying attrs library that supports positional arguments to classes. |
@imaurer What are the consequences of making all fields to pass |
Looks like |
The URL field no longer behaves in this arbitrarily restrictive manner: Thanks @GeorgeLubaretsi for the PR. That's a bigger change that requires more deliberation. |
Just as a quick bug report:
This does not work:
ValueError: No mandatory attributes allowed after an attribute with a default value or factory. Attribute in question: Attribute(name='email', default=NOTHING, validator=<instance_of validator for type (<class 'str'>,)>, repr=True, cmp=True, hash=None, init=True, metadata=mappingproxy({'key': None}), type=None, converter=<function str_if_not_none at 0x000001C58DFC6158>)
This does work:
Rather surprising that the order of arguments matter
The text was updated successfully, but these errors were encountered: