[issue25458] ftplib: command response shift - mismatch

Giampaolo Rodola' report at bugs.python.org
Wed Dec 14 14:57:54 EST 2016


Giampaolo Rodola' added the comment:

Maybe it's me but I still fail to understand what's the issue here. From what I understand from the last message(s) it seems there is complaint about not being able to use ftplib with threads.
FTP is a "command - response" protocol which is designed to handle one request at a time, meaning you send a command then you are supposed to *wait* to get a response back. 
If you want to do multiple transfers in parallel then you need a separate connection, not a separate thread using the same connection.
ftplib should *not* be thread-safe because of how FTP works.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25458>
_______________________________________


More information about the Python-bugs-list mailing list