-
Notifications
You must be signed in to change notification settings - Fork 910
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
Added smb protocol with test #782
Added smb protocol with test #782
Conversation
It appears the unit tests are failing because they are timing out and the docs_linkcheck is failing because of some url on documentation about AWS that no longer exists. Please let me know if you have any questions. thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great to me, thank you for your contribution @lucasjamar! I'm not very familiar with these protocols so will try and get some people who are more familiar to take a look.
Please could you explain to a dummy why the whole username:password@myhost:8080
get passed as a path here when it doesn't for s3 etc.?
We're fixing the broken link in a different PR already so don't worry about it - when it's merged to master you can update this PR and it should fix it. And the unit tests timing out is probably just a random error, so re-rerunning the job (which will happen if you do another commit) will probably fix it. So probably nothing to worry about here 🙂 |
Co-authored-by: Antony Milne <49395058+AntonyMilneQB@users.noreply.github.com>
To follow-up on your question @AntonyMilneQB , id be interested to know why the host and port are ignored for hdfs if someone knows the answer. I would have thought these are important pieces of information. |
@lucasjamar @AntonyMilneQB @lorenabalan I think generally our strategy when parsing filepath and instantiate the underlying
When we instantiate What I'd suggest is maybe looking into why you need to specify a dummy url and fix that instead so you can write:
|
Thank you very much for this @limdauto! Super helpful 👍 Just for completeness, when I was looking to this earlier I also found the original commit where we moved from fsspec's |
@limdauto Thanks a lot for the helpful answer! As mentioned in an earlier comment, |
@lucasjamar so I think in this case In [2]: _parse_filepath("smb:///test-path")
Out[2]: {'protocol': 'smb', 'path': '/test-path'} This is consistent with how urllib treats In [5]: urlsplit("file:///foo")
Out[5]: SplitResult(scheme='file', netloc='', path='/foo', query='', fragment='')
In [6]: urlsplit("file://foo")
Out[6]: SplitResult(scheme='file', netloc='foo', path='', query='', fragment='') |
Amazing, thanks very much @limdauto. @lucasjamar I think this means we don't need this PR any more? |
This solves #765
Description
Added else for filesystems that contain "netloc" but are not cloud protocols.
Development notes
Added a simple test to ensure the username, password, host and port are returned in the path of smb files
Checklist
RELEASE.md
fileNotice
I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":
I submit this contribution under the Apache 2.0 license and represent that I am entitled to do so on behalf of myself, my employer, or relevant third parties, as applicable.
I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorised to submit this contribution on behalf of the original creator(s) or their licensees.
I certify that the use of this contribution as authorised by the Apache 2.0 license does not violate the intellectual property rights of anyone else.