The Vortex codebase contains several references to file-like objects. For example in src/vortex/tools/systems.py:
|
def is_iofile(self, iocandidate): |
|
"""Check if actual **iocandidate** is a valid filename or io stream.""" |
|
return iocandidate is not None and ( |
|
(isinstance(iocandidate, str) and self.path.exists(iocandidate)) |
|
or isinstance(iocandidate, io.IOBase) |
|
or isinstance(iocandidate, io.BytesIO) |
|
or isinstance(iocandidate, io.StringIO) |
|
) |
and also in the tests:
|
ftpc = self.new_ftp_client() |
|
with self.assertRaises(RuntimeError): |
|
ftpc.pwd() |
|
ftpc.fastlogin(self.user, self.password, delayed=False) |
|
self.assertEqual(ftpc.logname, 'testlogin') |
|
with ftpc: |
|
self.assertEqual(ftpc.pwd(), '/') |
|
testdata = io.BytesIO() |
The goal of this ticket is to clarify the current status of this feature.
- Is support for file-like objects fully implemented?
- If so, what is the intended way to use it? Are there any examples or documentation?
- Is this functionality actually used in operational, or is it only present for tests or legacy reasons?
- If the implementation is incomplete, should it be completed or clean up the code by removing the feature?
The Vortex codebase contains several references to file-like objects. For example in
src/vortex/tools/systems.py:vortex/src/vortex/tools/systems.py
Lines 1647 to 1654 in cace380
and also in the tests:
vortex/tests/test_twistednet/test_ftpclient.py
Lines 53 to 60 in cace380
The goal of this ticket is to clarify the current status of this feature.