| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
precisions (GH-20747)
This reverts commit b6271025c640c228505dc9f194362a0c2ab81c61.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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)
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
sequences (GH-16832)
(cherry picked from commit 372ee27d4958302dac7ad6a8711f6fd04771b2e6)
Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
|
|
|
|
|
|
|
|
| |
(GH-20419)
struct.error is now raised if there is a null character in a struct
format string.
(cherry picked from commit 3f59b55316f4c6ab451997902579aa69020b537c)
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
(cherry picked from commit 7f21c9ac872acc2114aee3313d132b016550ff42)
Co-authored-by: Minmin Gong <gongminmin@msn.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
(GH-19583)
Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
(cherry picked from commit 12446e6a605f066d837d3a595d0a73e4f3b43b65)
|
|
|
|
|
| |
(cherry picked from commit a75e730075cd25be1143e6183006f3b1d61bb80f)
Co-authored-by: Jeffrey Quesnelle <jquesnelle@gmail.com>
|
|
|
|
|
|
|
| |
against old OpenSSL. (GH-19506)
(cherry picked from commit 584a3cfda4d7a65ea0c1ea1ee541378bb7be46ca)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
|
|
|
|
|
| |
(cherry picked from commit 909b87d2bb3d6330d39c48e43f7f50f4d086cc41)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
|
|
|
|
|
| |
_elementtree.XMLParser object (GH-3997) (GH-19485)
(cherry picked from commit 402e1cdb132f384e4dcde7a3d7ec7ea1fc7ab527)
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
(GH-18969)
(cherry picked from commit 472fc843ca816d65c12f9508ac762ca492165c45)
Co-authored-by: Stefan Krah <skrah@bytereef.org>
|
|
|
|
|
| |
(cherry picked from commit 63ba5cccf484b9ec23dfbf4cf7ffdc833eda98c3)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
(GH-18942)
(cherry picked from commit b146568dfcbcd7409c724f8917e4f77433dd56e4)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
| |
(GH-18412)
(cherry picked from commit b81f40f0adae3b1d1e57f9a89940ba827b9ede70)
Co-authored-by: David CARLIER <devnexen@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
| |
is called with invalid base. (GH-18863). (GH-18954)
(cherry picked from commit e5ccc94bbb153431698b2391df625e8d47a93276)
|
|
|
|
|
| |
(cherry picked from commit 88944a44aa84b0f3674939019b1befbc7a9dc874)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
| |
with exception raised. (GH-18656). (GH-18732)
(cherry picked from commit 28d0bcac8b7e6dbd28311f1283dabb6a4d649fcb)
|
|
|
|
|
| |
(cherry picked from commit 1f577ce363121d590b51abf5c41d1bcf3d751436)
Co-authored-by: Hai Shi <shihai1992@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 815280eb160af637e1347213659f9236adf78f80)
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#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>
|
|
|
|
|
|
|
| |
(#18584)
(cherry picked from commit 90930e65455f60216f09d175586139242dbba260)
Authored-by: Stefan Krah <skrah@bytereef.org>
|
|
|
|
|
|
|
|
| |
(cherry picked from commit c0cb8beb389da3ba67ad31b1ecc95e100b6292ab)
Co-authored-by: Stefan Krah <skrah@bytereef.org>
Co-authored-by: Stefan Krah <skrah@bytereef.org>
|
|
|
|
|
|
|
|
|
|
| |
(GH-18569) (#18574)
(cherry picked from commit 1246d892038a693304549f8574e6c2784b91589a)
Co-authored-by: Stefan Krah <skrah@bytereef.org>
Co-authored-by: Stefan Krah <skrah@bytereef.org>
|
|
|
|
|
|
|
|
| |
(cherry picked from commit 9b833e00e447a3b8b6966686bff701f549c66263)
Co-authored-by: Stefan Krah <skrah@bytereef.org>
Co-authored-by: Stefan Krah <skrah@bytereef.org>
|
|
|
|
|
|
| |
`resource`, `shutil`, `signal`, `syslog` (GH-18407)
Co-authored-by: Saiyang Gou <gousaiyang@163.com>
|
|
|
|
|
| |
(cherry picked from commit 597ebed748d0b0c061f8c108bd98270d103286c1)
Co-authored-by: Andy Lester <andy@petdance.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
|
| |
modules (GH-17824)
(cherry picked from commit 95f60010219e142a436fae18e1695cbc45407afe)
Co-authored-by: Saiyang Gou <gousaiyang@163.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
(GH-18093)
(cherry picked from commit 13c1c3556f2c12d0be2af890fabfbf44280b845c)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
|
|
|
|
|
| |
(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)
|
|
|
|
|
|
|
| |
_sharedexception_bind. (GH-17908)
(cherry picked from commit 5cae042f686cc174e00093944dc118914c874b7c)
Co-authored-by: Alex Henrie <alexhenrie24@gmail.com>
|