Skip to content

An error from pydantic show up on import #113

@okolawol

Description

@okolawol

What is the issue?

after installing the new version last week the compass import is now broken:
cohere_compass.clients.compass import CompassClient

here's the full trace

  File "/Users/Desktop/LEO0/aidenlumi-benchmarks/benchmarks/utils/compass_api.py", line 5, in <module>

    from cohere_compass.clients.compass import CompassClient

  File "/Users/.pyenv/versions/aiden-lumi-bench-venv/lib/python3.10/site-packages/cohere_compass/__init__.py", line 10, in <module>

    from cohere_compass.models import (

  File "/Users/.pyenv/versions/aiden-lumi-bench-venv/lib/python3.10/site-packages/cohere_compass/models/__init__.py", line 7, in <module>

    class ValidatedModel(BaseModel):

  File "/Users/.pyenv/versions/aiden-lumi-bench-venv/lib/python3.10/site-packages/pydantic/_internal/_model_construction.py", line 237, in __new__

    complete_model_class(

  File "/Users/.pyenv/versions/aiden-lumi-bench-venv/lib/python3.10/site-packages/pydantic/_internal/_model_construction.py", line 597, in complete_model_class

    schema = gen_schema.generate_schema(cls)

  File "/Users/.pyenv/versions/aiden-lumi-bench-venv/lib/python3.10/site-packages/pydantic/_internal/_generate_schema.py", line 706, in generate_schema

    schema = self._generate_schema_inner(obj)

  File "/Users/.pyenv/versions/aiden-lumi-bench-venv/lib/python3.10/site-packages/pydantic/_internal/_generate_schema.py", line 984, in _generate_schema_inner

    return self._model_schema(obj)

  File "/Users/.pyenv/versions/aiden-lumi-bench-venv/lib/python3.10/site-packages/pydantic/_internal/_generate_schema.py", line 816, in _model_schema

    fields_schema: core_schema.CoreSchema = core_schema.model_fields_schema(

TypeError: model_fields_schema() got an unexpected keyword argument 'extras_keys_schema'

TypeError: model_fields_schema() got an unexpected keyword argument 'extras_keys_schema'
seems to be an invalid pydantic type check. Type definitions need to be updated maybe?

Additional information

I believe it's an issue with the newest pydantic version 2.11.3

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions