summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* bpo-40071: Fix refleak in _functools module (GH19172)Paulo Henrique Silva2020-03-261-2/+4
|
* bpo-39947: Add PyThreadState_GetID() function (GH-19163)Victor Stinner2020-03-251-2/+3
| | | | Add PyThreadState_GetID() function: get the unique identifier of a Python thread state.
* bpo-39947: Add _PyThreadState_GetDict() function (GH-19160)Victor Stinner2020-03-251-2/+3
|
* bpo-39947: Use PyThreadState_GetFrame() (GH-19159)Victor Stinner2020-03-252-4/+6
| | | | | _tracemalloc.c and _xxsubinterpretersmodule.c use PyThreadState_GetFrame() and PyThreadState_GetInterpreter() to no longer depend on the PyThreadState structure.
* bpo-39882: Add _Py_FatalErrorFormat() function (GH-19157)Victor Stinner2020-03-251-5/+4
|
* Use calloc-based functions, not malloc. (GH-19152)Andy Lester2020-03-255-22/+9
|
* bpo-1635741: Port _functools module to multiphase initialization (PEP 489) ↵Paulo Henrique Silva2020-03-251-28/+32
| | | | (GH-19151)
* bpo-1635741: Port operator module to multiphase initialization (PEP 489) ↵Paulo Henrique Silva2020-03-251-23/+26
| | | | (GH-19150)
* bpo-40024: Update C extension modules to use PyModule_AddType() (GH-19119)Dong-hee Na2020-03-2412-134/+67
| | | | | | Update _asyncio, _bz2, _csv, _curses, _datetime, _io, _operator, _pickle, _queue, blake2, multibytecodec and overlapped C extension modules to use PyModule_AddType().
* bpo-1635741: Port _weakref extension module to multiphase initialization ↵Victor Stinner2020-03-241-21/+37
| | | | | (PEP 489) (GH-19140) Co-authored-by: Hai Shi <shihai1992@gmail.com>
* bpo-40014: Fix os.getgrouplist() (GH-19126)Victor Stinner2020-03-241-22/+25
| | | | | | | | Fix os.getgrouplist(): if getgrouplist() function fails because the group list is too small, retry with a larger group list. On failure, the glibc implementation of getgrouplist() sets ngroups to the total number of groups. For other implementations, double the group list size.
* bpo-39689: Do not use native packing for format "?" with standard size ↵Stefan Krah2020-03-241-0/+3
| | | | (GH-18969)
* closes bpo-40017: Add CLOCK_TAI constant to the time module. (GH-19096)Russell Owen2020-03-241-0/+5
| | | Co-authored-by: Benjamin Peterson <benjamin@python.org>
* Revert "bpo-1635741: Port _weakref extension module to multiphase ↵Victor Stinner2020-03-231-37/+21
| | | | | | initialization (PEP 489) (GH-19084)" (#19128) bpo-1635741, bpo-40050: This reverts commit 8334f30a74abcf7e469b901afc307887aa85a888.
* bpo-40036: Deleting duplicates in itertoolsmodule.c (GH-18958)AlphaHot2020-03-231-26/+0
|
* bpo-40014: Fix os.getgrouplist() on macOS (GH-19118)Victor Stinner2020-03-231-0/+19
| | | | | On macOS, getgrouplist() returns a non-zero value without setting errno if the group list is too small. Double the list size and call it again in this case.
* bpo-1635741: Port time module to multiphase initialization (PEP 489) (GH-19107)Paulo Henrique Silva2020-03-231-51/+52
|
* bpo-40024: Add PyModule_AddType() helper function (GH-19088)Dong-hee Na2020-03-224-41/+13
|
* bpo-39652: Truncate the column name after '[' only if PARSE_COLNAMES is set. ↵Serhiy Storchaka2020-03-211-7/+22
| | | | (GH-18942)
* bpo-40010: COMPUTE_EVAL_BREAKER() checks for subinterpreter (GH-19087)Victor Stinner2020-03-201-17/+12
| | | | | | | | | COMPUTE_EVAL_BREAKER() now also checks if the Python thread state belongs to the main interpreter. Don't break the evaluation loop if there are pending signals but the Python thread state it belongs to a subinterpeter. * Add _Py_IsMainThread() function. * Add _Py_ThreadCanHandleSignals() function.
* bpo-1635741: Port _weakref extension module to multiphase initialization ↵Hai Shi2020-03-201-21/+37
| | | | (PEP 489) (GH-19084)
* bpo-39824: Convert PyModule_GetState() to get_module_state() (GH-19076)Hai Shi2020-03-192-8/+8
| | | Automerge-Triggered-By: @vstinner
* bpo-1635741: Port _collections module to multiphase initialization (GH-19074)Dong-hee Na2020-03-191-42/+42
|
* bpo-39984: Move pending calls to PyInterpreterState (GH-19066)Victor Stinner2020-03-191-2/+2
| | | | | | | | | | | | | | | | | If Py_AddPendingCall() is called in a subinterpreter, the function is now scheduled to be called from the subinterpreter, rather than being called from the main interpreter. Each subinterpreter now has its own list of scheduled calls. * Move pending and eval_breaker fields from _PyRuntimeState.ceval to PyInterpreterState.ceval. * new_interpreter() now calls _PyEval_InitThreads() to create pending calls lock. * Fix Py_AddPendingCall() for subinterpreters. It now calls _PyThreadState_GET() which works in a subinterpreter if the caller holds the GIL, and only falls back on PyGILState_GetThisThreadState() if _PyThreadState_GET() returns NULL.
* Remove unused variable to fix compiler warning in _threadmodule.c (GH-19064)Pablo Galindo2020-03-181-2/+0
|
* bpo-39984: trip_signal() uses PyGILState_GetThisThreadState() (GH-19061)Victor Stinner2020-03-181-5/+9
| | | | | | | | | | | bpo-37127, bpo-39984: * trip_signal() and Py_AddPendingCall() now get the current Python thread state using PyGILState_GetThisThreadState() rather than _PyRuntimeState_GetThreadState() to be able to get it even if the GIL is released. * _PyEval_SignalReceived() now expects tstate rather than ceval. * Remove ceval parameter of _PyEval_AddPendingCall(): ceval is now get from tstate parameter.
* bpo-1635741: Port _heapq module to multiphase initialization (GH19057)Dong-hee Na2020-03-181-12/+19
|
* bpo-39984: _PyThreadState_DeleteCurrent() takes tstate (GH-19051)Victor Stinner2020-03-181-1/+1
| | | | | | | | | | * _PyThreadState_DeleteCurrent() now takes tstate rather than runtime. * Add ensure_tstate_not_null() helper to pystate.c. * Add _PyEval_ReleaseLock() function. * _PyThreadState_DeleteCurrent() now calls _PyEval_ReleaseLock(tstate) and frees PyThreadState memory after this call, not before. * PyGILState_Release(): rename "tcur" variable to "tstate".
* bpo-1635741: Port itertools module to multiphase initialization (GH-19044)Dong-hee Na2020-03-171-35/+42
|
* bpo-39824: module_traverse() don't call m_traverse if md_state=NULL (GH-18738)Victor Stinner2020-03-175-88/+23
| | | | | | | | | | | | | Extension modules: m_traverse, m_clear and m_free functions of PyModuleDef are no longer called if the module state was requested but is not allocated yet. This is the case immediately after the module is created and before the module is executed (Py_mod_exec function). More precisely, these functions are not called if m_size is greater than 0 and the module state (as returned by PyModule_GetState()) is NULL. Extension modules without module state (m_size <= 0) are not affected. Co-Authored-By: Petr Viktorin <encukou@gmail.com>
* bpo-39943: Remove unused self from find_nfc_index() (GH-18973)Andy Lester2020-03-171-4/+4
|
* bpo-1635741: Port _ctypes_test extension to multiphase initialization (PEP ↵Hai Shi2020-03-171-3/+6
| | | | 489) (GH-19012)
* bpo-39968: Fix a typo error in get_readline_state() (GH-19028)Hai Shi2020-03-161-1/+1
|
* bpo-1635741: Port _statistics module to multiphase initialization (GH-19015)Dong-hee Na2020-03-161-3/+7
|
* bpo-39968: Convert extension modules' macros of get_module_state() to inline ↵Hai Shi2020-03-1616-164/+278
| | | | functions (GH-19017)
* bpo-39582: ossaudiodev module update helpers signature for ioctl calls. ↵David CARLIER2020-03-141-3/+3
| | | | (GH-18412)
* bpo-39871: Fix possible SystemError in atan2, copysign and remainder (GH-18806)Zackery Spytz2020-03-141-1/+5
| | | | | | In math_2(), the first PyFloat_AsDouble() call should be checked for failure before the second call. Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
* Revert "bpo-39087: Add _PyUnicode_GetUTF8Buffer()" (GH-18985)Inada Naoki2020-03-141-212/+0
| | | | | | | * Revert "bpo-39087: Add _PyUnicode_GetUTF8Buffer() (GH-17659)" This reverts commit c7ad974d341d3edb6b9d2a2dcae4d3d4794ada6b. * Update unicodeobject.h
* bpo-39087: Add _PyUnicode_GetUTF8Buffer() (GH-17659)Inada Naoki2020-03-141-0/+212
| | | Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-39947: Add PyThreadState_GetInterpreter() (GH-18981)Victor Stinner2020-03-131-3/+3
| | | | Add PyThreadState_GetInterpreter(tstate): get the interpreter of a Python thread state.
* bpo-39947: Add PyInterpreterState_Get() function (GH-18979)Victor Stinner2020-03-132-4/+4
| | | | | | * Rename _PyInterpreterState_Get() to PyInterpreterState_Get() and move it the limited C API. * Add _PyInterpreterState_Get() alias to PyInterpreterState_Get() for backward compatibility with Python 3.8.
* bpo-39947: Use _PyInterpreterState_GET_UNSAFE() (GH-18978)Victor Stinner2020-03-132-10/+10
| | | | | | | Replace _PyInterpreterState_Get() function call with _PyInterpreterState_GET_UNSAFE() macro which is more efficient but don't check if tstate or interp is NULL. _Py_GetConfigsAsDict() now uses _PyThreadState_GET().
* bpo-35370: Add _PyEval_SetTrace() function (GH-18975)Victor Stinner2020-03-131-7/+24
| | | | | | | | | * sys.settrace(), sys.setprofile() and _lsprof.Profiler.enable() now properly report PySys_Audit() error if "sys.setprofile" or "sys.settrace" audit event is denied. * Add _PyEval_SetProfile() and _PyEval_SetTrace() function: similar to PyEval_SetProfile() and PyEval_SetTrace() but take a tstate parameter and return -1 on error. * Add _PyObject_FastCallTstate() function.
* bpo-39947: Move get_recursion_depth() to _testinternalcapi (GH-18974)Victor Stinner2020-03-132-14/+17
| | | | | Move get_recursion_depth() function from _testcapi to _testinternalcapi to avoid accessing PyThreadState attributes directly in _testcapi.
* Simplify defaultdict.__or__ (#18931)Brandt Bucher2020-03-121-5/+1
|
* bpo-1635741: Fix refleaks of time module error handling (GH-18486)Hai Shi2020-03-111-18/+45
|
* bpo-1635741: Fix potential refleaks in binascii module (GH-18613)Hai Shi2020-03-111-7/+45
|
* bpo-1635741: Port audioop extension module to multiphase initialization (PEP ↵Hai Shi2020-03-111-38/+79
| | | | | 489) (GH-18608) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-1635741: Port _locale extension module to multiphase initialization (PEP ↵Hai Shi2020-03-111-34/+83
| | | | | 489) (GH-18358) Co-authored-by: Petr Viktorin <pviktori@redhat.com>
* closes bpo-39926: Update Unicode to 13.0.0. (GH-18910)Benjamin Peterson2020-03-113-28209/+29179
|