Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 7 commits into from
Aug 12, 2022

Conversation

tiangolo
Copy link
Collaborator

@tiangolo tiangolo commented Jun 16, 2022

✨ Upgrade types and add support for instance autocompletion with dataclass_transform (VS Code autocompletion).

This is more or less the same as: #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. 🤦

@art049
Copy link
Owner

art049 commented Jul 5, 2022

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 pydantic/pydantic#3605 as well.
It makes some sense to drop it in odmantic also IMO since there aren't that many 3.6 downloads.

@tiangolo tiangolo changed the title ✨ Upgrade types and add support for instance autocompletion with dataclass_transform (VS Code autocompletion) ✨ Upgrade types and add support for instance autocompletion with dataclass_transform (VS Code autocompletion), drop support for Python 3.6 Jul 13, 2022
@tiangolo
Copy link
Collaborator Author

Awesome! Done ✔️

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). 🎉

@art049
Copy link
Owner

art049 commented Aug 12, 2022

Awesome ! Thank you again :)

@art049 art049 merged commit b93dc4f into art049:master Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants