summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* [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>
* bpo-40457: Support OpenSSL without TLS 1.0/1.1 (GH-19862)Miss Islington (bot)2020-05-161-34/+27
| | | | | | | | | | | | | | OpenSSL can be build without support for TLS 1.0 and 1.1. The ssl module now correctly adheres to OPENSSL_NO_TLS1 and OPENSSL_NO_TLS1_1 flags. Also update multissltest to test with latest OpenSSL and LibreSSL releases. Signed-off-by: Christian Heimes <christian@python.org> Automerge-Triggered-By: @tiran (cherry picked from commit 6e8cda91d92da72800d891b2fc2073ecbc134d98) Co-authored-by: Christian Heimes <christian@python.org>
* [3.8] bpo-40515: Require OPENSSL_THREADS (GH-19953) (GH-20119)Christian Heimes2020-05-152-1/+9
|
* [3.8] bpo-40559: Add Py_DECREF to _asynciomodule.c:task_step_impl() (GH-19990)Miss Islington (bot)2020-05-081-0/+4
| | | | | | | | This fixes a possible memory leak in the C implementation of asyncio.Task. (cherry picked from commit d2c349b190bcba21a4a38e6520a48ad97a9f1529) Co-authored-by: Chris Jerdonek <chris.jerdonek@gmail.com>
* bpo-40138: Fix Windows os.waitpid() for large exit code (GH-19654)Victor Stinner2020-04-221-1/+3
| | | | | Fix the Windows implementation of os.waitpid() for exit code larger than "INT_MAX >> 8". The exit status is now interpreted as an unsigned number.
* [3.8] bpo-40179: Fix translation of #elif in Argument Clinic (GH-19364) ↵Serhiy Storchaka2020-04-181-3/+3
| | | | | | | (GH-19583) Co-authored-by: Ammar Askar <ammar@ammaraskar.com> (cherry picked from commit 12446e6a605f066d837d3a595d0a73e4f3b43b65)
* bpo-40294: Fix _asyncio when module is loaded/unloaded multiple times (GH-19542)Miss Islington (bot)2020-04-171-0/+2
| | | | | (cherry picked from commit a75e730075cd25be1143e6183006f3b1d61bb80f) Co-authored-by: Jeffrey Quesnelle <jquesnelle@gmail.com>
* closes bpo-40266, closes bpo-39953: Use numeric lib code if compiling ↵Miss Islington (bot)2020-04-141-1248/+1248
| | | | | | | against old OpenSSL. (GH-19506) (cherry picked from commit 584a3cfda4d7a65ea0c1ea1ee541378bb7be46ca) Co-authored-by: Benjamin Peterson <benjamin@python.org>
* closes bpo-39953: Generate ifdefs around library code definitions. (GH-19490)Miss Islington (bot)2020-04-121-1/+53
| | | | | (cherry picked from commit 909b87d2bb3d6330d39c48e43f7f50f4d086cc41) Co-authored-by: Benjamin Peterson <benjamin@python.org>
* bpo-31758: Prevent crashes when using an uninitialized ↵Miss Islington (bot)2020-04-121-0/+24
| | | | | _elementtree.XMLParser object (GH-3997) (GH-19485) (cherry picked from commit 402e1cdb132f384e4dcde7a3d7ec7ea1fc7ab527)
* closes bpo-39953: Update OpenSSL error codes table. (GH-19082)Miss Islington (bot)2020-04-111-379/+4702
| | | | | | I updated the error codes using the OpenSSL 1.1.1f source tree. (cherry picked from commit 3e0dd3730b5eff7e9ae6fb921aa77cd26efc9e3a) Co-authored-by: Benjamin Peterson <benjamin@python.org>
* bpo-39689: Do not use native packing for format "?" with standard size ↵Miss Islington (bot)2020-03-311-0/+3
| | | | | | | (GH-18969) (cherry picked from commit 472fc843ca816d65c12f9508ac762ca492165c45) Co-authored-by: Stefan Krah <skrah@bytereef.org>
* bpo-40121: Fixes audit event raised on creating a new socket (GH-19238)Miss Islington (bot)2020-03-311-3/+4
| | | | | (cherry picked from commit 63ba5cccf484b9ec23dfbf4cf7ffdc833eda98c3) Co-authored-by: Steve Dower <steve.dower@python.org>
* bpo-40014: Fix os.getgrouplist() (GH-19126)Miss Islington (bot)2020-03-241-22/+25
| | | | | | | | | | | Fix os.getgrouplist(): if getgrouplist() function fails because the group list is too small, retry with a larger group list. On failure, the glibc implementation of getgrouplist() sets ngroups to the total number of groups. For other implementations, double the group list size. (cherry picked from commit f5c7cabb2be4e42a5975ba8aac8bb458c8d9d6d7) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-40014: Fix os.getgrouplist() on macOS (GH-19118)Miss Islington (bot)2020-03-231-0/+19
| | | | | | | | On macOS, getgrouplist() returns a non-zero value without setting errno if the group list is too small. Double the list size and call it again in this case. (cherry picked from commit 8ec7370c89aa522602eb9604086ce9f09770953d) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-39652: Truncate the column name after '[' only if PARSE_COLNAMES is set. ↵Miss Islington (bot)2020-03-211-7/+22
| | | | | | | (GH-18942) (cherry picked from commit b146568dfcbcd7409c724f8917e4f77433dd56e4) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-39582: ossaudiodev module update helpers signature for ioctl calls. ↵Miss Islington (bot)2020-03-141-3/+3
| | | | | | | (GH-18412) (cherry picked from commit b81f40f0adae3b1d1e57f9a89940ba827b9ede70) Co-authored-by: David CARLIER <devnexen@gmail.com>
* [3.8] bpo-39871: Fix possible SystemError in atan2, copysign and remainder ↵Mark Dickinson2020-03-141-1/+5
| | | | | | | | | | | | (GH-18806) (GH-18989) In math_2(), the first PyFloat_AsDouble() call should be checked for failure before the second call. Co-authored-by: Mark Dickinson <dickinsm@gmail.com>. (cherry picked from commit 5208b4b37953a406db0ed6a9db545c2948dde989) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* [3.8] bpo-38643: Raise SystemError instead of crashing when PyNumber_ToBase ↵Serhiy Storchaka2020-03-121-0/+14
| | | | | | is called with invalid base. (GH-18863). (GH-18954) (cherry picked from commit e5ccc94bbb153431698b2391df625e8d47a93276)
* bpo-39903: Fix double decref in _elementtree.Element.__getstate__ (GH-18850)Miss Islington (bot)2020-03-091-26/+17
| | | | | (cherry picked from commit 88944a44aa84b0f3674939019b1befbc7a9dc874) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.8] bpo-38913: Fix segfault in Py_BuildValue("(sGH-O)", ...) if entered ↵Serhiy Storchaka2020-03-021-0/+42
| | | | | | with exception raised. (GH-18656). (GH-18732) (cherry picked from commit 28d0bcac8b7e6dbd28311f1283dabb6a4d649fcb)
* bpo-39378: partial of PickleState struct should be traversed. (GH-18046)Miss Islington (bot)2020-03-021-0/+1
| | | | | (cherry picked from commit 1f577ce363121d590b51abf5c41d1bcf3d751436) Co-authored-by: Hai Shi <shihai1992@gmail.com>
* [3.8] Explicitly initialize like the surrounding code (GH-18717)Stefan Krah2020-02-291-1/+1
|
* [3.8] bpo-39794: Add --without-decimal-contextvar (GH-18702)Stefan Krah2020-02-292-29/+176
| | | (cherry picked from commit 815280eb160af637e1347213659f9236adf78f80)
* bpo-39681: Fix C pickle regression with minimal file-like objects (GH-18592) ↵Miss Islington (bot)2020-02-231-5/+36
| | | | | | | | | | | | (#18630) Fix a regression where the C pickle module wouldn't allow unpickling from a file-like object that doesn't expose a readinto() method. (cherry picked from commit 9f37872e307734666a7169f7be6e3370d3068282) Co-authored-by: Antoine Pitrou <antoine@python.org> Co-authored-by: Antoine Pitrou <pitrou@free.fr>
* bpo-39576: Prevent memory error for overly optimistic precisions (GH-18581) ↵Miss Islington (bot)2020-02-212-6/+210
| | | | | | | (#18584) (cherry picked from commit 90930e65455f60216f09d175586139242dbba260) Authored-by: Stefan Krah <skrah@bytereef.org>
* Valgrind no longer supports --db-attach=yes. (GH-18568) (#18576)Miss Islington (bot)2020-02-201-1/+1
| | | | | | | | (cherry picked from commit c0cb8beb389da3ba67ad31b1ecc95e100b6292ab) Co-authored-by: Stefan Krah <skrah@bytereef.org> Co-authored-by: Stefan Krah <skrah@bytereef.org>