-
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
Fix PermissionError
for inaccessible database path
#3924
Fix PermissionError
for inaccessible database path
#3924
Conversation
DirectoryBasedExampleDatabase.__init__() cast path to Path
Should I move the permission database tests to |
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.
Tests look good, let's move them to cover/ so that we don't need the pragma. Implementation also looks good though I'd put it into the existing function - see below.
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.
Nice work! I've cherry-picked in our weekly dependency update, since you'd already grabbed the new CPython alpha 🙂
Looks like I underestimated how tricky the edge cases here would be - I think I've got it now; the idea is that we error out if the user has explicitly asked for a directory-based DB, but do the fallback logic if the type of DB was never specific. |
we only ever run the optimizer if there have been target_observations, and so we can save both time and memory if we don't populate the frontier with buffers that are never interesting.
Yes, that is the idea. Also, if an explicit path is given instead of |
I don't want to do that - if the user has given us a path, we should either use it or error. Falling back to an in-memory DB is equivalent to silently deleting the database at the end of their session, which would be a pretty nasty surprise. |
I missed the change when you removed |
This PR was interesting. Thank you again for your help. |
My pleasure 🙂 It looks like the remaining CI issues are just flaky tests, so I expect we'll merge on retry. |
What do you usually do when you encounter flaky tests in CI? |
Some combination of "hit the retry button" (since I have maintainer permissions to do that), and opening an issue to make the test not flaky. Generally our tests are solid, but the sheer number of changes happening for #3921 have raised the baseline a bit lately 😢 |
PermissionError
when Hypothesis database dir path is not accessible #3764