Commit Graph

4949 Commits

Author SHA1 Message Date
Benjamin Peterson 3032ed7cb1 upgrade to unicode 7.0.0 2014-07-06 13:04:20 -07:00
Antoine Pitrou a93342b8b2 Issue #21897: Fix a crash with the f_locals attribute with closure variables when frame.clear() has been called. 2014-07-04 20:26:22 -04:00
Antoine Pitrou acc8cf2cfa Issue #21897: Fix a crash with the f_locals attribute with closure variables when frame.clear() has been called. 2014-07-04 20:24:13 -04:00
Victor Stinner c68b7fba86 (Merge 3.4) Issue #21892, #21893: Partial revert of changeset 4f55e802baf0,
PyErr_Format() uses "%zd" for Py_ssize_t, not PY_FORMAT_SIZE_T
2014-07-04 22:50:13 +02:00
Victor Stinner a33bce0945 Issue #21892, #21893: Partial revert of changeset 4f55e802baf0, PyErr_Format()
uses "%zd" for Py_ssize_t, not PY_FORMAT_SIZE_T
2014-07-04 22:47:46 +02:00
Victor Stinner 9f43505f3d (Merge 3.4) Closes #21892, #21893: Use PY_FORMAT_SIZE_T instead of %zi or %zu
to format C size_t, because %zi/%u is not supported on all platforms.
2014-07-01 08:57:54 +02:00
Victor Stinner 293f3f526d Closes #21892, #21893: Use PY_FORMAT_SIZE_T instead of %zi or %zu to format C
size_t, because %zi/%u is not supported on all platforms.
2014-07-01 08:57:10 +02:00
Benjamin Peterson 3cbae68de6 merge 3.4 2014-06-26 23:29:19 -07:00
Benjamin Peterson 1791c224dd use NULL not 0 2014-06-26 23:29:13 -07:00
Victor Stinner 40ee30181f Issue #21205: Add a new ``__qualname__`` attribute to generator, the qualified
name, and use it in the representation of a generator (``repr(gen)``). The
default name of the generator (``__name__`` attribute) is now get from the
function instead of the code. Use ``gen.gi_code.co_name`` to get the name of
the code.
2014-06-16 15:59:28 +02:00
Nick Coghlan 26171993fe Merge issue #21669 from 3.4 2014-06-16 19:49:12 +10:00
Nick Coghlan 5b1fdc1e37 Issue #21669: Special case print & exec syntax errors 2014-06-16 19:48:02 +10:00
Victor Stinner 2bc4d95bb6 Issue #21233: Revert bytearray(int) optimization using calloc() 2014-06-02 22:22:42 +02:00
Victor Stinner d8f0d922d5 Issue #21233: Rename the C structure "PyMemAllocator" to "PyMemAllocatorEx" to
make sure that the code using it will be adapted for the new "calloc" field
(instead of crashing).
2014-06-02 21:57:10 +02:00
Victor Stinner 5a1bb4e080 Initialize base types before child types
object (PyBaseObject_Type) is the base type of type (PyType_Type), int
(PyLong_Type) is the base type of bool (PyBool_Type).
2014-06-02 14:10:59 +02:00
Raymond Hettinger 426d9958a2 Add development comments to setobject.c 2014-05-18 21:40:20 +01:00
Stefan Krah bcaf5999e6 Issue #20186: memoryobject.c: add function signatures. 2014-05-18 00:35:09 +02:00
Victor Stinner 45e8e2f218 Issue #21490: Add new C macros: Py_ABS() and Py_STRINGIFY()
Keep _Py_STRINGIZE() in PC/pyconfig.h to not introduce a dependency between
pyconfig.h and pymacros.h.
2014-05-14 17:24:35 +02:00
Victor Stinner 470cf8dfbe (Merge 3.4) Issue #21418: Fix a crash in the builtin function super() when
called without argument and without current frame (ex: embedded Python).
2014-05-13 01:32:54 +02:00
Victor Stinner 1c6970fac9 Issue #21418: Fix a crash in the builtin function super() when called without
argument and without current frame (ex: embedded Python).
2014-05-13 01:32:36 +02:00
Zachary Ware bca9694ac1 Issue #21442: Fix MSVC compiler warning introduced by issue21377. 2014-05-06 11:42:37 -05:00
Victor Stinner 3080d926af Issue #21233: Fix _PyObject_Alloc() when compiled with WITH_VALGRIND defined 2014-05-06 11:32:29 +02:00
Raymond Hettinger 4b74fba62f Issue 21101: Internal API for dict getitem and setitem where the hash value is known. 2014-05-03 16:32:11 -07:00
Victor Stinner af8fc645af Issue #21233: Oops, Fix _PyObject_Alloc(): initialize nbytes before going to
redirect.
2014-05-02 23:26:03 +02:00
Victor Stinner db067af12a Issue #21233: Add new C functions: PyMem_RawCalloc(), PyMem_Calloc(),
PyObject_Calloc(), _PyObject_GC_Calloc(). bytes(int) and bytearray(int) are now
using ``calloc()`` instead of ``malloc()`` for large objects which is faster
and use less memory (until the bytearray buffer is filled with data).
2014-05-02 22:31:14 +02:00
Antoine Pitrou 161d695fb0 Issue #21377: PyBytes_Concat() now tries to concatenate in-place when the first argument has a reference count of 1.
Patch by Nikolaus Rath.
2014-05-01 14:36:20 +02:00
Benjamin Peterson 027ce16691 sprinkle some _PyId goodness around moduleobject.c 2014-04-24 19:39:18 -04:00
Benjamin Peterson 1184e266b9 do not override errors from descriptors on modules 2014-04-24 19:29:23 -04:00
Ethan Furman 7b9ff0e6da Issue8297: module attribute lookup failures now include module name in error message. 2014-04-24 14:47:47 -07:00
Zachary Ware 715ef02ddc Fix a typo in the docstring of nb_index. 2014-04-18 09:23:14 -05:00
Zachary Ware ea42b4cc80 Fix a typo in the signature for object.__ge__ 2014-04-18 09:14:31 -05:00
Zachary Ware 9996a7d21b Merge typo fix from 3.4 2014-04-18 09:23:35 -05:00
Zachary Ware 07b4c5e1f6 Merge typo fix from 3.4 2014-04-18 09:17:04 -05:00
Mark Dickinson 0c346d827d Issue #21193: Make (e.g.,) pow(2, -3, 5) raise ValueError rather than TypeError. Patch by Josh Rosenberg. 2014-04-11 14:34:40 -04:00
Benjamin Peterson d51374ed78 PEP 465: a dedicated infix operator for matrix multiplication (closes #21176) 2014-04-09 23:55:56 -04:00
Victor Stinner 4dd25256e2 Issue #21118: PyLong_AS_LONG() result type is long
Even if PyLong_AS_LONG() cannot fail, I prefer to use the right type.
2014-04-08 09:14:21 +02:00
Benjamin Peterson 1365de764e fix reference leaks in the translate fast path (closes #21175)
Patch by Josh Rosenberg.
2014-04-07 20:15:41 -04:00
Victor Stinner 872b291b96 Issue #21118: Optimize also str.translate() for ASCII => ASCII deletion 2014-04-05 14:27:07 +02:00
Victor Stinner 4ff33af257 Issue #21118: Add unit test for invalid character replacement (code point higher than U+10ffff) 2014-04-05 11:56:37 +02:00
Victor Stinner 89a76abf20 Issue #21118: Optimize str.translate() for ASCII => ASCII translation 2014-04-05 11:44:04 +02:00
Victor Stinner 8a4422e78d Issue #21118: Remove unused variable 2014-04-05 00:15:52 +02:00
Victor Stinner 69598d4ccf Issue #21118: Fix _PyUnicodeTranslateError_Create(), add missing format
character for the "end" parameter
2014-04-04 20:59:44 +02:00
Victor Stinner 1194ea020c Issue #21118: Use _PyUnicodeWriter API in str.translate() to simplify and
factorize the code
2014-04-04 19:37:40 +02:00
Victor Stinner d129eeb303 Issue #21118: Fix _PyUnicodeTranslateError_Create(), add missing format
character for the "end" parameter
2014-04-04 20:59:44 +02:00
Benjamin Peterson d818fc9205 merge 3.4 (#21134) 2014-04-02 12:16:55 -04:00
Benjamin Peterson 9b09ba1234 bail in unicode error's __str__ methods if the objects are not properly initialized (closes #21134) 2014-04-02 12:15:06 -04:00
Antoine Pitrou 3fec24ef13 Issue #21073: explain why Py_ReprEnter() allows for a missing thread state. 2014-03-31 22:05:02 +02:00
Antoine Pitrou 04d17d30b4 Issue #21073: explain why Py_ReprEnter() allows for a missing thread state. 2014-03-31 22:04:38 +02:00
Benjamin Peterson 00ced0f4c7 merge 3.4 2014-03-30 19:52:50 -04:00
Benjamin Peterson d455ce4fd4 merge 3.3 2014-03-30 19:52:39 -04:00