mirror of
https://github.com/kennethreitz/pydantic.git
synced 2026-06-05 23:00:18 +00:00
6d0aa20aa6
* ci: add python 3.11.0b4
* ignore both deprecation warnings
* handle specific tuple[()] case
`tuple` and `typing.Tuple` are now the same.
But `get_args(tuple[()]) == get_args(tuple) == ()`
even though `get_args(tuple[()]).__args__ = ()` and `tuple.__args__` is not defined.
* Handle type properly
Since `type` and `Type` are now the same, it triggers `_generic_get_args`
in our custom `get_args`
```py
if hasattr(tp, '_nparams'):
return (Any,) * tp._nparams
```
So we have `class_ is Any` for generic `type` type
* Handle enum in schemas
Enums have now a (huge) doc generated by inspect.getdoc.
It's very verbose and doesn't add anything.
I reckon it's best to keep the old generic description unless
a specific doc is provided (a test exists for this)
* add test that fails with python 3.9+
* fix test for python 3.11
* fix cython