-
Notifications
You must be signed in to change notification settings - Fork 588
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
Banning non runtime type in from_type #3331
Banning non runtime type in from_type #3331
Conversation
@Zac-HD I think I would like your review now, the rest of the failed tests are parallelization issues (ERROR collecting gw1) Please kindly guide me to solve the issue and any refactoring if needed. |
Ah-ha, got it: the problem is that @pytest.mark.parametrize("non_runtime_type", sorted(NON_RUNTIME_TYPES, key=lambda t: t.__name__)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really nice Cheuk - thanks again!
The only problem is that they don't have |
@Zac-HD pytest in 3.11 is doing something "interesting" here, the raises gives something internal again: https://github.com/HypothesisWorks/hypothesis/runs/6325869719?check_suite_focus=true#step:6:880 |
Hmm, I'd guess that this is a real behavior difference under Python 3.11 due to some internal change to But otherwise we're looking ready to merge! |
I love investigations and will give you an update. Then we will see what is
the next step (fixing this behavior or merge and open new issue for it)
will let you know what I find.
…On Fri, 6 May 2022 at 18:59, Zac Hatfield-Dodds ***@***.***> wrote:
Hmm, I'd guess that this is a real behavior difference under Python 3.11
due to some internal change to Concatenate (this was *really* common up
until 3.9 or so, and we *are* looking at internal APIs). No particular
advice beyond "open a repl or debugger each in 3.10 and 3.11, and step
through the logic until you see what's different".
But otherwise we're looking ready to merge!
—
Reply to this email directly, view it on GitHub
<#3331 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG3N26JSNHSUVEINEIXX4J3VIVMZZANCNFSM5U4U7CVQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
@Zac-HD On a 2nd thought, this discrepancy is so similar to the one we found in python/cpython#92118 maybe it will get fixed in the next release |
Makes sense - I'm planning to update our CI for beta1 tomorrow, and will rebase your PR on top of those changes then 👍 |
Just so you know 3.11.0-beta 1 is out :-) |
Yep, and |
Co-authored-by: Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com>
Co-authored-by: Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com>
83e939c
to
87a9059
Compare
Only keep the explicit names we want to refer to later
We also want to check that this works without typing_extensions installed, and on Python versions where we don't try that dependency.
Putting both lambdas on the same line allows our introspection to recover the function body, and here we are.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woohoo!
I ended up breaking a few things myself while refactoring, but this all looks good and ready to go 🚀
Banning the non-runtime types in from_type. See #2978 and #3280 for more detail.