* Make schema work for Literal and NewType, fix#646
* Fix test when typing_extensions not installed
* Make literal values fetching 3.6 compatible
* Rework to get around issues with Literal in python 3.6
* Make cython-compatible
* Use union for multiple allowed literal values
* Minor simplification of values-gathering
* Updated history
fix#561
* Add support for Literal annotation
* Updated requirements.txt
* incorporating feedback
* skip typing_extensions tests if not installed
* missed a spot
* address feedback
* Make work with python 3.6
* Work for *both* 3.6 and 3.7
* incorporate feedback
* fixed naming and quotes
* Trying to fix LGTM bot issue
* StrictBool
StrictBool only allows booleans to be parsed. Any other value, no matter
its truthiness, is rejected.
* Fix type of `validate`
Co-Authored-By: Samuel Colvin <samcolvin@gmail.com>
* " => '
* Update the exotic docs with StrictBool
* Fix error message
* Improve docs
* tweak docs.
* Fix issue with unspecified generic type, fix#550
Seems to solve #550
With this change, models with bare `List` or `Dict` as a typehint still validate for type agreement, but don't validate the type of the parameters.
I'm not sure this is the "right" fix (I don't know the implications of ignoring TypeVars like this), but considering how simple it was I figured I'd at least share.
* Update validators.py
Found this discussion: https://github.com/samuelcolvin/pydantic/issues/545; `lenient_issubclass` does seem to fix it.
* Update validators.py
Hacky solution to prevent no validator exception. Maybe there's a better way?
* Tests pass and PR checklist done
* Check sooner
* Block empty list from dict constructor
* Removed modifications to dict_validator
* fix: serialize secrets to json, fix#462
* feat: adjust documentation for secretstr.
* feat: undo unnecessary changes. keep tests.
* fix: tests were broken, now they're fixed again.
* feat: add display fn to SecretStr and SecretBytes, to be used for json output.
* fix: minor typo.
* fix: last few comments.
* feat: add SecretStr and SecretBytes.
* chore: update HISTORY.rst
* fix: file permissions were incorrect.
* feat: lint, format, fix comments.
* feat: changed inner type of SecretBytes in the schema to string as there is no bytes type in json.
* feat: remove format from secret str and secret bytes.
* feat: fix schema mapping.
* Json type
* Sort imports
* one more unsorted import
* Changed the way Json type is defined
* Fix Function is too complex (C901) warning
* Fixed remarks
* Fix additional remarks
* Additional test
fix#195
* Get rid of `track` in errors
* Move `display_as_type` func into utils module
* Get rid of error as `namedtuple`
* Renamed `Error.index` to `Error.loc`
* New way to get error type
* New way to get error message
* New errors format
* Renamed `flatten_errors` property to `flat_errors`
* `__slots__` for `Error` and `ValidationError`
* `loc` as `tuple`
* Tests
* Review fixes
* `flatten_errors` as generator