filesystem_spec
filesystem_spec copied to clipboard
Add ftptls
See #1580.
It is basically a copy of the FTP class in fsspec, with a modification to use FTP_TLS and one addtional change.
Please have a look at this.
I've added tests (mostly copied from test_ftp.py, not all are yet working. Could use some help here :)
Thanks for contributing!
Before going further, do you think it's possible to provide the extra features as options on the original FTP filesystem rather than create a new variant that is largely the same?
No worries, in a sense we could give two additional arguments on the init of FTPFileSystem:
- ssl=False
- prot_p=False
Then we could modify the _connect to use either FTP or TLS_FTP and modify the init to activate prot_p if it's equal to True after setting the connection.
How does this sound to you?
Yes, exactly.
For testing, you would need a secured server, of course, but you could essentially run all FTP tests with standard and secure servers.
I've removed the the ftp_tls
class and integrated it with the ftp
class. Two tests are currently still failing: the test with caching (test_complex) and the test with transaction (test_transaction), not sure how to fix those?
Ping: is this PR still progressing?
Thanks for the reminder, so far I've not had the time to further implement the tests.
I've found some time to update the tests. The pyftpdlib server has been replaced with script that starts a pyftpdlib server that accepts TLS. Furtermore, docstrings and codestyle improvements have been made.
@martindurant: Do you understand why the CI / downstream fails?
Do you understand why the CI / downstream fails
Please merge from master and try again
All checks have passed :)