Skip to content
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

fix main.BaseModel.(dict, json) fields types #4293

Merged
merged 2 commits into from
Aug 9, 2022

Conversation

shestakovich
Copy link
Contributor

@shestakovich shestakovich commented Jul 28, 2022

fix main.BaseModel.dict fields (include, exclude, skip_defaults) types
fix main.BaseModel.json fields (include, exclude, skip_defaults) types

Change Summary

Related issue number

Checklist

  • Unit tests for the changes exist
  • Tests pass on CI and coverage remains at 100%
  • Documentation reflects the changes where applicable
  • changes/<pull request or issue id>-<github username>.md file added describing change
    (see changes/README.md for details)
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

fix main.BaseModel.dict fields (include, exclude, skip_defaults) types
fix main.BaseModel.json fields (include, exclude, skip_defaults) types
@shestakovich
Copy link
Contributor Author

please review

@hramezani
Copy link
Member

Thanks @shestakovich for the patch 👍
Please update the patch and fix the same problem in the main.BaseModel.copy and main.BaseModel._iter functions:

https://github.com/samuelcolvin/pydantic/blob/5606157105d53c1ac4e9e29fd0cee5e04bb74e42/pydantic/main.py#L620-L627

https://github.com/samuelcolvin/pydantic/blob/5606157105d53c1ac4e9e29fd0cee5e04bb74e42/pydantic/main.py#L798-L807

fix types for BaseModel.copy fields: include, exclude, update
BaseModel._iter fields: include, exclude
@samuelcolvin
Copy link
Member

please update.

@hramezani
Copy link
Member

@samuelcolvin I think it's ready to merge. What are you waiting for here?

@samuelcolvin
Copy link
Member

Sorry, I hadn't seen the update, I'll review. please review.

@samuelcolvin samuelcolvin merged commit f41ac92 into pydantic:master Aug 9, 2022
@samuelcolvin
Copy link
Member

thanks so much for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants