OpenBB-finance / OpenBB

Investment Research for Everyone, Everywhere.
https://openbb.co
Other
31.83k stars 2.9k forks source link

[BugFix] `__fields__` is deprecated, use `model_fields` instead #6629

Closed deeleeramone closed 1 month ago

deeleeramone commented 1 month ago
  1. Why?:

    • Instances where Pydantic syntax has not been updated for V2.
PydanticDeprecatedSince20: The `__fields__` attribute is deprecated, use `model_fields` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.8/migration/
- Warning is raised when using `pytest` with provider fetchers.
  1. What?:

    • Use model_fields instead of __fields__.
      • fetcher.py
      • commands.py
  2. Impact:

    • Resolves the warning.
  3. Testing Done:

    • Recording a provider fetcher test, warning no longer being broadcast.