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

Migration to Pydantic 2 #83

Open
7 tasks
apirogov opened this issue Aug 24, 2023 · 0 comments
Open
7 tasks

Migration to Pydantic 2 #83

apirogov opened this issue Aug 24, 2023 · 0 comments
Labels
enhancement New feature or request prio:B

Comments

@apirogov
Copy link
Collaborator

apirogov commented Aug 24, 2023

Pydantic 2 has many breaking changes, but migration to it might remove the need for much of the custom hacks that metador_core includes + increase speed. This will take some time and needs thinking through what must be touched.

  • Remove custom decorator-based serializer system in favor of the new modular functional serialization
  • Remove or adjust the custom parser system in favor of the new modular functional validators (question: would the Model to Model conversion work with that correctly?)
  • Remove custom Strict aliases and use new strict mode by default (i.e. no number/bool coercion)

Lots of internal type-hint plumbing must be fixed, affecting

  • dynamic creation of Partial Schemas (i.e. foundation of the harvesters), that must be re-engineered
  • dynamic introspection of schemas (because model internals have been renamed or removed or refactored)
  • custom metaclass magic (on which the whole schema system is based)

Furthermore, it might be time to

  • remove the unused code of the custom and broken json schema generation and check out capabilities of the new default schema generation
@apirogov apirogov added the enhancement New feature or request label Aug 24, 2023
@github-actions github-actions bot added the triage Freshly opened or reopened issue label Aug 24, 2023
@apirogov apirogov added prio:B and removed triage Freshly opened or reopened issue labels Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request prio:B
Projects
None yet
Development

No branches or pull requests

1 participant