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

Consider vendoring pydantic into the pipeline repo #332

Closed
evansd opened this issue Sep 6, 2024 · 1 comment
Closed

Consider vendoring pydantic into the pipeline repo #332

evansd opened this issue Sep 6, 2024 · 1 comment

Comments

@evansd
Copy link
Contributor

evansd commented Sep 6, 2024

Pydantic v1 is no longer supported, and Pydantic v2 has compiled dependencies. This creates problems already described elsewhere:
opensafely-core/job-server#4557

And in this Slack thread:
https://bennettoxford.slack.com/archives/C069YDR4NCA/p1725547669768179

For a core, and relatively small, library like pipeline Pydantic is too heavyweight a dependency; so we should consider pure Python alternatives (whether third-party or home-rolled) to handle the relatively small amount of validation which pipeline involves.

In the short-term, the quickest way to remove the explicit dependency would be to vendor the pure Python version of Pydantic v1 into this repo.

We already have experience vendoring Python libraries in the opensafely-cli project so we can borrow workflows from there:
https://github.com/opensafely-core/opensafely-cli/blob/e9f7a44c1ea1ad55525e0d4c741447c2bb247eb7/DEVELOPERS.md#vendoring

@evansd
Copy link
Contributor Author

evansd commented Oct 3, 2024

Obviated by:

@evansd evansd closed this as completed Oct 3, 2024
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

No branches or pull requests

1 participant