Commit Graph

18 Commits

Author SHA1 Message Date
dmontagu 3ee54ed2bb Add support for Literal annotation (#582)
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
2019-06-25 10:33:21 +01:00
dmontagu b84df079a7 Add generic functionality (#595), fix #556
* Added generic functionality

* Skip tests in python 3.6

* double quote -> single quote

* Simplified, with more comprehensive tests

* double quote -> single quote

* Remove unintentional file

* Add caching

* don't cythonize generics.py

* Make work with mypy

* Remove __parameters__

* double quote -> single quote i'll remember one day

* More cleanup and validation

* Removed unwanted file

* A little more cleanup, and finish the PR

* Add proper inheritance

* Added note about inheritance to docs

* Added error for double-parameterizing

* Should build for python3.7

* Works with both 3.6 and 3.7

* Fixed bug with caching for single argument

* handle __name__ for generic models

* double quote -> single quote

* Updated error messages
2019-06-19 11:22:06 +01:00
Samuel Colvin 3dfae21208 ORM mode: Add support for arbitrary class instances (#562)
* Support ORM objects to 'parse_obj', replace #520

* switch to GetterDict and orm_mode

* tweaks

* update docs

* split tests and add @tiangolo's suggestion

* split tests and add @tiangolo's suggestion

* fix coverage
2019-06-06 11:29:09 +01:00
Samuel Colvin b248a0984f update benchmarks (#563)
* update benchmarks

* optimize
2019-05-30 12:43:44 +01:00
Samuel Colvin d473f4abc9 cython (#548)
* user cython for fields.py, parse.py and validators.py, fix #547

* fix coverage

* no cython on windows

* speedup error_wrappers, more cython

* conditional validators

* more tweaks to validators.py

* add compiled check

* fix mypy and tweak

* benchmark with cython

* simplify anystr_strip_whitespace

* build binaries on travis

* fix travis manylinux builds

* correct test stages

* cibuildwheel to dist

* fix manylinux build

* don't upgrade pip on wheel build

* try a fix for cibuildwheel

* speedup deploy stage

* revert file rearrangement, cythonize main.py

* tweak main.py

* update docs and history

* fix deploy stage of travis

* Cythonize more files (#553)

* Cythonize more files

* Tests pass

* Fixed ordering

* Some code cleanup

* Every last file cythonized

* cython coverage

* upgrade cython and tweak build setup

* different build stages
2019-05-30 12:04:15 +01:00
Samuel Colvin 27323aa8b2 fix for python 3.8 (#396)
* fix for python 3.8

* history and tweak types in main.py
2019-02-15 18:29:13 +00:00
Jere Lahelma db53fad28d add py.typed marker file for PEP-561 support (#391)
Fix #390

Disable zip_safe option as mypy is incompatible with it.
2019-02-13 15:11:33 +00:00
Samuel Colvin 3d4dc90d4b classifiers and python-tag 2018-12-27 23:44:13 +00:00
Samuel Colvin 9ff946d2fa PyObject = None, and Pattern (#306)
* PyObject = None, fix #305

* history formatting on pypi

* fix history rendering in setup

* allow Pattern validation, fix #303

* fix for python3.7

* fix linting

* proper processing for regex pattern errors
2018-11-18 16:11:29 +00:00
Samuel Colvin f3a278bb8d Dataclasses (#269)
* pydantic.dataclasses.dataclass decorator

* add dataclasses to requirnment.txt

* reimplement dataclasses

* fix linting, fix coverage

* docs
2018-10-01 09:48:28 +01:00
Samuel Colvin 9338c413c7 remove msgpack (#201)
* remove msgpack

* update history
2018-06-18 12:20:10 +01:00
Samuel Colvin afb90b91e8 implement email validator (#142)
* implement email validator, replace #112

* coverage and cleanup

* update docs
2018-03-25 18:09:37 +01:00
Samuel Colvin bf80464f28 allow direct install, fix #106 (#107) 2017-11-26 16:27:15 +00:00
Samuel Colvin 13300cd8c6 add .pyup.yml, tweak setup 2017-10-23 16:06:16 +01:00
Samuel Colvin 044fd42f4f parser methods (#58), fix #39
* working on parsers

* starting parse tests

* proper tests for parse

* adding parse docs

* tweaks and history

* add test for datetime direct, fix tests

* tweak docs
2017-07-08 18:39:24 +01:00
Thomas Grainger 3544c351ec configure python_requires and py3 only trove (#32) 2017-06-04 00:08:46 +01:00
Samuel Colvin 6d2e6b6d60 linting and adding .travis.yml 2017-05-05 12:19:25 +01:00
Samuel Colvin a8e844dad5 initial commit 2017-05-03 22:23:41 +01:00