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.
When using pydantic versions greater than
2.10.6, test coverage fails in the functionsget_request_modelandget_response_model. This issue is validated in the testtest_get_request_model_invalid_types.The root cause appears to be that
if issubclass(model_type, BaseModel)no longer raises aTypeErrorin newer versions of pydantic, whereas it did in version2.10.6and earlier.A possible explanation is that newer versions of pydantic have changed how
issubclassbehaves. 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
2.10.6.Next Steps
issubclasswith newer versions of pydantic.pydantic==2.10.6.