-
-
Notifications
You must be signed in to change notification settings - Fork 143
fix(deps): hypothesis update and text, refs #2262 #2263
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
Conversation
Codecov Report
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (82ef3ef) to head (c2edebb).
Additional details and impacted files
@@ Coverage Diff @@ ## master #2263 +/- ## ========================================== Coverage 100.00% 100.00% ========================================== Files 80 81 +1 Lines 2485 2581 +96 Branches 437 44 -393 ========================================== + Hits 2485 2581 +96
☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.
🚀 New features to boost your workflow:
- ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
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.
The question is: does this function actually return None? Or is it a repr bug?
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.
weirder and weirder
>>> from hypothesis.internal.lambda_sources import lambda_description >>> lambda_description(lambda *args, **kwargs: None) 'lambda *args, **kwargs: None' >>> lambda_description(lambda *args: None) 'lambda *args: <unknown>' >>> lambda_description(lambda: None) 'lambda: <unknown>'
I keep looking
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.
Looks like the repr of lambdas was changed in HypothesisWorks/hypothesis#4500. Afaics, they used to always use <unknown>, but now they refine the lambda body string where possible. I think this should be a harmless change for us.
(Found this via the changelog for 6.137.3
This patch makes the stringification of lambdas, and as a result
certain automatic filter rewriting operations, more robust. This fixes
issue https://github.com/HypothesisWorks/hypothesis/issues/4498, where a lambda was mistakenly identified as the identity
operator due to "inspect.getsource()" only returning the first line of
the lambda definition.
As a result, the "repr" of strategies filtered or mapped by lambda
functions may change slightly.
)
I have made things!
@pradeep90 hey! Your code is broken :) Can you validate it?
In hypothesis==6.137.2, this code produced the following output:
Whereas in hypothesis==6.140.2, the output is already:
So this is indeed a direct change in the library itself.
Checklist
CHANGELOG.mdRelated issues
Refs #2262
🙏 Please, if you or your company finds
dry-pythonvaluable, help us sustain the project by sponsoring it transparently on https://github.com/sponsors/dry-python. As a thank you, your profile/company logo will be added to our main README which receives hundreds of unique visitors per day.