odmantic icon indicating copy to clipboard operation
odmantic copied to clipboard

✨ Upgrade types and add support for instance autocompletion with dataclass_transform (VS Code autocompletion), drop support for Python 3.6

Open tiangolo opened this issue 2 years ago • 2 comments

✨ 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. 🤦

tiangolo avatar Jun 16 '22 18:06 tiangolo

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.

art049 avatar Jul 05 '22 18:07 art049

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:

tiangolo avatar Jul 13 '22 12:07 tiangolo

Awesome ! Thank you again :)

art049 avatar Aug 12 '22 16:08 art049