summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* bpo-42819, readline: Disable bracketed paste (GH-24108)Miss Islington (bot)2021-02-151-0/+23
| | | | | (cherry picked from commit 755f3c1521b422bc2177013d289f5439975fdc4f) Co-authored-by: Dustin Rodrigues <dust.rod@gmail.com>
* bpo-43108: Fix a reference leak in the curses module (GH-24420) (GH-24429)Miss Islington (bot)2021-02-151-1/+3
| | | | | | | (cherry picked from commit bb739ec922c6992a2be38f9fd3c544c2cc322dde) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-43204: Fix LibTomCrypt URL in md5module.c and sha*module.c comments ↵Miss Islington (bot)2021-02-144-4/+4
| | | | | | | | | | (GH-24507) (GH-24516) Automerge-Triggered-By: GH:tiran (cherry picked from commit 5ec7d535581bc99918e032891167a96abd224ed6) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no> Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* [3.9] bpo-41604: Don't decrement the reference count of the previous ↵Miss Islington (bot)2021-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> (cherry picked from commit 3c8d6934436e20163be802f5239c5b4e4925eeec) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* closes bpo-42938: Replace snprintf with Python unicode formatting in ctypes ↵Miss Islington (bot)2021-01-181-32/+19
| | | | | | | | | param reprs. (GH-24248) (cherry picked from commit 916610ef90a0d0761f08747f7b0905541f0977c7) Co-authored-by: Benjamin Peterson <benjamin@python.org> Co-authored-by: Benjamin Peterson <benjamin@python.org>
* [3.8] [3.9] bpo-42681: Fix test_curses failures related to color pairs ↵Serhiy Storchaka2021-01-051-8/+18
| | | | | | | | | | (GH-24089) (GH-24113) (GH-24116) 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) (cherry picked from commit 9b3a53a8264d4c469a3f3d8c037e74c010be3e5c)
* [3.8] [3.9] bpo-42681: Fix range checks for color and pair numbers in curses ↵Serhiy Storchaka2021-01-042-41/+29
| | | | | | | (GH-23874). (GH-24077) (GH-24079) (cherry picked from commit 1470edd6131c29b8a09ce012cdfee3afa269d553) (cherry picked from commit b0ee2b492dbf550fbd2a63b82de0a4dc9d67f32e)
* [3.8] bpo-26407: Do not mask errors in csv. (GH-20536) (GH-24021)Serhiy Storchaka2021-01-011-8/+8
| | | | | | | Unexpected errors in calling the __iter__ method are no longer masked by TypeError in csv.reader(), csv.writer.writerow() and csv.writer.writerows(). (cherry picked from commit c88239f864a27f673c0f0a9e62d2488563f9d081)
* [3.8] bpo-36589: Fix the error handling in curses.update_lines_cols(). ↵Serhiy Storchaka2021-01-012-21/+24
| | | | | | | | | (GH-12766) (GH-24023) Return None instead of 1. (cherry picked from commit 2bc343417a4de83fa6998ff91303877734ecd366) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* [3.8] bpo-42318: Fix support of non-BMP characters in Tkinter on macOS ↵Miss Islington (bot)2020-12-251-1/+53
| | | | | | | (GH-23281). (GH-23784) (GH-23787) (cherry picked from commit a26215db11cfcf7b5f55cab9e91396761a0e0bcf) (cherry picked from commit 28bf6ab61f77c69b732a211c398ac882bf3f65f4)
* 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-23389)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-42536: GC track recycled tuples (GH-23623) (GH-23652)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)
* 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
| | | | | | | | | | (GH-23349) 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)). (cherry picked from commit 05a5d697f4f097f37c5c1e2ed0e2338a33c3fb6a)
* [3.8] bpo-42237: Fix os.sendfile() on illumos (GH-23154). (GH-23246)Jakub Stasiak2020-11-121-0/+18
| | | | | (cherry picked from commit fd4ed57674c675e05bd5d577dd5047a333c76c78) Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
* [3.8] bpo-35455: Fix thread_time for Solaris OS (GH-11118). (GH-23145)Jakub Kulík2020-11-041-0/+17
| | | | | (cherry picked from commit 9568622c9983b682b2a2a7bacfd3c341028ea099) Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
* bpo-41662: Fix bugs in binding parameters in sqlite3 (GH-21998)Miss Skeleton (bot)2020-10-261-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-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>
* 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-22707)Miss Skeleton (bot)2020-10-151-0/+20
| | | (cherry picked from commit c13b847a6f913b72eeb71651ff626390b738d973)
* bpo-41867: List options for timespec in docstrings of isoformat methods ↵Miss Skeleton (bot)2020-10-031-4/+8
| | | | | | | (GH-22418) (cherry picked from commit 52301312bb9de2299b0c42468fd1936d869e651c) Co-authored-by: Ram Rachum <ram@rachum.com>
* [3.8] bpo-41602: raise SIGINT exit code on KeyboardInterrupt from ↵Thomas Grainger2020-09-241-0/+4
| | | | | | | | pymain_run_module (GH-21956) (#22398) 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-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>
* [3.8] bpo-41302: Support system libmpdec 2.5 for Python 3.8 (GH-21488)Felix Yan2020-07-151-0/+7
| | | | | | | Define UNUSED only when mpdecimal.h doesn't define it. This would support building with system libmpdec 2.5 while retaining compatibility with system libmpdec 2.4 or the vendored copy. Tested to build fine with either system libmpdec or the vendored one.
* 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>
* 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-41247: asyncio.set_running_loop() cache running loop holder (#21406)Tony Solomonik2020-07-091-3/+6
| | | | | | | The running loop holder cache variable was always set to NULL when calling set_running_loop. Now set_running_loop saves the newly created running loop holder in the cache variable for faster access in get_running_loop.
* 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>
* closes bpo-41235: Fix the error handling in SSLContext.load_dh_params() ↵Miss Islington (bot)2020-07-081-2/+4
| | | | | | | (GH-21385) (cherry picked from commit aebc0495572c5bb85d2bd97d27cf93ab038b5a6a) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-29778: Ensure python3.dll is loaded from correct locations when Python ↵Miss Islington (bot)2020-07-061-1/+44
| | | | | | | | | is embedded (GH-21297) (GH-21352) Also enables using debug build of `python3_d.dll` Reference: CVE-2020-15523 (cherry picked from commit dcbaa1b49cd9062fb9ba2b9d49555ac6cd8c60b5) Co-authored-by: Steve Dower <steve.dower@python.org>
* bpo-39960: Allow heap types in the "Carlo Verre" hack check that override ↵scoder2020-07-051-0/+79
| | | | | "tp_setattro()" (GH-21092) (GH-21339) Backport to Py3.8.
* [3.8] bpo-35975: Only use cf_feature_version if PyCF_ONLY_AST in cf_flags ↵Guido van Rossum2020-06-281-1/+3
| | | | (#21023)
* bpo-41094: Additional fix for PYTHONSTARTUP. (GH-21119)Miss Islington (bot)2020-06-241-9/+43
| | | | | (cherry picked from commit a7dc71470156680f1fd5243290c6d377824b7ef4) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-41094: Fix decoding errors with audit when open files. (GH-21095)Miss Islington (bot)2020-06-242-6/+10
| | | | | (cherry picked from commit 6c6810d98979add7a89391c3c38990d0859f7a29) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.8] bpo-31938: Fix default-value signatures of several functions in the ↵Anthony Sottile2020-06-232-13/+17
| | | | | | | select module (GH-21066) (GH-21098) (cherry picked from commit d051801052211b533c46a593b1c1bccf649a171c) Automerge-Triggered-By: @vstinner
* bpo-41085: Fix array.array.index() on 64-bit Windows (GH-21071)Miss Islington (bot)2020-06-231-1/+1
| | | | | | | Fix integer overflow in the :meth:`array.array.index` method on 64-bit Windows for index larger than ``2**31``. (cherry picked from commit 1d3dad5f96ed445b958ec53dfa0d46812f2162d9) Co-authored-by: WildCard65 <WildCard65@users.noreply.github.com>
* bpo-41056: Fix a NULL pointer dereference on MemoryError within the ssl ↵Miss Islington (bot)2020-06-211-6/+6
| | | | | | | | module. (GH-21009) Detected by Coverity. (cherry picked from commit eb0d5c38de7f970d8cd8524f4163d831c7720f51) Co-authored-by: Gregory P. Smith <greg@krypto.org>
* [3.8] Revert bpo-39576: Prevent memory error for overly optimistic ↵Stefan Krah2020-06-082-210/+6
| | | | | precisions (GH-20747) This reverts commit b6271025c640c228505dc9f194362a0c2ab81c61.
* [3.9] bpo-40826: Fix GIL usage in PyOS_Readline() (GH-20613) (GH-20616)Victor Stinner2020-06-031-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | * bpo-40826: Fix GIL usage in PyOS_Readline() (GH-20579) Fix GIL usage in PyOS_Readline(): lock the GIL to set an exception. Pass tstate to my_fgets() and _PyOS_WindowsConsoleReadline(). Cleanup these functions. (cherry picked from commit c353764fd564e401cf47a5d9efab18c72c60014e) * bpo-40826: Add _PyOS_InterruptOccurred(tstate) function (GH-20599) my_fgets() now calls _PyOS_InterruptOccurred(tstate) to check for pending signals, rather calling PyOS_InterruptOccurred(). my_fgets() is called with the GIL released, whereas PyOS_InterruptOccurred() must be called with the GIL held. test_repl: use text=True and avoid SuppressCrashReport in test_multiline_string_parsing(). Fix my_fgets() on Windows: fgets(fp) does crash if fileno(fp) is closed. (cherry picked from commit fa7ab6aa0f9a4f695e5525db5a113cd21fa93787)
* bpo-30008: Fix OpenSSL no-deprecated compilation (GH-20397)Miss Islington (bot)2020-06-011-11/+45
| | | | | | | | | | | | Fix :mod:`ssl`` code to be compatible with OpenSSL 1.1.x builds that use ``no-deprecated`` and ``--api=1.1.0``. Note: Tests assume full OpenSSL API and fail with limited API. Signed-off-by: Christian Heimes <christian@python.org> Co-authored-by: Mark Wright <gienah@gentoo.org> (cherry picked from commit a871f692b4a2e6c7d45579693e787edc0af1a02c) Co-authored-by: Christian Heimes <christian@python.org>
* bpo-40795: ctypes calls unraisablehook with an exception (GH-20452)Miss Islington (bot)2020-05-272-14/+31
| | | | | | | | | If ctypes fails to convert the result of a callback or if a ctypes callback function raises an exception, sys.unraisablehook is now called with an exception set. Previously, the error was logged into stderr by PyErr_Print(). (cherry picked from commit 10228bad0452d94e66c964b625a0b61befa08e59) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-13097: ctypes: limit callback to 1024 arguments (GH-19914)Miss Islington (bot)2020-05-271-0/+15
| | | | | | | | | | | | | ctypes now raises an ArgumentError when a callback is invoked with more than 1024 arguments. The ctypes module allocates arguments on the stack in ctypes_callproc() using alloca(), which is problematic when large numbers of arguments are passed. Instead of a stack overflow, this commit raises an ArgumentError if more than 1024 parameters are passed. (cherry picked from commit 29a1384c040d39659e7d01f1fd7b6eb71ef2634e) Co-authored-by: Sean Gillespie <sean@swgillespie.me>
* [3.8] bpo-38580: Document that select() accepts iterables, not just ↵Tal Einat2020-05-262-5/+5
| | | | | | | sequences (GH-16832) (cherry picked from commit 372ee27d4958302dac7ad6a8711f6fd04771b2e6) Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
* [3.8] bpo-35714: Reject null characters in struct format strings (GH-16928) ↵Zackery Spytz2020-05-261-0/+4
| | | | | | | | (GH-20419) struct.error is now raised if there is a null character in a struct format string. (cherry picked from commit 3f59b55316f4c6ab451997902579aa69020b537c)
* bpo-40677: Define IO_REPARSE_TAG_APPEXECLINK explicitly (GH-20206)Miss Islington (bot)2020-05-191-0/+4
| | | | | | This allows building with older versions of the Windows SDK where the value is not defined. (cherry picked from commit 711f9e180a48baba62301735b7f1a58ef0d0e93a) Co-authored-by: Minmin Gong <gongminmin@msn.com>
* bpo-40653: Move _dirnameW out of GH-ifdef HAVE_SYMLINK/GH-endif (GH-20144)Miss Islington (bot)2020-05-181-2/+6
| | | | | (cherry picked from commit 7f21c9ac872acc2114aee3313d132b016550ff42) Co-authored-by: Minmin Gong <gongminmin@msn.com>
* bpo-39148: enable ipv6 for datagrams in Proactor (GH-19121)Miss Islington (bot)2020-05-181-5/+2
| | | | | | | | | Ifdef is not necessary, as AF_INET6 is supported from Windows Vista, and other code in overlapped.c uses AF_INET6 and is not ifdef'd. Change the raised exception so users are not fooled to think it comes from Windows API. Automerge-Triggered-By: @njsmith (cherry picked from commit 442634c42fcaf31c636f693951a97734042c3e7b) Co-authored-by: Kjell Braden <afflux@pentabarf.de>