summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_socket.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Provide a little better debug output (#6940)Barry Warsaw2018-05-171-1/+1
|
* Spelling fixes to docs, docstrings, and comments (GH-6374)Ville Skyttä2018-04-201-1/+1
|
* bpo-32394: Remove some TCP options on old version Windows. (GH-5523)animalize2018-02-261-0/+22
|
* bpo-32221: makeipaddr(): remove interface part + speedup (GH-5449) (#5449)Коренберг Марк2018-02-121-0/+66
|
* bpo-28134: Ignore proto in unknown socket test (GH-5435)Christian Heimes2018-01-301-2/+3
| | | | | Band-aid for macOS: Some platforms seem to ignore unknown protocols. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-28134: Auto-detect socket values from file descriptor (#1349)Christian Heimes2018-01-291-1/+44
| | | | | | | | | | | | | | | Fix socket(fileno=fd) by auto-detecting the socket's family, type, and proto from the file descriptor. The auto-detection can be overruled by passing in family, type, and proto explicitly. Without the fix, all socket except for TCP/IP over IPv4 are basically broken: >>> s = socket.create_connection(('www.python.org', 443)) >>> s <socket.socket fd=3, family=AddressFamily.AF_INET6, type=SocketKind.SOCK_STREAM, proto=6, laddr=('2003:58:bc4a:3b00:56ee:75ff:fe47:ca7b', 59730, 0, 0), raddr=('2a04:4e42:1b::223', 443, 0, 0)> >>> socket.socket(fileno=s.fileno()) <socket.socket fd=3, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('2003:58:bc4a:3b00::%2550471192', 59730, 0, 2550471192), raddr=('2a04:4e42:1b:0:700c:e70b:ff7f:0%2550471192', 443, 0, 2550471192)> Signed-off-by: Christian Heimes <christian@python.org>
* bpo-32373: Add socket.getblocking() method. (#4926)Yury Selivanov2018-01-281-3/+60
|
* Revert "bpo-32221: makeipaddr(): remove interface part + speedup (GH-4724)" ↵Yury Selivanov2018-01-281-44/+0
| | | | | (#5394) This reverts commit 47c0b1f7d4115e6f15e6776c1f91d28e7d96fe0c.
* bpo-32221: makeipaddr(): remove interface part + speedup (GH-4724)Коренберг Марк2018-01-271-0/+44
|
* bpo-32454: socket closefd (#5048)Christian Heimes2018-01-271-0/+16
| | | | | Add close(fd) function to the socket module Signed-off-by: Christian Heimes <christian@python.org>
* bpo-32593: Drop FreeBSD 9 and older support (#5232)Victor Stinner2018-01-221-4/+0
| | | Drop support of FreeBSD 9 and older.
* bpo-32331: Fix socket.type when SOCK_NONBLOCK is available (#4877)Yury Selivanov2017-12-191-6/+35
|
* bpo-32297: Few misspellings found in Python source code comments. (#4803)Mike2017-12-141-2/+2
| | | | | | | | * Fix multiple typos in code comments * Add spacing in comments (test_logging.py, test_math.py) * Fix spaces at the beginning of comments in test_logging.py
* Skip test_socket.test_sha256() on linux < 4.5 (#4643)Victor Stinner2017-11-301-0/+3
| | | bpo-31705.
* test_socket: socket.socketpair() is always available (#4634)Victor Stinner2017-11-291-2/+0
|
* Replace KB unit with KiB (#4293)Victor Stinner2017-11-081-1/+1
| | | | | | | | | | | kB (*kilo* byte) unit means 1000 bytes, whereas KiB ("kibibyte") means 1024 bytes. KB was misused: replace kB or KB with KiB when appropriate. Same change for MB and GB which become MiB and GiB. Change the output of Tools/iobench/iobench.py. Round also the size of the documentation from 5.5 MB to 5 MiB.
* Fix miscellaneous typos (#4275)luzpaz2017-11-051-1/+1
|
* Fix test_socket.test_create_connection() (#4206)Victor Stinner2017-11-011-0/+4
| | | | bpo-31910: test_create_connection() now catchs also EADDRNOTAVAIL to fix the test on Travis CI.
* bpo-31479: Always reset the signal alarm in tests (#3588)Victor Stinner2017-09-191-9/+14
| | | | | | | | | | | | | * bpo-31479: Always reset the signal alarm in tests Use "try: ... finally: signal.signal(0)" pattern to make sure that tests don't "leak" a pending fatal signal alarm. * Move two more alarm() calls into the try block Fix also typo: replace signal.signal(0) with signal.alarm(0) * Move another signal.alarm() into the try block
* bpo-31234: Add test.support.wait_threads_exit() (#3578)Victor Stinner2017-09-141-0/+4
| | | | Use _thread.count() to wait until threads exit. The new context manager prevents the "dangling thread" warning.
* bpo-29639: change test.support.HOST to "localhost"Gregory P. Smith2017-09-091-2/+2
| | | | | | | | | | test.support.HOST should be "localhost" as it was in the past. See the bpo-29639. Tests that need the IP address should use HOSTv4 (added) or the existing HOSTv6 constant. This changes the definition and fixes tests that needed updating to deal with HOST being the hostname rather than the hardcoded IP address. This is only the first step in addressing https://bugs.python.org/issue29639.
* bpo-31370: Remove support for threads-less builds (#3385)Antoine Pitrou2017-09-071-51/+18
| | | | | | * Remove Setup.config * Always define WITH_THREAD for compatibility.
* bpo-27584: New addition of vSockets to the python socket module (#2489)caavery2017-09-061-0/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bpo-27584: New addition of vSockets to the python socket module Support for AF_VSOCK on Linux only * bpo-27584: Fixes for V2 Fixed syntax and naming problems. Fixed #ifdef AF_VSOCK checking Restored original aclocal.m4 * bpo-27584: Fixes for V3 Added checking for fcntl and thread modules. * bpo-27584: Fixes for V4 Fixed white space error * bpo-27584: Fixes for V5 Added back comma in (CID, port). * bpo-27584: Fixes for V6 Added news file. socket.rst now reflects first Linux introduction of AF_VSOCK. Fixed get_cid in test_socket.py. Replaced PyLong_FromLong with PyLong_FromUnsignedLong in socketmodule.c Got rid of extra AF_VSOCK #define. Added sockaddr_vm to sock_addr. * bpo-27584: Fixes for V7 Minor cleanup. * bpo-27584: Fixes for V8 Put back #undef AF_VSOCK as it is necessary when vm_sockets.h is not installed.
* bpo-30987 - Support for ISO-TP protocol in SocketCAN (#2956)Pier-Yves Lessard2017-08-281-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added support for CAN_ISOTP protocol * Added unit tests for CAN ISOTP * Updated documentation for ISO-TP protocol * Removed trailing whitespace in documentation * Added blurb NEWS.d file * updated Misc/ACKS * Fixed broken unit test that was using isotp const outside of skippable section * Removed dependecy over third party project * Added implementation for getsockname + unit tests * Missing newline at end of ACKS file * Accidentally inserted a type in ACKS file * Followed tiran changes review #1 recommendations * Added spaces after comma
* Fix tests: getsockname() can return None on OS X on unbound sockets (#1400)Antoine Pitrou2017-05-021-2/+2
|
* bpo-30205: Fix getsockname() for unbound AF_UNIX sockets on Linux (#1370)Antoine Pitrou2017-05-021-0/+4
| | | | | | * bpo-30205: Fix getsockname() for unbound AF_UNIX sockets on Linux * Add NEWS entry
* bpo-29972: Skip tests known to fail on AIX (#979)Victor Stinner2017-04-041-3/+7
| | | | | | | | | | | | | | | | | | | | | | * bpo-29972: Fix test_eintr on AIX On AIX, sigtimedwait(0.2) sleeps 199.8 ms, whereas the test expects 200 ms or longer. * bpo-29972: Skip some inet_pton() tests on AIX Skip some inet_pton() tests of test_socket on AIX. inet_pton() on AIX is less strict than on Linux and doesn't reject some invalid IP addresses. The unit tests test more the libc than Python itself. * bpo-29972: Skip tests known to fail on AIX * test_locale.test_strcoll_with_diacritic() * test_locale.test_strxfrm_with_diacritic() * test_strptime.test_week_of_year_and_day_of_week_calculation() * test_tools.test_POT_Creation_Date()
* bpo-29845: Mark tests that use _testcapi as CPython-only (#711)Serhiy Storchaka2017-03-191-0/+1
|
* bpo-28728: clarify possible test failure due to ISP (GH-412)Xiang Zhang2017-03-071-5/+15
|
* update test_socket AEAD test for kernel 4.9 and up (#133)matejcik2017-02-161-8/+7
|
* Issue #28815: Merge test tweak from 3.6Martin Panter2017-01-081-7/+3
|\
| * Issue #28815: Merge test tweak from 3.5Martin Panter2017-01-081-7/+3
| |\
| | * Issue #28815: Use new exception subclassesMartin Panter2017-01-081-7/+3
| | |
* | | Issue #28815: Merge test_socket fix from 3.6Martin Panter2016-12-241-3/+11
|\ \ \ | |/ /
| * | Issue #28815: Merge test_socket fix from 3.5Martin Panter2016-12-241-3/+11
| |\ \ | | |/
| | * Issue #28815: Skip TIPC tests if /proc/modules is not readableMartin Panter2016-12-241-3/+11
| | | | | | | | | | | | Based on patch by Patrila.
* | | Issue #28683: Merge 3.6.Xavier de Gaye2016-12-141-6/+15
|\ \ \ | |/ /
| * | Issue #28683: Fix the tests that bind() a unix socket and raise PermissionErrorXavier de Gaye2016-12-141-6/+15
| | | | | | | | | | | | on Android for a non-root user.
* | | Issue #26936: Fix the test_socket failures on Android - getservbyname(),Xavier de Gaye2016-12-131-4/+12
| | | | | | | | | | | | getservbyport() and getaddrinfo() are broken on some Android API levels.
* | | Merge 3.6Xavier de Gaye2016-11-131-1/+2
|\ \ \ | |/ /
| * | Merge 3.5Xavier de Gaye2016-11-131-1/+2
| |\ \ | | |/
| | * Fix temporary file not deleted in test_socketXavier de Gaye2016-11-131-1/+2
| | |
* | | Merge test suite fixes from 3.6Martin Panter2016-10-201-0/+1
|\ \ \ | |/ /
| * | Issue #28471: Avoid ResourceWarning by detaching test socketMartin Panter2016-10-201-0/+1
| | |
* | | Merge 3.6 (issue #28471)Yury Selivanov2016-10-181-0/+12
|\ \ \ | |/ /
| * | Issue #28471: Fix crash (GIL state related) in socket.setblockingYury Selivanov2016-10-181-0/+12
| | |
* | | Issue #28332: Deprecated silent truncations in socket.htons and socket.ntohs.Serhiy Storchaka2016-10-021-8/+18
|/ / | | | | | | Original patch by Oren Milman.
* | Issue #20254: Merge from 3.5Berker Peksag2016-10-021-2/+4
|\ \ | |/
| * Issue #20254: Fix duplicate tests in test_socketBerker Peksag2016-10-021-2/+4
| | | | | | | | Patch by Vajrasky Kok.
* | Issue #26384: Merge from 3.5Berker Peksag2016-09-171-0/+19
|\ \ | |/