summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* bpo-42819, readline: Disable bracketed paste (GH-24108) (GH-24545)Miss Islington (bot)2021-02-161-0/+23
| | | | | | | (cherry picked from commit 755f3c1521b422bc2177013d289f5439975fdc4f) Co-authored-by: Dustin Rodrigues <dust.rod@gmail.com> Co-authored-by: Dustin Rodrigues <dust.rod@gmail.com>
* bpo-43204: Fix LibTomCrypt URL in md5module.c and sha*module.c comments ↵Miss Islington (bot)2021-02-124-4/+4
| | | | | | | | (GH-24507) Automerge-Triggered-By: GH:tiran (cherry picked from commit 5ec7d535581bc99918e032891167a96abd224ed6) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-43132: Fix incorrect handling of PyObject_RichCompareBool() in _zoneinfo ↵Miss Islington (bot)2021-02-051-6/+17
| | | | | | | | | | | (GH-24450) (GH-24457) PyObject_RichCompareBool() returns -1 on error, but this case is not handled by the find_in_strong_cache() function. Any exception raised by PyObject_RichCompareBool() should be propagated. (cherry picked from commit effaec0bb54f381db8ccfa62514bc26b00946b40) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-43108: Fix a reference leak in the curses module (GH-24420)Miss Islington (bot)2021-02-031-1/+3
| | | | | (cherry picked from commit bb739ec922c6992a2be38f9fd3c544c2cc322dde) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-42688: Fix ffi alloc/free when using external libffi on macos (GH-23868) ↵Miss Islington (bot)2021-02-011-2/+10
| | | | | | | | | (GH-23888) Automerge-Triggered-By: GH:ronaldoussoren (cherry picked from commit b3c77ecbbe0ad3e3cc6dbd885792203e9e6ec858) Co-authored-by: erykoff <erykoff@stanford.edu>
* [3.9] bpo-41604: Don't decrement the reference count of the previous ↵Serhiy Storchaka2021-01-311-1/+3
| | | | | | | | user_ptr when set_panel_usertpr fails (GH-21933). (GH-24403) (cherry picked from commit 3243e8a4b4b4cf321f9b28335d565742a34b1976) Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
* bpo-43083: Fix error handling in _sqlite3 (GH-24395)Miss Islington (bot)2021-01-312-7/+19
| | | | | (cherry picked from commit 9073180db521dc83e6216ff0da1479d00167f643) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-42979: _zoneinfo exec function checks for PyDateTime_IMPORT failure ↵Miss Islington (bot)2021-01-271-0/+3
| | | | | | | | | | (GH-24333) (GH-24351) Importing datetime can fail. (cherry picked from commit eeb701adc0fc29ba803fddf133d917ff45639a00) Co-authored-by: Hai Shi <shihai1992@gmail.com> Co-authored-by: Hai Shi <shihai1992@gmail.com>
* bpo-43033: Fix the handling of PyObject_SetAttrString() in _zoneinfo.c ↵Miss Islington (bot)2021-01-271-1/+5
| | | | | | | | (GH-24345) (GH-24349) (cherry picked from commit 5327f370344a627f1578d8183d197feb286371c6) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-41995: Handle allocation failure in _tracemalloc and _zoneinfo (GH-22635)Miss Islington (bot)2021-01-201-0/+12
| | | | | (cherry picked from commit f1ff800db1f9fa5ff8f2fa2863796a46bfa9ee46) Co-authored-by: Yunlongs <lylgood@foxmail.com>
* closes bpo-42938: Replace snprintf with Python unicode formatting in ctypes ↵Miss Islington (bot)2021-01-181-32/+19
| | | | | | | | | param reprs. (GH-24247) (cherry picked from commit 916610ef90a0d0761f08747f7b0905541f0977c7) Co-authored-by: Benjamin Peterson <benjamin@python.org> Co-authored-by: Benjamin Peterson <benjamin@python.org>
* [3.9] bpo-42681: Fix test_curses failures related to color pairs (GH-24089) ↵Serhiy Storchaka2021-01-051-8/+18
| | | | | | | | | (GH-24113) On ncurses 6.1 pair numbers are limited by SHORT_MAX-1. Improve error reporting and tests for color functions. (cherry picked from commit 59f9b4e4509be67494f3d45489fa55523175ff69)
* bpo-42692: fix __builtin_available check on older compilers (GH-23873) ↵Miss Islington (bot)2021-01-041-1/+7
| | | | | | | | | | | | (GH-24090) A compiler that doesn't define `__has_builtin` will error out when it is used on the same line as the check for it. Automerge-Triggered-By: GH:ronaldoussoren (cherry picked from commit df21f502fdccec234282bf0a211af979fd23def4) Co-authored-by: Joshua Root <jmr@macports.org>
* [3.9] bpo-42681: Fix range checks for color and pair numbers in curses ↵Serhiy Storchaka2021-01-032-41/+29
| | | | | | (GH-23874). (GH-24077) (cherry picked from commit 1470edd6131c29b8a09ce012cdfee3afa269d553)
* bpo-42655: Fix subprocess extra_groups gid conversion (GH-23762)Miss Islington (bot)2020-12-293-11/+7
| | | | | (cherry picked from commit 0159e5efeebd12b3cf365c8569ca000eac7cb03e) Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
* bpo-42620: Improve socket.getsockname doc string (GH-23742)Miss Islington (bot)2020-12-231-2/+3
| | | | | | Signed-off-by: Christian Heimes <christian@python.org> (cherry picked from commit cf3565ca9a7ed0f7decd000e41fa3de400986e4d) Co-authored-by: Christian Heimes <christian@python.org>
* bpo-42375: subprocess DragonFlyBSD build update. (GH-23320) (GH-23388)Miss Islington (bot)2020-12-171-4/+4
| | | | | | | | Same as FreeBSD, file descriptors in /dev/fd id from 0 to 63. (cherry picked from commit 13b865f0e17c88b081c23f7f05cf91166d220a50) Co-authored-by: David CARLIER <devnexen@gmail.com> Co-authored-by: David CARLIER <devnexen@gmail.com>
* bpo-40686: Fix compiler warnings on _zoneinfo.c (GH-23614) (GH-23804)Miss Islington (bot)2020-12-161-10/+4
| | | | | | | | | | | | | "uint8_t day" is unsigned and so "day < 0" test is always true. Remove the test to fix the following warnings on Windows: modules\_zoneinfo.c(1224): warning C4068: unknown pragma modules\_zoneinfo.c(1225): warning C4068: unknown pragma modules\_zoneinfo.c(1227): warning C4068: unknown pragma (cherry picked from commit aefb69b23f056c61e82ad228d950f348de090c70) Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.9] bpo-42318: Fix support of non-BMP characters in Tkinter on macOS ↵Serhiy Storchaka2020-12-151-1/+53
| | | | | | (GH-23281). (GH-23784) (cherry picked from commit a26215db11cfcf7b5f55cab9e91396761a0e0bcf)
* bpo-42536: GC track recycled tuples (GH-23623) (GH-23651)Brandt Bucher2020-12-072-0/+32
| | | | | | | | | | | | | | | | | Several built-in and standard library types now ensure that their internal result tuples are always tracked by the garbage collector: - collections.OrderedDict.items - dict.items - enumerate - functools.reduce - itertools.combinations - itertools.combinations_with_replacement - itertools.permutations - itertools.product - itertools.zip_longest - zip Previously, they could have become untracked by a prior garbage collection. (cherry picked from commit 226a012d1cd61f42ecd3056c554922f359a1a35d)
* Add GCC pragmas to silence compiler warning about ffi_prep_closure ↵Miss Islington (bot)2020-12-011-2/+9
| | | | | | | | | (GH-23327) (GH-23590) (cherry picked from commit cce3f0b0c88eba98bc11abe703a444bee7880ff8) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* [3.9] bpo-41100: Support macOS 11 and Apple Silicon (GH-22855) (GH-23295)Ronald Oussoren2020-11-228-254/+981
| | | | | | | | | | | | | | | | | | | | * [3.9] bpo-41100: Support macOS 11 and Apple Silicon (GH-22855) Co-authored-by: Lawrence D’Anna <lawrence_danna@apple.com> * Add support for macOS 11 and Apple Silicon (aka arm64) As a side effect of this work use the system copy of libffi on macOS, and remove the vendored copy * Support building on recent versions of macOS while deploying to older versions This allows building installers on macOS 11 while still supporting macOS 10.9.. (cherry picked from commit 41761933c1c30bb6003b65eef1ba23a83db4eae4) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com> * Back port of changes to _decimal to support arm64 * temp_dir is in test.support in 3.9
* bpo-40791: Make compare_digest more constant-time. (GH-20444)Miss Islington (bot)2020-11-211-1/+1
| | | | | | | | | | * bpo-40791: Make compare_digest more constant-time. The existing volatile `left`/`right` pointers guarantee that the reads will all occur, but does not guarantee that they will be _used_. So a compiler can still short-circuit the loop, saving e.g. the overhead of doing the xors and especially the overhead of the data dependency between `result` and the reads. That would change performance depending on where the first unequal byte occurs. This change removes that optimization. (This is change GH-1 from https://bugs.python.org/issue40791 .) (cherry picked from commit 31729366e2bc09632e78f3896dbce0ae64914f28) Co-authored-by: Devin Jeanpierre <jeanpierreda@google.com>
* bpo-41686: Always create the SIGINT event on Windows (GH-23344) (GH-23347)Victor Stinner2020-11-171-5/+47
| | | | | | bpo-41686, bpo-41713: On Windows, the SIGINT event, _PyOS_SigintEvent(), is now created even if Python is configured to not install signal handlers (PyConfig.install_signal_handlers=0 or Py_InitializeEx(0)).
* bpo-42237: Fix os.sendfile() on illumos (GH-23154)Miss Islington (bot)2020-11-121-0/+15
| | | | | (cherry picked from commit fd4ed57674c675e05bd5d577dd5047a333c76c78) Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
* bpo-35455: Fix thread_time for Solaris OS (GH-11118) (GH-23130)Miss Skeleton (bot)2020-11-041-0/+17
| | | | | | | (cherry picked from commit 9568622c9983b682b2a2a7bacfd3c341028ea099) Co-authored-by: Jakub Kulík <Kulikjak@gmail.com> Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
* [3.9] bpo-42146: Fix memory leak in subprocess.Popen() in case of uid/gid ↵Miss Skeleton (bot)2020-10-261-2/+2
| | | | | | | | | | | | | | | | | overflow (GH-22966) (GH-22980) Fix memory leak in subprocess.Popen() in case of uid/gid overflow Also add a test that would catch this leak with `--huntrleaks`. Alas, the test for `extra_groups` also exposes an inconsistency in our error reporting: we use a custom ValueError for `extra_groups`, but propagate OverflowError for `user` and `group`. (cherry picked from commit c0590c0033e86f98cdf5f2ca6898656f98ab4053) Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru> Automerge-Triggered-By: GH:gpshead
* bpo-42144: Add a missing "goto error;" in the _ssl module (GH-22959)Miss Skeleton (bot)2020-10-251-0/+1
| | | | | (cherry picked from commit c32f2976b8f4034724c3270397aa16f38daf470f) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* [3.9] bpo-41052: Fix pickling heap types implemented in C with protocols 0 ↵Serhiy Storchaka2020-10-252-35/+1
| | | | | and 1 (GH-22870). (GH-22963) (cherry picked from commit 8cd1dbae32d9303caac3a473d3332f17bc98c921)
* bpo-38324: Fix test__locale.py Windows failures (GH-20529)Miss Skeleton (bot)2020-10-201-3/+22
| | | | | | | Use wide-char _W_* fields of lconv structure on Windows Remove "ps_AF" from test__locale.known_numerics on Windows (cherry picked from commit f2312037e3a974d26ed3e23884f94c6af111a27a) Co-authored-by: TIGirardi <tiagoigirardi@gmail.com>
* bpo-16396: Allow wintypes to be imported on non-Windows systems. (GH-21394)Miss Skeleton (bot)2020-10-191-3/+6
| | | | | | Co-authored-by: Christian Heimes <christian@python.org> (cherry picked from commit 5456e78f4593edc277ab72fb9a9db1ebae7d4c2d) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* bpo-41984: GC track all user classes (GH-22701/GH-22702)Miss Skeleton (bot)2020-10-151-0/+20
| | | (cherry picked from commit c13b847a6f913b72eeb71651ff626390b738d973)
* bpo-41995: Fix null ptr deref in tracemalloc_copy_trace() (GH-22660)Miss Skeleton (bot)2020-10-131-1/+1
| | | | | | | Fix a null pointer dereference in tracemalloc_copy_trace() of _tracemalloc. (cherry picked from commit 66c28f50c76e4f23af7146e0e580457c5fd6bde7) Co-authored-by: Yunlongs <lylgood@foxmail.com>
* [3.9] bpo-41867: List options for timespec in docstrings of isoformat ↵Miss Skeleton (bot)2020-10-031-4/+8
| | | | | | | methods (GH-22418) (cherry picked from commit 52301312bb9de2299b0c42468fd1936d869e651c) Co-authored-by: Ram Rachum <ram@rachum.com>
* [3.9] bpo-41602: raise SIGINT exit code on KeyboardInterrupt from ↵Łukasz Langa2020-09-241-0/+4
| | | | | | | | pymain_run_module (GH-21956) (#22397) Closes bpo issue 41602. (cherry picked from commit a68a2ad19c891faa891904b3da537911cc77df21) Co-authored-by: Thomas Grainger <tagrain@gmail.com>
* bpo-41815: SQLite: segfault if backup called on closed database (GH-22322)Miss Islington (bot)2020-09-211-0/+4
| | | | | | | | | | | | | | | | GH- [bpo-41815](): SQLite: fix segfault if backup called on closed database Attempting to backup a closed database will trigger segfault: ```python import sqlite3 target = sqlite3.connect(':memory:') source = sqlite3.connect(':memory:') source.close() source.backup(target) ``` (cherry picked from commit bfee9fad84531a471fd7864e88947320669f68e2) Co-authored-by: Peter McCormick <peter@pdmccormick.com>
* bpo-41662: Fix bugs in binding parameters in sqlite3 (GH-21998)Miss Islington (bot)2020-09-171-2/+5
| | | | | | | | | * When the parameters argument is a list, correctly handle the case of changing it during iteration. * When the parameters argument is a custom sequence, no longer override an exception raised in ``__len__()``. (cherry picked from commit 0b419b791077414bbc011a412698ebb362b63761) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-41687: Fix error handling in Solaris sendfile implementation (GH-22128)Miss Islington (bot)2020-09-161-3/+2
| | | | | | | | | | I just realized that my recent PR with sendfile on Solaris ([PR 22040](https://github.com/python/cpython/pull/22040)) has broken error handling. Sorry for that, this simple followup fixes that. Automerge-Triggered-By: @1st1 (cherry picked from commit fa8c9e70104b0aef966a518eb3a80a4881906ae0) Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
* [3.9] bpo-41687: Fix sendfile implementation to work with Solaris (GH-22040) ↵Łukasz Langa2020-09-161-0/+19
| | | | | | | (GH-22273) (cherry picked from commit 8c0be6fd9101746235b63ddfb84106d1e9ca286b) Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
* On path with known exact float, extract the double with the fast macro. ↵Miss Islington (bot)2020-09-041-5/+10
| | | | | | | (GH-21072) (cherry picked from commit 930f4518aea7f3f0f914ce93c3fb92831a7e1d2a) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
* bpo-41568: Fix refleaks in zoneinfo subclasses (GH-21907)Miss Islington (bot)2020-08-171-3/+3
| | | | | | | | | | | | | | | | | * Fix refleak in C module __init_subclass__ This was leaking a reference to the weak cache dictionary for every ZoneInfo subclass created. * Fix refleak in ZoneInfo subclass's clear_cache The previous version of the code accidentally cleared the global ZONEINFO_STRONG_CACHE variable (and inducing `ZoneInfo` to create a new strong cache) on calls to a subclass's `clear_cache()`. This would not affect guaranteed behavior, but it's still not the right thing to do (and it caused reference leaks). (cherry picked from commit c3dd7e45cc5d36bbe2295c2840faabb5c75d83e4) Co-authored-by: Paul Ganssle <paul@ganssle.io>
* bpo-40878: xlc cannot handle C99 extern inline. (GH-21891)Miss Islington (bot)2020-08-151-1/+1
| | | | | | | This applies to the default "extc99" mode. Python does not compile with "stdc99". (cherry picked from commit 40e700ad042089120456cc2ee79b8ca69479416b) Authored-by: Stefan Krah <skrah@bytereef.org>
* bpo-31122: ssl.wrap_socket() now raises ssl.SSLEOFError rather than OSError ↵Miss Islington (bot)2020-08-151-4/+5
| | | | | | | | | | when peer closes connection during TLS negotiation (GH-18772) [bpo-31122](): ssl.wrap_socket() now raises ssl.SSLEOFError rather than OSError when peer closes connection during TLS negotiation Reproducer: http://tiny.cc/f4ztnz (tiny url because some bot keeps renaming b.p.o.-nnn as bpo links) (cherry picked from commit 495bd035662fda29639f9d52bb6baebea31d72fa) Co-authored-by: Dima Tisnek <dimaqq@gmail.com>
* bpo-41025: Fix subclassing for zoneinfo.ZoneInfo (GH-20965) (GH-21876)Miss Islington (bot)2020-08-141-1/+1
| | | | | | | | | | | Prior to this change, attempting to subclass the C implementation of zoneinfo.ZoneInfo gave the following error: TypeError: unbound method ZoneInfo.__init_subclass__() needs an argument https://bugs.python.org/issue41025 (cherry picked from commit 87d8287865e5c9f137f6b5cf8c34c2c509eb5e9d) Co-authored-by: Paul Ganssle <paul@ganssle.io>
* bpo-41336: Fix the error handling in zoneinfo_new_instance() (GH-21546)Miss Islington (bot)2020-07-201-1/+7
| | | | | | | Do not call PyObject_CallMethod() with a live exception (like KeyboardInterrupt). (cherry picked from commit eca2549f5a5048b44ca88b9555f1c62f094e3c12) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-40150: Fix mismatched argument in RegisterWaitForSingleObject() call ↵Miss Islington (bot)2020-07-151-3/+2
| | | | | | | (GH-19686) (cherry picked from commit af4eda46d1538b1da700a86588bdb94b0a4d1ff2) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* Fix -Wstring-prototypes warnings in _zoneinfo.c. (GH-21478)Miss Islington (bot)2020-07-151-2/+2
| | | | | (cherry picked from commit 0108b2a2401d0ffffe7c07e5ab69a3b0c7593070) Co-authored-by: Benjamin Peterson <benjamin@python.org>
* bpo-41302: Fix build with system libmpdec (GH-21481)Miss Islington (bot)2020-07-152-6/+5
| | | | | | | | | | Move definition of UNUSED from modified headers of libmpdec to _decimal.c itself. This makes the vendored source closer to the standalone library and fixes build with --with-system-libmpdec. Tested to build fine with either system libmpdec or the vendored one. (cherry picked from commit 015efdbef7454a522e88cd79ba2b4cd77a5fb2a2) Co-authored-by: Felix Yan <felixonmars@archlinux.org>
* bpo-41288: Fix a crash in unpickling invalid NEWOBJ_EX. (GH-21458)Miss Islington (bot)2020-07-131-8/+21
| | | | | | Automerge-Triggered-By: @tiran (cherry picked from commit 4f309abf55f0e6f8950ac13d6ec83c22b8d47bf8) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-41252: Fix incorrect refcounting in _ssl.c's _servername_callback() ↵Miss Islington (bot)2020-07-091-1/+2
| | | | | | | (GH-21407) (cherry picked from commit ee96f32ca24779656d3c8736d26671fc3689f0a3) Co-authored-by: Zackery Spytz <zspytz@gmail.com>