Steve Dower
cb39d1f466
Issue 19933: Provide default argument for ndigits in round. Patch by Vajrasky Kok.
11 years ago
Larry Hastings
89964c48d1
Issue #23944 : Argument Clinic now wraps long impl prototypes at column 78.
11 years ago
Zachary Ware
8ef887ce47
Issue #20586 : Argument Clinic now ensures signatures on functions without docstrings.
11 years ago
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.
11 years ago
Serhiy Storchaka
4aa867959f
Issue #23783 : Fixed memory leak in PyObject_ClearWeakRefs() in case of
MemoryError.
11 years ago
Serhiy Storchaka
48070c1248
Issue #23803 : Fixed str.partition() and str.rpartition() when a separator
is wider then partitioned string.
11 years ago
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
11 years ago
Serhiy Storchaka
92e8af67a8
Issue #23492 : Argument Clinic now generates argument parsing code with
PyArg_Parse instead of PyArg_ParseTuple if possible.
11 years ago
Serhiy Storchaka
1009bf18b3
Issue #23501 : Argumen Clinic now generates code into separate files by default.
11 years ago
Serhiy Storchaka
41525e31a5
Issue #23466 : Raised OverflowError if %c argument is out of range.
11 years ago
Serhiy Storchaka
2c7b5a9d0d
Issue #23466 : %c, %o, %x, and %X in bytes formatting now raise TypeError on
non-integer input.
11 years ago
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.
11 years ago
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.
11 years ago
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).
11 years ago
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).
11 years ago
Victor Stinner
454bd3a277
stdprinter_write(): mention the encoding
11 years ago
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.
11 years ago
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.
11 years ago
Serhiy Storchaka
1dd49824df
Issue #23681 : The -b option now affects comparisons of bytes with int.
11 years ago
Victor Stinner
f50e187724
Fix compiler warnings: comparison between signed and unsigned numbers
11 years ago
Antoine Pitrou
31084ba528
Issue #23632 : Memoryviews now allow tuple indexing (including for multi-dimensional memoryviews).
11 years ago
Victor Stinner
66aab0c4b5
Issue #23708 : Add _Py_read() and _Py_write() functions to factorize code handle
EINTR error and special cases for Windows.
These functions now truncate the length to PY_SSIZE_T_MAX to have a portable
and reliable behaviour. For example, read() result is undefined if counter is
greater than PY_SSIZE_T_MAX on Linux.
11 years ago
Serhiy Storchaka
009b811d67
Removed unintentional trailing spaces in non-external and non-generated C files.
11 years ago
Victor Stinner
0c39b1b970
Initialize variables to prevent GCC warnings
11 years ago
Ethan Furman
62e977f1b6
Close issue23467: add %r compatibility to bytes and bytearray
11 years ago
Antoine Pitrou
a654510150
Issue #23629 : Fix the default __sizeof__ implementation for variable-sized objects.
11 years ago
Victor Stinner
283f3f8ab3
Issue #23571 : Oops, fix #ifdef assert()
assert() are noop when NDEBUG is defined. We want the opposite.
11 years ago
Victor Stinner
4a7cc88472
Issue #23571 : PyObject_Call(), PyCFunction_Call() and call_function() now
raise a SystemError if a function returns a result and raises an exception.
The SystemError is chained to the previous exception.
Refactor also PyObject_Call() and PyCFunction_Call() to make them more readable.
Remove some checks which became useless (duplicate checks).
Change reviewed by Serhiy Storchaka.
11 years ago
Benjamin Peterson
a915723dc7
fix potential refleak in PyFloat_AsDouble ( closes #23590 )
11 years ago
Benjamin Peterson
e5a853c390
use PyMem_NEW to detect overflow ( closes #23362 )
11 years ago
Larry Hastings
42fc0eb827
Issue #21293 : Remove unnecessary "capsule hack".
11 years ago
Steve Dower
3e96f324dc
Issue #23451 : Update pyconfig.h for Windows to require Vista headers and remove unnecessary version checks.
11 years ago
Serhiy Storchaka
71c6f445cd
Fixed a typo.
11 years ago
Serhiy Storchaka
490055a167
Issue #20204 : Deprecation warning is now raised for builtin type without the
__module__ attribute.
11 years ago
Benjamin Peterson
b808d590a2
fix merge_collapse to actually maintain the invariant it purports to ( closes #23515 )
See
de Gouw, Stijn and Rot, Jurriaan and de Boer, Frank S and Bubel, Richard and Hähnle, Reiner
"OpenJDK’s java.utils.Collection.sort() is broken: The good, the bad and the worst case"
11 years ago
Serhiy Storchaka
e55181f517
Issue #23490 : Fixed possible crashes related to interoperability between
old-style and new API for string with 2**30-1 characters.
11 years ago
Serhiy Storchaka
26861b0b29
Issue #23450 : Fixed possible integer overflows.
11 years ago
Serhiy Storchaka
1a1ff29659
Issue #23446 : Use PyMem_New instead of PyMem_Malloc to avoid possible integer
overflows. Added few missed PyErr_NoMemory().
11 years ago
Serhiy Storchaka
ea5ce5a15e
Issue #23383 : Cleaned up bytes formatting.
11 years ago
Raymond Hettinger
438f9134cf
Mirco-optimizations to reduce register spills and reloads observed on CLANG and GCC.
11 years ago
Steve Dower
b4e20bb588
Fix definition mismatch for type_is_subtype_base_chain.
11 years ago
Benjamin Peterson
104b9e0cca
fix many custom mro() edge cases and improve code quality ( #22735 )
Patch by Eldar Abusalimov.
11 years ago
Raymond Hettinger
8249282622
Minor code clean up.
11 years ago
Raymond Hettinger
06bb1226d1
Issue 23359: Reduce size of code in set_lookkey. Only do linear probes when there is no wrap-around.
Nice simplification contributed by Serhiy Storchaka :-)
11 years ago
Stefan Krah
5178d91be0
Issue #14203 : Remove obsolete support for view==NULL in PyBuffer_FillInfo()
and bytearray_getbuffer(). Both functions now raise BufferError in that
case.
11 years ago
Serhiy Storchaka
83848704f5
Issue #22896 : Fixed using _getbuffer() in recently added _PyBytes_Format().
11 years ago
Serhiy Storchaka
4fdb68491e
Issue #22896 : Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer()
and PyObject_AsWriteBuffer().
11 years ago
Raymond Hettinger
c658d85487
Issue 23359: Tighten inner search loop for sets (don't and-mask every entry lookup).
11 years ago
Stefan Krah
7213fcc27e
Issue #23370 : Fix off-by-one error for non-contiguous buffers.
11 years ago
Stefan Krah
363af44a4a
Issue #22445 : PyBuffer_IsContiguous() now implements precise contiguity
tests, compatible with NumPy's NPY_RELAXED_STRIDES_CHECKING compilation
flag. Previously the function reported false negatives for corner cases.
11 years ago