| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
| |
| |
| | |
Argument Clinic is now able to infer all needed information.
|
| |\ \
| |/
| |
| | |
messages.
|
| | | |
|
| | | |
|
| |\ \
| |/
| |
| |
| |
| | |
Affected classes are generic sequence iterators, iterators of str, bytes,
bytearray, list, tuple, set, frozenset, dict, OrderedDict, corresponding
views and os.scandir() iterator.
|
| | |
| |
| |
| |
| |
| | |
Affected classes are generic sequence iterators, iterators of str, bytes,
bytearray, list, tuple, set, frozenset, dict, OrderedDict, corresponding
views and os.scandir() iterator.
|
| | |
| |
| |
| |
| | |
Issue #26574: Optimize bytes.replace(b'', b'.') and
bytearray.replace(b'', b'.'): up to 80% faster. Patch written by Josh Snider.
|
| | |
| |
| |
| | |
Issue #26564.
|
| | |
| |
| |
| |
| |
| | |
Issue #26564: _PyObject_DebugDumpAddress() now dumps the traceback where a
memory block was allocated on memory block. Use the tracemalloc module to get
the traceback.
|
| | |
| |
| |
| | |
private functions.
|
| |\ \
| |/
| |
| |
| | |
This allows sys.getsize() to work correctly with their subclasses with
__slots__ defined.
|
| | |
| |
| |
| |
| | |
This allows sys.getsize() to work correctly with their subclasses with
__slots__ defined.
|
| | |
| |
| |
| |
| | |
STRINGLIB(find_char) and STRINGLIB(rfind_char) that can be used independedly
without special preconditions.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Issue #25401: Optimize bytes.fromhex() and bytearray.fromhex(): they are now
between 2x and 3.5x faster. Changes:
* Use a fast-path working on a char* string for ASCII string
* Use a slow-path for non-ASCII string
* Replace slow hex_digit_to_int() function with a O(1) lookup in
_PyLong_DigitValue precomputed table
* Use _PyBytesWriter API to handle the buffer
* Add unit tests to check the error position in error messages
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
| |
Issue #25399: Don't create temporary bytes objects: modify _PyBytes_Format() to
create work directly on bytearray objects.
* Rename _PyBytes_Format() to _PyBytes_FormatEx() just in case if something
outside CPython uses it
* _PyBytes_FormatEx() now uses (char*, Py_ssize_t) for the input string, so
bytearray_format() doesn't need tot create a temporary input bytes object
* Add use_bytearray parameter to _PyBytes_FormatEx() which is passed to
_PyBytesWriter, to create a bytearray buffer instead of a bytes buffer
Most formatting operations are now between 2.5 and 5 times faster.
|
| |
|
|
| |
for single-byte argument on Linux.
|
| |\
| |
| |
| |
| | |
object now always allocates place for trailing null byte and it's buffer now
is always null-terminated.
|
| | |
| |
| |
| |
| | |
object now always allocates place for trailing null byte and it's buffer now
is always null-terminated.
|
| |\ \
| |/
| |
| |
| | |
PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains()
to check for and handle errors correctly.
|
| | |
| |
| |
| |
| | |
PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains()
to check for and handle errors correctly.
|
| | |
| |
| |
| | |
signatures as booleans.
|
| |\ \
| |/
| |
| |
| |
| | |
front of a bytearray and then appending some other bytes data.
Patch by Martin Panter.
|
| | |
| |
| |
| |
| |
| | |
front of a bytearray and then appending some other bytes data.
Patch by Martin Panter.
|
| | |
| |
| |
| |
| |
| |
| | |
Also updates a few internal implementations of the same thing to use the
new built-in code.
Contributed by Arnon Yaari.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
Windows has no memrchr() function.
This change is only a workaround, the optimization must be reenabled on other
platforms.
|
| | |
| |
| |
| |
| | |
str.index, str.count, the in operator, str.split, str.partition) with
arguments of different kinds (UCS1, UCS2, UCS4).
|
| | |
| |
| |
| |
| | |
and bytearray_getbuffer(). Both functions now raise BufferError in that
case.
|
| |\ \
| |/
| |
| | |
and PyObject_AsWriteBuffer().
|
| | |
| |
| |
| | |
and PyObject_AsWriteBuffer().
|
| | | |
|
| |\ \
| |/
| |
| | |
bytes on a 32-bit platform.
|
| | |
| |
| |
| | |
bytes on a 32-bit platform.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some time ago we changed the docs to consistently use the term 'bytes-like
object' in all the contexts where bytes, bytearray, memoryview, etc are used.
This patch (by Ezio Melotti) completes that work by changing the error
messages that previously reported that certain types did "not support the
buffer interface" to instead say that a bytes-like object is required. (The
glossary entry for bytes-like object references the discussion of the buffer
protocol in the docs.)
|
| | |
| |
| |
| |
| | |
tuples by adding 'or slices'. Added ', not <typename' for bytearrays.
Original patch by Claudiu Popa.
|
| | | |
|
| | |
| |
| |
| | |
Patch by Tal Einat.
|
| | | |
|
| |/
|
|
|
|
| |
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).
|
| |\
| |
| |
| |
| | |
index. This avoids the possibility of setting an iterator to an invalid
state.
|
| | |
| |
| |
| |
| | |
index. This avoids the possibility of setting an iterator to an invalid
state.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
PyByteArray_Resize() failure: leave the bytearray object in an consistent state.
If growth < 0, handling the memory allocation failure is tricky here because
the bytearray object has already been modified. If lo != 0, the operation is
completed, but a MemoryError is still raised and the memory block is not
shrinked. If lo == 0, the bytearray is restored in its previous state and a
MemoryError is raised.
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
of data at the front (slice deletion).
|
| | | |
|
| |\ \
| |/
| |
| | |
CID 715334
|