Skip to content

fix: model_fields attribute access warning in connector.py #527

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Fixemega
Copy link

@Fixemega Fixemega commented Jun 2, 2025

Fixed warning about model_fields access being deprecated on Pydantic v2.11+ in connector.py by accessing it through the model class using __class__.

Example warning:

../../unstructured_ingest/interfaces/connector.py:35
PydanticDeprecatedSince211: Accessing the 'model_fields' attribute on the instance is deprecated.
Instead, you should access this attribute from the model class.
Deprecated in Pydantic V2.11 to be removed in V3.0.
    access_config_type = self.model_fields["access_config"].annotation

@Fixemega Fixemega changed the title Fixed model_fields attribute access warning in connector.py fix: model_fields attribute access warning in connector.py Jun 4, 2025
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

Successfully merging this pull request may close these issues.

1 participant