Skip to content

Test Coverage Fails with pydantic > 2.10.6 #167

@gmorales96

Description

@gmorales96

When using pydantic versions greater than 2.10.6, test coverage fails in the functions get_request_model and get_response_model. This issue is validated in the test test_get_request_model_invalid_types.

The root cause appears to be that if issubclass(model_type, BaseModel) no longer raises a TypeError in newer versions of pydantic, whereas it did in version 2.10.6 and earlier.

A possible explanation is that newer versions of pydantic have changed how issubclass behaves. We need to investigate whether this behavior is consistent and apply the necessary modifications to avoid pinning the pydantic version while maintaining full test coverage.

Steps to Reproduce

  • Use pydantic > 2.10.6.
  • Run the test suite.
  • Observe the coverage

Next Steps

  • Investigate the behavior of issubclass with newer versions of pydantic.
  • Determine whether this is an intended change or a bug.
  • Implement necessary adjustments to ensure compatibility with newer versions without pinning pydantic==2.10.6.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions