Remove PyFilesystem2 dependency @W-21244194#3923
Conversation
|
@robertbwatson This doesn't look related to the pkg_resources namespace package that is the problem in #3907 |
Are you sure? The dependency using pkg_resources is PyFileSystem2, so removing that dependency will solve the issue, won't it? Here's my stack trace: The crash happens in |
|
@BrandonEnclude Oh, I see. I was remembering that cumulusci.tasks was also a pkg_resources namespace package, but it looks like that was updated several years ago. So this could help, as long as there are not other dependency packages with the same problem. |
This commit removes `PyFilesystem2`. Importing `fs` emits a `pkg_resources` deprecation warning (see [pyfilesystem2#597](PyFilesystem/pyfilesystem2#597)). There are also open questions about the project’s maintenance status (see [pyfilesystem2#571](PyFilesystem/pyfilesystem2#571)). As far as I can tell, CumulusCI only relied on a small, local subset of functionality. That subset maps cleanly to Python’s standard library. This commit introduces a local-only `FSResource` and `open_fs_resource` implemented with `pathlib`, `os`, and `shutil`. `file://` URLs are supported for absolute and relative paths, and non-file schemes are rejected. All `fs` imports were removed and tests updated to expect `FileExistsError` instead of `fs.errors.DirectoryExists`.
93f7eb4 to
118a6e7
Compare
|
This needs to get merged like, last week. |
|
@vsbharath You still have write access to this repo. Can you review this PR? |
This PR removes
PyFilesystem2. Importingfsemits apkg_resourcesdeprecation warning (seepyfilesystem2#597). There are also open questions about the project’s maintenance status (see
pyfilesystem2#571). As far as I can tell, CumulusCI only relied on a small, local subset of functionality. That subset maps cleanly to Python’s standard library.
This PR introduces a local-only
FSResourceandopen_fs_resourceimplemented withpathlib,os, andshutil.file://URLs are supported for absolute and relative paths, and non-file schemes are rejected. Allfsimports were removed and tests updated to expectFileExistsErrorinstead offs.errors.DirectoryExists.