* refactor: rename `is_union` into `is_union_origin`
* fix: "new" union and generic types are not the same as `typing.GenericAlias`
* chore: rename param
* fix(ci): name changed for 3.10
* fix: mypy
* chore(ci): update python 3.10 version
* Revert "fix: enum repr is different with 3.10+"
This reverts commit b1c8d9ef1396959ff9d88bb2ed16d99dd3146151.
* 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
* docs preview using smokeshow
* switch to using smokeshow for coverage
* fix macos and windows builds
* correct coverage prep.
* tweak coverage build logic
* print more coverage info
* mess with coverage setup, set config [PATHS]
* updating badges
* add context to coverage reports
* adding smokeshow status context
* 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
* Add JSON Benchmark
* Apply iterator suggestions from code review
Co-Authored-By: Samuel Colvin <samcolvin@gmail.com>
* Reorganize run to avoid parsing time in json test
* tweak json benchmarks
Co-authored-by: Samuel Colvin <samcolvin@gmail.com>
Co-authored-by: Samuel Colvin <s@muelcolvin.com>