Serhiy Storchaka
f8d7d41507
Issue #28511 : Use the "U" format instead of "O!" in PyArg_Parse*.
9 years ago
Serhiy Storchaka
523c449ca0
Issue #28504 : Cleanup unicode_decode_call_errorhandler_wchar/writer.
Patch by Xiang Zhang.
9 years ago
Raymond Hettinger
b12785d456
Reference the original compact-and-ordered proposal
9 years ago
Serhiy Storchaka
d5d32d2127
Issue #28214 : Improved exception reporting for problematic __set_name__
attributes.
9 years ago
Serhiy Storchaka
467ab194fc
Issue #28410 : Added _PyErr_FormatFromCause() -- the helper for raising
new exception with setting current exception as __cause__.
_PyErr_FormatFromCause(exception, format, args...) is equivalent to Python
raise exception(format % args) from sys.exc_info()[1]
9 years ago
Benjamin Peterson
8d761ff045
remove extra PyErr_Format arguments ( closes #28454 )
Patch from Xiang Zhang.
9 years ago
Christian Heimes
5cade88ac1
Check return value of _PyDict_SetItemId()
9 years ago
Victor Stinner
ebe17e0347
Fix _Py_normalize_encoding() command
It's not exactly the same than encodings.normalize_encoding(): the C function
also converts to lowercase.
9 years ago
Benjamin Peterson
b329e1bb5b
va_end vargs2 once ( closes #28417 )
9 years ago
doko@ubuntu.com
de69ee71e2
- dictobject.c: Make dict_merge symbol a static symbol
9 years ago
doko@ubuntu.com
c96df68ea3
- dictobject.c: Make dict_merge symbol a static symbol
9 years ago
Serhiy Storchaka
2e58f1a52a
Issue #28400 : Removed uncessary checks in unicode_char and resize_copy.
1. In resize_copy we don't need to PyUnicode_READY(unicode) since when
it's not PyUnicode_WCHAR_KIND it should be ready.
2. In unicode_char, PyUnicode_1BYTE_KIND is handled by get_latin1_char.
Patch by Xiang Zhang.
9 years ago
Serhiy Storchaka
49f5cdde1a
Issue #28183 : Optimize and cleanup dict iteration.
9 years ago
Serhiy Storchaka
9c0e1f83af
Issue #28379 : Added sanity checks and tests for PyUnicode_CopyCharacters().
Patch by Xiang Zhang.
9 years ago
Serhiy Storchaka
df53392f0d
Issue #28376 : Creating instances of range_iterator by calling range_iterator
type now is disallowed. Calling iter() on range instance is the only way.
Patch by Oren Milman.
9 years ago
Serhiy Storchaka
c7f490c8b1
Issue #28376 : Creating instances of range_iterator by calling range_iterator
type now is deprecated. Patch by Oren Milman.
9 years ago
Serhiy Storchaka
44759bcf13
Issue #28376 : The constructor of range_iterator now checks that step is not 0.
Patch by Oren Milman.
9 years ago
Serhiy Storchaka
8ef34600c7
Issue #26906 : Resolving special methods of uninitialized type now causes
implicit initialization of the type instead of a fail.
9 years ago
Serhiy Storchaka
de0574bdab
Issue #18287 : PyType_Ready() now checks that tp_name is not NULL.
Original patch by Niklas Koep.
9 years ago
INADA Naoki
267941c675
Issue #28201 : Dict reduces possibility of 2nd conflict in hash table.
Do perturb shift after first conflict.
9 years ago
Serhiy Storchaka
09f3d080fe
Issue #28350 : String constants with null character no longer interned.
9 years ago
Benjamin Peterson
8f657c35b9
ensure gc tracking is off when invoking weakref callbacks ( closes #26617 )
9 years ago
Serhiy Storchaka
e036ef8fa2
Issue #27358 : Optimized merging var-keyword arguments and improved error
message when pass a non-mapping as a var-keyword argument.
9 years ago
Serhiy Storchaka
00a0fc1144
Issue #27942 : String constants now interned recursively in tuples and frozensets.
9 years ago
Serhiy Storchaka
e9e44484a5
Issue #28289 : ImportError.__init__ now resets not specified attributes.
9 years ago
Serhiy Storchaka
47dee11ba7
Issue #21578 : Fixed misleading error message when ImportError called with
invalid keyword args.
9 years ago
Serhiy Storchaka
333ad92ec2
Issue #27914 : Fixed a comment in PyModule_ExcDef.
Patch by Xiang Zhang.
9 years ago
Serhiy Storchaka
97932e4c4f
issue #28144 : Decrease empty_keys_struct's dk_refcnt
since there is no dummy_struct any more.
Patch by Xiang Zhang.
9 years ago
Serhiy Storchaka
46825d2399
Issue #28194 : Clean up some checks in dict implementation.
Patch by Xiang Zhang.
9 years ago
Mark Dickinson
613f8e513c
Issue #28203 : Fix incorrect type in error message from complex(1.0, {2:3}). Patch by Soumya Sharma.
10 years ago
Benjamin Peterson
7b7228a709
remove unneeded cast
10 years ago
Serhiy Storchaka
afd02a439f
Issue #28214 : Now __set_name__ is looked up on the class instead of the
instance.
10 years ago
Victor Stinner
1ddf53d496
Fix PyUnicode_FromFormatV() error handling
Issue #28233 : Fix a memory leak if the format string contains a non-ASCII
character, destroy the unicode writer.
10 years ago
Christian Heimes
2f2fee19ec
va_end() all va_copy()ed va_lists.
10 years ago
Benjamin Peterson
0c21214f3e
replace usage of Py_VA_COPY with the (C99) standard va_copy
10 years ago
Raymond Hettinger
6692f01c91
merge
10 years ago
Raymond Hettinger
7eb1becc25
Issue #28189 : dictitems_contains no longer swallows compare errors.
(Patch by Xiang Zhang)
10 years ago
Benjamin Peterson
5d4b09c106
correct silly spelling problem
10 years ago
Benjamin Peterson
19517e4da7
replace obmalloc's homegrown uptr and uchar types with standard ones
10 years ago
Benjamin Peterson
3924f93794
improvements to code that checks whether Python (obmalloc) allocated an address
- Rename Py_ADDRESS_IN_RANGE to address_in_range and make it a static
function instead of macro. Any compiler worth its salt will inline this
function.
- Remove the duplicated function version of Py_ADDRESS_IN_RANGE used when memory
analysis was active. Instead, we can simply mark address_in_range as allergic
to dynamic memory checking. We can now remove the
__attribute__((no_address_safety_analysis)) from _PyObject_Free and
_PyObject_Realloc. All the badness is contained in address_in_range now.
- Fix the code that tried to only read pool->arenaindex once. Putting something
in a variable is no guarantee that it won't be read multiple times. We must
use volatile for that.
10 years ago
Mark Dickinson
c1c4a64edb
Issue #27111 : Minor simplication to long_add and long_sub fast path code. Thanks Oren Milman.
10 years ago
Mark Dickinson
fba121fe9d
Issue #27441 : Remove some redundant assignments to ob_size in longobject.c. Thanks Oren Milman.
10 years ago
Mark Dickinson
92ca535626
Issue #27222 : various cleanups in long_rshift. Thanks Oren Milman.
10 years ago
Martin Panter
6d57fe1c23
Issue #28139 : Fix messed up indentation
Also update the classmethod and staticmethod doc strings and comments to
match the RST documentation.
10 years ago
Berker Peksag
4a72a7b6c4
Issue #25270 : Prevent codecs.escape_encode() from raising SystemError when an empty bytestring is passed
10 years ago
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.
10 years ago
Victor Stinner
611b0fa94c
Add _PyDict_CheckConsistency()
Issue #28127 : Add a function to check that a dictionary remains consistent
after any change.
By default, tables are not checked, only basic attributes. Define DEBUG_PYDICT
(ex: gcc -D DEBUG_PYDICT) to also check dictionary "content".
10 years ago
Christian Heimes
f051e43b22
Issue #28126 : Replace Py_MEMCPY with memcpy(). Visual Studio can properly optimize memcpy().
10 years ago
Victor Stinner
d0ad11f6b4
Fix _PyDict_Pop() on pending key
Issue #28120 : Fix dict.pop() for splitted dictionary when trying to remove a
"pending key" (Not yet inserted in split-table).
Patch by Xiang Zhang.
10 years ago
Victor Stinner
9926480b6a
Issue #28040 : Cleanup find_empty_slot()
find_empty_slot() only supports combined dict
10 years ago