summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
...
* [3.11] gh-100370: fix OverflowError in sqlite3.Connection.blobopen for ↵Erlend E. Aasland2023-05-082-9/+26
| | | | 32-bit builds (#103902) (#104285)
* [3.11] gh-104106: Add gcc fallback of mkfifoat/mknodat for macOS (gh-104129) ↵Dong-hee Na2023-05-051-0/+8
| | | | | (gh-104187) gh-104106: Add gcc fallback of mkfifoat/mknodat for macOS (gh-104129)
* gh-103242: Migrate SSLContext.set_ecdh_curve not to use deprecated APIs ↵Miss Islington (bot)2023-04-081-3/+8
| | | | | | | | (GH-103378) Migrate `SSLContext.set_ecdh_curve()` not to use deprecated OpenSSL APIs. (cherry picked from commit 35167043e3a21055a94cf3de6ceccd1585554cb8) Co-authored-by: Dong-hee Na <donghee.na@python.org>
* gh-103256: Fix hmac algorithm to support fallback implementation (gh-103286)Miss Islington (bot)2023-04-071-1/+1
| | | | | | (cherry picked from commit efb0a2cf3adf4629cf4669cb558758fb78107319) Co-authored-by: Dong-hee Na <donghee.na@python.org> Co-authored-by: Gregory P. Smith <greg@krypto.org>
* [3.11] GH-95494: Fix transport EOF handling in OpenSSL 3.0 (GH-95495) (#103006)Miss Islington (bot)2023-03-271-4/+10
| | | | | | | | | | | | | | | | | | | | | | | GH-25309 enabled SSL_OP_IGNORE_UNEXPECTED_EOF by default, with a comment that it restores OpenSSL 1.1.1 behavior, but this wasn't quite right. That option causes OpenSSL to treat transport EOF as the same as close_notify (i.e. SSL_ERROR_ZERO_RETURN), whereas Python actually has distinct SSLEOFError and SSLZeroReturnError exceptions. (The latter is usually mapped to a zero return from read.) In OpenSSL 1.1.1, the ssl module would raise them for transport EOF and close_notify, respectively. In OpenSSL 3.0, both act like close_notify. Fix this by, instead, just detecting SSL_R_UNEXPECTED_EOF_WHILE_READING and mapping that to the other exception type. There doesn't seem to have been any unit test of this error, so fill in the missing one. This had to be done with the BIO path because it's actually slightly tricky to simulate a transport EOF with Python's fd based APIs. (If you instruct the server to close the socket, it gets confused, probably because the server's SSL object is still referencing the now dead fd?) (cherry picked from commit 420bbb783b43216cc897dc8914851899db37a31d) Co-authored-by: David Benjamin <davidben@google.com>
* [3.11] gh-102281: Fix potential nullptr dereference + use of uninitia… ↵Max Bachmann2023-03-251-1/+4
| | | | | | (#103040) [3.11] gh-102281: Fix potential nullptr dereference + use of uninitialized memory (gh-102282) (cherry picked from commit afa6092ee4260bacf7bc11905466e4c3f8556cbb)
* [3.11] gh-102027: Fix macro name (GH-102124) (#102916)Miss Islington (bot)2023-03-241-1/+1
| | | | | | | | | | gh-102027: Fix macro name (GH-102124) This fixes the ssse3 / sse2 detection when sse4 is available. (cherry picked from commit ea93bde4ece139d4152a59f2c38aa6568559447c) Co-authored-by: Max Bachmann <kontakt@maxbachmann.de> Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
* [3.11] gh-96931: Fix incorrect results in ssl.SSLSocket.shared_ciphers ↵Miss Islington (bot)2023-03-241-8/+28
| | | | | | | | (GH-96932) (#102918) gh-96931: Fix incorrect results in ssl.SSLSocket.shared_ciphers (GH-96932) (cherry picked from commit af9c34f6ef8dceb21871206eb3e4d350f6e3d3dc) Co-authored-by: Benjamin Fogle <benfogle@gmail.com>
* GH-100989: remove annotation from docstring (GH-102991)Miss Islington (bot)2023-03-241-2/+2
| | | | | (cherry picked from commit d49409196e0c73c38e3f96cf860cbffda40607ec) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
* GH-100989: Revert Improve the accuracy of collections.deque docstrings ↵Miss Islington (bot)2023-03-241-24/+13
| | | | | | | (GH-102979) (cherry picked from commit 7f01a11199864bcf230b243b99e8a51e9044675d) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
* gh-100989: Improve the accuracy of collections.deque docstrings (GH-100990)Miss Islington (bot)2023-03-221-13/+24
| | | | | | (cherry picked from commit c74073657e32b8872f91b3bbe1efa9af20adbea9) Co-authored-by: Timo Ludwig <ti.ludwig@web.de> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* [3.11] gh-102493: backport unit test for PyErr_SetObject (#102602)Irit Katriel2023-03-111-0/+15
| | | gh-102493: backport unit test for PyErr_SetObject
* GH-102397: Fix segfault from race condition in signal handling (GH-102399)Miss Islington (bot)2023-03-081-0/+4
| | | | | | (cherry picked from commit 1a84cc007e207f2dd61f86a7fc3d86632fdce72f) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-102179: Fix `os.dup2` error reporting for negative fds (GH-102180)Miss Islington (bot)2023-03-041-5/+0
| | | | | (cherry picked from commit c2bd55d26f8eb2850eb9f9026b5d7f0ed1420b65) Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
* [3.11] Add missing 'is' to `cmath.log()` docstring (GH-102049) (#102279)Mark Dickinson2023-02-262-4/+4
| | | | | | Fix missing 'is' in cmath.log() docstring. (cherry picked from commit 71f614ef2a3d66213b9cae807cbbc1ed03741221) Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
* [3.11] gh-101656: Fix "conversion from Py_ssize_t to int" warning in ↵Nikita Sobolev2023-02-081-3/+3
| | | | | `_testcapimodule` (#101680) (cherry picked from commit acc2f3b19d28d4bf3f8fb32357f581cba5ba24c7)
* [3.11] gh-101072: support default and kw default in PyEval_EvalCodeEx for ↵Łukasz Langa2023-02-071-0/+139
| | | | | | 3.11+ (GH-101127) (#101636) Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: Matthieu Dartiailh <m.dartiailh@gmail.com>
* gh-101543: Ensure Windows registry path is only used when stdlib can't be ↵Miss Islington (bot)2023-02-061-19/+12
| | | | | | | found (GH-101544) (cherry picked from commit 7a253103d4c64fcca4c0939a584c2028d8da6829) Co-authored-by: Steve Dower <steve.dower@python.org>
* gh-101372: Fix unicodedata.is_normalized to properly handle the UCD 3… ↵Miss Islington (bot)2023-02-061-1/+1
| | | | | | | (gh-101388) (cherry picked from commit 9ef7e75434587fc8f167d73eee5dd9bdca62714b) Co-authored-by: Dong-hee Na <donghee.na@python.org>
* [3.11] gh-99952: fix refcount issues in ctypes.Structure from_param() result ↵Gregory P. Smith2023-01-262-0/+9
| | | | | | | | | | | | (#101339) [3.11] gh-99952: [ctypes] fix refcount issues in from_param() result. (GH-100169) Fixes a reference counting issue with `ctypes.Structure` when a `from_param()` method call is used and the structure size is larger than a C pointer `sizeof(void*)`. This problem existed for a very long time, but became more apparent in 3.8+ by change likely due to garbage collection cleanup timing changes.. (cherry picked from commit dfad678d7024ab86d265d84ed45999e031a03691) Co-authored-by: Yukihiro Nakadaira <yukihiro.nakadaira@gmail.com>
* [3.11] gh-101326: Fix regression when passing None to FutureIter.throw ↵Shantanu2023-01-251-1/+6
| | | | | | | (GH-101327) (#101328) (cherry picked from commit a178ba82bfe2f2fb6f6ff0e67cb734fd7c4321e3) Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* gh-100795: Don't call freeaddrinfo on failure. (GH-101252)Miss Islington (bot)2023-01-231-0/+4
| | | | | | | | | | | | When getaddrinfo returns an error, the output pointer is in an unknown state Don't call freeaddrinfo on it. See the issue for discussion and details with links to reasoning. _Most_ libc getaddrinfo implementations never modify the output pointer unless they are returning success. (cherry picked from commit b724ac2fe7fbb5a7a33d639cad8e748f17b325e0) Co-authored-by: Gregory P. Smith <greg@krypto.org> Co-authored-by: Sergey G. Brester <github@sebres.de> Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
* gh-82052: Don't send partial UTF-8 sequences to the Windows API (GH-101103)Miss Islington (bot)2023-01-171-1/+16
| | | | | | Don't send partial UTF-8 sequences to the Windows API (cherry picked from commit f34176b77f222726d901595968a4b44456186da4) Co-authored-by: Paul Moore <p.f.moore@gmail.com>
* gh-100320: Fix path calculations on Windows when python.exe is moved outside ↵Steve Dower2023-01-161-18/+30
| | | | of the normal location (GH-100947)
* [3.11] GH-100892: Fix race in clearing `threading.local` (GH-100922). (#100937)Kumar Aditya2023-01-112-19/+59
| | | | | (cherry picked from commit 762745a124cbc297cf2fe6f3ec9ca1840bb2e873) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* GH-81061: Fix refcount issue when returning `None` from a `ctypes.py_object` ↵Miss Islington (bot)2023-01-091-8/+7
| | | | | | | callback (GH-13364) (cherry picked from commit 837ba052672d1a5f85a46c1b6d4b6e7d192af6f3) Co-authored-by: dgelessus <dgelessus@users.noreply.github.com>
* gh-100689: Revert "bpo-41798: pyexpat: Allocate the expat_CAPI on the heap ↵Miss Islington (bot)2023-01-081-40/+27
| | | | | | | | | | memory (GH-24061)" (GH-100745) * gh-100689: Revert "bpo-41798: pyexpat: Allocate the expat_CAPI on the heap memory (GH-24061)" This reverts commit 7c83eaa536d2f436ae46211ca48692f576c732f0. (cherry picked from commit b034fd3e5926c63a681a211087b4c666834c7525) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* gh-100649: Update native_thread_id after fork (gh-100650)Miss Islington (bot)2023-01-011-0/+4
| | | | | | Update native_thread_id after fork (cherry picked from commit d52d4942cfdd52a50f88b87b1ff2a67375dbcf47) Co-authored-by: Gabriele N. Tornetta <P403n1x87@users.noreply.github.com>
* [3.11] GH-100342: check for allocation failure in AC `*args` parsing ↵Kumar Aditya2022-12-281-1/+7
| | | | | | | (GH-100343). (#100568) (cherry picked from commit 7cf164ad5e3c8c6af5ae8813ad6a784448605418) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* [3.11] gh-64490: Fix bugs in argument clinic varargs processing (GH-32092) ↵colorfulappl2022-12-282-1/+370
| | | | | (#100368) (cherry picked from commit 0da728387c99fe6c127b070f2d250dc5bdd62ee5)
* [3.11] gh-99110: Initialize frame->previous in init_frame to fix ↵Bill Fisher2022-12-241-0/+18
| | | | | | | segmentation fault (GH-100182) (#100478) (cherry picked from commit 88d565f32a709140664444c6dea20ecd35a10e94) Co-authored-by: Bill Fisher <william.w.fisher@gmail.com>
* [3.11] gh-76963: PEP3118 itemsize of an empty ctypes array should not be 0 ↵Miss Islington (bot)2022-12-231-8/+25
| | | | | | | | | | | (GH-5576) (GH-100452) gh-76963: PEP3118 itemsize of an empty ctypes array should not be 0 (GH-5576) The itemsize returned in a memoryview of a ctypes array is now computed from the item type, instead of dividing the total size by the length and assuming that the length is not zero. (cherry picked from commit 84bc6a4f25fcf467813ee12b74118f7b1b54e285) Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
* gh-78878: Fix crash when creating an instance of `_ctypes.CField` (GH-14837)Miss Islington (bot)2022-12-212-10/+3
| | | | | (cherry picked from commit d713c54ac8a2eba0616a5a07714696d935f1062e) Co-authored-by: Hai Shi <shihai1992@gmail.com>
* [3.11] gh-99240: Reset pointer to NULL when the pointed memory is freed in ↵colorfulappl2022-12-211-0/+20
| | | | | | | | argument parsing (GH-99890) (#100385) (cherry picked from commit efbb1eb9f54cad4f7bf5df03eed3a6aba02d99f4) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* [3.11] gh-99240: Fix double-free bug in Argument Clinic str_converter ↵colorfulappl2022-12-202-1/+150
| | | | | | | generated code (GH-99241) (#100352) (cherry picked from commit 8dbe08eb7c807f484fe9870f5b7f5ae2881fd966) Fix double-free bug mentioned at GH-99240, by moving memory clean up out of "exit" label.
* [3.11] gh-64490: Fix refcount error when arguments are packed to tuple in ↵colorfulappl2022-12-192-1/+103
| | | | | argument clinic (GH-99233) (#100338) (cherry picked from commit 69f6cc77d0f1664f983a83b6ae707d99a99f5c4f)
* [3.11] gh-96002: Add functional test for Argument Clinic (GH-96178) (#100230)colorfulappl2022-12-173-0/+2870
| | | | | | (cherry picked from commit c450c8c9ed6e420025f39d0e4850a79f8160cdcd) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* [3.11] gh-93453: Only emit deprecation warning in asyncio.get_event_loop ↵Serhiy Storchaka2022-12-061-7/+5
| | | | | | | when a new event loop is created (#99949) It no longer emits a deprecation warning if the current event loop was set. Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* [3.11] gh-60203: Revert changes in cycle.__setstate__ (GH-99982) (#100016)Łukasz Langa2022-12-051-0/+1
| | | | | | | In case if only True/False be supported as boolean arguments in future, we should continue to support 1/0 here. (cherry picked from commit 922a6cf6c265e2763a003291885ff74d46203fc3) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.11] bpo-40882: Fix a memory leak in SharedMemory on Windows (GH-20684) ↵Luke Garland2022-12-052-1/+52
| | | | | | | | | | | | | (#99973) bpo-40882: Fix a memory leak in SharedMemory on Windows (GH-20684) In multiprocessing.shared_memory.SharedMemory(), the temporary view returned by MapViewOfFile() should be unmapped when it is no longer needed. (cherry picked from commit 85c128e34daec7625b74746e127afa25888ccde1) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* [3.11] bpo-31718: Fix io.IncrementalNewlineDecoder SystemErrors and ↵Kumar Aditya2022-11-281-10/+20
| | | | | | | | | segfaults (GH-18640) (#99841) Co-authored-by: Oren Milman <orenmn@gmail.com> Co-authored-by: Zackery Spytz <zspytz@gmail.com> Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> (cherry picked from commit 53eef27133c1da395b3b4d7ce0ab1d5b743ffb41)
* GH-95896: posixmodule.c: fix osdefs.h inclusion to not depend on compiler ↵Miss Islington (bot)2022-11-261-11/+3
| | | | | | | | (GH-95897) (cherry picked from commit ec2b76aa8b7c6313293ff9c6814e8bc31e08fcaf) Co-authored-by: TheShermanTanker <32636402+TheShermanTanker@users.noreply.github.com> Co-authored-by: Steve Dower <steve.dower@python.org>
* bpo-38031: Fix a possible assertion failure in _io.FileIO() (GH-GH-5688)Miss Islington (bot)2022-11-251-1/+5
| | | | | (cherry picked from commit d386115039e75c332c8471c239cf7dc5dee791a7) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* GH-97001: Release GIL in termios extension (GH-99503)Miss Islington (bot)2022-11-221-12/+76
| | | | | | Without releasing the GIL calls to termios APIs might block the entire interpreter. (cherry picked from commit 959ba45d75953caa911e16b4c2a277978fc4b9b0) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
* [3.11] Revert "[3.11] gh-98724: Fix Py_CLEAR() macro side effects (#99100)" ↵Victor Stinner2022-11-211-87/+0
| | | | | | | (#99573) Revert "gh-98724: Fix Py_CLEAR() macro side effects (#99100) (#99288)" This reverts commit 108289085719db8b227d65ce945e806f91be8f80.
* [3.11] gh-99337: Fix compile errors with gcc 12 on macOS (GH-99470) (#99638)Miss Islington (bot)2022-11-215-6/+49
| | | | | | | | | | | | | | gh-99337: Fix compile errors with gcc 12 on macOS (GH-99470) Fix a number of compile errors with GCC-12 on macOS: 1. In pylifecycle.c the compile rejects _Pragma within a declaration 2. posixmodule.c was missing a number of ..._RUNTIME macros for non-clang on macOS 3. _ctypes assumed that __builtin_available is always present on macOS (cherry picked from commit cdde29dde90947df9bac39c1d19479914fb3db09) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com> Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
* gh-99370: Calculate zip path from prefix when in a venv (GH-99371)Miss Islington (bot)2022-11-141-2/+1
| | | | | | | | | | | Before python3.11, when in a venv the zip path is calculated from prefix on POSIX platforms. In python3.11 the behavior is accidentally changed to calculating from default prefix. This change will break venv created from a non-installed python with a stdlib zip file. This commit restores the behavior back to before python3.11. (cherry picked from commit e3d4fed07429670af631e5662086b76c1ec098c4) Co-authored-by: Kai Zhang <kylerzhang11@gmail.com>
* [3.11] gh-98930: improve the docstring of signal.strsignal (GH-99290) (#99449)Gregory P. Smith2022-11-132-6/+8
| | | | | | | | | | Improves the docstring on signal.strsignal to make it explain when it returns a message, None, or when it raises ValueError. Closes GH-98930 Co-authored-by: Gregory P. Smith <greg@krypto.org>. (cherry picked from commit 88385b856490a5ce3c99160bde6050638f81f72e) Co-authored-by: ram vikram singh <ramvikrams243@gmail.com>
* gh-99275: Fix `SystemError` in `ctypes` during `__initsubclass__` (GH-99283)Miss Islington (bot)2022-11-131-1/+4
| | | | | (cherry picked from commit 343eb0f94b26f2a4c1c15505d417e8157ec19660) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* gh-99204: Calculate base_executable by alternate names in POSIX venvs (GH-99206)Miss Islington (bot)2022-11-101-0/+19
| | | | | | | | | | | | | | Check to see if `base_executable` exists. If it does not, attempt to use known alternative names of the python binary to find an executable in the path specified by `home`. If no alternative is found, previous behavior is preserved. Signed-off-by: Vincent Fazio <vfazio@gmail.com> (cherry picked from commit c41b13d39ccc2d6e239782de99ba8e3cdd061e5a) Co-authored-by: Vincent Fazio <vfazio@gmail.com> Signed-off-by: Vincent Fazio <vfazio@gmail.com>