Skip to content

Fix compatibility with Pydantic 2.11 #1249

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

Closed
wants to merge 1 commit into from
Closed

Conversation

Viicos
Copy link
Member

@Viicos Viicos commented Mar 26, 2025

@@ -340,7 +340,7 @@ def _object_gen(self, schema: dict[str, Any]) -> dict[str, Any]:
add_prop_key += '_'
if addition_props is True:
data[add_prop_key] = self._char()
else:
elif addition_props is not False:
Copy link
Member Author

Choose a reason for hiding this comment

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

This is not strictly required but could fail at some point if not included.

Copy link

Docs Preview

commit: 8d8b6cf
Preview URL: https://996c4b46-pydantic-ai-previews.pydantic.workers.dev

@@ -397,6 +397,9 @@ def _get_python_type(cls, value: dict[str, Any]) -> str:
# 5) Object: Check for additionalProperties
if value_type == 'object':
additional_properties = value.get('additionalProperties', {})
if isinstance(additional_properties, bool):
Copy link
Member Author

Choose a reason for hiding this comment

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

To have coverage, we need to upgrade to 2.11. Can I upgrade to the latest beta in this PR?

@Viicos Viicos requested a review from Kludex March 26, 2025 16:05
@Viicos Viicos mentioned this pull request Mar 31, 2025
@Viicos
Copy link
Member Author

Viicos commented Apr 8, 2025

Will be handled in #1293.

@Viicos Viicos closed this Apr 8, 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