Skip to content

model_fields attribute deprecation warning with Pydantic 2.11 #107

Description

@kulnor

Greetings:
I'm using SemPyRO to serialize RDF for the DDI-CDI model.
I'm seeing the deprecation warning below with Pydantic 2.11.7
Let me know if you need assistance addressing this issue.
Thanks!

  /Users/pascal/.pyenv/versions/3.13.5/envs/dartfx13/lib/python3.13/site-packages/sempyro/rdf_model.py:193: PydanticDeprecatedSince211: Accessing the 'model_fields' attribute on the instance is deprecated. Instead, you should access this attribute from the model class. Deprecated in Pydantic V2.11 to be removed in V3.0.
    bind_namespace = self.model_fields[field].json_schema_extra.get(BIND_NAMESPACE_KEY)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions