msg104749 - (view) |
Author: Giampaolo Rodola' (giampaolo.rodola) *  |
Date: 2010-05-01 20:32 |
Similarly to issue 3972 the patch in attachment adds a new "source_address" option to FTP class to bind to a specific address when connecting to a remote FTP server. It must be noted that this gets done for both control and passive data connections (client connecting to server). The latter one solves issue 1661754. |
|
|
msg104753 - (view) |
Author: Antoine Pitrou (pitrou) *  |
Date: 2010-05-01 22:01 |
You should not use find_unused_port(), because it causes problems on some Windows buildbot. Also, there's something fishy in your patch, because you never set self.source_address. |
|
|
msg104805 - (view) |
Author: Giampaolo Rodola' (giampaolo.rodola) *  |
Date: 2010-05-02 21:36 |
> You should not use find_unused_port() I agree find_unused_port() is the wrong approach in general, but in this case I think there's nothing we can do about it. > you never set self.source_address. You're right, I should set it in connect() method. I'm going to attach a new patch including documentation. |
|
|
msg129582 - (view) |
Author: Giampaolo Rodola' (giampaolo.rodola) *  |
Date: 2011-02-26 18:26 |
Patch in attachment set source_address attribute and updates doc. It still keeps using support.find_unused_port() which is also used in test_socket.py though [1], so it shouldn't cause problems. http://svn.python.org/view/python/trunk/Lib/test/test_socket.py?r1=77263&r2=77262&pathrev=77263 |
|
|
msg129717 - (view) |
Author: Giampaolo Rodola' (giampaolo.rodola) *  |
Date: 2011-02-28 19:20 |
Committed in r88679. |
|
|
msg130188 - (view) |
Author: Nadeem Vawda (nadeem.vawda) *  |
Date: 2011-03-06 20:17 |
test_source_address_passive_connection() raises a ResourceWarning. Fix attached. |
|
|
msg130191 - (view) |
Author: Giampaolo Rodola' (giampaolo.rodola) *  |
Date: 2011-03-06 21:05 |
Thanks. Committed in r88761. |
|
|
msg130192 - (view) |
Author: Antoine Pitrou (pitrou) *  |
Date: 2011-03-06 21:11 |
Giampaolo, can you make your commit on the Mercurial repo instead? See http://mail.python.org/pipermail/python-dev/2011-March/108738.html |
|
|
msg130238 - (view) |
Author: Giampaolo Rodola' (giampaolo.rodola) *  |
Date: 2011-03-07 08:14 |
Committed in r68309. |
|
|
msg130239 - (view) |
Author: Giampaolo Rodola' (giampaolo.rodola) *  |
Date: 2011-03-07 08:15 |
Ok, that wasn't r68309. =) I'm not sure what revision number is now that we're using mercurial. |
|
|
msg130242 - (view) |
Author: Nadeem Vawda (nadeem.vawda) *  |
Date: 2011-03-07 08:56 |
I'm not seeing the commit anywhere. Did you perhaps forget to "hg push" after committing? |
|
|
msg130370 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2011-03-08 20:33 |
New changeset 7f605fa1688d by Giampaolo Rodol�� in branch 'default': #8594: fix ResourceWarning in test_ftplib.py - patch by Nadeem Vawda. http://hg.python.org/cpython/rev/7f605fa1688d |
|
|