* added config var warn_on_undefined_types
raises a UserWarning if model not fully defined and will need rebuild
* black formatting
* use | instead of Optional[]
* suppress undefined types warning in existing tests
* ran pre-commit to fix linting
* changed to use Optional since | failing in CI
* changes following initial code review
* added some preliminary documentation
* fix linting
* fixed linting
* fixed linting
* assert model partially built when suppressing warn
* moved check for ForwardRef into existing for loop
* change assertion to dict instead of json
* cleanup of undefined_types_warning tests and docs
* Update docs/examples/types_undefined_warning.py
* Update docs/examples/types_undefined_warning.py
* fix EOL (trim trailing whitespace) lint error
Co-authored-by: Samuel Colvin <s@muelcolvin.com>
* moving docs to docs.pydantic.dev
* use the wrangler gh action
* :face-palm:
* 🤦 disable tag check
* uncomment ci checks
* set branch for cf pages publish
Hello
BaseModel is an import from pydantic.
Using that same name for the Base from sqlachemy can be misleading, and not aligned to the other examples.
I therefore suggest to use the same naming that the other example.
Pierre
* working on core schema generation
* adapting main.py
* getting tests to run
* fix tests
* disable pyright, fix mypy
* moving to class-based model generation
* working on validators
* change how models are created
* start fixing test_main.py
* fixing mypy
* SelfType
* recursive models working, more tests fixed
* fix tests on <3.10
* get docs build to pass
* starting to cleanup types.py
* starting works on custom types
* working on using annotated-types
* using annoated types for constraints
* lots of cleanup, fixing network tests
* network tests passing 🎉
* working on types
* working on types and cleanup
* fixing UUID type, restructing again
* more types and newer pydantic-core
* working on Iterable
* more test_types tests
* support newer pydantic-core, fixing more test_types.py
* working through more test_types.py
* test_types.py at last passing locally 🎉
* fixing more tests in test_types.py
* fix datetime_parse tests and linting
* get tests running again, rename to test_datetime.py
* renaming internal modules
* working through mypy errors
* fixing mypy
* refactoring _generate_schema.py
* test_main.py passing
* uprev deps
* fix conftest and linting?
* importing Annotated
* ltining
* import Annotated from typing_extensions
* fixing 3.7 compatibility
* fixing tests on 3.9
* fix linting
* fixing SecretField and 3.9 tests
* customising get_type_hints
* ignore warnings on 3.11
* spliting repr out of utils
* removing unused bits of _repr, fix tests for 3.7
* more cleanup, removing many type aliases
* clean up repr
* support namedtuples and typeddicts
* test is_union
* removing errors, uprev pydantic-core
* fix tests on 3.8
* fixing private attributes and model_post_init
* renaming and cleanup
* remove unnecessary PydanticMetadata inheritance
* fixing forward refs and mypy tests
* fix signatures, change how xfail works
* revert mypy tests to 3.7 syntax
* correct model title
* try to fix tests
* fixing ClassVar forward refs
* uprev pydantic-core, new error format
* add "force" argument to model_rebuild
* Apply suggestions from code review
Suggestions from @tiangolo and @hramezani 🙏
Co-authored-by: Hasan Ramezani <hasan.r67@gmail.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
* more suggestions from @tiangolo
* extra -> json_schema_extra on Field
Co-authored-by: Hasan Ramezani <hasan.r67@gmail.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
* Remove Cython
* fix CI
* fix coverage
* fix tests
* switching to pypyroject.toml
* pre-commit all and use pre-commit for linting
* no mypy tests on macos and windows on ci, use flake8-pyproject
* fix docs and tests CI
* check build is working
* drop pytest-cov
* window and macos ci with 3.11, reduce filtering
* use pip-tools to pin all dependencies
* fix docs and fastapi tests
* fix test deps for 3.7
* no cache on tests job
* revert fastapi changes, fix coverage
* fix mypy coverage
* test with older mypy
* dotenv not required for mypy tests
* split testing requirements std and extra
* typo
* @PrettyWood comments
* correct branch name
* mypy python_version and pr template
* Fix#1458 - Allow for custom parsing of environment variables via env_parse
* Add docs for env_parse usage
* Add changes file for #3977
* fixup: remove stray print statement
* Revert env_parse property on field
* Add parse_env_var classmethod in nested Config
* Update documentation for parse_env_var
* Update changes file.
* fixup: linting in example
* Rebase and remove quotes around imported example
* fix example
* my suggestions
* remove unnecessary Field(env_parse=_parse_custom_dict)
Co-authored-by: Samuel Colvin <s@muelcolvin.com>
* ✨ Add JSON-compatible float constraints for NaN and Inf
* switching to a single "allow_inf_nan"
* fix tests
* add change and docs
* add allow_inf_nan to Config
Co-authored-by: Samuel Colvin <s@muelcolvin.com>
* Fix `AnyUrl.build` doesn't do percent encoding (#3061)
please review
* Use `urllib.parse` instead of custom implementation for percent encoding
* Make `quote_plus` a `stricturl` option
* Add docs for `stricturl(quote_plus=True)`
* Better changes message for #3061
Co-authored-by: Samuel Colvin <samcolvin@gmail.com>
* Fix precent encoding version note to V1.10
Co-authored-by: Samuel Colvin <samcolvin@gmail.com>
* Fix `Building URLs` snippit markdown
Co-authored-by: Samuel Colvin <samcolvin@gmail.com>
* Fix formatting for `docs/examples/types_url_building.py`
* fix docs
Co-authored-by: Samuel Colvin <samcolvin@gmail.com>
Co-authored-by: Samuel Colvin <s@muelcolvin.com>