Christian Heimes
71515510d8
Issue #18259 : Declare sethostname in socketmodule.c for AIX
2013-06-19 02:07:20 +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
Victor Stinner
640c35ce13
Reuse Py_MIN and Py_MAX macros: remove duplicate MIN/MAX macros
...
multiprocessing.h: remove unused MIN and MAX macros
2013-06-04 23:14:37 +02:00
Victor Stinner
0b81111b18
(Merge 3.3) Close #18109 : os.uname() now decodes fields from the locale
...
encoding, and socket.gethostname() now decodes the hostname from the locale
encoding, instead of using the UTF-8 encoding in strict mode.
2013-06-03 22:09:14 +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
Giampaolo Rodola'
80e1c43ddf
Fix issue #17996 : expose socket.AF_LINK constant on BSD and OSX.
2013-05-21 21:02:04 +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
74ca886788
Issue #17917 : Use PyModule_AddIntMacro() instead of PyModule_AddIntConstant()
...
when applicable.
2013-05-20 19:13:19 +02:00
Benjamin Peterson
aa96588399
merge 3.3
2013-05-16 15:30:09 -05:00
Terry Jan Reedy
8b53559a89
Merge with 3.3, issue #17047 : remove doubled words added in 3.3,
...
as reported by Serhiy Storchaka and Matthew Barnett.
2013-03-11 18:36:38 -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
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
0832af6628
Issue #16717 : get rid of socket.error, replace with OSError
2012-12-18 23:10:48 +02:00
Benjamin Peterson
57b667261c
expose TCP_FASTOPEN and MSG_FASTOPEN
2012-12-12 22:24:47 -05:00
Jesus Cea
14c81aba50
#16135 : Removal of OS/2 support (Modules/*)
2012-10-05 02:11:36 +02:00
Charles-François Natali
f8f5237b2f
Remove useless test (flowinfo is unsigned).
2012-06-23 10:26:54 +02:00
Charles-François Natali
9b0c006eb0
Remove useless test (flowinfo is unsigned).
2012-06-23 10:17:05 +02: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
9a54a260de
Issue #14300 : Under Windows, sockets created using socket.dup() now allow overlapped I/O.
...
Patch by sbt.
2012-04-01 01:14:39 +02:00
Kristján Valur Jónsson
310052c1f0
Fix warning when compiling socketmodule.c with VS2010
...
VS2010 defineds the old errno constants in addition to the WSA* ones.
2012-03-31 13:35:00 +00:00
Ross Lagerwall
8c159761de
Issue #10951 : Fix warnings in the socket module.
2012-03-06 21:36:18 +02:00
Martin v. Löwis
9d6c66933a
Issue #13777 : Add PF_SYSTEM sockets on OS X.
...
Patch by Michael Goderbauer.
2012-02-03 17:44:58 +01: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
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
Charles-François Natali
8b759655d0
Issue #8623 : Fix some strict-aliasing warnings. Patch by David Watson.
2011-12-23 16:44:51 +01:00
Charles-François Natali
564a42c8de
Issue #12809 : Expose IP_TRANSPARENT in the socket module. Patch by Michael
...
Farrell.
2011-12-17 14:59:56 +01:00
Victor Stinner
1f33f2b0c3
Issue #13560 : os.strerror() now uses the current locale encoding instead of UTF-8
2011-12-17 04:45:09 +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
Victor Stinner
9d3b93ba30
Use the new Unicode API
...
* Replace PyUnicode_FromUnicode(NULL, 0) by PyUnicode_New(0, 0)
* Replce PyUnicode_FromUnicode(str, len) by PyUnicode_FromWideChar(str, len)
* Replace Py_UNICODE by wchar_t
* posix_putenv() uses PyUnicode_FromFormat() to create the string, instead
of PyUnicode_FromUnicode() + _snwprintf()
2011-11-22 02:27:30 +01:00
Victor Stinner
74168975cc
socket_gethostname() uses a wchar_t* with PyMem_Malloc() to avoid the
...
old Unicode API.
2011-11-17 01:11: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
Victor Stinner
cb98bed299
Issue #12619 : Expose socket.SO_BINDTODEVICE constant
2011-10-25 13:45:48 +02:00
Martin v. Löwis
bd928fef42
Rename _Py_identifier to _Py_IDENTIFIER.
2011-10-14 10:20:37 +02:00
Antoine Pitrou
6b4883dec0
PEP 3151 / issue #12555 : reworking the OS and IO exception hierarchy.
2011-10-12 02:54:14 +02:00
Martin v. Löwis
afe55bba33
Add API for static strings, primarily good for identifiers.
...
Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
2011-10-09 10:38:36 +02:00
Charles-François Natali
30589c9041
Issue #10141 : fix socketmodule compilation on Linux systems with <linux/can.h>
...
but without AF_CAN definition.
2011-10-07 22:47:08 +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
Victor Stinner
639418812f
Use the new Py_ARRAY_LENGTH macro
2011-09-29 00:42:28 +02:00
Charles-François Natali
466517df0e
Issue #12837 : POSIX.1-2008 allows socklen_t to be a signed integer: re-enable
...
the check against negative values, and add a note on this surprising test.
Patch by David Watson.
2011-08-28 18:23:43 +02:00
Charles-François Natali
ac7e9e058d
Issue #12287 : Fix a stack corruption in ossaudiodev module when the FD is
...
greater than FD_SETSIZE.
2011-08-28 18:10:27 +02:00
Charles-François Natali
aa26b27503
Issue #12287 : Fix a stack corruption in ossaudiodev module when the FD is
...
greater than FD_SETSIZE.
2011-08-28 17:51:43 +02:00
Charles-François Natali
e9e95ae93d
sock_sendmsg/sock_recvmsg: Use {0} to 0-initialize aggregate types with
...
automatic storage class.
2011-08-24 21:40:53 +02:00
Charles-François Natali
b09f25e9a3
Issue12810: Remove check for negative unsigned value in socketmodule.c. Patch
...
by Joel Stanley.
2011-08-24 20:07:54 +02:00
Victor Stinner
710d27e93a
Close #12826 : fix socketmodule.c for OpenBSD, include sys/uio.h
...
Patch written by Remi Pointel.
2011-08-23 10:57:32 +02:00
Nick Coghlan
4ecf6cfc20
Attempt to address Windows buildbot failures
2011-08-22 15:45:19 +10: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
Ezio Melotti
7ec7fc4c3b
#12725 : merge with 3.2.
2011-08-14 08:29:49 +03:00
Ezio Melotti
388c945e97
#12725 : fix working. Patch by Ben Hayden.
2011-08-14 08:28:57 +03:00
Gregory P. Smith
d64b2bae9b
merge heads.
2011-06-04 23:05:19 -07:00
Victor Stinner
77af172914
socket.sendto(): exit directly after setting the error
...
Dummy change to avoid a false positive with the Clang Static Analyzer.
2011-05-26 14:05:59 +02:00
Gregory P. Smith
b6471db8a7
Further documentation updates to be consistent with doc standards and comments
...
Ezio Melotti pointed out.
2011-05-22 22:47:55 -07: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
3b1f2c35f4
issue #1746656 : Fix for OS X. configure and #include changes so that the socket
...
module compiles again on OS X with its more annoying #include requirements.
2011-05-15 12:18:23 -07: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
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
Antoine Pitrou
9befeb3743
Issue #5421 : merge fix
2011-03-17 22:40:18 +01:00
Antoine Pitrou
5e98141f9f
Issue #5421 : Fix misleading error message when one of socket.sendto()'s
...
arguments has the wrong type. Patch by Nikita Vetoshkin.
2011-03-17 22:38:37 +01:00
Ezio Melotti
3b3499ba69
#11565 : Merge with 3.1.
2011-03-16 11:35:38 +02:00
Ezio Melotti
13925008dc
#11565 : Fix several typos. Patch by Piotr Kasprzyk.
2011-03-16 11:05:33 +02:00
Antoine Pitrou
fee6684f3c
Issue #5421 : merge fix
2011-03-17 22:46:17 +01:00
Ezio Melotti
b88ed1549e
#11565 : Merge with 3.2.
2011-03-16 11:38:59 +02:00
Jesus Cea
736e7fc0f6
Issue #11495 : OSF support is eliminated. It was deprecated in Python 3.2
2011-03-14 17:36:54 +01:00
Antoine Pitrou
061cfb5258
Issue #10866 : Add socket.sethostname(). Initial patch by Ross Lagerwall.
2011-02-28 22:25:22 +00:00
Brett Cannon
b94767ff44
Issue #8914 : fix various warnings from the Clang static analyzer v254.
2011-02-22 20:15:44 +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
Antoine Pitrou
c4df784514
Issue #10272 : The ssl module now raises socket.timeout instead of a generic
...
SSLError on socket timeouts.
2010-12-03 19:59:41 +00:00
Hirokazu Yamamoto
09fff7a8d1
Fixed socket_gethostname() on windows.
2010-11-05 17:24:13 +00:00
Benjamin Peterson
e857b29fdd
plug refleak
2010-10-29 21:37:26 +00:00
Martin v. Löwis
72f48422e2
Issue #9377 : Use Unicode API for gethostname on Windows.
2010-10-29 18:20:08 +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
323dd70b48
Merged revisions 85868 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85868 | antoine.pitrou | 2010-10-27 22:13:57 +0200 (mer., 27 oct. 2010) | 3 lines
Issue #8852 : Allow the socket module to build on OpenSolaris.
........
2010-10-27 20:27:14 +00:00
Antoine Pitrou
b156a46b26
Issue #8852 : Allow the socket module to build on OpenSolaris.
2010-10-27 20:13:57 +00:00
Antoine Pitrou
61ec8de809
For now, remove accept4() code (issue #10115 )
2010-10-22 18:44:15 +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
3e85dfd15e
applying netbsd-wizs-mod.patch from issue5510 -
...
fixes for netbsd (and dragonflybsd?)
2010-10-17 00:43:10 +00:00
Antoine Pitrou
b1c5496738
Issue #7523 : Add SOCK_CLOEXEC and SOCK_NONBLOCK to the socket module,
...
where supported by the system. Patch by Nikita Vetoshkin.
2010-10-14 15:05:38 +00:00
Gregory P. Smith
bc5d78d304
Merged revisions 85404 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85404 | gregory.p.smith | 2010-10-12 20:39:47 -0700 (Tue, 12 Oct 2010) | 2 lines
fix compliation on NetBSD
........
2010-10-13 03:51:16 +00:00
Gregory P. Smith
2501aca628
fix compliation on NetBSD
2010-10-13 03:39:47 +00:00
Antoine Pitrou
c8f0196454
Fix compilation under Windows
2010-09-28 22:03:27 +00:00
Antoine Pitrou
3e1fd27b74
Issue #9090 : When a socket with a timeout fails with EWOULDBLOCK or EAGAIN,
...
retry the select() loop instead of bailing out. This is because select()
can incorrectly report a socket as ready for reading (for example, if it
received some data with an invalid checksum).
2010-09-28 21:23:11 +00:00
Antoine Pitrou
08ae02f11e
Merged revisions 85032 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85032 | antoine.pitrou | 2010-09-27 19:52:25 +0200 (lun., 27 sept. 2010) | 6 lines
Issue #9950 : Fix socket.sendall() crash or misbehaviour when a signal is
received. Now sendall() properly calls signal handlers if necessary,
and retries sending if these returned successfully, including on sockets
with a timeout.
........
2010-09-27 18:14:43 +00:00
Antoine Pitrou
6d7df63837
Issue #9950 : Fix socket.sendall() crash or misbehaviour when a signal is
...
received. Now sendall() properly calls signal handlers if necessary,
and retries sending if these returned successfully, including on sockets
with a timeout.
2010-09-27 17:52:25 +00:00
Daniel Stutzbach
ee541e0d81
Merged revisions 84450 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84450 | daniel.stutzbach | 2010-09-03 07:38:33 -0500 (Fri, 03 Sep 2010) | 1 line
Fix Issue9753: socket.dup() does not always work right on Windows
........
2010-09-03 12:42:06 +00:00
Daniel Stutzbach
6c765284a3
Fix Issue9753: socket.dup() does not always work right on Windows
2010-09-03 12:38:33 +00:00
Martin v. Löwis
112c0f3411
Issue #1027206 : getnameinfo is now restricted to numeric addresses as input.
2010-08-25 07:38:15 +00:00
Martin v. Löwis
fc0275a14a
Issue #1027206 : Support IDNA in gethostbyname, gethostbyname_ex and
...
getaddrinfo. Patch by David Watson.
2010-08-22 19:33:47 +00:00
Antoine Pitrou
f72006f442
Merged revisions 84146-84147,84150 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84146 | antoine.pitrou | 2010-08-17 19:55:07 +0200 (mar., 17 août 2010) | 4 lines
Issue #9612 : The set object is now 64-bit clean under Windows.
........
r84147 | antoine.pitrou | 2010-08-17 20:30:06 +0200 (mar., 17 août 2010) | 3 lines
Fix <deque iterator>.__length_hint__() under 64-bit Windows.
........
r84150 | antoine.pitrou | 2010-08-17 21:33:30 +0200 (mar., 17 août 2010) | 3 lines
Clean some 64-bit issues. Also, always spell "ssize_t" "Py_ssize_t".
........
2010-08-17 19:39:39 +00:00
Antoine Pitrou
19467d27ff
Clean some 64-bit issues. Also, always spell "ssize_t" "Py_ssize_t".
2010-08-17 19:33:30 +00:00
Giampaolo Rodolà
ccfb91c89f
fix issue #8866 : parameters passed to socket.getaddrinfo can now be specified as single keyword arguments.
2010-08-17 15:30:23 +00:00
Antoine Pitrou
6e451df800
Followup to r83869 and issue #8524 : rename socket.forget() to socket.detach()
...
and make it return the file descriptor.
2010-08-09 20:39:54 +00:00
Antoine Pitrou
e43f9d0ed6
Issue #8524 : Add a forget() method to socket objects, so as to put the
...
socket into the closed state without closing the underlying file
descriptor.
2010-08-08 23:24:50 +00:00
Antoine Pitrou
7f14f0d8a0
Recorded merge of revisions 81032 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r81032 | antoine.pitrou | 2010-05-09 17:52:27 +0200 (dim., 09 mai 2010) | 9 lines
Recorded merge of revisions 81029 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
................
2010-05-09 16:14:21 +00:00
Antoine Pitrou
f95a1b3c53
Recorded merge of revisions 81029 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
2010-05-09 15:52:27 +00:00
Antoine Pitrou
72867d611d
Merged revisions 80612 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r80612 | antoine.pitrou | 2010-04-29 12:11:46 +0200 (jeu., 29 avril 2010) | 10 lines
Merged revisions 80610 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r80610 | antoine.pitrou | 2010-04-29 12:05:40 +0200 (jeu., 29 avril 2010) | 4 lines
Issue #7834 : Fix connect() of Bluetooth L2CAP sockets with recent versions
of the Linux kernel. Patch by Yaniv Aknin.
........
................
2010-04-29 10:18:33 +00:00
Antoine Pitrou
bf043491a1
Merged revisions 80610 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r80610 | antoine.pitrou | 2010-04-29 12:05:40 +0200 (jeu., 29 avril 2010) | 4 lines
Issue #7834 : Fix connect() of Bluetooth L2CAP sockets with recent versions
of the Linux kernel. Patch by Yaniv Aknin.
........
2010-04-29 10:11:46 +00:00
Larry Hastings
f0f3795068
- Issue #8235 : _socket: Add the constant ``SO_SETFIB``. SO_SETFIB is
...
a socket option available on FreeBSD 7.1 and newer.
2010-04-02 11:47:10 +00:00
Antoine Pitrou
c9213f5849
Merged revisions 77972 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r77972 | antoine.pitrou | 2010-02-04 21:23:24 +0100 (jeu., 04 févr. 2010) | 12 lines
Merged revisions 77970 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r77970 | antoine.pitrou | 2010-02-04 21:20:18 +0100 (jeu., 04 févr. 2010) | 6 lines
Issue #4772 : Raise a ValueError when an unknown Bluetooth protocol is
specified, rather than fall through to AF_PACKET (in the `socket` module).
Also, raise ValueError rather than TypeError when an unknown TIPC address
type is specified. Patch by Brian Curtin.
........
................
2010-02-04 20:26:18 +00:00
Antoine Pitrou
b6375f1266
Merged revisions 77970 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r77970 | antoine.pitrou | 2010-02-04 21:20:18 +0100 (jeu., 04 févr. 2010) | 6 lines
Issue #4772 : Raise a ValueError when an unknown Bluetooth protocol is
specified, rather than fall through to AF_PACKET (in the `socket` module).
Also, raise ValueError rather than TypeError when an unknown TIPC address
type is specified. Patch by Brian Curtin.
........
2010-02-04 20:23:24 +00:00