Commit Graph

334 Commits

Author SHA1 Message Date
Zachary Ware 101d9e7250 Issue 19572: More silently skipped tests explicitly skipped. 2013-12-08 00:44:27 -06:00
Zachary Ware 9fe6d86709 Issue 19572: More silently skipped tests explicitly skipped. 2013-12-08 00:20:35 -06:00
Nick Coghlan ca351e6bc5 Fix test_socket for repr update 2013-11-13 22:10:16 +10:00
Jason R. Coombs 6bdc498734 Normalize whitespace 2013-11-10 14:02:04 -05:00
Serhiy Storchaka 7908068627 Issue #18702: All skipped tests now reported as skipped. 2013-11-03 21:31:18 +02:00
Charles-François Natali 5fd2642adb Issue #18643: Fix some test_socket failures due to large default socket buffer
sizes.
2013-08-29 19:01:40 +02:00
Victor Stinner 71fe8c00f6 test_socket: cancel scheduled alarm on test failure 2013-08-24 15:52:47 +02:00
Charles-Francois Natali dd225e4c64 Issue #17684: Fix some test_socket failures due to limited FD passing support
on OS-X. Patch by Jeff Ramnani.
2013-05-20 19:08:19 +02:00
Charles-François Natali 37114bb548 Issue #18308: don't take the scope ID into account when comparing IPv6
addresses.
2013-07-09 19:15:43 +02:00
Ronald Oussoren a822d36675 Ensure that the fix for #17269 also works on OSX 10.4
AI_NUMERICSERV isn't defined on OSX 10.4.
2013-06-10 10:36:28 +02:00
Ronald Oussoren 27a4ac535f Issue #17269: Workaround for a platform bug in getaddrinfo on OSX
Without this patch socket.getaddrinfo crashed when called
with some unusual argument combinations.
2013-05-24 13:47:37 +02:00
Terry Jan Reedy 98472b8396 Merge 3.2, issue #17047: remove doubled words found in 2.7 to
3.4 Lib/*, as reported by Serhiy Storchaka and Matthew Barnett.
2013-03-11 17:58:27 -04:00
Terry Jan Reedy c30b7b16ea Issue #17047: remove doubled words found in 2.7 to 3.4 Lib/*,
as reported by Serhiy Storchaka and Matthew Barnett.
2013-03-11 17:57:08 -04:00
Serhiy Storchaka 9101e23ff6 Issue #15989: Fix several occurrences of integer overflow
when result of PyLong_AsLong() narrowed to int without checks.

This is a backport of changesets 13e2e44db99d and 525407d89277.
2013-01-19 12:41:45 +02:00
Serhiy Storchaka 441d30fac7 Issue #15989: Fix several occurrences of integer overflow
when result of PyLong_AsLong() narrowed to int without checks.

This is a backport of changesets 13e2e44db99d and 525407d89277.
2013-01-19 12:26:26 +02:00
Antoine Pitrou d5a070f586 Silence sporadic failure in RecvmsgIntoSCTPStreamTest.testRecvmsgEOF (issue #13876) - probably not Python-related. 2012-12-18 23:44:36 +01:00
Antoine Pitrou 92f8b0016e Silence sporadic failure in RecvmsgSCTPStreamTest.testRecvmsgEOF (issue #13876) - probably not Python-related. 2012-12-16 16:40:04 +01:00
Trent Nelson 016884cbaa Issue #16257: make test_create_connection() handle ENETUNREACH. 2012-10-17 06:15:40 -04:00
Trent Nelson 45bb613e25 Issue #16257: make test_create_connection() handle ENETUNREACH. 2012-10-17 06:15:15 -04:00
Antoine Pitrou 9b1c84b586 Issue #15842: the SocketIO.{readable,writable,seekable} methods now raise ValueError when the file-like object is closed.
Patch by Alessandro Moura.
2012-09-14 17:30:31 +02:00
Antoine Pitrou 1e7ee9dfa0 Issue #15842: the SocketIO.{readable,writable,seekable} methods now raise ValueError when the file-like object is closed.
Patch by Alessandro Moura.
2012-09-14 17:28:10 +02:00
Atsuo Ishimoto da0fc14d46 Issue #7171: Add Windows implementation of ``inet_ntop`` and ``inet_pton`` to socket module. 2012-07-16 15:16:54 +09:00
Serhiy Storchaka 43767638a9 Issue #18702: All skipped tests now reported as skipped. 2013-11-03 21:31:38 +02:00
Charles-François Natali 0cc86850b6 Issue #16201: socket: Use inet_pton()/inet_addr() instead of ad-hoc parsing for
numeric IP addresses.
2013-09-13 19:53:08 +02:00
Victor Stinner 4f7a36f84f Issue #18904: test_os and test_socket use unittest.skipIf() to check if fcntl
module is present (to record skipped tests)
2013-09-08 14:14:38 +02:00
Victor Stinner a3c18d0f14 Issue #18904: test_socket: add inheritance tests using fcntl and FD_CLOEXEC 2013-09-08 11:53:09 +02:00
Eli Bendersky b2ff3cf0e9 Switch the AF_* and SOCK_* constants in the socket module to IntEnum.
Closes #18720.
2013-08-31 15:13:30 -07:00
Charles-François Natali fcfb324e81 Use the recent support.HOSTv6 addition. 2013-08-31 14:40:49 +02:00
Charles-François Natali f25f80c839 Merge. 2013-08-29 19:27:17 +02:00
Charles-François Natali 74b7408604 Issue #18643: Fix some test_socket failures due to large default socket buffer
sizes.
2013-08-29 19:02:23 +02:00
Victor Stinner d39dca9e33 Fix test_socket.test_SOCK_CLOEXEC(), the test was wrong 2013-08-28 12:28:18 +02:00
Victor Stinner daf455554b Issue #18571: Implementation of the PEP 446: file descriptors and file handles
are now created non-inheritable; add functions os.get/set_inheritable(),
os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
2013-08-28 00:53:59 +02:00
Victor Stinner e726ce1f3e (Merge 3.3) test_socket: cancel scheduled alarm on test failure 2013-08-24 15:53:39 +02:00
Charles-François Natali 19361a2046 Issue #18308: don't take the scope ID into account when comparing IPv6
addresses.
2013-07-09 19:16:32 +02:00
Ronald Oussoren 36451f076b (3.3->default) Ensure that the fix for #17269 also works on OSX 10.4
AI_NUMERICSERV isn't defined on OSX 10.4.
2013-06-10 10:37:12 +02:00
Ronald Oussoren dc3e6cc452 (3.3->default) Issue #17269: Workaround for a platform bug in getaddrinfo on OSX
Without this patch socket.getaddrinfo crashed when called
with some unusual argument combinations.
2013-05-24 13:51:21 +02:00
Charles-François Natali b10c71daa2 Backed out changeset c0f2b038fc12 2013-05-21 10:45:46 +02:00
Charles-François Natali c7c333d25d Issue #17683: socket module: return AF_UNIX addresses in Linux abstract
namespace as string.
2013-05-21 09:49:18 +02:00
Charles-Francois Natali d66b10e165 Issue #17684: Fix some test_socket failures due to limited FD passing support
on OS-X. Patch by Jeff Ramnani.
2013-05-20 19:08:19 +02:00
Giampaolo Rodola' 7ca4936113 attempt to fix bb failure as per http://bugs.python.org/issue17675#msg186595 2013-04-12 18:28:15 +02:00
Giampaolo Rodola' 50331cbf08 Fix issue #17675: make socket repr() provide local and remote addresses (if any). 2013-04-10 15:49:47 +02:00
Antoine Pitrou c9b3ef2df0 Issue #16997: unittest.TestCase now provides a subTest() context manager to procedurally generate, in an easy way, small test instances. 2013-03-20 20:16:47 +01:00
Terry Jan Reedy 16b5c13668 Merge 3.3, issue #17047: remove doubled words found in 2.7 to
3.4 Lib/*, as reported by Serhiy Storchaka and Matthew Barnett.
2013-03-11 17:59:07 -04:00
Charles-François Natali 773e42dff8 Issue #15359: Add CAN_BCM protocol support to the socket module. Patch by Brian
Thorne.
2013-02-05 19:42:01 +01:00
Serhiy Storchaka 45cb7f6529 Fix test_socket broken in previous commit (changeset 13e2e44db99d).
Added new checks for socket.setblocking().
2013-01-15 11:08:30 +02:00
Serhiy Storchaka 7898043868 Issue #15989: Fix several occurrences of integer overflow
when result of PyLong_AsLong() narrowed to int without checks.
2013-01-15 01:12:17 +02:00
Andrew Svetlov f7a17b48d7 Replace IOError with OSError (#16715) 2012-12-25 16:47:37 +02:00
Antoine Pitrou f23e3f7ad2 Silence sporadic failure in RecvmsgIntoSCTPStreamTest.testRecvmsgEOF (issue #13876) - probably not Python-related. 2012-12-18 23:44:59 +01:00
Andrew Svetlov 0832af6628 Issue #16717: get rid of socket.error, replace with OSError 2012-12-18 23:10:48 +02:00
Ross Lagerwall 8d459f0cb8 #15284: Skip {send,recv}msg tests with disabled IPv6
Patch by Brian Brazil.
2012-07-08 09:53:57 +02:00
Antoine Pitrou b7eb563a2a Errors in "client" methods in test_socket were ignored because of a bogus except clause.
(this could reveal test failures!)
2012-06-24 01:34:13 +02:00
Kristján Valur Jónsson 52a11f1f46 Issue #14310: Catch testing errors when trying to create unsupported socket
types on some platforms.
2012-04-07 20:38:44 +00:00
Kristján Valur Jónsson 10f383a937 Issue #14310: inter-process socket duplication for windows 2012-04-07 11:23:31 +00:00
Antoine Pitrou 8315f96764 Issue #13872: socket.detach() now marks the socket closed (as mirrored in the socket repr()).
Patch by Matt Joiner.
2012-04-01 01:00:55 +02:00
Antoine Pitrou 70deb3de39 Issue #13872: socket.detach() now marks the socket closed (as mirrored in the socket repr()).
Patch by Matt Joiner.
2012-04-01 01:00:17 +02:00
Nadeem Vawda 61baebd0e1 Issue #12804: Fix test failures on systems without internet access. 2012-01-25 08:02:05 +02:00
Nadeem Vawda a58c01ba48 Remove redundant resource check in test_socket. 2012-01-25 06:48:47 +02:00
Charles-François Natali 366999a011 Issue #9975: socket: Fix incorrect use of flowinfo and scope_id. Patch by
Vilmos Nebehaj.
2012-01-02 15:47:29 +01:00
Antoine Pitrou 7ded21e917 Issue #5424: add tests for inet_ntoa, inet_ntop, inet_aton and inet_pton.
Patch by Philipp Hagemeister.
2011-12-19 16:21:21 +01:00
Charles-François Natali 42663334cd Issue #9975: socket: Fix incorrect use of flowinfo and scope_id. Patch by
Vilmos Nebehaj.
2012-01-02 15:57:30 +01:00
Antoine Pitrou d1301953fe Issue #5424: add tests for inet_ntoa, inet_ntop, inet_aton and inet_pton.
Patch by Philipp Hagemeister.
2011-12-19 16:22:26 +01:00
Antoine Pitrou 1637487a0c Skip test if the path is too long for a AF_UNIX socket 2011-12-16 15:04:12 +01:00
Antoine Pitrou 6ec29e299b Issue #8373: The filesystem path of AF_UNIX sockets now uses the filesystem
encoding and the surrogateescape error handler, rather than UTF-8.  Patch
by David Watson.
2011-12-16 14:46:36 +01:00
Stefan Krah d9bed99fcb Issue #20246: Fix test failures on FreeBSD. Patch by Ryan Smith-Roberts. 2014-01-21 22:58:40 +01:00
Ezio Melotti 4a7abe7ca6 #11112: merge with 3.2. 2011-11-18 18:35:53 +02:00
Ezio Melotti 7f78ddc3ad #11112: Fix typo in a base class in test_socket. 2011-11-18 18:33:14 +02:00
Charles-François Natali 240c55f721 Fix test_socket when built whithout threads. 2011-11-10 20:33:36 +01:00
Charles-François Natali 10b8cf4455 Issue #7777: socket: Add Reliable Datagram Sockets (PF_RDS) support. 2011-11-10 19:21:37 +01:00
Antoine Pitrou 24d659daaf Use InterruptedError instead of checking for EINTR 2011-10-23 23:49:42 +02:00
Antoine Pitrou ffa547e139 Fix deprecation warning 2011-10-11 22:43:37 +02:00
Antoine Pitrou 86fe86055b Fix the threading infrastructure in test_socket to support skipping
tests from the setUp() routine.
This fixes a refleak in test_socket on some machines.
2011-10-10 20:15:59 +02:00
Charles-François Natali 47413c1171 Issue #10141: socket: add SocketCAN (PF_CAN) support. Initial patch by Matthias
Fuchs, updated by Tiago Gonçalves.
2011-10-06 19:47:44 +02:00
Charles-François Natali 8619cd7376 Issue #13001: Fix test_socket.testRecvmsgTrunc failure on FreeBSD < 8, which
doesn't always set the MSG_TRUNC flag when a truncated datagram is received.
2011-10-03 19:43:15 +02:00
Antoine Pitrou 86aed0bbc6 Fix ResourceWarnings in the TIPC socket tests. 2011-10-02 23:33:19 +02:00
Antoine Pitrou 22cd021656 Fix ResourceWarnings in the TIPC socket tests. 2011-10-02 23:37:41 +02:00
Charles-François Natali 9089b7956b Fix a race condition in test_socket.ThreadableTest: the client is reported
ready before having been set up.
2011-09-21 22:05:01 +02:00
Charles-François Natali a49ed7650a Fix a race condition in test_socket.ThreadableTest: the client is reported as
ready before having been set up.
2011-09-21 22:03:58 +02:00
Nick Coghlan 2496f331a7 Close issue 12958 by flagging expected failures in test_socket on Mac OS X 2011-09-19 20:26:31 +10:00
Nadeem Vawda 3d1706fa83 Fix deprecation warnings in test_socket. 2011-08-22 09:46:56 +02:00
Nick Coghlan 96fe56abec Add support for the send/recvmsg API to the socket module. Patch by David Watson and Heiko Wundram. (Closes #6560) 2011-08-22 11:55:57 +10:00
Victor Stinner e67474725b Issue #12326: refactor usage of sys.platform
* Use str.startswith(tuple): I didn't know this Python feature, Python rocks!
 * Replace sometimes sys.platform.startswith('linux') with
   sys.platform == 'linux'
 * sys.platform doesn't contain the major version on Cygwin on Mac OS X
   (it's just 'cygwin' and 'darwin')
2011-08-21 00:39:18 +02:00
Victor Stinner 9c3de4a883 Issue #12326: don't test the major version of sys.platform
Use startswith, instead of ==, when testing sys.platform to support
new platforms like Linux 3 or OpenBSD 5.
2011-08-17 20:49:41 +02:00
Charles-François Natali 239bb96540 Issue #12196: Make test.support's requires_linux_version a decorator. 2011-06-03 12:55:15 +02:00
Victor Stinner fea0f4d517 Issue #12158: Move linux_version() from test_socket to test.support 2011-05-24 00:24:19 +02:00
Charles-François Natali 6071359de1 Issue #1746656: make if_nameindex(), if_indextoname() and if_nametoindex()
accept and return str instead of bytes arrays. Add some more tests.
2011-05-20 16:55:06 +02:00
Gregory P. Smith 5ed2e779f1 Issue #1746656: Add if_nameindex, if_nametoindex, if_indextoname
methods to the socket module.
2011-05-15 00:26:45 -07:00
Antoine Pitrou 74b4885cc9 Issue #12054: use support.find_unused_port() instead of reinventing the wheel 2011-05-10 23:37:42 +02:00
Antoine Pitrou ccc87b53db Issue #12054: use support.find_unused_port() instead of reinventing the wheel 2011-05-10 23:37:11 +02:00
Antoine Pitrou 3cade9942e Issue #8498: In socket.accept(), allow to specify 0 as a backlog value in
order to accept exactly one connection.  Patch by Daniel Evers.
2011-05-10 19:19:13 +02:00
Antoine Pitrou 1be815aac4 Issue #8498: In socket.accept(), allow to specify 0 as a backlog value in
order to accept exactly one connection.  Patch by Daniel Evers.
2011-05-10 19:16:29 +02:00
Ezio Melotti 845f1526a3 Refactor buggy test to correctly use the msg argument of assertRaises. 2011-05-08 20:23:57 +03:00
Ezio Melotti 8b7664d0b8 #5421: merge with 3.2. 2011-05-07 19:51:47 +03:00
Ezio Melotti 4c1aebd88b #5421: merge with 3.1. 2011-05-07 19:50:28 +03:00
Ezio Melotti 63e4230c38 #5421: add tests. 2011-05-07 19:47:48 +03:00
Antoine Pitrou 9c39f3c4ec Issue #11811: Factor out detection of IPv6 support on the current host
and make it available as `test.support.IPV6_ENABLED`.  Patch by
Charles-François Natali.
2011-04-28 19:18:10 +02:00
Antoine Pitrou fc2e3763c8 Issue #11749: try to fix transient test_socket failure 2011-04-04 01:22:06 +02:00
Antoine Pitrou 43bf045be0 Issue #11749: try to fix transient test_socket failure 2011-04-04 01:21:37 +02:00
Antoine Pitrou 6d58d64919 Issue #11127: Raise a TypeError when trying to pickle a socket object. 2011-03-20 23:56:36 +01:00
Antoine Pitrou 061cfb5258 Issue #10866: Add socket.sethostname(). Initial patch by Ross Lagerwall. 2011-02-28 22:25:22 +00:00
Antoine Pitrou 5d5381ed00 Merged revisions 88622 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88622 | antoine.pitrou | 2011-02-26 00:07:44 +0100 (sam., 26 févr. 2011) | 5 lines

  Issue #7322: Trying to read from a socket's file-like object after a timeout
  occurred now raises an error instead of silently losing data.
  Patch by Ross Lagerwall.
........
2011-02-25 23:14:08 +00:00