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

Replace trafaret with pydantic #165

Open
Dreamsorcerer opened this issue Aug 15, 2021 · 3 comments
Open

Replace trafaret with pydantic #165

Dreamsorcerer opened this issue Aug 15, 2021 · 3 comments

Comments

@Dreamsorcerer
Copy link
Member

It would probably a good idea to replace trafaret/trafaret-config with pydantic. Trafaret seems somewhat unmaintained and doesn't have any static typing support. Pydantic is likely a better option to use here.

@webknjaz
Copy link
Member

I wouldn't mind that, however, trafaret used to be very popular among the community the demos come from. So I'd maybe ping @Arfey / @Deepwalker to see what they think. And if they don't mind/respond in like a week, then it's okay to proceed.

@Deepwalker
Copy link

Trafaret is maintained. If I do not accept someones PRs it means that I do not think that they are ready to be merged.

About this examples – I did not write them. And I honestly think that pydantic version will be nice addition, as it is popular in community and has wide adoption.

@Dreamsorcerer
Copy link
Member Author

Thanks. The biggest issue is the support for static typing. I like the overall design of trafaret, but without the option to define things with type annotations or have any type safety from the outputs, that basically rules it out for me. We also heavily support static typing across the aio-libs projects, so it feels a bit weird to recommend a library that can easily result in removing a large chunk of type safety from the user's code.

I'd suggest for now, that we try out pydantic in the polls demo/tutorial to see how it looks (though I intend to look at sqlalchemy first in #161).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants