Commit Graph

9767 Commits

Author SHA1 Message Date
Serhiy Storchaka 9204a20452 Issue #27897: Fixed possible crash in sqlite3.Connection.create_collation()
if pass invalid string-like object as a name.  Patch by Xiang Zhang.
2016-09-27 00:16:25 +03:00
Serhiy Storchaka 22805ca54e Issue #27897: Fixed possible crash in sqlite3.Connection.create_collation()
if pass invalid string-like object as a name.  Patch by Xiang Zhang.
2016-09-27 00:14:24 +03:00
Serhiy Storchaka 407ac47690 Issue #27897: Fixed possible crash in sqlite3.Connection.create_collation()
if pass invalid string-like object as a name.  Patch by Xiang Zhang.
2016-09-27 00:10:03 +03:00
Berker Peksag e2197d1312 Issue #20100: Simplify newPyEpoll_Object()
EPOLL_CLOEXEC is the only value that can be passed
to epoll_create1() and we are passing EPOLL_CLOEXEC
unconditionally since Python 3.4.
2016-09-26 23:30:41 +03:00
Christian Heimes 5a274465a1 Issue #28277: remove linefeed character from iomodule.h. Patch by Michael Felt 2016-09-26 14:08:56 +02:00
Christian Heimes 9df89d06a0 Issue #28277: remove linefeed character from iomodule.h. Patch by Michael Felt 2016-09-26 14:08:47 +02:00
Christian Heimes 04133e7e2e Typo 2016-09-24 12:07:30 +02:00
Christian Heimes 1a63b9f288 Typo 2016-09-24 12:07:21 +02:00
Christian Heimes 7713ef432b Finish GC code for SSLSession and increase test coverage 2016-09-24 10:48:16 +02:00
Christian Heimes a5d0765990 Finish GC code for SSLSession and increase test coverage 2016-09-24 10:48:05 +02:00
Christian Heimes fec8627322 Increase buffer for readlink() in case OS will support longer names one day. 2016-09-23 20:24:45 +02:00
Christian Heimes 6f3f3e5ca4 Increase buffer for readlink() in case OS will support longer names one day. 2016-09-23 20:24:39 +02:00
Christian Heimes 3cb091e576 Increase buffer for readlink() in case OS will support longer names one day. 2016-09-23 20:24:28 +02:00
Christian Heimes 4e8fa31029 Add an extra byte for null in case we ever get very long unicode names. 2016-09-23 20:21:27 +02:00
Christian Heimes 0202c347bc Add an extra byte for null in case we ever get very long unicode names. 2016-09-23 20:21:20 +02:00
Christian Heimes 2f366cab48 Add an extra byte for null in case we ever get very long unicode names. 2016-09-23 20:20:27 +02:00
Christian Heimes d55bdb86ca Don't define PY_WITH_KECCAK 2016-09-21 14:37:04 +02:00
Christian Heimes b00e00c339 Don't define PY_WITH_KECCAK 2016-09-21 14:36:44 +02:00
Victor Stinner b6f3c0dca1 Merge 3.6 (os.getrandom) 2016-09-20 23:01:22 +02:00
Victor Stinner ec2319c46d Fix memleak in os.getrandom()
Issue #27778: Fix a memory leak in os.getrandom() when the getrandom() is
interrupted by a signal and a signal handler raises a Python exception.

