Trent Nelson <tnel...@onresolve.com> added the comment:

I introduced test_support.find_unused_port in r62234, as part of a general 
refactoring of client/server network-oriented tests.  The only reason I 
introduced this method at the time was because the SSL tests used to launch 
openssl in server mode, which required a port to be specified as part of the 
command line.

Pure Python tests shouldn't use this method, as noted in the docstring, they 
should use bind_port(), which takes platform socket-oddities into account.

I'm not sure if I agree that find_unused_port() should be removed though; it 
does serve a purpose in very rare corner cases.  Perhaps it should be renamed 
to _find_unused_port() to discourage accidental usage.

(I'd recommend reviewing r62234's commit log and change set for more info.)

----------
nosy: +trent

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8576>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to