summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* bpo-39184: Add audit events to command execution functions in os and pty ↵Saiyang Gou2020-02-051-7/+42
| | | | modules (GH-17824)
* bpo-39542: Make _Py_NewReference() opaque in C API (GH-18346)Victor Stinner2020-02-051-0/+1
| | | | | | | | | | _Py_NewReference() becomes a regular opaque function, rather than a static inline function in the C API (object.h), to better hide implementation details. Move _Py_tracemalloc_config from public pymem.h to internal pycore_pymem.h header. Make _Py_AddToAllObjects() private.
* closes bpo-39510: Fix use-after-free in BufferedReader.readinto() (GH-18295)Philipp Gesang2020-02-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | When called on a closed object, readinto() segfaults on account of a write to a freed buffer: ==220553== Process terminating with default action of signal 11 (SIGSEGV): dumping core ==220553== Access not within mapped region at address 0x2A ==220553== at 0x48408A0: memmove (vg_replace_strmem.c:1272) ==220553== by 0x58DB0C: _buffered_readinto_generic (bufferedio.c:972) ==220553== by 0x58DCBA: _io__Buffered_readinto_impl (bufferedio.c:1053) ==220553== by 0x58DCBA: _io__Buffered_readinto (bufferedio.c.h:253) Reproducer: reader = open ("/dev/zero", "rb") _void = reader.read (42) reader.close () reader.readinto (bytearray (42)) ### BANG! The problem exists since 2012 when commit dc469454ec added code to free the read buffer on close(). Signed-off-by: Philipp Gesang <philipp.gesang@intra2net.com>
* bpo-39542: Simplify _Py_NewReference() (GH-18332)Victor Stinner2020-02-031-3/+5
| | | | | | | | | * Remove _Py_INC_REFTOTAL and _Py_DEC_REFTOTAL macros: modify directly _Py_RefTotal. * _Py_ForgetReference() is no longer defined if the Py_TRACE_REFS macro is not defined. * Remove _Py_NewReference() implementation from object.c: unify the two implementations in object.h inline function. * Fix Py_TRACE_REFS build: _Py_INC_TPALLOCS() macro has been removed.
* bpo-39489: Remove COUNT_ALLOCS special build (GH-18259)Victor Stinner2020-02-031-10/+0
| | | | | | | | | | | Remove: * COUNT_ALLOCS macro * sys.getcounts() function * SHOW_ALLOC_COUNT code in listobject.c * SHOW_TRACK_COUNT code in tupleobject.c * PyConfig.show_alloc_count field * -X showalloccount command line option * @test.support.requires_type_collecting decorator
* bpo-39492: Fix a reference cycle between reducer_override and a Pickler ↵Pierre Glaser2020-02-021-4/+18
| | | | | | | | | | | | instance (GH-18266) This also needs a backport to 3.8 https://bugs.python.org/issue39492 Automerge-Triggered-By: @pitrou
* bpo-39496: Remove redundant checks from _sqlite/cursor.c (GH-18270)Alex Henrie2020-02-011-20/+6
|
* bpo-39511: Fix multiprocessing semlock_acquire() (GH-18298)Victor Stinner2020-02-011-10/+11
| | | | The Python C API must not be used when the GIL is released: only access Py_None when the GIL is hold.
* bpo-38631: Add _Py_NO_RETURN to functions calling Py_FatalError() (GH-18278)Victor Stinner2020-01-301-15/+1
| | | | | | | | | Add _Py_NO_RETURN to functions calling Py_FatalError(): * _PyObject_AssertFailed() * dummy_dealloc() * faulthandler_fatal_error_thread() * none_dealloc() * notimplemented_dealloc()
* bpo-39497: Remove unused variable from pysqlite_cursor_executescript (GH-18271)Alex Henrie2020-01-301-3/+0
|
* bpo-39353: binascii.crc_hqx() is no longer deprecated (GH-18276)Victor Stinner2020-01-301-5/+0
| | | The binascii.crc_hqx() function is no longer deprecated.
* bpo-39494: Remove extra null terminators from kwlist vars (GH-18267)Alex Henrie2020-01-302-3/+3
|
* bpo-39393: Misleading error message on dependent DLL resolution failure ↵Zackery Spytz2020-01-281-2/+3
| | | | (GH-18093)
* bpo-38631: Avoid Py_FatalError() in GC collect() (GH-18164)Victor Stinner2020-01-241-7/+1
| | | | | | | collect() should not get an exception, but it does, logging the exception is enough. Override sys.unraisablehook to decide how to handle unraisable exceptions. Py_FatalError() should be avoided whenever possible.
* bpo-39395: putenv() and unsetenv() always available (GH-18135)Victor Stinner2020-01-242-84/+9
| | | | | | | | The os.putenv() and os.unsetenv() functions are now always available. On non-Windows platforms, Python now requires setenv() and unsetenv() functions to build. Remove putenv_dict from posixmodule.c: it's not longer needed.
* bpo-39413: Implement os.unsetenv() on Windows (GH-18163)Victor Stinner2020-01-242-41/+108
| | | The os.unsetenv() function is now also available on Windows.
* bpo-39426: Fix outdated default and highest protocols in docs (GH-18154)Mark Dickinson2020-01-242-16/+18
| | | | | | Some portions of the pickle documentation hadn't been updated for the pickle protocol changes in Python 3.8 (new protocol 5, default protocol 4). This PR fixes those docs. https://bugs.python.org/issue39426
* bpo-39421: Fix posible crash in heapq with custom comparison operators ↵Pablo Galindo2020-01-231-9/+26
| | | | | | | | | | (GH-18118) * bpo-39421: Fix posible crash in heapq with custom comparison operators * fixup! bpo-39421: Fix posible crash in heapq with custom comparison operators * fixup! fixup! bpo-39421: Fix posible crash in heapq with custom comparison operators
* bpo-39406: Implement os.putenv() with setenv() if available (GH-18128)Victor Stinner2020-01-222-23/+25
| | | | | If setenv() C function is available, os.putenv() is now implemented with setenv() instead of putenv(), so Python doesn't have to handle the environment variable memory.
* bpo-39406: os.putenv() avoids putenv_dict on Windows (GH-18126)Victor Stinner2020-01-221-2/+6
| | | | Windows: _wputenv(env) copies the *env* string and doesn't require the caller to manage the variable memory.
* Revert "bpo-39413: Implement os.unsetenv() on Windows (GH-18104)" (GH-18124)Victor Stinner2020-01-222-84/+4
| | | This reverts commit 56cd3710a1ea3ba872d345ea1bebc86ed08bc8b8.
* bpo-39353: Deprecate the binhex module (GH-18025)Victor Stinner2020-01-222-12/+32
| | | | | | | | Deprecate binhex4 and hexbin4 standards. Deprecate the binhex module and the following binascii functions: * b2a_hqx(), a2b_hqx() * rlecode_hqx(), rledecode_hqx() * crc_hqx()
* bpo-39406: Add PY_PUTENV_DICT macro to posixmodule.c (GH-18106)Victor Stinner2020-01-211-15/+37
| | | Rename posix_putenv_garbage to putenv_dict.
* 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-091-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.