-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
more conservative promote_rule
for Pair
and Some
#58836
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
base: master
Are you sure you want to change the base?
Conversation
I am OK with the promote_rule change; it doesn't make much sense for Pair to be different from Tuple here. I don't see the need for the other check though. While Dict needs this check, there's no reason Pair itself does, and changing the promote rule makes it less likely the type of a Pair will change unpredictably. I guess the argument for doing the check is that if |
promote_rule
for Pair
ok, makes sense. I am categorically a proponent of lossless conversion and error otherwise --- but no need to bundle that with the |
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
Actually the right fix here is probably to just delete the method. To really make it work like |
what should similarly: for |
Very good catch. The
If we remove this promote_rule method like I want to, that second case actually becomes an error |
Data point: |
the current state of the PR would leave all |
related-ish #16419 |
Triage wants this but we still need a package eval. |
promote_rule
for Pairpromote_rule
for Pair
and Some
@nanosoldier |
The package evaluation job you requested has completed - possible new issues were detected. Report summary❗ Packages that crashed3 packages crashed only on the current version.
1 packages crashed on the previous version too. ✖ Packages that failed16 packages failed only on the current version.
1531 packages failed on the previous version too. ✔ Packages that passed tests13 packages passed tests only on the current version.
5209 packages passed tests on the previous version too. ~ Packages that at least loaded4 packages successfully loaded only on the current version.
3023 packages successfully loaded on the previous version too. ➖ Packages that were skipped altogether904 packages were skipped on the previous version too. |
I created issues for the flagged failures. the remaining |
closes #47704 which contains some painful examples
to quote @mbauman
copies also the defensiveconvert
that exists forDict
as observed here #12187 (comment)