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

fix(minor): adjust _SchemaConfig class to use literal values and not pydantic.config.Extra #87

Open
sfc-gh-twhite opened this issue Dec 10, 2024 · 1 comment

Comments

@sfc-gh-twhite
Copy link
Collaborator

When running the tests, we're getting a few deprecation warnings. This one seems like low-hanging fruit.

agent_gateway/tools/base.py:58
orchestration-framework/agent_gateway/tools/base.py:58: PydanticDeprecatedSince20: `pydantic.config.Extra` is deprecated, use literal values instead (e.g. `extra='allow'`). Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.10/migration/
    extra: Any = Extra.forbid

This is where it's raising the deprecation warning at:

class _SchemaConfig:
"""Configuration for the pydantic model."""
extra: Any = Extra.forbid
arbitrary_types_allowed: bool = True

@sfc-gh-twhite
Copy link
Collaborator Author

I think that this needs to become:

class _SchemaConfig:
    """Configuration for the pydantic model."""

    extra: str = "forbid"
    arbitrary_types_allowed: bool = True

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

No branches or pull requests

1 participant