Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This restores compatibility more or less with the old path() approach that supports directly running `with x as f: do_stuff(f)`. There is no more need to use as_file() by hand every time you need to have a file. Namespace packages are TODO. But currently they are half-broken anyway, in the sense that namespace packages do not support being inside zip files unless you use pkg_resources style and importlib_resources does not support this anyway. We specifically go to efforts to ensure that the return value of files() is still usable as-is, representing an isinstance()-compatible pathlib.Path or zipfile.Path. We do this by replacing it at the last second with a subclass that adds the context manager magic.
- Loading branch information