Commit Graph

215 Commits

Author SHA1 Message Date
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 22cd021656 Fix ResourceWarnings in the TIPC socket tests. 2011-10-02 23:37:41 +02:00
Antoine Pitrou 86aed0bbc6 Fix ResourceWarnings in the TIPC socket tests. 2011-10-02 23:33:19 +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
Antoine Pitrou 68e5c044e8 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:07:44 +00:00
Marc-André Lemburg 8f36af7a4c Normalize the encoding names for Latin-1 and UTF-8 to
'latin-1' and 'utf-8'.

These are optimized in the Python Unicode implementation
to result in more direct processing, bypassing the codec
registry.

Also see issue11303.
2011-02-25 15:42:01 +00:00
Antoine Pitrou 600232b562 Issue #7995: When calling accept() on a socket with a timeout, the returned
socket is now always non-blocking, regardless of the operating system.
2011-01-05 21:03:42 +00:00
Victor Stinner c3a51ecb85 Issue #10819: SocketIO.name property returns -1 when its closed, instead of
raising a ValueError, to fix repr().
2011-01-04 11:00:45 +00:00
Victor Stinner 1d5eb3425b test_socket: use context managers to close directly the socket
Fix ResourceWarning(unclosed socket) warnings. Patch written by Nadeem Vawda.
2011-01-03 14:30:46 +00:00
Alexander Belopolsky e239d23e8c Issue #6697: Fixed instances of _PyUnicode_AsString() result not checked for NULL 2010-12-08 23:31:48 +00:00
Georg Brandl f65e25b626 Merged revisions 86134,86315-86316,86390,86424-86425,86428,86550,86561-86562,86564-86565,86705,86708,86713 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k

........
  r86134 | georg.brandl | 2010-11-03 08:41:00 +0100 (Mi, 03 Nov 2010) | 1 line

  A newline in lineno output breaks pyframe output.
........
  r86315 | georg.brandl | 2010-11-08 12:05:18 +0100 (Mo, 08 Nov 2010) | 1 line

  Fix latex conversion glitch in property/feature descriptions.
........
  r86316 | georg.brandl | 2010-11-08 12:08:35 +0100 (Mo, 08 Nov 2010) | 1 line

  Fix typo.
........
  r86390 | georg.brandl | 2010-11-10 08:57:10 +0100 (Mi, 10 Nov 2010) | 1 line

  Fix typo.
........
  r86424 | georg.brandl | 2010-11-12 07:19:48 +0100 (Fr, 12 Nov 2010) | 1 line

  Build a PDF of the FAQs too.
........
  r86425 | georg.brandl | 2010-11-12 07:20:12 +0100 (Fr, 12 Nov 2010) | 1 line

  #10008: Fix duplicate index entry.
........
  r86428 | georg.brandl | 2010-11-12 09:09:26 +0100 (Fr, 12 Nov 2010) | 1 line

  Fix weird line block in table.
........
  r86550 | georg.brandl | 2010-11-20 11:24:34 +0100 (Sa, 20 Nov 2010) | 1 line

  Fix rst markup errors.
........
  r86561 | georg.brandl | 2010-11-20 12:47:10 +0100 (Sa, 20 Nov 2010) | 1 line

  #10460: Update indent.pro to match PEP 7 better.
........
  r86562 | georg.brandl | 2010-11-20 14:44:41 +0100 (Sa, 20 Nov 2010) | 1 line

  #10439: document PyCodec C APIs.
........
  r86564 | georg.brandl | 2010-11-20 15:08:53 +0100 (Sa, 20 Nov 2010) | 1 line

  #10460: an even better indent.pro.
........
  r86565 | georg.brandl | 2010-11-20 15:16:17 +0100 (Sa, 20 Nov 2010) | 1 line

  socket.gethostbyname(socket.gethostname()) can fail when host name resolution is not set up correctly; do not fail test_socket if this is the case.
........
  r86705 | georg.brandl | 2010-11-23 08:54:19 +0100 (Di, 23 Nov 2010) | 1 line

  #10468: document Unicode exception creation and access functions.
