-
Notifications
You must be signed in to change notification settings - Fork 43
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
v0.2.2 breaks SMBFilesystem #217
Comments
I appear I can fix this behaviour by implementing a very simple subclass that returns an absolute path: class SMBPath(UPath):
@property
def path(self):
return "/" + super().path The docs from ffspec mention that:
Which sounds like interpreting every path as absolute should be the default behaviour. Should I maybe file a bug with fsspec instead? |
The fact that it worked with a previous version of UPath suggests that it's a UPath bug which got introduced during the refactor. Ideally we would add a SMBPath implementation to UPath to be able to give more guarantees for all the path methods. I'm on holiday until the end of May and will then try to find some time to work on setting this up. We would need to implement an SMBPath subclass and the test fixtures to run the base test suite against it. |
Sorry, just saw your comment. Thank you for offering to contribute! You would have to create tests in upath/tests/implementations/test_smb.py which requires you to write a fixture that sets up the smb filesystem via a docker container. There is code in the fsspec/filesystem_spec repository that does this. You would then put your minimal implementation in upath/implementations/smb.py and add an entry pointing at your new class into upath/registry.py This should allow you to run the test suite against your class and make adjustments for various edge cases. Cheers, |
Hi, we have the same problem with an sftp-based filesystem: path = UPath("ssh://myserver.mydomain.com/home/user1/Documents/hello.txt")
print(path.path)
'home/user1/Documents/hello.txt' ie the first |
hi, we are using upath to access an smb share. Unfortunately v0.2.2 broke the functionality.
It appears that the url components are somehow not passed on correctly.
E.g.
UPath("smb://server.com/share/folder/file.csv")
will result in
Edit: I would be happy and try to contribute a basic SMB implementation, is there any guide or example I can follow?
The text was updated successfully, but these errors were encountered: