summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* bpo-1635741: Convert _multibytecodec to multi-phase init (GH-24095)Erlend Egeberg Aasland2021-01-042-261/+218
| | | | Convert the _multibytecodec extension module (CJK codecs) to multi-phase initialization (PEP 489).
* bpo-1635741: Port pyexpat to multi-phase init (PEP 489) (GH-22222)Mohamed Koubaa2021-01-042-164/+177
|
* bpo-42692: fix __builtin_available check on older compilers (GH-23873)Joshua Root2021-01-041-1/+7
| | | | | | A compiler that doesn't define `__has_builtin` will error out when it is used on the same line as the check for it. Automerge-Triggered-By: GH:ronaldoussoren
* bpo-42681: Fix range checks for color and pair numbers in curses (GH-23874)Serhiy Storchaka2021-01-032-61/+76
|
* bpo-41798: pyexpat: Allocate the expat_CAPI on the heap memory (GH-24061)Hai Shi2021-01-031-27/+40
|
* bpo-40077: Add traverse/clear/free to arraymodule (GH-24066)Erlend Egeberg Aasland2021-01-031-6/+33
|
* bpo-40077: Convert arraymodule to use heap types and establish module state ↵Erlend Egeberg Aasland2021-01-022-159/+195
| | | | (GH-23124)
* bpo-42393: Raise OverflowError iso. DeprecationWarning on overflow in ↵Erlend Egeberg Aasland2020-12-311-26/+10
| | | | socket.ntohs and socket.htons (GH-23980)
* bpo-40137: Fix refleak in _functools_exec() (GH-24006)Victor Stinner2020-12-301-0/+1
|
* bpo-40956: Convert _sqlite3.Row to Argument Clinic (GH-23964)Erlend Egeberg Aasland2020-12-292-21/+86
|
* bpo-42655: Fix subprocess extra_groups gid conversion (GH-23762)Jakub Kulík2020-12-293-11/+7
|
* bpo-40137: Convert _functools module to use PyType_FromModuleAndSpec. (GH-23405)Hai Shi2020-12-291-222/+253
|
* Fix minor typo in comments in readline.c (GH-23911)Jero Bado2020-12-291-1/+1
|
* Fix compiler warnings regarding loss of data (GH-23983)Pablo Galindo2020-12-291-1/+1
|
* Use Py_NewRef in Modules/_struct.c (GH-23981)Pablo Galindo2020-12-281-2/+1
|
* bpo-40077: Fix typo in simplequeue_get_state_by_type() (GH-23975)Erlend Egeberg Aasland2020-12-281-1/+1
| | | | | | | | The typo did no damage, but it looks suspicious and confusing. Introduced by GH-23136. Skip news. Automerge-Triggered-By: GH:pitrou
* bpo-1635741: sqlite3: Fix ref leak introduced by commit bf64d90 (GH-23972)Erlend Egeberg Aasland2020-12-281-1/+0
|
* bpo-1635741: sqlite3 uses Py_NewRef/Py_XNewRef (GH-23170)Erlend Egeberg Aasland2020-12-277-82/+45
|
* bpo-40956: Convert _sqlite3.Connection to Argument Clinic, part 2 (GH-23838)Erlend Egeberg Aasland2020-12-274-77/+297
|
* bpo-42694: Prevent creating _curses_panel.panel (GH-23948)Victor Stinner2020-12-261-1/+2
| | | | | Fix regression introduced in commit 1baf030a902392fe92d934ed0fb6a385cf7d8869: restore removed code to prevent creating a _curses_panel.panel instance directly.
* bpo-25246: Optimize deque.remove() (GH-23898)Raymond Hettinger2020-12-231-32/+42
|
* bpo-32381: pymain_run_command() uses PyCF_IGNORE_COOKIE (GH-23724)Victor Stinner2020-12-231-19/+23
| | | | | | | | | | The coding cookie (ex: "# coding: latin1") is now ignored in the command passed to the -c command line option. Since pymain_run_command() uses UTF-8, pass PyCF_IGNORE_COOKIE compiler flag to the parser. pymain_run_python() no longer propages compiler flags between function calls.
* bpo-1635741: Port resource extension module to module state (GH-23462)Christian Heimes2020-12-231-13/+43
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-42620: Improve socket.getsockname doc string (GH-23742)Christian Heimes2020-12-231-2/+3
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-39465: Add pycore_atomic_funcs.h header (GH-20766)Victor Stinner2020-12-231-0/+13
| | | | | | Add pycore_atomic_funcs.h internal header file: similar to pycore_atomic.h but don't require to declare variables as atomic. Add _Py_atomic_size_get() and _Py_atomic_size_set() functions.
* bpo-42688: Fix ffi alloc/free when using external libffi on macos (GH-23868)erykoff2020-12-221-2/+10
| | | Automerge-Triggered-By: GH:ronaldoussoren
* bpo-42008: Fix internal _random.Random() seeding for the one argument case ↵AMIR2020-12-211-1/+12
| | | | (GH-22668)
* bpo-40956: Fix sqlite3 AC code (GH-23837)Dong-hee Na2020-12-182-9/+32
|
* bpo-40956: Convert _sqlite3.Connection to Argument Clinic (GH-23341)Erlend Egeberg Aasland2020-12-183-135/+702
|
* bpo-1635741: Port _thread to multiphase init (GH-23811)Victor Stinner2020-12-181-90/+221
| | | | | | | Port the _thread extension module to the multiphase initialization API (PEP 489) and convert its static types to heap types. Add a traverse function to the lock type, so the garbage collector can break reference cycles.
* bpo-40686: Fix compiler warnings on _zoneinfo.c (GH-23614)Victor Stinner2020-12-161-10/+4
| | | | | | | | "uint8_t day" is unsigned and so "day < 0" test is always true. Remove the test to fix the following warnings on Windows: modules\_zoneinfo.c(1224): warning C4068: unknown pragma modules\_zoneinfo.c(1225): warning C4068: unknown pragma modules\_zoneinfo.c(1227): warning C4068: unknown pragma
* bpo-1635741: Refactor _threadmodule.c (GH-23793)Victor Stinner2020-12-161-311/+226
| | | | | | | | | | | | | * Fix ExceptHookArgsType name: "_thread.ExceptHookArgs", instead of "_thread._ExceptHookArgs". * PyInit__thread() no longer intializes interp->num_threads to 0: it is already done in PyInterpreterState_New(). * Use PyModule_AddType(), Py_NewRef() and Py_XNewRef(). * Replace str_dict variable with _Py_IDENTIFIER(__dict__). * Remove assert(Py_IS_TYPE(obj, &Locktype)) from release_sentinel() to avoid having to retrive the type from this callback. * Add thread_bootstate_free() * Rename t_bootstrap() to thread_run() * bootstate structure: rename keyw member to kwargs
* bpo-42639: atexit._run_exitfuncs() uses sys.unraisablehook (GH-23779)Victor Stinner2020-12-151-35/+11
| | | | | | | | | | atexit._run_exitfuncs() now logs callback exceptions using sys.unraisablehook, rather than logging them directly into sys.stderr and raising the last exception. Run GeneralTest of test_atexit in a subprocess since it calls atexit._clear() which clears all atexit callbacks. _PyAtExit_Fini() sets state->callbacks to NULL.
* bpo-32381: pymain_run_file() uses PySys_FormatStderr() (GH-23778)Victor Stinner2020-12-151-17/+34
| | | | | If config->run_filename doesn't exist, log the error into sys.stderr using "%R" format, to escape properly unencodable characters (usually with backslashreplace).
* bpo-14935: Remove static state from the _csv module (GH-23224)Petr Viktorin2020-12-151-241/+303
| | | | | | | | Uses code from: https://github.com/python/cpython/pull/16078 Co-authored-by: Marcel Plch <gmarcel.plch@gmail.com> Co-authored-by: Eddie Elizondo <eduardo.elizondorueda@gmail.com> Co-authored-by: Hai Shi <shihai1992@gmail.com>
* bpo-42639: Move atexit state to PyInterpreterState (GH-23763)Victor Stinner2020-12-151-97/+53
| | | | | | | | | * Add _PyAtExit_Call() function and remove pyexitfunc and pyexitmodule members of PyInterpreterState. The function logs atexit callback errors using _PyErr_WriteUnraisableMsg(). * Add _PyAtExit_Init() and _PyAtExit_Fini() functions. * Remove traverse, clear and free functions of the atexit module. Co-authored-by: Dong-hee Na <donghee.na@python.org>
* bpo-42639: atexit now logs callbacks exceptions (GH-23771)Victor Stinner2020-12-141-18/+35
| | | | | | | | | | | At Python exit, if a callback registered with atexit.register() fails, its exception is now logged. Previously, only some exceptions were logged, and the last exception was always silently ignored. Add _PyAtExit_Call() function and remove PyInterpreterState.atexit_func member. call_py_exitfuncs() now calls directly _PyAtExit_Call(). The atexit module must now always be built as a built-in module.
* bpo-42639: Cleanup atexitmodule.c (GH-23770)Victor Stinner2020-12-141-126/+109
| | | | | | | | | * Rename "atexitmodule_state" to "struct atexit_state". * Rename "modstate" to "state". * Rename "self" parameter to "module". * test_atexit uses textwrap.dedent(). * Remove _Py_PyAtExit() function: inline it into atexit_exec(). * PyInterpreterState: rename pyexitfunc to atexit_func, rename pyexitmodule to atexit_module.
* bpo-32381: Add _PyRun_AnyFileObject() (GH-23723)Victor Stinner2020-12-091-27/+8
| | | | | | | | | | pymain_run_file() no longer encodes the filename: pass the filename as an object to the new _PyRun_AnyFileObject() function. Add new private functions: * _PyRun_AnyFileObject() * _PyRun_InteractiveLoopObject() * _Py_FdIsInteractive()
* bpo-32381: Add _PyRun_SimpleFileObject() (GH-23709)Victor Stinner2020-12-081-27/+14
| | | | pymain_run_startup() now pass the filename as a Python object to _PyRun_SimpleFileObject().
* bpo-42111: Make the xxlimited module an example of best extension module ↵Petr Viktorin2020-12-082-155/+525
| | | | | | | practices (GH-23226) - Copy existing xxlimited to xxlimited53 (named for the limited API version it uses) - Build both modules, both in debug and release - Test both modules
* bpo-42536: GC track recycled tuples (GH-23623)Brandt Bucher2020-12-052-0/+32
| | | | | | | | | | | | | | | | Several built-in and standard library types now ensure that their internal result tuples are always tracked by the garbage collector: - collections.OrderedDict.items - dict.items - enumerate - functools.reduce - itertools.combinations - itertools.combinations_with_replacement - itertools.permutations - itertools.product - itertools.zip_longest - zip Previously, they could have become untracked by a prior garbage collection.
* bpo-42262: Py_NewRef() casts its argument to PyObject* (GH-23626)Victor Stinner2020-12-031-1/+31
| | | Write also unit tests on Py_NewRef() and Py_XNewRef().
* bpo-41625: Do not add os.splice on AIX due to compatibility issues (GH-23608)Pablo Galindo2020-12-022-4/+4
|
* Correct return type in Modules/_ssl.c::sslmodule_legacy (GH-23609)Pablo Galindo2020-12-021-1/+1
|
* bpo-42519: Replace PyObject_MALLOC() with PyObject_Malloc() (GH-23587)Victor Stinner2020-12-0130-46/+46
| | | | | | | | | No longer use deprecated aliases to functions: * Replace PyObject_MALLOC() with PyObject_Malloc() * Replace PyObject_REALLOC() with PyObject_Realloc() * Replace PyObject_FREE() with PyObject_Free() * Replace PyObject_Del() with PyObject_Free() * Replace PyObject_DEL() with PyObject_Free()
* bpo-42519: Replace PyMem_MALLOC() with PyMem_Malloc() (GH-23586)Victor Stinner2020-12-0112-61/+62
| | | | | | | | | | | No longer use deprecated aliases to functions: * Replace PyMem_MALLOC() with PyMem_Malloc() * Replace PyMem_REALLOC() with PyMem_Realloc() * Replace PyMem_FREE() with PyMem_Free() * Replace PyMem_Del() with PyMem_Free() * Replace PyMem_DEL() with PyMem_Free() Modify also the PyMem_DEL() macro to use directly PyMem_Free().
* bpo-38200: Add itertools.pairwise() (GH-23549)Raymond Hettinger2020-12-012-2/+168
|
* bpo-31904: Support signal module on VxWorks (GH-23391)pxinwr2020-11-301-0/+4
|
* bpo-42423: Accept single base class in PyType_FromModuleAndSpec() (GH-23441)Serhiy Storchaka2020-11-222-14/+2
|