summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* bpo-38465: Convert the type of exports counters to Py_ssize_t. (GH-16746)Hai Shi2019-10-212-2/+2
|
* validate_list: make flags argument impossible to spell wrongly. (GH-16843)Tim Peters2019-10-191-16/+37
|
* bpo-38418: Fixes audit event for os.system to be named 'os.system' (GH-16670)Steve Dower2019-10-181-2/+2
| | | | | | | https://bugs.python.org/issue38418 Automerge-Triggered-By: @zooba
* bpo-34953: Implement `mmap.mmap.__repr__` (GH-9891)Taine Zhao2019-10-171-12/+57
|
* bpo-37587: json: Use _PyUnicodeWriter when scanning string. (GH-15591)Inada Naoki2019-10-171-57/+23
|
* bpo-38006: Add unit test for weakref clear bug (GH-16788)Neil Schemenauer2019-10-161-0/+55
|
* bpo-37961, tracemalloc: add Traceback.total_nframe (GH-15545)Julien Danjou2019-10-151-13/+32
| | | | Add a total_nframe field to the traces collected by the tracemalloc module. This field indicates the original number of frames before it was truncated.
* bpo-11410: Standardize and use symbol visibility attributes across POSIX and ↵Vinay Sajip2019-10-153-7/+5
| | | | Windows. (GH-16347)
* Misc gc code & comment cleanups. (GH-16752)Tim Peters2019-10-131-22/+44
| | | | | | | | | | | | * Misc gc code & comment cleanups. validate_list: there are two temp flags polluting pointers, but this checked only one. Now it checks both, and verifies that the list head's pointers are not polluted. move_unreachable: repaired incoherent comments. Added new comments. Cleared the pollution of the unreachable list head's 'next' pointer (it was expedient while the function was running, but there's no excuse for letting this damage survive the function's end). * Update Modules/gcmodule.c Co-Authored-By: Pablo Galindo <Pablogsal@gmail.com>
* bpo-38379: Don't block collection of unreachable objects when some objects ↵Pablo Galindo2019-10-131-60/+122
| | | | | | | resurrect (GH-16687) Currently if any finalizer invoked during garbage collection resurrects any object, the gc gives up and aborts the collection. Although finalizers are assured to only run once per object, this behaviour of the gc can lead to an ever-increasing memory situation if new resurrecting objects are allocated in every new gc collection. To avoid this, recompute what objects among the unreachable set need to be resurrected and what objects can be safely collected. In this way, resurrecting objects will not block the collection of other objects in the unreachable set.
* bpo-38378: Rename parameters "out" and "in" of os.sendfile(). (GH-16742)Serhiy Storchaka2019-10-132-21/+20
| | | | | | | They conflicted with keyword "in". Also rename positional-only parameters of private os._fcopyfile() for consistency.
* bpo-38282: Correctly manage the Bluetooth L2CAP socket structure in FreeBSD ↵Pablo Galindo2019-10-131-1/+6
| | | | (GH-16738)
* bpo-38417: Add umask support to subprocess (GH-16726)Gregory P. Smith2019-10-121-5/+9
| | | | On POSIX systems, allow the umask to be set in the child process before we exec.
* bpo-37731: Reorder includes in xmltok.c to avoid redefinition of ↵Pablo Galindo2019-10-121-8/+8
| | | | _POSIX_C_SOURCE (GH-16733)
* bpo-38437: Activate GC_DEBUG when PY_DEBUG is set (GH-16707)Pablo Galindo2019-10-101-2/+5
|
* bpo-38282: Rewrite getsockaddrarg() helper function (GH-16698)Victor Stinner2019-10-102-39/+25
| | | | | | | | Rewrite getsockaddrarg() helper function of socketmodule.c (_socket module) to prevent a false alarm when compiling codde using GCC with _FORTIFY_SOURCE=2. Pass a pointer of the sock_addr_t union, rather than passing a pointer to a sockaddr structure. Add "struct sockaddr_tipc tipc;" to the sock_addr_t union.
* bpo-38353: Fix typos in calculate_argv0_path_framework() (GH-16695)Victor Stinner2019-10-101-4/+4
| | | | | bpo-38353, bpo-38429: Fix typos introduced by commit c02b41b1fb115c87693530ea6a480b2e15460424 in calculate_argv0_path_framework() of getpath.c.
* bpo-38392: Only declare visit_validate() if Py_DEBUG is defined (GH-16689)Victor Stinner2019-10-101-0/+3
| | | | | bpo-38392, bpo-38426: Fix a compiler warning in gcmodule.c. Fix also a typo in PYMEM_DEADBYTE macro comment.
* bpo-38379: don't claim objects are collected when they aren't (#16658)Tim Peters2019-10-091-6/+4
| | | | | | * bpo-38379: when a finalizer resurrects an object, nothing is actually collected in this run of gc. Change the stats to relect that truth.
* closes bpo-36161: Use thread-safe ttyname_r instead of ttyname. (GH-14868)Antonio Gutierrez2019-10-091-4/+15
| | | Signed-off-by: Antonio Gutierrez <chibby0ne@gmail.com>
* bpo-38368: Added fix for ctypes crash when handling arrays in structs… ↵Vinay Sajip2019-10-082-25/+179
| | | | (GH-16589)
* bpo-38371: Tkinter: deprecate the split() method. (GH-16584)Serhiy Storchaka2019-10-081-0/+6
|
* closes bpo-38402: Check error of primitive crypt/crypt_r. (GH-16599)Antonio Gutierrez2019-10-081-0/+3
| | | | | | | Checks also for encryption algorithms methods not supported in different OSs. Signed-off-by: Antonio Gutierrez <chibby0ne@gmail.com>
* bpo-38070: Enhance visit_decref() debug trace (GH-16631)Victor Stinner2019-10-081-4/+5
| | | | | | | | subtract_refs() now pass the parent object to visit_decref() which pass it to _PyObject_ASSERT(). So if the "is freed" assertion fails, the parent is used in debug trace, rather than the freed object. The parent object is more likely to contain useful information. Freed objects cannot be inspected are are displayed as "<object at xxx is freed>" with no other detail.
* bpo-38392: PyObject_GC_Track() validates object in debug mode (GH-16615)Victor Stinner2019-10-073-4/+24
| | | | | | | | In debug mode, PyObject_GC_Track() now calls tp_traverse() of the object type to ensure that the object is valid: test that objects visited by tp_traverse() are valid. Fix pyexpat.c: only track the parser in the GC once the parser is fully initialized.
* bpo-36389: _PyObject_CheckConsistency() available in release mode (GH-16612)Victor Stinner2019-10-072-1/+9
| | | | | | | | | | | | | | | | | | | | | bpo-36389, bpo-38376: The _PyObject_CheckConsistency() function is now also available in release mode. For example, it can be used to debug a crash in the visit_decref() function of the GC. Modify the following functions to also work in release mode: * _PyDict_CheckConsistency() * _PyObject_CheckConsistency() * _PyType_CheckConsistency() * _PyUnicode_CheckConsistency() Other changes: * _PyMem_IsPtrFreed(ptr) now also returns 1 if ptr is NULL (equals to 0). * _PyBytesWriter_CheckConsistency() now returns 1 and is only used with assert(). * Reorder _PyObject_Dump() to write safe fields first, and only attempt to render repr() at the end.
* bpo-36356: Fix memory leak in _asynciomodule.c (GH-16598)Ben Harper2019-10-071-0/+7
|
* Fix a compile warning in selectmodule.c. (GH-16617)Xiang Zhang2019-10-071-1/+1
|
* bpo-38353: Simplify calculate_pybuilddir() (GH-16614)Victor Stinner2019-10-071-5/+0
| | | | Calling _Py_wfopen() is enough to check if filename is an existing file or not. There is no need to check first isfile().
* bpo-38353: getpath.c: allocates strings on the heap (GH-16585)Victor Stinner2019-10-041-295/+383
| | | | | | | | | | | * _Py_FindEnvConfigValue() now returns a string allocated by PyMem_RawMalloc(). * calculate_init() now decodes VPATH macro. * Add calculate_open_pyenv() function. * Add substring() and joinpath2() functions. * Fix add_exe_suffix() And a few cleanup changes.
* bpo-38353: getpath.c uses dynamically allocated strings (GH-16582)Victor Stinner2019-10-041-91/+115
| | | | * PyCalculatePath: add "_macro" to the 3 fields storing macro values * Add dynamically allocated strings to PyCalculatePath
* bpo-13153: Use OS native encoding for converting between Python and Tcl. ↵Serhiy Storchaka2019-10-041-173/+202
| | | | | | | | | | | | | (GH-16545) On Windows use UTF-16 (or UTF-32 for 32-bit Tcl_UniChar) with the "surrogatepass" error handler for converting to/from Tcl Unicode objects. On Linux use UTF-8 with the "surrogateescape" error handler for converting to/from Tcl String objects. Converting strings from Tcl to Python and back now never fails (except MemoryError).
* bpo-38353: Rework ismodule() in getpath.c (GH-16574)Victor Stinner2019-10-041-64/+80
| | | | * ismodule() no longer modify the input string. * copy_absolute(), joinpath(): rename parameters and local variables.
* bpo-38353: Add subfunctions to getpath.c (GH-16572)Victor Stinner2019-10-041-153/+259
| | | | | | | | | | | | | | Following symbolic links is now limited to 40 attempts, just to prevent loops. Add subfunctions: * Add resolve_symlinks() * Add calculate_argv0_path_framework() * Add calculate_which() * Add calculate_program_macos() Fix also _Py_wreadlink(): readlink() result type is Py_ssize_t, not int.
* bpo-38353: Fix calculate_argv0_path() for symlinks (GH-16549)Victor Stinner2019-10-031-1/+1
| | | | calculate_argv0_path() must read argv0_path link, not read program_full_path link.
* bpo-38353: Cleanup includes in the internal C API (GH-16548)Victor Stinner2019-10-021-0/+1
| | | | Use forward declaration of types to avoid includes in the internal C API. Add also comment to justify other includes.
* bpo-37474: Don't call fedisableexcept() on FreeBSD (GH-16515)Victor Stinner2019-10-011-13/+0
| | | | | On FreeBSD, Python no longer calls fedisableexcept() at startup to control the floating point control mode. The call became useless since FreeBSD 6: it became the default mode.