Modify also os_getrandom_impl() to avoid the temporary buffer, use directly a
Python bytes object.
2016-09-20 23:00:59 +02:00
Benjamin Peterson b90d15d57e merge 3.6 2016-09-19 22:20:19 -07:00
Benjamin Peterson 8ac46c972f revert expat changes 2016-09-19 22:20:13 -07:00
Benjamin Peterson adaa56ac35 merge 3.6 (closes #28184) 2016-09-19 22:17:44 -07:00
Benjamin Peterson e2e792d98f merge 3.5 (#28184) 2016-09-19 22:17:16 -07:00
Victor Stinner 822675b82e Merge 3.6 2016-09-19 11:56:06 +02:00
Victor Stinner 26c03bd7d5 Fix memory leak in path_converter()
Issue #28200: Replace PyUnicode_AsWideCharString() with
PyUnicode_AsUnicodeAndSize().
2016-09-19 11:55:44 +02:00
Benjamin Peterson 75361243d5 merge 3.6 2016-09-18 18:12:44 -07:00
Benjamin Peterson ac965ca16c stop using Py_LL and Py_ULL 2016-09-18 18:12:21 -07:00
Berker Peksag bf3c1c3235 Issue #28075: Fix test_access_denied in Python 3.5
I forgot there two variations of os.stat() in Python 3.5.
2016-09-18 13:56:29 +03:00
Steve Dower b401d723ac Issue #28161: Opening CON for write access fails
Issue #28162: WindowsConsoleIO readall() fails if first line starts with Ctrl+Z
Issue #28163: WindowsConsoleIO fileno() passes wrong flags to _open_osfhandle
Issue #28164: _PyIO_get_console_type fails for various paths
2016-09-17 13:51:32 -07:00
Steve Dower 27f26ad962 Issue #28161: Opening CON for write access fails
Issue #28162: WindowsConsoleIO readall() fails if first line starts with Ctrl+Z
Issue #28163: WindowsConsoleIO fileno() passes wrong flags to _open_osfhandle
Issue #28164: _PyIO_get_console_type fails for various paths
2016-09-17 13:51:23 -07:00
Steve Dower 64566db065 Merge with 3.6 2016-09-17 12:57:03 -07:00
Steve Dower 313523ce2d Issue #28192: Don't import readline in isolated mode 2016-09-17 12:22:41 -07:00
Berker Peksag 6adb223831 Issue #28075: Merge from 3.6 2016-09-17 15:51:43 +03:00
Berker Peksag 052e4f18c4 Issue #28075: Merge from 3.5 2016-09-17 15:51:14 +03:00
Berker Peksag 0b4dc4846b Issue #28075: Check for ERROR_ACCESS_DENIED in Windows implementation of os.stat()
Patch by Eryk Sun.
2016-09-17 15:49:59 +03:00
Martin Panter 369052bb05 Issue #28139: Merge indentation fixes from 3.6 2016-09-17 07:59:32 +00:00
Martin Panter d508d00919 Issue #28139: Merge indentation fixes from 3.5 into 3.6 2016-09-17 07:59:14 +00:00
Zachary Ware f40d4ddff3 Closes #27979: Remove bundled copy of libffi
An installed copy of libffi is now required for building _ctypes on
any platform but OSX and Windows.
2016-09-17 01:25:24 -05:00
Martin Panter 6d57fe1c23 Issue #28139: Fix messed up indentation
Also update the classmethod and staticmethod doc strings and comments to
match the RST documentation.
2016-09-17 03:26:16 +00:00
Martin Panter 355bbb0a2a Issue #28145: Merge spelling fixes from 3.5 into 3.6 2016-09-16 00:55:27 +00:00
Martin Panter 2dc77f0e19 Issue #28145: Spelling fixes 2016-09-16 00:46:05 +00:00
Berker Peksag 3940499ca8 Issue #28156: Export os.getpid() conditionally
Patch by Ed Schouten.
2016-09-15 20:45:16 +03:00
Berker Peksag 8181646931 Issue #28114: Fix a crash in parse_envlist() when env contains byte strings
Patch by Eryk Sun.
2016-09-15 20:19:47 +03:00
Benjamin Peterson 6775231597 Unicode 9.0.0
Not completely mechanical since support for East Asian Width changes—emoji
codepoints became Wide—had to be added to unicodedata.
2016-09-14 23:53:47 -07:00
Berker Peksag 7ec64562b2 Issue #28153: Make kqueue()'s event filters optional
Patch by Ed Schouten.
2016-09-14 18:16:59 +03:00
Serhiy Storchaka 62a1f024b4 Issue #27599: Fixed buffer overrun in binascii.b2a_qp() and binascii.a2b_qp(). 2016-09-14 16:37:34 +03:00
Serhiy Storchaka e6265e92bf Issue #27599: Fixed buffer overrun in binascii.b2a_qp() and binascii.a2b_qp(). 2016-09-14 16:34:37 +03:00
Christian Heimes 8cee10386e Restrict name_length to NAME_MAXLEN in unicodedata_UCD_lookup() 2016-09-14 10:25:54 +02:00
Christian Heimes 7ce201322e Restrict name_length to NAME_MAXLEN in unicodedata_UCD_lookup() 2016-09-14 10:25:46 +02:00
Benjamin Peterson 37098cd584 more granular configure checks for clock_* functions (closes #28081) 2016-09-13 22:55:09 -07:00
Berker Peksag 8ee9edbf45 Issue #28131: Merge from 3.5 2016-09-14 08:10:45 +03:00
Berker Peksag 4aa74c429c Issue #28131: Fix a regression in zipimport's compile_source()
zipimport should use the same optimization level as the interpreter.
2016-09-14 08:09:48 +03:00
Christian Heimes f6365e3816 Issue #28188: Use PyMem_Calloc() to get rid of a type-limits warning and an extra memset() call in _ssl.c. 2016-09-13 20:48:13 +02:00
Christian Heimes f051e43b22 Issue #28126: Replace Py_MEMCPY with memcpy(). Visual Studio can properly optimize memcpy(). 2016-09-13 20:22:02 +02:00
Christian Heimes faf2cea1fd Fix NULL check in sock_sendmsg_iovec. CID 1372885 2016-09-13 10:07:16 +02:00
Victor Stinner 410b9887e1 Issue #27866: Fix refleak in cipher_to_dict() 2016-09-12 12:00:23 +02:00
Victor Stinner 52d61e485e socket: Fix memory leak in sendmsg() and sendmsg_afalg()
Issue #27744:

* Release msg.msg_iov memory block.
* Release memory on PyMem_Malloc(controllen) failure
2016-09-12 11:41:58 +02:00
Victor Stinner 288b5bf624 Cleanup socketmodule.c
Issue #27744:

* PEP 7: add {...} around if blocks
* assign variables and then check their value in if() to make the code easier
  to read and to debug.
2016-09-12 11:45:59 +02:00
Raymond Hettinger 88057171f0 Revert part of 3471a3515827 that caused a performance regression 2016-09-11 22:45:53 -07:00
Berker Peksag 59da4b324f Issue #28037: Use sqlite3_get_autocommit() instead of setting Connection->inTransaction manually
Patch adapted from 9b79188edb
2016-09-12 07:16:43 +03:00
Steve Dower 654a7bdf57 Adds missing assert suppression. 2016-09-11 20:19:32 -07:00
Alexander Belopolsky 18f3a9b93c Closes #25283: Make tm_gmtoff and tm_zone available on all platforms. 2016-09-11 22:55:16 -04:00
Christian Heimes 5fe668c672 Issue #28085: Add PROTOCOL_TLS_CLIENT and PROTOCOL_TLS_SERVER for SSLContext 2016-09-12 00:01:11 +02:00
Serhiy Storchaka ec406fed16 Issue #27810: Regenerate Argument Clinic. 2016-09-11 21:25:45 +03:00
Eric V. Smith a6d75fdc37 Issue 24454: Removed unused match_getitem_doc. 2016-09-11 10:20:27 -04:00
Eric V. Smith b5690864ba Issue 24454: Added whatsnew entry, removed __getitem__ from match_methods. Thanks Serhiy Storchaka. 2016-09-11 09:50:47 -04:00
Eric V. Smith 605bdae078 Issue 24454: Improve the usability of the re match object named group API 2016-09-11 08:55:43 -04:00
Berker Peksag 9af13ca565 Issue #28036: Remove unused pysqlite_flush_statement_cache function 2016-09-11 15:37:30 +03:00
Serhiy Storchaka 8be17409b7 Use uint16_t instead of short in audioop. 2016-09-11 14:48:16 +03:00
Berker Peksag ab994ed8b9 Issue #10740: sqlite3 no longer implicitly commit an open transaction before DDL statements
This commit contains the following commits from ghaering/pysqlite:

* f254c53494
* 796b3afe38
* cae87ee686
* 3567b31bb5

With the following additions:

* Fixed a refcount error
* Fixed a compiler warning
* Made the string comparison a little more robust
* Added a whatsnew entry
2016-09-11 12:57:15 +03:00
Christian Heimes 99a6570295 Issue #19500: Add client-side SSL session resumption to the ssl module. 2016-09-10 23:44:53 +02:00
Alexander Belopolsky 130bbe5fd3 #28067: Fixed another typo. 2016-09-10 16:51:17 -04:00
Christian Heimes 358cfd426c Issue 28043: SSLContext has improved default settings
The options OP_NO_COMPRESSION, OP_CIPHER_SERVER_PREFERENCE, OP_SINGLE_DH_USE, OP_SINGLE_ECDH_USE, OP_NO_SSLv2 (except for PROTOCOL_SSLv2), and OP_NO_SSLv3 (except for PROTOCOL_SSLv3) are set by default. The initial cipher suite list contains only HIGH ciphers, no NULL ciphers and MD5 ciphers (except for PROTOCOL_SSLv2).
2016-09-10 22:43:48 +02:00
Alexander Belopolsky abd143b23b #28067: Fixed a typo. 2016-09-10 16:08:26 -04:00
Alexander Belopolsky 6d88fa5c05 Closes #28067: Do not call localtime (gmtime) in datetime module. 2016-09-10 15:58:31 -04:00
Nick Coghlan 457fc9a69e Issue #27137: align Python & C implementations of functools.partial
The pure Python fallback implementation of functools.partial
now matches the behaviour of its accelerated C counterpart for
subclassing, pickling and text representation purposes.

Patch by Emanuel Barry and Serhiy Storchaka.
2016-09-10 20:00:02 +10:00
Serhiy Storchaka 8f9cafad3d Issue #28019: itertools.count() no longer rounds non-integer step in range
between 1.0 and 2.0 to 1.
2016-09-10 09:53:51 +03:00
Serhiy Storchaka 8ddcf3abf7 Issue #28019: itertools.count() no longer rounds non-integer step in range
between 1.0 and 2.0 to 1.
2016-09-10 09:49:24 +03:00
Łukasz Langa fef7e94fa1 Don't run garbage collection on interpreter exit if it was explicitly disabled
by the user.
2016-09-09 21:47:46 -07:00
Victor Stinner 37e4ef7b17 Issue #27810: Rerun Argument Clinic on all modules 2016-09-09 20:00:13 -07:00
Benjamin Peterson dec2df3df3 fix dummy macro 2016-09-09 17:46:24 -07:00
Łukasz Langa a785c87d6e DTrace support: function calls, GC activity, line execution
Tested on macOS 10.11 dtrace, Ubuntu 16.04 SystemTap, and libbcc.

Largely based by an initial patch by Jesús Cea Avión, with some
influence from Dave Malcolm's SystemTap patch and Nikhil Benesch's
unification patch.

Things deliberately left out for simplicity:
- ustack helpers, I have no way of testing them at this point since
they are Solaris-specific
- PyFrameObject * in function__entry/function__return, this is
SystemTap-specific
- SPARC support
- dynamic tracing
- sys module dtrace facility introspection

All of those might be added later.
2016-09-09 17:37:37 -07:00
Steve Dower ff70fc2206 Issue #25758: Prevents zipimport from unnecessarily encoding a filename (patch by Eryk Sun) 2016-09-09 17:33:37 -07:00
Steve Dower 8dcc48ee3b Issue #25758: Prevents zipimport from unnecessarily encoding a filename (patch by Eryk Sun) 2016-09-09 17:27:33 -07:00
Brett Cannon a721abac29 Issue #26331: Implement the parsing part of PEP 515.
Thanks to Georg Brandl for the patch.
2016-09-09 14:57:09 -07:00
Benjamin Peterson 7d895ac953 remove --with(out)-signal-module, since the signal module is non-optional 2016-09-09 12:01:10 -07:00
Steve Dower 6230aaf561 Issue #27781: Fixes uninitialized fd when !MS_WINDOWS and !HAVE_OPENAT 2016-09-09 09:03:15 -07:00
Yury Selivanov eb6364557f Issue #28003: Implement PEP 525 -- Asynchronous Generators. 2016-09-08 22:01:51 -07:00
Yury Selivanov f8cb8a16a3 Issue #27985: Implement PEP 526 -- Syntax for Variable Annotations.
Patch by Ivan Levkivskyi.
2016-09-08 20:50:03 -07:00
Christian Heimes 0b9d64ebfe Issue 18550: Check return value of ioctl() / fnctl() in internal_setblocking
The function internal_setblocking() of the socket module did not check
the return values of ioctl() and fnctl().

CID 1294328
2016-09-09 00:28:57 +02:00
Christian Heimes ff4fddde57 Add NULL checks to the initializer of the locale module
The _locale module was using old-style APIs to set numeric module
constants from macros. The new way requires less code and properly
checks for NULL.

CID 1295027
2016-09-09 00:24:12 +02:00
Benjamin Peterson bb0b0d9ff0 replace PyInt16 with int16_t 2016-09-08 15:08:02 -07:00
Christian Heimes 7a5457b687 Add error checking to PyInit_pyexpact
The module initializer of the pyexpat module failed to check
the return value of PySys_GetObject() for NULL.

CID 982779
2016-09-09 00:13:35 +02:00
Christian Heimes 6782b14bcb Use PyModule_AddIntMacro() in signal module
The signal module was using old-style module initialization with
potential NULL dereferencing.

CID 1295026
2016-09-09 00:11:45 +02:00
Christian Heimes 275270772e Check return value of PyList_Append() in Py_Main(). CID 1353200 2016-09-09 00:08:35 +02:00
Martin Panter 0be894b2f6 Issue #27895: Spelling fixes (Contributed by Ville Skyttä). 2016-09-07 12:03:06 +00:00
Martin Panter be8da9c990 Issue #27570: Avoid zero-length memcpy() calls with null source pointers 2016-09-07 11:04:41 +00:00
Benjamin Peterson 4a757609d1 do not memcpy from NULL 2016-09-06 19:03:40 -07:00
Christian Heimes 1c03abd026 Issue #27691: Fix ssl module's parsing of GEN_RID subject alternative name fields in X.509 certs. 2016-09-06 23:25:35 +02:00