`PermissionError` when Hypothesis database dir path is not accessible
After this change, checking for whether the given location is usable may lead to PermissionError, if the location has e.g. 0o222 permissions. Previously, os.path.exists did not raise an exception there. Found out about it downstream in Schemathesis - I guess that the expected behavior for the cases when the directory is not accessible is to work with an in-memory database, but it does not happen due to PermissionError
I also noted that it only affects Linux in Schemathesis's test suite
I guess we should wrap a try: ... / except OSError: return False around https://github.com/HypothesisWorks/hypothesis/blob/5278b7cf4815857c0147389107060a8bf340d256/hypothesis-python/src/hypothesis/database.py#L47-L50
...and add a test for this specific case on Linux, too. I'll fix that this week, if you don't beat me to it.
I would like to take this on.