-
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
False positive HypothesisDeprecationWarning #595
Comments
👍 We should definitely support enums here. Thanks for the report. |
It seems enums are Also dicts and hashes should be okay for 3.6+ and PyPy? |
Hmm. That's true actually, yeah. I guess we need a much more refined check for stable ordering. |
The ironic thing is that I spent quite a lot of time telling @Zac-HD we shouldn't be clever about this. 😜 I think being clever about certain concrete collection types might be OK though. |
As a side note, we introduced this deprecation in (I think) 3.7.1, which was naughty of us. We shouldn't introduce deprecation warnings in patch releases. ETA: I say "us" I really mean "me" here. But now we're on one release per change it becomes us in future. |
We definitely shouldn't introduce them without a changelog entry (at least, not one that I can see). |
Yeah, mea culpa. I did a very bad job of assembling the changelog entry for 3.7.1. But that problem has been fixed by the new release process, while deprecations in patch releases is a thing we've not yet pinned down a fix for (something to add to the review guide). |
The main idea was to only support things where the iteration order is stable between runs. Enums definitely count, but dict iteration order is still implementation-dependent. I can add that pretty easily, but... @DRMacIver, I already have four patches in the queue waiting for review, and dealing with merge issues in the changelog is pretty tedious when I rebase and then go back to waiting. I've just added this to the tiny fix in #620, but do you mind reviewing that, #613, and #508 so I can integrate them? |
Just upgraded to Hypothesis 3.8.2, and I'm getting the following warning:
It's a great warning but I think I'm getting a false positive:
According to https://docs.python.org/3/library/enum.html, "Enumerations support iteration, in definition order", so this should be fine, right?
The text was updated successfully, but these errors were encountered: