Serhiy Storchaka
b785396ab4
bpo-29998: Pickling and copying ImportError now preserves name and path ( #1010 )
attributes.
9 years ago
Serhiy Storchaka
b879fe82e7
Expand the PySlice_GetIndicesEx macro. ( #1023 )
9 years ago
Serhiy Storchaka
205e00c5cf
bpo-29914: Fix default implementations of __reduce__ and __reduce_ex__(). ( #843 )
object.__reduce__() no longer takes arguments, object.__reduce_ex__() now
requires one argument.
9 years ago
Serhiy Storchaka
bae6881b42
Update Argument Clinic generated code for bpo-29878. ( #1001 )
9 years ago
Lisa Roach
43ba8861e0
bpo-29549: Fixes docstring for str.index ( #256 )
* Updates B.index documentation.
* Updates str.index documentation, makes it Argument Clinic compatible.
* Removes ArgumentClinic code.
* Finishes string.index documentation.
* Updates string.rindex documentation.
* Documents B.rindex.
9 years ago
INADA Naoki
e82cf8675b
bpo-29949: Fix set memory usage regression (GH-943)
Revert "Minor factoring: move redundant resize scaling logic into the resize function."
This reverts commit 4897300276 .
9 years ago
T. Wouters
06bb4873d6
Fix spurious MemoryError introduced by PR #886 . ( #930 )
Fix MemoryError caused by moving around code in PR #886 ; nbytes was sometimes used unitinitalized (in non-debug builds, when use_calloc was false and elsize was 0).
9 years ago
T. Wouters
a00c3fd12d
bpo-29941: Assert fixes ( #886 )
Make a non-Py_DEBUG, asserts-enabled build of CPython possible. This means
making sure helper functions are defined when NDEBUG is not defined, not
just when Py_DEBUG is defined.
Also fix a division-by-zero in obmalloc.c that went unnoticed because in Py_DEBUG mode, elsize is never zero.
9 years ago
Serhiy Storchaka
d4edfc9abf
bpo-29935: Fixed error messages in the index() method of tuple, list and deque ( #887 )
when pass indices of wrong type.
9 years ago
Serhiy Storchaka
918403cfc3
bpo-29816: Shift operation now has less opportunity to raise OverflowError. ( #680 )
ValueError always is raised rather than OverflowError for negative counts.
Shifting zero with non-negative count always returns zero.
9 years ago
Serhiy Storchaka
0a58f72762
bpo-24821: Fixed the slowing down to 25 times in the searching of some ( #505 )
unlucky Unicode characters.
9 years ago
Serhiy Storchaka
ba85d69a3e
bpo-29878: Add global instances of int for 0 and 1. ( #852 )
9 years ago
Louie Lu
c431854a09
bpo-29927: Remove duplicate BufferError init and unnecessary semicolons (GH-866)
9 years ago
Sylvain
d67a103702
bpo-29924: Remove useless argument ( #854 )
9 years ago
Serhiy Storchaka
671079ef60
bpo-29894: Deprecate returning an instance of complex subclass from __complex__. ( #798 )
In a future versions of Python this can be an error.
9 years ago
Serhiy Storchaka
fff9a31a91
bpo-29865: Use PyXXX_GET_SIZE macros rather than Py_SIZE for concrete types. ( #748 )
9 years ago
Serhiy Storchaka
c61ac1642d
Don't use Py_SIZE for dict object. ( #747 )
9 years ago
4kir4
e46fb86118
bpo-28876: bool of large range raises OverflowError ( #699 )
9 years ago
Serhiy Storchaka
6b5a9ec478
bpo-29116: Fix error messages for concatenating bytes and bytearray with unsupported type. ( #709 )
9 years ago
Serhiy Storchaka
004e03fb0c
bpo-29116: Improve error message for concatenating str with non-str. ( #710 )
9 years ago
Serhiy Storchaka
80ec8364f1
bpo-29748: Added the slice index converter in Argument Clinic. ( #549 )
9 years ago
Serhiy Storchaka
18b250f844
bpo-29793: Convert some builtin types constructors to Argument Clinic. ( #615 )
9 years ago
Serhiy Storchaka
0b5615926a
bpo-20186: Convert tuple object implementation to Argument Clinic. ( #614 )
9 years ago
Serhiy Storchaka
5c643a028e
bpo-20185: Convert typeobject.c to Argument Clinic. ( #544 )
Based on patch by Vajrasky Kok.
9 years ago
Victor Stinner
0f7b0b397e
bpo-29735: Optimize partial_call(): avoid tuple ( #516 )
* Add _PyObject_HasFastCall()
* partial_call() now avoids temporary tuple to pass positional
arguments if the callable supports the FASTCALL calling convention
for positional arguments.
* Fix also a performance regression in partial_call() if the callable
doesn't support FASTCALL.
9 years ago
Ivan Levkivskyi
9135275cba
bpo-28810: Update lnotab_notes.txt ( #665 )
9 years ago
INADA Naoki
aa289a59ff
bpo-29548: Recommend PyObject_Call APIs over PyEval_Call APIs. (GH-75)
PyEval_Call* APIs are not documented and they doesn't respect PY_SSIZE_T_CLEAN.
So add comment block which recommends PyObject_Call* APIs to ceval.h.
This commit also changes PyEval_CallMethod and PyEval_CallFunction
implementation same to PyObject_CallMethod and PyObject_CallFunction
to reduce future maintenance cost. Optimization to avoid temporary
tuple are copied too.
PyEval_CallFunction(callable, "i", (int)i) now calls callable(i) instead of
raising TypeError. But accepting this edge case is backward compatible.
9 years ago
Xiang Zhang
7e2a54cdd9
bpo-28856: Let %b format for bytes support objects that follow the buffer protocol (GH-546)
9 years ago
Oren Milman
004251059b
bpo-29730: replace some calls to PyNumber_Check and improve some error messages ( #650 )
9 years ago
Yury Selivanov
b7c9150b68
Fix wrapping into StopIteration of return values in generators and coroutines ( #644 )
9 years ago
Serhiy Storchaka
202fda55c2
bpo-24037: Add Argument Clinic converter `bool(accept={int})`. ( #485 )
9 years ago
Serhiy Storchaka
b5c51d3dd9
bpo-20185: Convert float object implementation to Argument Clinic. ( #543 )
Based on patch by Vajrasky Kok.
9 years ago
Serhiy Storchaka
fdd42c481e
bpo-20185: Convert list object implementation to Argument Clinic. ( #542 )
9 years ago
svelankar
390a0969c1
bpo-29749: Update int() docstring (GH-565)
The docstring did not properly represent the fact that the argument to int() was positional-only.
9 years ago
Serhiy Storchaka
370fd202f1
Use Py_RETURN_FALSE/Py_RETURN_TRUE rather than PyBool_FromLong(0)/PyBool_FromLong(1). ( #567 )
9 years ago
Serhiy Storchaka
9f8ad3f39e
bpo-29568: Disable any characters between two percents for escaped percent "%%" in the format string for classic string formatting. (GH-513)
9 years ago
Xiang Zhang
c393ee8589
bpo-24329: allow __qualname__ and __classcell__ in __slots__ (GH-495)
9 years ago
Serhiy Storchaka
98e80c2bab
bpo-29737: Optimize concatenating with empty tuple. ( #524 )
9 years ago
Serhiy Storchaka
2e5642422f
bpo-29695: Remove bad keyword parameters in int(), bool(), float(), list() and tuple(). ( #518 )
9 years ago
Xiang Zhang
b76ad5121e
bpo-29714: Fix a regression that bytes format may fail when containing zero bytes inside. (GH-499)
9 years ago
orenmn
86aa269646
remove 3 redundant casts in Objects/longobject.c ( #445 )
9 years ago
Serhiy Storchaka
58d23e6806
bpo-29695: Deprecated using bad named keyword arguments in builtings: ( #486 )
int(), bool(), float(), list() and tuple(). Specify the value as a
positional argument instead.
9 years ago
Brian Coleman
6a9122ce69
bpo-29683 - Fixes to _PyCode_SetExtra when co_extra->ce->extras is ( #376 )
allocated.
On PyMem_Realloc failure, _PyCode_SetExtra should free co_extra if
co_extra->ce_extras could not be allocated.
On PyMem_Realloc success, _PyCode_SetExtra should set all unused slots in
co_extra->ce_extras to NULL.
9 years ago
INADA Naoki
3824cd8fd4
bpo-29684: Fix regression of PyEval_CallObjectWithKeywords (GH-87)
It should raise TypeError when kwargs is not a dict.
9 years ago
Victor Stinner
561ca80cff
Document why functools.partial() must copy kwargs ( #253 )
Add a comment to prevent further attempts to avoid a copy for
optimization.
9 years ago
Xiang Zhang
4cee049f5b
bpo-27660: remove unnecessary overflow checks in list_resize (GH-189)
9 years ago
INADA Naoki
3e8d6cb189
bpo-29509: skip redundant intern (GH-197)
PyObject_GetAttrString intern temporary key string.
It's completely redudant.
9 years ago
Mark Dickinson
112ec38c15
bpo-29602: fix signed zero handling in complex constructor. ( #203 )
* Fix incorrect handling of signed zeros for complex-related classes.
* Add Misc/NEWS entry.
9 years ago
INADA Naoki
1b8df107f8
bpo-24274: fix erroneous comment in dictobject.c (GH-196)
lookdict_unicode() and lookdict_unicode_nodummy() may raise exception
when key is not unicode.
9 years ago
Xiang Zhang
d0e8212ed7
bpo-29347: Fix possibly dereferencing undefined pointers when creating weakref objects ( #128 )
9 years ago