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.

classification
Title: test_socket: replace custom _get_unused_port() by support.find_unused_port()
Type: enhancement Stage: resolved
Components: Tests Versions: Python 3.2, Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: neologix, pitrou, python-dev
Priority: low Keywords: patch

Created on 2011-05-10 20:33 by neologix, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_socket_unused_port.diff neologix, 2011-05-10 20:33 patch review
Messages (3)
msg135738 - (view) Author: Charles-François Natali (neologix) * (Python committer) Date: 2011-05-10 20:33
Lib/test/test_socket.py uses custom _get_unused_port to return a port which will be likely available for binding in some tests.
The same functionality is already provided by support.find_unuse_port, let's make use of it.
Patch attached.
msg135739 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-05-10 21:38
New changeset 695a7acae392 by Antoine Pitrou in branch '3.2':
Issue #12054: use support.find_unused_port() instead of reinventing the wheel
http://hg.python.org/cpython/rev/695a7acae392

New changeset 1b9d6226a3dd by Antoine Pitrou in branch 'default':
Issue #12054: use support.find_unused_port() instead of reinventing the wheel
http://hg.python.org/cpython/rev/1b9d6226a3dd
msg135740 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011-05-10 21:39
An obvious one indeed, thank you :)
History
Date User Action Args
2022-04-11 14:57:17adminsetgithub: 56263
2011-05-10 21:39:32pitrousetstatus: open -> closed

versions: + Python 3.2, Python 3.3
nosy: + pitrou

messages: + msg135740
resolution: fixed
stage: resolved
2011-05-10 21:38:12python-devsetnosy: + python-dev
messages: + msg135739
2011-05-10 20:33:02neologixcreate