8000 cython by samuelcolvin · Pull Request #548 · pydantic/pydantic · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0593eb0
user cython for fields.py, parse.py and validators.py
samuelcolvin May 25, 2019
d068d24
fix coverage
samuelcolvin May 25, 2019
da8f50a
no cython on windows
samuelcolvin May 25, 2019
178766e
speedup error_wrappers, more cython
samuelcolvin May 25, 2019
02590c9
conditional validators
samuelcolvin May 25, 2019
f093118
more tweaks to validators.py
samuelcolvin May 25, 2019
0a4e37a
add compiled check
samuelcolvin May 25, 2019
a2165d8
fix mypy and tweak
samuelcolvin May 25, 2019
7ebf254
benchmark with cython
samuelcolvin May 25, 2019
1b50f47
simplify anystr_strip_whitespace
samuelcolvin May 25, 2019
217049a
build binaries on travis
samuelcolvin May 25, 2019
74a84f5
fix travis manylinux builds
samuelcolvin May 25, 2019
8e8982f
correct test stages
samuelcolvin May 25, 2019
4bcf5dc
cibuildwheel to dist
samuelcolvin May 25, 2019
becb8d2
fix manylinux build
samuelcolvin May 25, 2019
ce82323
don't upgrade pip on wheel build
samuelcolvin May 25, 2019
5c83e48
try a fix for cibuildwheel
samuelcolvin May 26, 2019
35e364c
speedup deploy stage
samuelcolvin May 26, 2019
b56008e
revert file rearrangement, cythonize main.py
samuelcolvin May 26, 2019
8bd8adb
tweak main.py
samuelcolvin May 26, 2019
d583512
update docs and history
samuelcolvin May 26, 2019
0dca636
fix deploy stage of travis
samuelcolvin May 26, 2019
dac2652
Cythonize more files (#553)
dmontagu May 29, 2019
1e322ef
Merge branch 'master' into cython
samuelcolvin May 30, 2019
e290b99
cython coverage
samuelcolvin May 30, 2019
59a99aa
upgrade cython and tweak build setup
samuelcolvin May 30, 2019
948ce20
different build stages
samuelcolvin May 30, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add compiled check
  • Loading branch information
samuelcolvin committed May 25, 2019
commit 0a4e37a375d7fb0cc6700f8bc34d96e3bbb99259
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ script:

# test with and without ujson and email-validator then combine coverage
- make test && mv .coverage .coverage.extra-cython
- python -c "import sys, pydantic; print('compiled:', pydantic.compiled); sys.exit(not pydantic.compiled)"
- pip uninstall -y cython
- make clean
- python -c "import sys, pydantic; print('compiled:', pydantic.compiled); sys.exit(pydantic.compiled)"
- make test && mv .coverage .coverage.no-cython
- pip uninstall -y ujson email-validator
- make test && mv .coverage .coverage.no-extra
Expand Down
2 changes: 1 addition & 1 deletion pydantic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from .errors import *
from .fields import Required
from .main import BaseConfig, BaseModel, Extra, create_model
from .parse import parse_model
from .parse import compiled, parse_model
from .parse_files import Protocol
from .schema import Schema
from .types import *
Expand Down
11 changes: 11 additions & 0 deletions pydantic/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@
SetStr = Set[str]


__all__ = ['Extra', 'compiled', 'parse_model']


try:
import cython
except ImportError:
compiled = False
else:
compiled = cython.compiled


class Extra(str, Enum):
allow = 'allow'
ignore = 'ignore'
Expand Down
0