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

chore: relax pydantic requirements #390

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

djs0109
Copy link
Contributor

@djs0109 djs0109 commented Feb 12, 2025

closes #387

@djs0109
Copy link
Contributor Author

djs0109 commented Feb 12, 2025

There is an update of the create_model since pydantic 2.8 (https://github.com/pydantic/pydantic/releases/tag/v2.8.0), which break the fucntion create_context_entity_model in filip. We need to make sure after the dependency relax, our codes work for both pydantic <2.8 and ==2.8

@tstorek
Copy link
Collaborator

tstorek commented Feb 14, 2025

@djs0109 Could you please elaborate on the error. I am pretty packed right now, but maybe we can check next week.
From a quick glance the type-hint should not impact the model creation. Most likely it is only a small thing. :)

@djs0109
Copy link
Contributor Author

djs0109 commented Feb 18, 2025

In pydantic 2.8 They changed

def create_model(  # noqa: C901
    __model_name: str,
    *,
...

to

def create_model(  # noqa: C901
    model_name: str,
    *,
...

So I have to change to use a positional argument to pass the model_name. It is not the most elegant solution, but it should work

@djs0109 djs0109 requested a review from tstorek February 19, 2025 08:11
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.

Update dependencies
2 participants