summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* [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>
* Use the new recommended number of repetitions in the refleak tests. ↵Miss Islington (bot)2020-02-201-1/+1
| | | | | | | | | | (GH-18569) (#18574) (cherry picked from commit 1246d892038a693304549f8574e6c2784b91589a) Co-authored-by: Stefan Krah <skrah@bytereef.org> Co-authored-by: Stefan Krah <skrah@bytereef.org>
* Update runall.bat to the latest Windows build system. (GH-18571) (#18573)Miss Islington (bot)2020-02-201-41/+59
| | | | | | | | (cherry picked from commit 9b833e00e447a3b8b6966686bff701f549c66263) Co-authored-by: Stefan Krah <skrah@bytereef.org> Co-authored-by: Stefan Krah <skrah@bytereef.org>
* bpo-39184: Add audit events to functions in `fcntl`, `msvcrt`, `os`, ↵Steve Dower2020-02-135-17/+174
| | | | | | `resource`, `shutil`, `signal`, `syslog` (GH-18407) Co-authored-by: Saiyang Gou <gousaiyang@163.com>
* closes bpo-39621: Make buf arg to md5_compress be const. (GH-18497)Miss Islington (bot)2020-02-131-2/+2
| | | | | (cherry picked from commit 597ebed748d0b0c061f8c108bd98270d103286c1) Co-authored-by: Andy Lester <andy@petdance.com>
* closes bpo-39605: Fix some casts to not cast away const. (GH-18453)Miss Islington (bot)2020-02-121-2/+2
| | | | | | | | | | | | | | | | | | gcc -Wcast-qual turns up a number of instances of casting away constness of pointers. Some of these can be safely modified, by either: Adding the const to the type cast, as in: - return _PyUnicode_FromUCS1((unsigned char*)s, size); + return _PyUnicode_FromUCS1((const unsigned char*)s, size); or, Removing the cast entirely, because it's not necessary (but probably was at one time), as in: - PyDTrace_FUNCTION_ENTRY((char *)filename, (char *)funcname, lineno); + PyDTrace_FUNCTION_ENTRY(filename, funcname, lineno); These changes will not change code, but they will make it much easier to check for errors in consts (cherry picked from commit e6be9b59a911626d6597fe148c32f0342bd2bd24) Co-authored-by: Andy Lester <andy@petdance.com>
* bpo-39590: make deque.__contains__ and deque.count hold strong references ↵Miss Islington (bot)2020-02-091-0/+4
| | | | | | | | | | (GH-18421) (GH-18423) (cherry picked from commit c6dedde160a9fce5d049e860f586ad8f93aec822) Co-authored-by: sweeneyde <36520290+sweeneyde@users.noreply.github.com> Co-authored-by: sweeneyde <36520290+sweeneyde@users.noreply.github.com>
* bpo-39184: Add audit events to command execution functions in os and pty ↵Miss Islington (bot)2020-02-051-7/+42
| | | | | | | modules (GH-17824) (cherry picked from commit 95f60010219e142a436fae18e1695cbc45407afe) Co-authored-by: Saiyang Gou <gousaiyang@163.com>
* closes bpo-39510: Fix use-after-free in BufferedReader.readinto() (GH-18295)Miss Islington (bot)2020-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)) GH-GH-GH- 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> (cherry picked from commit cb1c0746f277052e45a60d6c436a765e34722821) Co-authored-by: Philipp Gesang <phg@phi-gamma.net>
* [3.8] bpo-39492: Fix a reference cycle between reducer_override and a ↵Antoine Pitrou2020-02-021-4/+18
| | | | | | | | | | | Pickler instance (GH-18266) (#18316) https://bugs.python.org/issue39492 Automerge-Triggered-By: @pitrou (cherry picked from commit 0f2f35e) Co-authored-by: Pierre Glaser <pierreglaser@msn.com>
* bpo-39393: Misleading error message on dependent DLL resolution failure ↵Miss Islington (bot)2020-01-281-2/+3
| | | | | | | (GH-18093) (cherry picked from commit 13c1c3556f2c12d0be2af890fabfbf44280b845c) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-39426: Fix outdated default and highest protocols in docs (GH-18154)Miss Islington (bot)2020-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 (cherry picked from commit e9652e8d58392f5022759ba06b444ce970eb12db) Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
* bpo-39421: Fix posible crash in heapq with custom comparison operators ↵Miss Islington (bot)2020-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 (cherry picked from commit 79f89e6e5a659846d1068e8b1bd8e491ccdef861) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-16575: Disabled checks for union types being passed by value. (GH-17960) ↵Miss Islington (bot)2020-01-121-0/+18
| | | | | | | | | | | (GH-17964) 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. (cherry picked from commit c12440c371025bea9c3bfb94945f006c486c2c01)
* closes bpo-39262: Use specific out-of-memory message in ↵Miss Islington (bot)2020-01-091-2/+4
| | | | | | | _sharedexception_bind. (GH-17908) (cherry picked from commit 5cae042f686cc174e00093944dc118914c874b7c) Co-authored-by: Alex Henrie <alexhenrie24@gmail.com>
* bpo-38532: Add missing decrefs in PyCFuncPtr_FromDll() (GH-17811)Miss Islington (bot)2020-01-031-0/+2
| | | | | | (cherry picked from commit e02ab59fdffa0bb841182c30ef1355c89578d945) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* [3.8] bpo-38820: OpenSSL 3.0.0 compatibility. (GH-17190) (GH-17499)Miss Islington (bot)2019-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 (cherry picked from commit 2b7de6696bf2f924cd2cd9ff0a539c8aa37c6244) Co-authored-by: Christian Heimes <christian@python.org> https://bugs.python.org/issue38820 Automerge-Triggered-By: @tiran
* Make repr of C accelerated TaskWakeupMethWrapper the same as of pure Python ↵Miss Islington (bot)2019-12-071-1/+17
| | | | | | | version (GH-17484) (cherry picked from commit 969ae7aca809a8dacafee04c261110eea0ac1945) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-37931: Fix crash on OSX re-initializing os.environ (GH-15428)Miss Islington (bot)2019-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. (cherry picked from commit 723f71abf7ab0a7be394f9f7b2daa9ecdf6fb1eb) Co-authored-by: Benoit Hudson <benoit@imgspc.com>
* bpo-38965: Fix faulthandler._stack_overflow() on GCC 10 (GH-17467)Miss Islington (bot)2019-12-041-10/+6
| | | | | | | Use the "volatile" keyword to prevent tail call optimization on any compiler, rather than relying on compiler specific pragma. (cherry picked from commit 8b787964e0a647caa0558b7c29ae501470d727d9) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-38634: Allow non-apple build to cope with libedit (GH-16986)Miss Islington (bot)2019-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. (cherry picked from commit 7105319ada2e663659020cbe9fdf7ff38f421ab2) Co-authored-by: serge-sans-paille <serge.guelton@telecom-bretagne.eu>
* bpo-36854: Fix reference counter in PyInit__testcapi() (GH-17338)Victor Stinner2019-11-221-2/+5
| | | | Increment properly Py_True/Py_False reference counter for _testcapi.WITH_PYMALLOC variable.
* bpo-38823: Fix refleak in _tracemalloc init error handling (GH-17235)Miss Islington (bot)2019-11-201-1/+3
| | | | | (cherry picked from commit d51a363a4379385fdfe9c09a56324631465ede29) Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
* bpo-38823: Fix refleaks in faulthandler init error path on Windows (GH-17250)Miss Islington (bot)2019-11-191-10/+21
| | | | | (cherry picked from commit ac2235432c607ce2c0faf6dff5d9b2534d2f6652) Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
* bpo-38622: Ensure ctypes.PyObj_FromPtr audit event passes tuples as a single ↵Miss Islington (bot)2019-11-181-2/+2
| | | | | | | argument (GH-17243) (cherry picked from commit dcf1f83de8678b09df5bd7d04ca5f4ef1cd02aca) Co-authored-by: Steve Dower <steve.dower@python.org>
* bpo-38622: Add missing audit events for ctypes module (GH-17158)Miss Islington (bot)2019-11-182-7/+65
| | | | | (cherry picked from commit 00923c63995e34cdc25d699478f113de99a69df9) Co-authored-by: Steve Dower <steve.dower@python.org>
* bpo-38823: Clean up refleaks in _tkinter initialization. (GH-17206)Miss Islington (bot)2019-11-181-0/+2
| | | | | | https://bugs.python.org/issue38823 (cherry picked from commit 289cf0fbf78c4f38c38ac71ac8b772be7ec2672f) Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>