Commit Graph

525 Commits

Author SHA1 Message Date
Benjamin Peterson 901acb4d89 merge 3.3 (#20251) 2014-01-14 00:22:50 -05:00
Benjamin Peterson a677d7628b remove overly strict assertion (closes #20251) 2014-01-14 00:21:49 -05:00
Benjamin Peterson c6b37e21f5 merge 3.3 (#20246) 2014-01-13 23:14:42 -05:00
Benjamin Peterson 5688222907 merge 3.2 (#20246) 2014-01-13 23:12:55 -05:00
Benjamin Peterson fbf648ebba complain when nbytes > buflen to fix possible buffer overflow (closes #20246) 2014-01-13 22:59:38 -05:00
Brett Cannon b05cbe61b3 Issue #12837: Silence a Clang compiler warning on OS X.
Now makes CPython build without warnings on OS X under Clang with
-Wno-unused-value -Wno-empty-body -Qunused-arguments
-Wno-deprecated-declarations.

Thanks to David Watson for taking an initial stab at a solution.
2014-01-07 17:01:01 -05:00
Christian Heimes af01f66817 Issue #16136: Remove VMS support and VMS-related code 2013-12-21 16:19:10 +01:00
Guido van Rossum 638aebd58e Fix broken docstring continuation line for detach(). 2013-12-04 11:50:09 -08:00
Victor Stinner 9a954838ab Close #19827: On UNIX, setblocking() and settimeout() methods of socket.socket
can now avoid a second syscall if the ioctl() function can be used, or if the
non-blocking flag of the socket is unchanged.
2013-12-04 00:41:24 +01:00
Benjamin Peterson 1314ef73d0 add SO_PRIORITY (closes #19802)
Patch by Claudiu Popa.
2013-11-27 09:18:54 -06:00
Victor Stinner e990c6e952 Fix sock_recvfrom_guts(): recvfrom() size is limited to an int on Windows, not
on other OSes!
2013-11-16 00:18:58 +01:00
Jason R. Coombs 8ec784c2df Issue #7171: Update syntax to replace MAX in favor of Py_MAX (matching implementation for Unix). 2013-11-10 13:43:22 -05:00
Serhiy Storchaka 9594942716 Issue #18783: Removed existing mentions of Python long type in docstrings,
error messages and comments.
2013-08-27 19:40:23 +03:00
Christian Heimes 9228837e31 Issue #18549: Eliminate dead code in socket_ntohl().
CID 982369
2013-07-25 11:46:10 +02:00
Christian Heimes d2774c7d09 Issue #18259: Declare sethostname in socketmodule.c for AIX 2013-06-19 02:06:29 +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
Victor Stinner a534fc4b3b 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:07:27 +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
Benjamin Peterson 18b7191653 C89 declaration compliance 2013-05-16 15:29:44 -05:00
Terry Jan Reedy 0f84764a09 Issue #17047: remove doubled words added in 3.3
as reported by Serhiy Storchaka and Matthew Barnett.
2013-03-11 18:34:00 -04:00
Antoine Pitrou c73c561181 Issue #17173: Remove uses of locale-dependent C functions (isalpha() etc.) in the interpreter.
I've left a couple of them in: zlib (third-party lib), getaddrinfo.c
(doesn't include Python.h, and probably obsolete), _sre.c (legitimate
use for the re.LOCALE flag), mpdecimal (needs to build without Python.h).
2013-02-09 23:14:42 +01:00
Antoine Pitrou 4de7457009 Issue #17173: Remove uses of locale-dependent C functions (isalpha() etc.) in the interpreter.
I've left a couple of them in: zlib (third-party lib), getaddrinfo.c
(doesn't include Python.h, and probably obsolete), _sre.c (legitimate
use for the re.LOCALE flag).
2013-02-09 23:11:27 +01: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
Christian Heimes 15b6885fe0 Make sure that *really* no more than sizeof(ifr.ifr_name) chars are strcpy-ed to ifr.ifr_name and that the string is *always* NUL terminated. New code shouldn't use strcpy(), too. CID 719692 2012-09-10 01:25:50 +02:00
Andrew Svetlov c53eb9dfe2 Merge 3.2 to default 2012-08-14 18:42:10 +03:00
Matthias Klose d182a6c77e Modules/socketmodule.c: netdb_lock: define static. 2012-08-14 17:29:04 +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
Georg Brandl 6083a4bc1c Re #18521: remove assignments of variables that are immediately reassigned. 2013-10-14 06:51:46 +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
Charles-François Natali 24aa041731 Use INADDR_BROADCAST instead of hard-coded value (it's part of POSIX and
already appears without #ifdef a couple lines above).
2013-08-31 14:48:25 +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
Serhiy Storchaka 46e1ce214b Issue #18783: Removed existing mentions of Python long type in docstrings,
error messages and comments.
2013-08-27 20:17:03 +03:00
Christian Heimes 7c8cd257e4 Issue #18549: Eliminate dead code in socket_ntohl().
CID 982369
2013-07-25 11:47:25 +02:00
Victor Stinner 14b9b11098 If MS_WIN64 is defined, MS_WINDOWS is also defined: #ifdef can be simplified. 2013-06-25 00:37:25 +02:00
Victor Stinner 9a644b23cc Issue #9566: recv(), recvfrom(), send(), sendall() and sendto() methods
of socket.socket objects now truncate the input buffer to INT_MAX bytes on
Windows to avoid an integer overflow.

(sendall() still send the whole buffer.)
2013-06-24 23:47:41 +02:00
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