summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* bpo-38823: Clean up _xxtestfuzz initialization. (GH-17216)Brandt Bucher2019-11-211-6/+1
| | | https://bugs.python.org/issue38823
* bpo-38858: Add _Py_IsMainInterpreter(tstate) (GH-17293)Victor Stinner2019-11-201-3/+3
|
* bpo-37340: Remove PyMethod_ClearFreeList() and PyCFunction_ClearFreeList() ↵Victor Stinner2019-11-201-2/+0
| | | | | | | | (GH-17284) Remove PyMethod_ClearFreeList() and PyCFunction_ClearFreeList() functions: the free lists of bound method objects have been removed. Remove also _PyMethod_Fini() and _PyCFunction_Fini() functions.
* bpo-36854: Move _PyRuntimeState.gc to PyInterpreterState (GH-17287)Victor Stinner2019-11-201-34/+38
| | | | | * Rename _PyGC_InitializeRuntime() to _PyGC_InitState() * finalize_interp_clear() now also calls _PyGC_Fini() in subinterpreters (clear the GC state).
* bpo-36854: gcmodule.c gets its state from tstate (GH-17285)Victor Stinner2019-11-201-157/+184
| | | | | | | | | * Add GCState type for readability * gcmodule.c now gets its gcstate from tstate * _PyGC_DumpShutdownStats() now expects tstate rather than runtime * Rename "state" to "gcstate" for readability: to avoid confusion between "state" and "tstate" for example. * collect() now only expects tstate: it gets gcstate from tstate. * Pass tstate to _PyErr_xxx() functions
* bpo-36854: Clear the current thread later (GH-17279)Victor Stinner2019-11-201-1/+0
| | | | | | | | | | Clear the current thread later in the Python finalization. * The PyInterpreterState_Delete() function is now responsible to call PyThreadState_Swap(NULL). * The tstate_delete_common() function is now responsible to clear the "autoTSSKey" thread local storage and it only clears it once the thread state is fully cleared. It allows to still get the current thread from TSS in tstate_delete_common().
* bpo-38823: Fix refleak in _tracemalloc init error handling (GH-17235)Brandt Bucher2019-11-201-1/+3
|
* bpo-38858: Factorize Py_EndInterpreter() code (GH-17273)Victor Stinner2019-11-201-2/+2
| | | | | | * Factorize code in common between Py_FinalizeEx() and Py_EndInterpreter(). * Py_EndInterpreter() now also calls _PyWarnings_Fini(). * Call _PyExc_Fini() and _PyGC_Fini() later in the finalization.
* closes bpo-38712: Add signal.pidfd_send_signal. (GH-17070)Benjamin Peterson2019-11-202-1/+111
| | | | | | | | This exposes a Linux-specific syscall for sending a signal to a process identified by a file descriptor rather than a pid. For simplicity, we don't support the siginfo_t parameter to the syscall. This parameter allows implementing a pidfd version of rt_sigqueueinfo(2), which Python also doesn't support.
* bpo-38835: Don't use PyFPE_START_PROTECT and PyFPE_END_PROTECT (GH-17231)Victor Stinner2019-11-204-63/+18
| | | | | The PyFPE_START_PROTECT() and PyFPE_END_PROTECT() macros are empty: they have been doing nothing for the last year (since commit 735ae8d139a673b30b321dc10acfd3d14f0d633b), so stop using them.
* bpo-36710: Add PyInterpreterState.runtime field (GH-17270)Victor Stinner2019-11-202-3/+3
| | | | | | | | | | | Add PyInterpreterState.runtime field: reference to the _PyRuntime global variable. This field exists to not have to pass runtime in addition to tstate to a function. Get runtime from tstate: tstate->interp->runtime. Remove "_PyRuntimeState *runtime" parameter from functions already taking a "PyThreadState *tstate" parameter. _PyGC_Init() first parameter becomes "PyThreadState *tstate".
* bpo-36710: Pass tstate parameter to GC collect() (GH-17267)Victor Stinner2019-11-201-37/+50
| | | | Pass tstate parameter (PyThreadState) to GC collect() function and other GC subfunctions.
* bpo-38631: Avoid Py_FatalError() in handle_legacy_finalizers() (GH-17266)Victor Stinner2019-11-201-6/+18
| | | | | * Rename _PyGC_Initialize() to _PyGC_InitializeRuntime() * Add _PyGC_Init(): initialize _PyRuntime.gc.garbage list * Call _PyGC_Init() before _PyTypes_Init()
* bpo-38823: Fix refleaks in faulthandler init error path on Windows (GH-17250)Brandt Bucher2019-11-191-10/+21
|
* bpo-38823: Clean up refleak in fcntl module initialization. (GH-17236)Brandt Bucher2019-11-191-1/+3
|
* Clean up module initialization. (GH-17215)Brandt Bucher2019-11-191-3/+1
|
* Minor fixes to the formatting of the notes of Modules/gcmodule.c (GH-17247)Pablo Galindo2019-11-191-2/+2
|
* bpo-38622: Ensure ctypes.PyObj_FromPtr audit event passes tuples as a single ↵Steve Dower2019-11-181-2/+2
| | | | argument (GH-17243)
* bpo-38622: Add missing audit events for ctypes module (GH-17158)Steve Dower2019-11-182-7/+65
|
* Revert "remove a strange non-ASCII character in _iomodule.c" (GH-17240)Tal Einat2019-11-181-1/+1
| | | | This reverts commit bcc1cc5c, which removed an intentionally placed "form feed" character.
* remove a strange non-ASCII character in _iomodule.c (GH-17239)Tal Einat2019-11-181-1/+1
|
* bpo-38631: Avoid Py_FatalError() in _multibytecodec init (GH-17233)Victor Stinner2019-11-181-1/+0
| | | | | If an exception is raised and PyInit__multibytecodec() returns NULL, Python reports properly the exception to the user. There is no need to crash Python with Py_FatalError().
* bpo-38823: Clean up refleaks in _tkinter initialization. (GH-17206)Brandt Bucher2019-11-181-0/+2
| | | https://bugs.python.org/issue38823
* bpo-36589: Fix the error handling in curses.update_lines_cols(). (GH-12766)Zackery Spytz2019-11-172-21/+24
| | | | Return None instead of 1.
* bpo-38823: Clean up refleaks in _contextvars initialization. (GH-17198)Brandt Bucher2019-11-161-0/+3
| | | https://bugs.python.org/issue38823
* bpo-38823: Clean up refleaks in _asyncio initialization. (GH-17195)Brandt Bucher2019-11-161-0/+4
| | | https://bugs.python.org/issue38823
* bpo-38639: Optimize floor(), ceil() and trunc() for floats. (GH-16991)Serhiy Storchaka2019-11-161-20/+28
|
* bpo-38677: Fix arraymodule error handling in module initialization. (GH-17039)Marco Paolini2019-11-151-8/+12
|
* bpo-38785: Prevent asyncio from crashing (GH-17144)Andrew Svetlov2019-11-131-0/+1
| | | | | | | if parent `__init__` is not called from a constructor of object derived from `asyncio.Future` https://bugs.python.org/issue38785
* closes bpo-27805: Ignore ESPIPE in initializing seek of append-mode files. ↵Benjamin Peterson2019-11-121-9/+15
| | | | | (GH-17112) This change, which follows the behavior of C stdio's fdopen and Python 2's file object, allows pipes to be opened in append mode.
* bpo-16576: Add checks for bitfields passed by value to functions. (GH-17097)Vinay Sajip2019-11-122-3/+60
|
* Minor readability improvement for argument handling in itertools.repeat() ↵Raymond Hettinger2019-11-101-5/+5
| | | | | | (GH-17101)
* bpo-38644: Add _PyObject_VectorcallTstate() (GH-17052)Victor Stinner2019-11-081-7/+14
| | | | | * Add _PyObject_VectorcallTstate() function: similar to _PyObject_Vectorcall(), but with tstate parameter * Add tstate parameter to _PyObject_MakeTpCall()
* closes bpo-38713: Expose P_PIDFD in os if it's defined. (GH-17071)Benjamin Peterson2019-11-061-0/+6
| | | https://bugs.python.org/issue38713
* bpo-38692: Add os.pidfd_open. (GH-17063)Benjamin Peterson2019-11-062-1/+68
|
* bpo-35381 Remove all static state from posixmodule (GH-15892)Eddie Elizondo2019-11-052-226/+273
| | | | | | | | | | | | | | After #9665, this moves the remaining types in posixmodule to be heap-allocated to make it compatible with PEP384 as well as modifying all the type accessors to fully make the type opaque. The original PR that got messed up a rebase: https://github.com/python/cpython/pull/10854. All the issues in that commit have now been addressed since https://github.com/python/cpython/pull/11661 got committed. This change also removes any state from the data segment and onto the module state itself. https://bugs.python.org/issue35381 Automerge-Triggered-By: @encukou
* _json.c: use Py_UNUSED() macro (GH-17053)Victor Stinner2019-11-051-10/+4
| | | Remove UNUSED macro: use Py_UNUSED() macro instead.
* bpo-38684: haslib: fix build when Blake2 not enabled in OpenSSL (#17043)Alexandru Ardelean2019-11-041-1/+1
|
* Years overdue, explain why unreachable objects are moved. (GH-17030)Tim Peters2019-11-021-1/+38
|
* bpo-38312: Add curses.{get,set}_escdelay and curses.{get,set}_tabsize. ↵Anthony Sottile2019-10-312-1/+207
| | | | (GH-16938)
* bpo-16575: Add checks for unions passed by value to functions. (GH-16799)Vinay Sajip2019-10-314-0/+98
|
* bpo-38631: Avoid Py_FatalError() in readline (GH-16998)Victor Stinner2019-10-301-6/+11
| | | | readline now calls PyErr_NoMemory() rather than Py_FatalError() on memory allocation failure, when importing the module.
* Permutations Python code equivalent in comment was invalid for Python 3 ↵Sergey2019-10-291-3/+6
| | | | (GH-16927)
* bpo-37330: open() no longer accept 'U' in file mode (GH-16959)Victor Stinner2019-10-282-29/+3
| | | | | open(), io.open(), codecs.open() and fileinput.FileInput no longer accept "U" ("universal newline") in the file mode. This flag was deprecated since Python 3.3.
* bpo-38602: Add fcntl.F_OFD_XXXX for fcntlmodule (GH-16956)Dong-hee Na2019-10-281-0/+9
|
* Replace _pysqlite_long_from_int64() with PyLong_FromLongLong() (GH-16882)Sergey Fedoseev2019-10-234-20/+3
|
* bpo-38303: Make audioop extension module PEP-384 compatible (GH-16497)Tyler Kieft2019-10-221-55/+77
| | | | | | | https://bugs.python.org/issue38303 Automerge-Triggered-By: @encukou
* visit_reachable: replace release-mode test with an assert. (GH-16866)Tim Peters2019-10-211-2/+5
| | | | | | | It should be impossible for an untracked object to have the collecting flag set. Back when state was stored in gc_refs, it obviously was impossible (gc_refs couldn't possibly have a positive & negative value simultaneously). While the _implementation_ of "state" has gotten much more complicated, it's still _logically_ just as impossible.
* bpo-38493: Add os.CLD_KILLED and os.CLD_STOPPED. (GH-16821)Dong-hee Na2019-10-211-0/+6
|
* bpo-27961: Replace PY_LONG_LONG with long long. (GH-15386)Sergey Fedoseev2019-10-211-2/+2
|