odmantic
odmantic copied to clipboard
✨ Upgrade types and add support for instance autocompletion with dataclass_transform (VS Code autocompletion), drop support for Python 3.6
✨ Upgrade types and add support for instance autocompletion with dataclass_transform (VS Code autocompletion).
This is more or less the same as: https://github.com/art049/odmantic/pull/229, and this PR would superseded that one (if accepted). This PR upgrades mypy, the pre-commit, typing-extensions, the necessary types for the new mypy, and adds again dataclass_transform
with the definitive version (importing from typing
).
Edit 2022-06-23: I realized that the new parameters for dataclass_transform
require typing_extensions
version 4.2.0
, but that version doesn't have support for Python 3.6. So this specific PR would depend on dropping support for Python 3.6. 🤦
Love this! I have been waiting for this for a long time, really the missing part of DX with pydantic based models
I saw pydantic dropped python3.6 in https://github.com/samuelcolvin/pydantic/pull/3605 as well. It makes some sense to drop it in odmantic also IMO since there aren't that many 3.6 downloads.
Awesome! Done :heavy_check_mark:
I updated it to drop support for Python 3.6 and tweaked the types and configs so everything is passing now (in a PR to my local repo to be able to trigger CI tests). :tada:
Awesome ! Thank you again :)