Commit Graph

14 Commits

Author SHA1 Message Date
Yasser Tahiri e07d73b373 Update URLs after migrating to organization (#4348)
* update URLs

* add a change file
2022-08-08 12:27:35 +00:00
Jochen Kupperschmidt 058d4a52ee Tweak documentation (#4143) 2022-07-04 22:53:11 +02:00
Samuel Colvin 6f46a5a146 drop python3.6 support (#3605)
* drop python3.6 support

* revert small change

* fix 3.7 failures

* more cases and cleanup

* add change description
2022-01-02 13:53:45 +00:00
Eric Jolibois 4a54f393ad Add python 3.10 support (#2885)
* refactor: extra `BaseConfig` and `Extra` in dedicated `config` module

* refactor: clean useless `#noqa: F401`

* refactor: clean useless `#noqa: F811`

* refactor: replace enum check

Error with 3.10
> DeprecationWarning: accessing one member from another is not supported

* refactor: avoid using `distutils` directly

error with python 3.10
> DeprecationWarning: The distutils package is deprecated and slated
> for removal in Python 3.12.
> Use setuptools or check PEP 632 for potential alternatives

* fix: `__annotations__` always exists

* fix: origin of `typing.Hashable` is not `None`

* ci: add run with 3.10.0b2

* docs: add 3.10

* feat: support `|` union operator properly

`|` operator has origin `types.Union` (and not `typing.Union`)

* fix: enum repr is different with 3.10+

* fix: error message changed a bit

change from basic `__init__` to `test_hashable_required.<locals>.MyDataclass.__init__()` (with `__qualname__`)

* fix:  always exists and is not inherited anymore

* fix: avoid calling `asyncio.get_event_loop` directly

With python 3.10, calling it results in
> DeprecationWarning: There is no current event loop

* fix(ci): do not run 3.10 on linux for now

For now it can not be compiled.
Let's just skip the check on linux for now instead of tuning the CI pipeline

* fix(ci): ignore DeprecationWarning raised by `mypy` on windows

* docs: add change file
2021-07-19 14:23:07 +01:00
Peter Roelants 2e2edf4f11 Allow custom CFLAGS and update documentation on reducing size. (#2517)
Squashed commit Co-authored-by: Eric Jolibois <em.jolibois@gmail.com>
2021-06-04 21:42:49 +02:00
Dmitry 55ae199fd4 Update install.md (#2626)
There must be a typo here - two external dependencies, not three.
2021-04-05 11:19:55 +02:00
Samuel Colvin b7a8ef25c6 fix coverage and make typing-extensions a required dependency (#2368)
* fixing coverage by simplifying Annotated import logic, fix #2367

* avoid checking against annotated if it's None

* make typing-extensions required WIP

* more making typing-extensions required

* fix docs and get_origin for python 3.6

* fix mypy test

* fix docs

* update docs, cleanup and add change

* clean docs/examples/schema_annotated.py

* move AnnotatedTypeNames
2021-02-17 19:17:30 +00:00
Samuel Colvin a25aba26b5 linting as a separate CI step (#2030)
* 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
2020-10-25 15:03:33 +00:00
Connor 730d84217d allow use of a .env-style files in BaseSettings (#607) (#1011)
* 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>
2020-01-19 16:45:36 +00:00
dmontagu 643266944c Support typing.Literal in python 3.8 (#1027)
* Support typing.Literal in python 3.8

* Improve import pattern for Literal

* Update references to  in docs

* Try to get build to pass
2019-11-25 11:32:01 +00:00
retnikt 80c2fb1545 mention python 3.8 in docs (#927) 2019-10-23 11:02:34 +01:00
nu_no ca1fa934ec Add installation from repository (#900)
It think it's a good idea given that some features that are mentioned in the documentation (such as `root_validator`) are not yet in the current PyPI version.
2019-10-18 10:35:19 +01:00
dmontagu beb57364d2 Lots of minor docs tweaks (#877)
* Lots of minor changes

* More tweaks

* Remove git conflicts

* suggested tweaks
2019-10-10 12:00:22 +01:00
Samuel Colvin 33b7d52d31 moving docs to mkdocs (#856)
* 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
2019-10-07 17:19:01 +01:00