| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* The PyByteArray_Init() and PyByteArray_Fini() functions have been
removed. They did nothing since Python 2.7.4 and Python 3.2.0, were
excluded from the limited API (stable ABI), and were not
documented.
* Move "_PyXXX_Init()" and "_PyXXX_Fini()" declarations from
Include/cpython/pylifecycle.h to
Include/internal/pycore_pylifecycle.h. Replace
"PyAPI_FUNC(TYPE)" with "extern TYPE".
* _PyExc_Init() now returns an error on failure rather than calling
Py_FatalError(). Move macros inside _PyExc_Init() and undefine them
when done. Rewrite macros to make them look more like statement:
add ";" when using them, add "do { ... } while (0)".
* _PyUnicode_Init() now returns a _PyInitError error rather than call
Py_FatalError().
* Move stdin check from _PySys_BeginInit() to init_sys_streams().
* _Py_ReadyTypes() now returns a _PyInitError error rather than
calling Py_FatalError().
|
|
|
|
|
|
|
|
| |
(GH-11047)
This speeds up pickling of some iterators.
This fixes also error handling in pickling methods when fail to
look up builtin "getattr".
|
|
|
|
| |
Move _PyObject_GC_TRACK() and _PyObject_GC_UNTRACK() from
Include/objimpl.h to Include/internal/pycore_object.h.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename Include/internal/ headers:
* pycore_hash.h -> pycore_pyhash.h
* pycore_lifecycle.h -> pycore_pylifecycle.h
* pycore_mem.h -> pycore_pymem.h
* pycore_state.h -> pycore_pystate.h
Add missing headers to Makefile.pre.in and PCbuild:
* pycore_condvar.h.
* pycore_hamt.h
* pycore_pyhash.h
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Rename Include/internal/ header files:
* pyatomic.h -> pycore_atomic.h
* ceval.h -> pycore_ceval.h
* condvar.h -> pycore_condvar.h
* context.h -> pycore_context.h
* pygetopt.h -> pycore_getopt.h
* gil.h -> pycore_gil.h
* hamt.h -> pycore_hamt.h
* hash.h -> pycore_hash.h
* mem.h -> pycore_mem.h
* pystate.h -> pycore_state.h
* warnings.h -> pycore_warnings.h
* PCbuild project, Makefile.pre.in, Modules/Setup: add the
Include/internal/ directory to the search paths of header files.
* Update includes. For example, replace #include "internal/mem.h"
with #include "pycore_mem.h".
|
|
|
|
| |
(GH-9874)
|
|
|
|
|
|
|
| |
(GH-9852)
bytes and bytearray constructors converted unexpected exceptions
(e.g. MemoryError and KeyboardInterrupt) to TypeError.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add more fields to _PyCoreConfig:
* _check_hash_pycs_mode
* bytes_warning
* debug
* inspect
* interactive
* legacy_windows_fs_encoding
* legacy_windows_stdio
* optimization_level
* quiet
* unbuffered_stdio
* user_site_directory
* verbose
* write_bytecode
Changes:
* Remove pymain_get_global_config() and pymain_set_global_config()
which became useless. These functions have been replaced by
_PyCoreConfig_GetGlobalConfig() and
_PyCoreConfig_SetGlobalConfig().
* sys.flags.dont_write_bytecode value is now restricted to 1 even if
-B option is specified multiple times on the command line.
* PyThreadState_Clear() now uses the config from the current
interpreter rather than using global Py_VerboseFlag
|
|
|
|
| |
* converted bytes methods: expandtabs, ljust, rjust, center, zfill
* updated char_convertor to properly set the C default value
|
|
|
|
|
|
|
|
|
| |
(GH-6030)
METH_NOARGS functions need only a single argument but they are cast
into a PyCFunction, which takes two arguments. This triggers an
invalid function cast warning in gcc8 due to the argument mismatch.
Fix this by adding a dummy unused argument.
|
| |
|
|
|
|
| |
(#4370)
|
|
|
|
| |
functions (GH-793)
|
|
|
| |
separators that are not bytes-like objects.
|
|
|
|
|
| |
(#3631)
Affected classes are bytearray, array, deque, defaultdict, count and repeat.
|
|
|
|
|
|
|
| |
* group the (stateful) runtime globals into various topical structs
* consolidate the topical structs under a single top-level _PyRuntimeState struct
* add a check-c-globals.py script that helps identify runtime globals
Other globals are excluded (see globals.txt and check-c-globals.py).
|
| |
|
| |
|
|
|
|
| |
unsupported type. (#709)
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Issue #28858: The change b9c9691c72c5 introduced a regression. It seems like
_PyObject_CallArg1() uses more stack memory than
PyObject_CallFunctionObjArgs().
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* PyObject_CallFunctionObjArgs(func, NULL) => _PyObject_CallNoArg(func)
* PyObject_CallFunctionObjArgs(func, arg, NULL) => _PyObject_CallArg1(func, arg)
PyObject_CallFunctionObjArgs() allocates 40 bytes on the C stack and requires
extra work to "parse" C arguments to build a C array of PyObject*.
_PyObject_CallNoArg() and _PyObject_CallArg1() are simpler and don't allocate
memory on the C stack.
This change is part of the fastcall project. The change on listsort() is
related to the issue #23507.
|
|/
|
|
| |
functions.
|
| |
|
|
|
|
| |
Patch by Xiang Zhang.
|
|
|
|
|
| |
and iterables. Speed up to 3 times for short objects. Original patch by
Naoki Inada.
|
|\ |
|
| |
| |
| |
| | |
Patch by Xiang Zhang.
|
|\ \
| |/
| |
| | |
concatenations. Patch by Xiang Zhang.
|
| |
| |
| |
| | |
concatenations. Patch by Xiang Zhang.
|
|\ \
| |/
| |
| | |
negative integer for resized bytearray.
|
| |
| |
| |
| | |
negative integer for resized bytearray.
|
| |
| |
| |
| | |
For unknown reasons it perhaps caused a crash on 32-bit Windows (issue #).
|
| |
| |
| |
| | |
file.
|
| |
| |
| |
| | |
now return an instance of corresponding subclass.
|
|\ \
| |/
| |
| | |
Based on patch by Joe Jevnik.
|
| |
| |
| |
| | |
Patch by Joe Jevnik.
|
| |
| |
| |
| | |
to a template file.
|
| |
| |
| |
| | |
to bytes_methods.c.
|
| |
| |
| |
| | |
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.
|