Commit Graph

5145 Commits

Author SHA1 Message Date
Raymond Hettinger 740d6134f1 merge 2015-05-17 14:47:00 -07:00
Raymond Hettinger 610a51f364 Issue #23757: Only call the concrete list API for exact lists. 2015-05-17 14:45:58 -07:00
Raymond Hettinger d4be691494 Issue #24064: Help property() support GC 2015-05-13 11:12:33 -07:00
Raymond Hettinger 5af9e13c18 Minor stylistic and consistency cleanup. 2015-05-13 01:44:36 -07:00
Raymond Hettinger 1bd8d75be3 Issue #23290: Optimize set_merge() for cases where the target is empty.
(Contributed by Serhiy Storchaka.)
2015-05-13 01:26:14 -07:00
Raymond Hettinger eac503aeac Issue #24064: Property() docstrings are now writeable.
(Patch by Berker Peksag.)
2015-05-13 01:09:59 -07:00
Serhiy Storchaka 48e47aaa28 Issue #22486: Added the math.gcd() function. The fractions.gcd() function now is
deprecated.  Based on patch by Mark Dickinson.
2015-05-13 00:19:51 +03:00
Serhiy Storchaka 0d4df752ac Issue #15027: The UTF-32 encoder is now 3x to 7x faster. 2015-05-12 23:12:45 +03:00
Yury Selivanov df52e67d85 Fix warnings for gen_get_iter() 2015-05-11 23:23:05 -04:00
Yury Selivanov 7544508f02 PEP 0492 -- Coroutines with async and await syntax. Issue #24017. 2015-05-11 22:57:16 -04:00
Yury Selivanov 18c30a29f8 Issue #22906: Do incref before SetCause/SetContext 2015-05-10 15:09:46 -04:00
Yury Selivanov 80e4dbea0e Issue 22906: Increment refcount after PyException_SetContext 2015-05-09 14:04:17 -04:00
Yury Selivanov 8170e8c0d1 PEP 479: Change StopIteration handling inside generators.
Closes issue #22906.
2015-05-09 11:44:30 -04:00
Benjamin Peterson 025e9ebd0a PEP 448: additional unpacking generalizations (closes #2292)
Patch by Neil Girdhar.
2015-05-05 20:16:41 -04:00
Raymond Hettinger c4e335b67a Issue #23910: Optimize property() getter calls. Patch by Joe Jevnik 2015-04-30 08:08:13 -07:00
Andrew Svetlov 48050cbbe7 Merge 3.4 2015-04-27 17:49:16 +03:00
Andrew Svetlov 9df36c9456 Issue #21354: PyCFunction_New function is exposed by python DLL again. 2015-04-27 17:48:50 +03:00
Antoine Pitrou 7503509f19 Issue #23996: Avoid a crash when a delegated generator raises an unnormalized StopIteration exception. Patch by Stefan Behnel. 2015-04-26 18:48:16 +02:00
Antoine Pitrou 7403e91630 Issue #23996: Avoid a crash when a delegated generator raises an unnormalized StopIteration exception. Patch by Stefan Behnel. 2015-04-26 18:46:40 +02:00
Gregory P. Smith 8cb6569fe1 Implements issue #9951: Adds a hex() method to bytes, bytearray, & memoryview.
Also updates a few internal implementations of the same thing to use the
new built-in code.

Contributed by Arnon Yaari.
2015-04-25 23:22:26 +00:00
Serhiy Storchaka 247789cee9 Issue #24007: Argument Clinic now writes the format of PyArg_Parse*() at the
same line as function name.
2015-04-24 00:40:51 +03:00
Benjamin Peterson a30e2256f7 merge 3.4 (#24044) 2015-04-23 17:06:45 -04:00
Benjamin Peterson bd91ee9cd7 merge 3.3 (#24044) 2015-04-23 17:06:33 -04:00
Benjamin Peterson 51454a62e2 merge 3.2 (#24044) 2015-04-23 17:05:07 -04:00
Benjamin Peterson 0823ffb2fb properly handle malloc failure (closes #24044)
Patch by Christian Heimes.
2015-04-23 17:04:36 -04:00
Benjamin Peterson 4320f54ea3 merge 3.4 (#22785) 2015-04-22 09:16:27 -04:00
Benjamin Peterson ac22c6b923 improved range docstring (closes #22785)
Patch by Ned Batchelder.
2015-04-22 09:16:07 -04:00
Serhiy Storchaka 7e9d1d1a1b Issue #23908: os functions now reject paths with embedded null character
on Windows instead of silently truncate them.

Removed no longer used _PyUnicode_HasNULChars().
2015-04-20 10:12:28 +03:00
Christian Heimes 4e25913f9f Remove local dead code. In both blocks dir is always greater 0. 2015-04-18 05:54:02 +02:00
Steve Dower cb39d1f466 Issue 19933: Provide default argument for ndigits in round. Patch by Vajrasky Kok. 2015-04-15 16:10:59 -04:00
Larry Hastings 89964c48d1 Issue #23944: Argument Clinic now wraps long impl prototypes at column 78. 2015-04-14 18:07:59 -04:00
Zachary Ware 8ef887ce47 Issue #20586: Argument Clinic now ensures signatures on functions without docstrings. 2015-04-13 18:22:35 -05:00
Antoine Pitrou a63cc21234 Issue #23726: Don't enable GC for user subclasses of non-GC types that don't add any new fields.
Patch by Eugene Toder.
2015-04-13 20:10:06 +02:00
Serhiy Storchaka 92e8af67a8 Issue #23492: Argument Clinic now generates argument parsing code with
PyArg_Parse instead of PyArg_ParseTuple if possible.
2015-04-04 00:12:11 +03:00
Serhiy Storchaka 1009bf18b3 Issue #23501: Argumen Clinic now generates code into separate files by default. 2015-04-03 23:53:51 +03:00
Serhiy Storchaka 41525e31a5 Issue #23466: Raised OverflowError if %c argument is out of range. 2015-04-03 20:53:46 +03:00
Serhiy Storchaka be1c60c3f6 Issue #23783: Fixed memory leak in PyObject_ClearWeakRefs() in case of
MemoryError.
2015-03-30 09:52:53 +03:00
Serhiy Storchaka 4aa867959f Issue #23783: Fixed memory leak in PyObject_ClearWeakRefs() in case of
MemoryError.
2015-03-30 09:52:29 +03:00
Serhiy Storchaka 2c7b5a9d0d Issue #23466: %c, %o, %x, and %X in bytes formatting now raise TypeError on
non-integer input.
2015-03-30 09:19:08 +03:00
Serhiy Storchaka 48070c1248 Issue #23803: Fixed str.partition() and str.rpartition() when a separator
is wider then partitioned string.
2015-03-29 19:21:02 +03:00
Victor Stinner 1912b39def _PyUnicodeWriter_WriteStr() now checks that the input string is consistent
in debug mode to detect bugs earlier.

_PyUnicodeWriter_Finish() doesn't check if the read only string is consistent,
whereas it does check consistency for strings built by itself.
2015-03-26 09:37:23 +01:00
Serhiy Storchaka d357b89f0b Issue #22079: Deprecation warning now is issued in PyType_Ready() instead of
raising TypeError when statically allocated type subclasses dynamically
allocated type
2015-03-22 09:46:36 +02:00
Victor Stinner dabbfe7b30 Issue #23573: Fix bytes.rfind() and bytearray.rfind() on Windows
Windows has no memrchr() function.

This change is only a workaround, the optimization must be reenabled on other
platforms.
2015-03-25 03:16:32 +01:00
Serhiy Storchaka d9d769fcdd Issue #23573: Increased performance of string search operations (str.find,
str.index, str.count, the in operator, str.split, str.partition) with
arguments of different kinds (UCS1, UCS2, UCS4).
2015-03-24 21:55:47 +02:00
Victor Stinner 944fbcc478 Issue #23571: Enhance _Py_CheckFunctionResult()
Too bad, sometimes Py_FatalError() is unable to write the exception into
sys.stderr (on "AMD64 OpenIndiana 3.x" buildbot, the buildbot was probably out
of memory).

Call Py_FatalError() with a different message for the two cases (result+error,
or no result and no error).
2015-03-24 16:28:52 +01:00
Victor Stinner 454bd3a277 stdprinter_write(): mention the encoding 2015-03-24 13:40:29 +01:00
Victor Stinner 3b06dfb9d1 Issue #23571: In debug mode, _Py_CheckFunctionResult() now calls
Py_FatalError() instead of using an assertion in debug mode. Py_FatalError()
displays the current exception and the traceback which contain more information
than just the assertion error.
2015-03-24 12:53:59 +01:00
Victor Stinner efde146b0c Issue #23571: _Py_CheckFunctionResult() now gives the name of the function
which returned an invalid result (result+error or no result without error) in
the exception message.

Add also unit test to check that the exception contains the name of the
function.

Special case: the final _PyEval_EvalFrameEx() check doesn't mention the
function since it didn't execute a single function but a whole frame.
2015-03-21 15:04:43 +01:00
Serhiy Storchaka 1dd49824df Issue #23681: The -b option now affects comparisons of bytes with int. 2015-03-20 16:54:57 +02:00
Victor Stinner f50e187724 Fix compiler warnings: comparison between signed and unsigned numbers 2015-03-20 11:32:24 +01:00