This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author trent
Recipients brian.curtin, exarkun, giampaolo.rodola, paul.moore, pitrou, r.david.murray, tim.golden, trent, vinay.sajip
Date 2010-05-03.08:26:39
SpamBayes Score 1.8654235e-05
Marked as misclassified No
Message-id <1272875202.23.0.0210517301813.issue8576@psf.upfronthosting.co.za>
In-reply-to
Content
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.)
History
Date User Action Args
2010-05-03 08:26:42trentsetrecipients: + trent, paul.moore, vinay.sajip, exarkun, pitrou, giampaolo.rodola, tim.golden, r.david.murray, brian.curtin
2010-05-03 08:26:42trentsetmessageid: <1272875202.23.0.0210517301813.issue8576@psf.upfronthosting.co.za>
2010-05-03 08:26:40trentlinkissue8576 messages
2010-05-03 08:26:39trentcreate