Skip to content

Use __config__ not model_config with create_model for pydatic 2.11 compatibility#181

Merged
rwb27 merged 1 commit into
mainfrom
create_model-config
Aug 26, 2025
Merged

Use __config__ not model_config with create_model for pydatic 2.11 compatibility#181
rwb27 merged 1 commit into
mainfrom
create_model-config

Conversation

@julianstirling
Copy link
Copy Markdown
Contributor

Pydantic 2.11 throws and error is model_config is used in create_model. The docs say to use __config__, this is tested to work with older pydantic too.

@julianstirling julianstirling changed the title Used __config__ not model_config with create_model for pydatic 2.11 compatibility Use __config__ not model_config with create_model for pydatic 2.11 compatibility Aug 26, 2025
@barecheck
Copy link
Copy Markdown

barecheck Bot commented Aug 26, 2025

Barecheck - Code coverage report

Total: 93.48%

Your code coverage diff: 0.00% ▴

Uncovered files and lines
FileLines
src/labthings_fastapi/utilities/introspection.py87, 97

Copy link
Copy Markdown
Collaborator

@rwb27 rwb27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very easy to approve! At some point I should figure out why this didn't show up in our test with unpinned dependencies.

@rwb27 rwb27 merged commit 67ef8aa into main Aug 26, 2025
14 checks passed
@rwb27 rwb27 deleted the create_model-config branch August 26, 2025 15:43
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.

2 participants