8000 Remove warning for mutable default by dmontagu · Pull Request #594 · pydantic/pydantic-core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Remove warning for mutable default #594

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
May 5, 2023

Conversation

dmontagu
Copy link
Collaborator
@dmontagu dmontagu commented May 5, 2023

There was no test that failed when I deleted this code; I'm assuming it's okay if I don't add a test that it doesn't happen

Needed to rebuild, non-issue.

@lig
Copy link
Contributor
lig commented May 5, 2023

Well, there are tests failing now on CI. 🤷🏻‍♂️

@codspeed-hq
Copy link
codspeed-hq bot commented May 5, 2023

CodSpeed Performance Report

Merging #594 remove-mutable-default-warning (ea27203) will not alter performances.

Summary

🔥 0 improvements
❌ 0 regressions
✅ 114 untouched benchmarks

🆕 0 new benchmarks
⁉️ 0 dropped benchmarks

@dmontagu
Copy link
Collaborator Author
dmontagu commented May 5, 2023

Stupid — I didn't rebuild before running tests. So of course. I'll fix it

@lig
Copy link
Contributor
lig commented May 5, 2023

There is nothing to fix. You could just leave the warning where it is maybe? I'd rather keep the warning which in an edge case misses some info than remove it completely.

@codecov-commenter
Copy link

Codecov Report

Merging #594 (ea27203) into main (b396f93) will decrease coverage by 0.01%.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #594      +/-   ##
==========================================
- Coverage   94.17%   94.17%   -0.01%     
==========================================
  Files          96       96              
  Lines       13069    13064       -5     
  Branches       24       24              
==========================================
- Hits        12308    12303       -5     
  Misses        755      755              
  Partials        6        6              
Impacted Files Coverage Δ
src/validators/with_default.rs 98.14% <ø> (-0.09%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b396f93...ea27203. Read the comment docs.

@dmontagu
Copy link
Collaborator Author
dmontagu commented May 5, 2023

(We discussed on slack but just adding note here for posterity:)

The reason for removing the warning wasn't the bad error message — we concluded it was better behavior to not have this warning, because it will require a lot of code changes and forces users to go down code paths that are more likely to lead to confusion and/or bugs for non-advanced users.

@samuelcolvin samuelcolvin merged commit 493643e into main May 5, 2023
@samuelcolvin samuelcolvin deleted the remove-mutable-default-warning branch May 5, 2023 21:26
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.

4 participants
0