summaryrefslogtreecommitdiff
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
...
* bpo-39413: Implement os.unsetenv() on Windows (GH-18104)Victor Stinner2020-01-212-4/+82
| | | | | The os.unsetenv() function is now also available on Windows. It is implemented with SetEnvironmentVariableW(name, NULL).
* bpo-39396: Fix math.nextafter(-0.0, +0.0) on AIX 7.1 (GH-18094)Victor Stinner2020-01-211-2/+8
| | | | Move also math.nextafter() on math.ulp() tests from IsCloseTests to MathTests.
* bpo-31031: Unify duplicate bits_in_digit and bit_length (GH-2866)Niklas Fiekas2020-01-161-25/+3
| | | Add _Py_bit_length() to unify duplicate bits_in_digit() and bit_length().
* bpo-1635741: Port _json extension module to multiphase initialization (PEP ↵Hai Shi2020-01-151-23/+30
| | | | 489) (GH-17835)
* bpo-38361: syslog: fixed making default "ident" from sys.argv[0] (GH-16557)Václav Bartoš2020-01-141-1/+1
| | | | | | | | | | The default value of "ident" parameter should be sys.argv[0] with leading path components stripped, but it contained the last slash, i.e. '/program' instead of 'program'. BPO issue: https://bugs.python.org/issue38361 https://bugs.python.org/issue38361
* bpo-39322: Add gc.is_finalized to the gc module docstring (GH-18000)Pablo Galindo2020-01-141-0/+1
|
* bpo-39322: Add gc.is_finalized to check if an object has been finalised by ↵Pablo Galindo2020-01-142-1/+30
| | | | the gc (GH-17989)
* Fix typos in gcmodule.c and restructure comments for clarity (GH-17983)Pablo Galindo2020-01-131-44/+36
|
* bpo-39310: Add math.ulp(x) (GH-17965)Victor Stinner2020-01-132-1/+72
| | | | Add math.ulp(): return the value of the least significant bit of a float.
* bpo-16575: Disabled checks for union types being passed by value. (GH-17960)Vinay Sajip2020-01-121-0/+18
| | | | | | | Although the underlying libffi issue remains open, adding these checks have caused problems in third-party projects which are in widespread use. See the issue for examples. The corresponding tests have also been skipped.
* bpo-39288: Add math.nextafter(x, y) (GH-17937)Victor Stinner2020-01-122-1/+69
| | | Return the next floating-point value after x towards y.
* bpo-39272: Remove dead assignment from ↵Alex Henrie2020-01-091-1/+0
| | | | _ssl__SSLContext_load_verify_locations_impl (GH-17916)
* bpo-39271: Remove dead assignment from pattern_subx (GH-17915)Alex Henrie2020-01-091-1/+0
|
* closes bpo-39262: Use specific out-of-memory message in ↵Alex Henrie2020-01-081-2/+4
| | | | _sharedexception_bind. (GH-17908)
* bpo-39237, datetime: Remove redundant call to round from delta_new (GH-17877)Alex Henrie2020-01-081-1/+0
|
* bpo-39239: epoll.unregister() no longer ignores EBADF (GH-17882)Victor Stinner2020-01-071-5/+0
| | | | The select.epoll.unregister() method no longer ignores the EBADF error.
* bpo-28367: Add additional baud rates for termios (GH-13142)Anthony Shaw2020-01-041-0/+33
| | | | | | Co-authored-by: Andrey Smirnov <andrew.smirnov@gmail.com>. Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* bpo-38532: Add missing decrefs in PyCFuncPtr_FromDll() (GH-16857)Zackery Spytz2020-01-031-0/+2
|
* Move comment about permanent generation to gcmodule.c (GH-17718)Pablo Galindo2019-12-271-2/+34
| | | | | | The comment about the collection rules for the permanent generation was incorrectly referenced by a comment in gcmodule.c (the comment has been moved long ago into a header file). Moving the comment into the relevant code helps with readability and avoids broken references.
* 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-251-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-201-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-192-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-201-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-181-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
|