Samuel Colvin
6f46a5a146
drop python3.6 support ( #3605 )
...
* drop python3.6 support
* revert small change
* fix 3.7 failures
* more cases and cleanup
* add change description
2022-01-02 13:53:45 +00:00
Samuel Colvin
b7a8ef25c6
fix coverage and make typing-extensions a required dependency ( #2368 )
...
* fixing coverage by simplifying Annotated import logic, fix #2367
* avoid checking against annotated if it's None
* make typing-extensions required WIP
* more making typing-extensions required
* fix docs and get_origin for python 3.6
* fix mypy test
* fix docs
* update docs, cleanup and add change
* clean docs/examples/schema_annotated.py
* move AnnotatedTypeNames
2021-02-17 19:17:30 +00:00
PrettyWood
e5fff9ccd0
fix: make pydantic errors (un)pickable ( #1630 )
...
* fix: make pydantic errors (un)pickable
closes #1616
* add typing
* refactor: rename kwargs into ctx
2020-06-27 19:31:23 +01:00
dmontagu
643266944c
Support typing.Literal in python 3.8 ( #1027 )
...
* Support typing.Literal in python 3.8
* Improve import pattern for Literal
* Update references to in docs
* Try to get build to pass
2019-11-25 11:32:01 +00:00
Samuel Colvin
78921da353
better str and repr for ModelField ( #912 )
...
* better str and repr for ModelField, fix #505
* better type display, fix tests
* correct _type_display signature
* fix for python3.6 differences
* fix PyObjectStr
* fix coverage
2019-10-18 14:32:30 +01:00
Samuel Colvin
c3098a30cf
Consistent __repr__ and __str__ methods for all types ( #884 )
...
* Consistent __repr__ and __str__ methods for all types
* add change description
* devtools integration and feedback on repr methods
* fix Color repr
* tests for truncate
* add devtools section to docs
* tests for devtools
* ValidationError inheriting from Representation
* fix imports
* tweaks
* tweak docs
* exec_examples.py integration with __repr__ changes
2019-10-14 17:37:04 +01:00
dmontagu
cccf39e7c9
Fix raised ValidationError for model-type fields ( #820 )
2019-09-20 12:43:58 +01:00
Samuel Colvin
16263bafea
None behaviour ( #803 )
...
* tweaks to None behaviour
* prevent sub_fields for Optional fields by default
* rewrite None validation
* rename whole > each_item on validators
* cleanup processing of the Json type
* fix schema coverage and cleanup
* tweak validate_model
* change and docs
* fix validators on optional fields
* coverage
* remove is_none_validator
* minor performance improvements to ErrorWrapper
* fix coverage
* fix PaymentCardNumber
* undo schema changes, fix
* tweak validators
2019-09-18 11:38:21 +01:00
Samuel Colvin
0e8cfba713
small performance improvements to validators and fields ( #763 )
...
* small performance improvements to validators and fields
* simplify ErrorWrapper and ValidationError
* more cleanup of errors, combine test_error_wrapper.py and test_error.py
* tweak datetime_parse.py
* fix for python 3.6
* add change
* fix bug with int or float passed to datetime.time
2019-08-18 16:48:39 +01:00
Samuel Colvin
5837acb288
test demonstrating internal ValidationError ( #738 )
...
* test demonstrating internval ValidationError
* fix #736
2019-08-11 14:14:02 +01:00
Nikita Grishko
4f4e22ef47
Error context and message ( #183 )
...
* POC of error context and message
* Move type errors to the `errors.py` module; Change errors interface a bit
* Rename `.as_dict()` to `.dict()`
* Fix `PydanticErrorMixin` constructor
* Rename `exceptions.py` to `error_wrappers.py`
* Do not include nullable `ctx`
* Fix tests
* Added `int_validator`; Added `IntegerError`
* Added `float_validator`; Added `FloatError`
* Get rid of `__mro__` in prior of `exc.code`
* Removed `min_number_size` and `max_number_size` from config (#174 )
* Added `NumberMinSizeError` and `NumberMaxSizeError`
* Added `NoneIsNotAllowedError`
* Added `EnumError`
* Added `path_validator`; Added `PathError`
* Added `DictError`
* Added `ListError`
* Added `TupleError`
* Added `SetError`
* Added `datetime` related errors
* Added `bytes` and `str` related errors
* Added `SequenceError`
* Improved code coverage
* Display error context in string representation of validation error
* Redefine error message templates using config
* Review fixes
* Updated changelog
2018-05-31 14:35:38 +01:00