Skip to content
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

Latest version of fs(2.0.0a1) breaks the compatibility #130

Open
spirosdelviniotis opened this issue Oct 24, 2016 · 3 comments
Open

Latest version of fs(2.0.0a1) breaks the compatibility #130

spirosdelviniotis opened this issue Oct 24, 2016 · 3 comments

Comments

@spirosdelviniotis
Copy link
Contributor

spirosdelviniotis commented Oct 24, 2016

After running inspire-next on travis-ci (https://travis-ci.org/inspirehep/inspire-next/jobs/170102212) we found that the latest fs module version(2.0.0a1) breaks the api that this module uses.

For example there is no opener but Opener and some of the errors were renamed, for example DirectoryNotEmptyError to DirectoryNotEmpty.

@jirikuncar
Copy link
Member

jirikuncar commented Oct 24, 2016

fs>=2.0.0a1 looks like rewrite from scratch: https://github.com/PyFilesystem/pyfilesystem2 We should probably pin the dependency until we figure out the status.

jirikuncar pushed a commit that referenced this issue Oct 25, 2016
* Limits version of PyFileSystem to `fs>=0.5.4,<2.0`.
  (addresses #130)

Signed-off-by: Spiros Delviniotis <[email protected]>
@david-caro david-caro changed the title Latest version of fs(2.0.0a1) brakes the compatibility Latest version of fs(2.0.0a1) breaks the compatibility Nov 30, 2017
@david-caro
Copy link
Member

@lnielsen I had a quick look at this, it seems that at least one functionality we are depending on has changed, there's no way to remove the root directory of a fs instance anymore:
https://github.com/PyFilesystem/pyfilesystem2/blob/7e5d556b5c760a0d61ec679cf80081189053b4d7/fs/osfs.py#L325

and we are doing it here:
https://github.com/inveniosoftware/invenio-files-rest/blob/master/invenio_files_rest/storage/pyfs.py#L85

There's no such check for other types of filesystems, like eos for example:
https://github.com/inveniosoftware/xrootdpyfs/blob/master/xrootdpyfs/fs.py#L319

Should it then check specifically if it's OSFS and try to remove it with os directly in that case? It clearly looks like the intention is to avoid removing the roof of the filesystem, maybe we should not try to do that then? But that might create lots of empty dirs (as we create them with the create flag when creating the filesystem, but can't remove them after...).
wdyt?

@lnielsen
Copy link
Member

I don't know if v0.5 and v2 can be install at the same time - if they both can be installed, we might just do a class PyFS2FileStorage(PyFSFileStorage) class that fixes this specific isssue we have.

My main concern for upgrading to pyfilesystem2 is however inveniosoftware/xrootdpyfs which likely have quite a lot of fixes.

@lnielsen lnielsen added this to the someday milestone Feb 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants