* linting as a separate ci step
* CI and docs improvements
* fix docs preview
* fix docs, benchmarks fastapi tests
* fix formatting and docs build
* tweak publishing docs
* fix for new download-artifact action
* skip check tag to check docs build
* prepare for merge
* feat: use partially get_origin and get_args from typing
Rework of d86a184072655d93652d6ea941421005f34de962 by @hmvp
We cannot directly use `typing.get_origin` and `typing.get_args` for
our custom types for which args and origin are wrong by default.
But at least we now have a unified behaviour, which can be improved
in the near future
* feat: add fallback in `get_args` for generics in python 3.9
* feat: add new `_evaluate` for python 3.9
In python 3.9, `typing._evaluate` has a new required
positional argument `recursive_guard`
* chore: add pragma no cover for python 3.9 fallbacks
* chore: add change file
* chore: add comments
* feat(ci): add python 3.9 support
* fix: mypy assumption is wrong
* allow use of a `.env`-style files in BaseSettings (#607)
* address various issues with initial implementation
- allow specifying `_env_file` kwarg in instantiation
* overrides any `env_file` specified in the `Config` class
- cast `os.environ` as a dict for better consistenty of behavior
- `env_path` should be a `Path` type
- replace `with open()` with `read_text`
- use regex for parsing the dotenv files and throw error on invalid line
- factor out `read_env_file` into separate file for easier testing
* move back into a single file; revert typing changes; use regex better
* pass `_env_file` argument around instead of setting a class attribute
* add dotenv docs
* add dotenv tests
* Add changes file
* Flesh out the docs a bit
* Apply suggestions from @samuelcolvin's code review
Co-Authored-By: Samuel Colvin <samcolvin@gmail.com>
* wrap docs
* add not about priority
* fix tests and imports
* fix tests
* switch to python-dotenv
* cleanup, test example
* more docs tweaks
* typo
* fix tests for dotenv
Co-authored-by: Samuel Colvin <samcolvin@gmail.com>
* moving docs to mkdocs
* transfering readme to md and more
* fixing build
* splitting usage.md
* improving schema.md and index.md
* fix make_history.rst
* models intro
* working on data conversation and required fields
* more fixes to models.md
* list all standard types supported
* list of pydantic types
* tweaks
* update links in code
* Apply suggestions from code review
incorporate @dmontagu's suggestions.
Co-Authored-By: dmontagu <35119617+dmontagu@users.noreply.github.com>
* Apply suggestions from code review
more missed suggestions.
Co-Authored-By: dmontagu <35119617+dmontagu@users.noreply.github.com>
* Apply suggestions from code review
more corrects.
* cleanup
* Field order warning
* fix and regenerate benchmarks
* format examples better, cleanup
* improve schema mapping table
* correct highlighting file types in schema.md
* add redirects in javascript
* add logo
* big performance improvement!
* exception performance improvement
* check errors and explicit export from errors.py
* more tweaks
* fix coverage
* fix tests and remove "from e" in exceptions for performance
Whilst working on the Reproducible Builds effort [0] we noticed
that pydantic could not be built reproducibly.
This is due to it generating the contents of the `PKG-INFO` file
via iterating over the contents of a set.
This was originally filed in Debian as #940156 [1].
[0] https://reproducible-builds.org/
[1] https://bugs.debian.org/940156
Signed-off-by: Chris Lamb <lamby@debian.org>
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
* 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
* 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