It appears the use of __file__ here is mostly unnecessary, or could be replaced with importlib.resources/pkgutil. See indygreg/PyOxidizer#69 for more info about why, but the tl;dr version is __file__ is an optional attribute and should not be relied upon.
At the moment, import hypothesis fails on any Python runtime that doesnt attach __file__ to hypothesisor doesnt attach __file__ to os.
As show there, ROOT and STDLIB are unused within the main runtime code.
If they are needed elsewhere, the definitions should be moved closer to the need, so that at least the top level import hypothesis works.
Loading of tlds-alpha-by-domain.txt should ideally be done using importlib.resources and backport ``importlib_resources, however pkgutil` could be used to avoid the need for the backport. Using `pkgutil` would mean hypothesis doesn't work under PyOxidizer 0.4, however I expect that will be fixed soon.
The text was updated successfully, but these errors were encountered: