summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* bpo-38916: array.array: remove fromstring() and tostring() (GH-17487)Victor Stinner2019-12-092-110/+1
| | | | array.array: Remove tostring() and fromstring() methods. They were aliases to tobytes() and frombytes(), deprecated since Python 3.2.
* bpo-38820: OpenSSL 3.0.0 compatibility. (GH-17190)Christian Heimes2019-12-071-1/+48
| | | | | | | | | | test_openssl_version now accepts version 3.0.0. getpeercert() no longer returns IPv6 addresses with a trailing new line. Signed-off-by: Christian Heimes <christian@python.org> https://bugs.python.org/issue38820
* Make repr of C accelerated TaskWakeupMethWrapper the same as of pure Python ↵Andrew Svetlov2019-12-071-1/+17
| | | | version (GH-17484)
* bpo-38978: Implement __class_getitem__ for asyncio objects (GH-17491)Batuhan Taşkaya2019-12-071-0/+15
| | | https://bugs.python.org/issue38978
* bpo-37931: Fix crash on OSX re-initializing os.environ (GH-15428)Benoit Hudson2019-12-061-5/+5
| | | | | | | | | | On most platforms, the `environ` symbol is accessible everywhere. In a dylib on OSX, it's not easily accessible, you need to find it with _NSGetEnviron. The code was caching the *value* of environ. But a setenv() can change the value, leaving garbage at the old value. Fix: don't cache the value of environ, just read it every time.
* bpo-27961: Replace PY_LLONG_MAX, PY_LLONG_MIN and PY_ULLONG_MAX with ↵Sergey Fedoseev2019-12-051-15/+15
| | | | | standard macros (GH-15385) Use standard constants LLONG_MIN, LLONG_MAX and ULLONG_MAX.
* bpo-38965: Fix faulthandler._stack_overflow() on GCC 10 (GH-17467)Victor Stinner2019-12-041-10/+6
| | | | Use the "volatile" keyword to prevent tail call optimization on any compiler, rather than relying on compiler specific pragma.
* bpo-38634: Allow non-apple build to cope with libedit (GH-16986)serge-sans-paille2019-12-041-19/+4
| | | | | | | | | | | The readline module now detects if Python is linked to libedit at runtime on all platforms. Previously, the check was only done on macOS. If Python is used as a library by a binary linking to libedit, the linker resolves the rl_initialize symbol required by the readline module against libedit instead of libreadline, which leads to a segfault. Take advantage of the existing supporting code to have readline module being compatible with both situations.
* closes bpo-38803: Fix leak in posixmodule. (GH-17373)Eddie Elizondo2019-11-261-0/+1
|
* bpo-38876: Raise pickle.UnpicklingError when loading an item from memo for ↵Claudiu Popa2019-11-241-4/+8
| | | | | | | | | | | | | | | invalid input (GH-17335) The previous code was raising a `KeyError` for both the Python and C implementation. This was caused by the specified index of an invalid input which did not exist in the memo structure, where the pickle stores what objects it has seen. The malformed input would have caused either a `BINGET` or `LONG_BINGET` load from the memo, leading to a `KeyError` as the determined index was bogus. https://bugs.python.org/issue38876 https://bugs.python.org/issue38876
* bpo-38896: Remove PyUnicode_ClearFreeList() function (GH-17354)Victor Stinner2019-11-231-1/+0
| | | | Remove PyUnicode_ClearFreeList() function: the Unicode free list has been removed in Python 3.3.
* bpo-36854: Fix refleak in subinterpreter (GH-17331)Victor Stinner2019-11-221-2/+5
| | | | finalize_interp_clear() now explicitly clears the codec registry and then trigger a GC collection to clear all references.
* 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
|