Skip to content

Update Python SDK to correctly support Pydantic v1 and v2 #89

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

Merged
merged 2 commits into from
Jun 21, 2024

Conversation

fern-api[bot]
Copy link
Contributor

@fern-api fern-api bot commented Jun 20, 2024

This PR regenerates code to match the latest API Definition.

@fern-api fern-api bot requested a review from a team as a code owner June 20, 2024 22:19
@fern-api fern-api bot requested a review from rmkonnur June 20, 2024 22:19
@rmkonnur rmkonnur changed the title 🌿 Fern Regeneration -- June 20, 2024 Update Python SDK to correctly support Pydantic v1 and v2 Jun 20, 2024
Comment on lines 40 to +41
name = "certifi"
version = "2024.2.2"
version = "2024.6.2"
Copy link

Choose a reason for hiding this comment

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

Legal Risk:
certifi 2024.6.2 was released under the MPL-2.0 license, a license that has been flagged by your organization for consideration

Recommendation:
While merging is not directly blocked, it's best to pause and consider what it means to use this license before continuing. If you are unsure, reach out to your security team or Semgrep admin to address this issue.

@rmkonnur rmkonnur merged commit 6ceae34 into main Jun 21, 2024
4 checks passed
@lucasgadams
Copy link

Hey it looks like the models are now being generated with extra = pydantic_v1.Extra.forbid. I am pretty sure the default is extra='ignore'. So this is a very big change and seems to have broken various models like filestoreage PermissionRequest


class Config:
frozen = True
smart_union = True
extra = pydantic_v1.Extra.forbid

Choose a reason for hiding this comment

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

This model is broken by changing this to forbid. I think the default should be ignore. There are fields returned that are not properly mapped in this model like created_at, ect.

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