........
  r86708 | georg.brandl | 2010-11-23 09:37:54 +0100 (Di, 23 Nov 2010) | 2 lines

  #10511: clarification of what heaps are; suggested by Johannes Hoff.
........
  r86713 | georg.brandl | 2010-11-23 19:14:57 +0100 (Di, 23 Nov 2010) | 1 line

  assert.h is also included. Thanks to Savio Sena.
........
2010-11-26 09:05:43 +00:00
Ezio Melotti 19f2aeba67 Merged revisions 86596 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line

  #9424: Replace deprecated assert* methods in the Python test suite.
........
2010-11-21 01:30:29 +00:00
Ezio Melotti b3aedd4862 #9424: Replace deprecated assert* methods in the Python test suite. 2010-11-20 19:04:17 +00:00
Georg Brandl 89197fe93c socket.gethostbyname(socket.gethostname()) can fail when host name resolution is not set up correctly; do not fail test_socket if this is the case. 2010-11-20 14:16:17 +00:00
Brian Curtin 5ad0bd69c9 Add socket cleanup for ResourceWarning and update test to use skip decorator 2010-11-05 15:47:45 +00:00
Brian Curtin 8f8ed94196 Merged revisions 86151 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86151 | brian.curtin | 2010-11-03 22:41:43 -0500 (Wed, 03 Nov 2010) | 3 lines

  Fix three ResourceWarnings.
  Mimic the clientTearDown from ThreadedTCPSocketTest, closing the socket.
........
2010-11-04 03:49:29 +00:00
Brian Curtin 3beb38f8ff Fix three ResourceWarnings.
Mimic the clientTearDown from ThreadedTCPSocketTest, closing the socket.
2010-11-04 03:41:43 +00:00
Brian Curtin 21ebbb7d39 Clean up ResourceWarnings due to unclosed sockets. 2010-11-02 02:07:09 +00:00
Antoine Pitrou e033e06db0 Issue #10093: ResourceWarnings are now issued when files and sockets are
deallocated without explicit closing.  These warnings are silenced by
default, except in pydebug mode.
2010-10-29 10:38:18 +00:00
Antoine Pitrou 1cae8b58eb Also guard other SOCK_NONBLOCK test 2010-10-23 17:05:13 +00:00
Antoine Pitrou acd0fda1a4 Fix SOCK_CLOEXEC and SOCK_NONBLOCK tests on recent glibcs with old Linux kernels. 2010-10-23 17:01:44 +00:00
Gregory P. Smith 397cd8a1fc Merged revisions 85586-85587,85596-85598 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85586 | gregory.p.smith | 2010-10-16 17:17:24 -0700 (Sat, 16 Oct 2010) | 2 lines

  fix for netbsd.
........
  r85587 | gregory.p.smith | 2010-10-16 17:43:10 -0700 (Sat, 16 Oct 2010) | 3 lines

  applying netbsd-wizs-mod.patch from issue5510 -
   fixes for netbsd (and dragonflybsd?)
........
  r85596 | gregory.p.smith | 2010-10-16 19:14:36 -0700 (Sat, 16 Oct 2010) | 6 lines

  Fix multiprocessing Semaphore's on netbsd5. SEM_VALUE_MAX is defined
  as (~0U) on NetBSD which was causing it to appear as -1 when used as
  a signed int for _multprocessing.SemLock.SEM_VALUE_MAX.  This works
  around the problem by substituting INT_MAX on systems where it appears
  negative when used as an int.
........
  r85597 | gregory.p.smith | 2010-10-16 19:57:19 -0700 (Sat, 16 Oct 2010) | 2 lines

  skip test_itimer_virtual on NetBSD to prevent the test suite from hanging.
........
  r85598 | gregory.p.smith | 2010-10-16 20:09:12 -0700 (Sat, 16 Oct 2010) | 2 lines

  Avoid hanging the test on netbsd5.
........
2010-10-17 04:23:21 +00:00
Gregory P. Smith b603d03f15 fix for netbsd. 2010-10-17 00:17:24 +00:00