diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index c2e05d8..d7f4b0d 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,19 +1,28 @@ + -## What do these changes do? +## Change Summary - + ## Related issue number +## Performance Changes + +pydantic cares about performance, if there's any risk performance changed on this PR, +please run `make benchmark-pydantic` before and after the change: +* before: **?** +* after: **?** + ## Checklist * [ ] Unit tests for the changes exist -* [ ] Coverage remains at 100% +* [ ] Tests pass on CI and coverage remains at 100% * [ ] Documentation reflects the changes +* [ ] No performance deterioration (if applicable) * [ ] `HISTORY.rst` has been updated * if this is the first change since a release, please add a new section - * include the issue number or this pull request number + * include the issue number or this pull request number `#` * if you're not a regular contributer please include your github username `@whatever` diff --git a/.travis.yml b/.travis.yml index 73e6b22..7ab35ae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,7 +30,7 @@ script: - make mypy - make docs -- BENCHMARK_REPEATS=1 make benchmark +- BENCHMARK_REPEATS=1 make benchmark-all - ./tests/check_tag.py after_success: diff --git a/HISTORY.rst b/HISTORY.rst index c328e37..a31e72a 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,8 +3,8 @@ History ------- -v0.13.0 (XXXX-XX-XX) -.................... +v0.13.0 (20180-08-25) +..................... * raise an exception if a field's name shadows an existing ``BaseModel`` attribute #242 * add ``UrlStr`` and ``urlstr`` types #236 * timedelta json encoding ISO8601 and total seconds, custom json encoders #247, by @cfkanesan and @samuelcolvin diff --git a/Makefile b/Makefile index 63fa384..a1c2938 100644 --- a/Makefile +++ b/Makefile @@ -41,10 +41,14 @@ testcov: .PHONY: all all: testcov mypy lint -.PHONY: benchmark -benchmark: +.PHONY: benchmark-all +benchmark-all: python benchmarks/run.py +.PHONY: benchmark-pydantic +benchmark-pydantic: + python benchmarks/run.py pydantic-only + .PHONY: clean clean: rm -rf `find . -name __pycache__` diff --git a/docs/index.rst b/docs/index.rst index 4f9ad63..72bba56 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -508,6 +508,9 @@ over how non-standard types are encoded to JSON. (This script is complete, it should run "as is") +By default timedelta's are encoded as a simple float of total seconds. The ``timedelta_isoformat`` is provided +as an optional alternative which implements ISO 8601 time diff encoding. + Pickle Serialisation ~~~~~~~~~~~~~~~~~~~~ diff --git a/pydantic/version.py b/pydantic/version.py index 357d1c5..7499e31 100644 --- a/pydantic/version.py +++ b/pydantic/version.py @@ -2,4 +2,4 @@ from distutils.version import StrictVersion __all__ = ['VERSION'] -VERSION = StrictVersion('0.13a1') +VERSION = StrictVersion('0.13')