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

Pydantic 2.0 Upgrade #253

Open
robcxyz opened this issue Jan 1, 2024 · 0 comments
Open

Pydantic 2.0 Upgrade #253

robcxyz opened this issue Jan 1, 2024 · 0 comments
Labels
implemented proposal Proposal for changes in syntax / behaviour

Comments

@robcxyz
Copy link
Collaborator

robcxyz commented Jan 1, 2024

Pydantic 2.0 Upgrade

Upgrade to pydantic version 2.0

Overview

  • Custom Field

    • Need to create new Field object poc

    • Added fields

      • arg_num

      • render_by_default

      • visible

      • hidden

    • Could also strongly type the field which would be very helpful.

      • This should not work but it does. Should have error as the bar: baz is discarded
  • New Config

  • Replace __fields__

    • model_config
Schema<-:

  foo:

    type: str

    default: bar

    bar: baz



success->: Schema
  • create_model

    • ok
  • ModelMetaclass

  • ConfigError

  • smart_union

    • TypeError: GenerateHook.init_subclass() takes no keyword arguments
@robcxyz robcxyz changed the title tmp Pydantic 2.0 Upgrade Jan 1, 2024
@robcxyz robcxyz added proposal Proposal for changes in syntax / behaviour implemented labels Jan 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
implemented proposal Proposal for changes in syntax / behaviour
Projects
None yet
Development

No branches or pull requests

1 participant