summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* Python 3.10.13v3.10.13Pablo Galindo2023-08-241-1/+1
|
* [3.10] gh-108342: Make ssl TestPreHandshakeClose more reliable (GH-108370) ↵Łukasz Langa2023-08-241-31/+72
| | | | | | | | | | | | | | | | | | | | | | (#108406) * In preauth tests of test_ssl, explicitly break reference cycles invoving SingleConnectionTestServerThread to make sure that the thread is deleted. Otherwise, the test marks the environment as altered because the threading module sees a "dangling thread" (SingleConnectionTestServerThread). This test leak was introduced by the test added for the fix of issue gh-108310. * Use support.SHORT_TIMEOUT instead of hardcoded 1.0 or 2.0 seconds timeout. * SingleConnectionTestServerThread.run() catchs TimeoutError * Fix a race condition (missing synchronization) in test_preauth_data_to_tls_client(): the server now waits until the client connect() completed in call_after_accept(). * test_https_client_non_tls_response_ignored() calls server.join() explicitly. * Replace "localhost" with server.listener.getsockname()[0]. (cherry picked from commit 592bacb6fc0833336c0453e818e9b95016e9fd47) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.10] gh-108342: Break ref cycle in SSLSocket._create() exc (GH-108344) ↵Miss Islington (bot)2023-08-231-1/+5
| | | | | | | | | | | | | (#108350) Explicitly break a reference cycle when SSLSocket._create() raises an exception. Clear the variable storing the exception, since the exception traceback contains the variables and so creates a reference cycle. This test leak was introduced by the test added for the fix of GH-108310. (cherry picked from commit 64f99350351bc46e016b2286f36ba7cd669b79e3) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.10] gh-99612: Fix PyUnicode_DecodeUTF8Stateful() for ASCII-only data ↵Miss Islington (bot)2023-08-221-0/+54
| | | | | | | | | | (GH-99613) (GH-107224) (#107230) Previously *consumed was not set in this case. (cherry picked from commit b8b3e6afc0a48c3cbb7c36d2f73e332edcd6058c) (cherry picked from commit f08e52ccb027f6f703302b8c1a82db9fd3934270) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.10] gh-108310: Fix CVE-2023-40217: Check for & avoid the ssl pre-close ↵Łukasz Langa2023-08-222-1/+245
| | | | | | | | | | | | | | | | | | flaw (#108318) gh-108310: Fix CVE-2023-40217: Check for & avoid the ssl pre-close flaw Instances of `ssl.SSLSocket` were vulnerable to a bypass of the TLS handshake and included protections (like certificate verification) and treating sent unencrypted data as if it were post-handshake TLS encrypted data. The vulnerability is caused when a socket is connected, data is sent by the malicious peer and stored in a buffer, and then the malicious peer closes the socket within a small timing window before the other peers’ TLS handshake can begin. After this sequence of events the closed socket will not immediately attempt a TLS handshake due to not being connected but will also allow the buffered data to be read as if a successful TLS handshake had occurred. Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
* [3.10] gh-107845: Fix symlink handling for tarfile.data_filter (GH-107846) ↵Miss Islington (bot)2023-08-222-9/+146
| | | | (#108210)
* Python 3.10.12v3.10.12Pablo Galindo2023-06-061-4/+4
|
* [3.10] gh-89412: Add missing attributes (added in 3.10) to traceback module ↵Miss Islington (bot)2023-06-051-2/+2
| | | | | | | docs (GH-105046) (#105329) (cherry picked from commit a4f72fa39a9d391c7b931ba1906d81da4ae01949) Co-authored-by: Jakub Kuczys <me@jacken.men>
* [3.10] gh-104472: Skip `test_subprocess.ProcessTestCase.test_empty_env` if ↵Miss Islington (bot)2023-05-191-0/+3
| | | | | | | | | | ASAN is enabled (GH-104667) (#104669) gh-104472: Skip `test_subprocess.ProcessTestCase.test_empty_env` if ASAN is enabled (GH-104667) Skip test_subprocess.ProcessTestCase.test_empty_env if ASAN is enabled. (cherry picked from commit c3f43bfb4bec39ff8f2c36d861a3c3a243bcb3af) Co-authored-by: chgnrdv <52372310+chgnrdv@users.noreply.github.com>
* [3.10] [3.11] gh-102153: Start stripping C0 control and space chars in ↵Miss Islington (bot)2023-05-172-1/+72
| | | | | | | | | | | | | | | | | | | | | | `urlsplit` (GH-102508) (GH-104575) (#104592) gh-102153: Start stripping C0 control and space chars in `urlsplit` (GH-102508) `urllib.parse.urlsplit` has already been respecting the WHATWG spec a bit GH-25595. This adds more sanitizing to respect the "Remove any leading C0 control or space from input" [rule](https://url.spec.whatwg.org/GH-url-parsing:~:text=Remove%20any%20leading%20and%20trailing%20C0%20control%20or%20space%20from%20input.) in response to [CVE-2023-24329](https://nvd.nist.gov/vuln/detail/CVE-2023-24329). I simplified the docs by eliding the state of the world explanatory paragraph in this security release only backport. (people will see that in the mainline /3/ docs) --------- (cherry picked from commit 2f630e1ce18ad2e07428296532a68b11dc66ad10) (cherry picked from commit 610cc0ab1b760b2abaac92bd256b96191c46b941) Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Co-authored-by: Illia Volochii <illia.volochii@gmail.com> Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>
* [3.10] gh-102950: Implement PEP 706 – Filter for tarfile.extractall ↵Matěj Cepl2023-05-104-78/+1302
| | | | | | | | | | | (GH-102953) (GH-104128) - Backport b52ad18a766700be14382ba222033b2d75a33521 - Backport c8c3956d905e019101038b018129a4c90c9c9b8f - Remove the DeprecationWarning - Adjust docs - Remove new `__all__` entries Co-authored-by: Petr Viktorin <encukou@gmail.com>
* [3.10] gh-99889: Fix directory traversal security flaw in uu.decode() ↵Miss Islington (bot)2023-05-092-1/+36
| | | | | | | | | | | | | | | | | | (GH-104096) (#104330) gh-99889: Fix directory traversal security flaw in uu.decode() (GH-104096) * Fix directory traversal security flaw in uu.decode() * also check absolute paths and os.altsep * Add a regression test. --------- (cherry picked from commit 0aeda297931820436a50b78f4f7f0597274b5df4) [Google] Co-authored-by: Sam Carroll <70000253+samcarroll42@users.noreply.github.com>
* [3.10] gh-104049: do not expose on-disk location from ↵Miss Islington (bot)2023-05-092-1/+9
| | | | | | | | | | | | | | | SimpleHTTPRequestHandler (GH-104067) (#104119) gh-104049: do not expose on-disk location from SimpleHTTPRequestHandler (GH-104067) Do not expose the local server's on-disk location from `SimpleHTTPRequestHandler` when generating a directory index. (unnecessary information disclosure) --------- (cherry picked from commit c7c3a60c88de61a79ded9fdaf6bc6a29da4efb9a) Co-authored-by: Ethan Furman <ethan@stoneleaf.us> Co-authored-by: Gregory P. Smith <greg@krypto.org> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-103935: Use `io.open_code()` when executing code in trace and profile ↵Steve Dower2023-04-273-3/+6
| | | | | modules (GH-103947) Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
* Python 3.10.11v3.10.11Pablo Galindo2023-04-041-67/+69
|
* gh-103109: Document ignore_warnings() test support helper (GH-103110)Miss Islington (bot)2023-04-021-1/+1
| | | | | | (cherry picked from commit 32937d6aa414ec7db5c63ef277f21db1880b3af4) Co-authored-by: Charlie Zhao <zhaoyu_hit@qq.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* [3.10] gh-103112: Add http.client.HTTPResponse.read docstring and fix pydoc ↵Miss Islington (bot)2023-03-291-0/+1
| | | | | | | | | | output (GH-103113) (#103120) (cherry picked from commit d052a383f1a0c599c176a12c73a761ca00436d8b) Co-authored-by: Bernhard Wagner <github.comNotification20120125@xmlizer.net> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Éric <merwok@netwok.org>
* [3.10] GH-87235: Make sure "python /dev/fd/9 9</path/to/script.py" works on ↵Miss Islington (bot)2023-03-282-98/+119
| | | | | | | | | | | | | | | | | | | | | | | macOS (GH-99768) (#99817) On macOS all file descriptors for a particular file in /dev/fd share the same file offset, that is ``open("/dev/fd/9", "r")`` behaves more like ``dup(9)`` than a regular open. This causes problems when a user tries to run "/dev/fd/9" as a script because zipimport changes the file offset to try to read a zipfile directory. Therefore change zipimport to reset the file offset after trying to read the zipfile directory. (cherry picked from commit d08fb257698e3475d6f69bb808211d39e344e5b2) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com> * Regen zipimport --------- Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* [3.10] gh-88233: zipfile: handle extras after a zip64 extra (GH-96161) (#102087)Miss Islington (bot)2023-03-282-0/+64
| | | | | | | | | | Previously, any data _after_ the zip64 extra would be removed. With many new tests. Fixes GH-88233 (cherry picked from commit 59e86caca812fc993c5eb7dc8ccd1508ffccba86) Co-authored-by: Tim Hatch <tim@timhatch.com>
* [3.10] gh-101997: Update bundled pip version to 23.0.1 (GH-101998). (#102241)Pradyun Gedam2023-03-282-1/+1
| | | (cherry picked from commit 89d9ff0f48c51a85920c7372a7df4a2204e32ea5)
* [3.10] GH-95494: Fix transport EOF handling in OpenSSL 3.0 (GH-95495) (#103007)Miss Islington (bot)2023-03-271-3/+15
| | | | | | | | | | | | | | | | | | | | | | | 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>
* gh-102980: Add tests for pdf's display, alias and where commands (GH-102981)Miss Islington (bot)2023-03-241-0/+150
| | | | | (cherry picked from commit ded9a7fc194a1d5c0e38f475a45f8f77dbe9c6bc) Co-authored-by: gaogaotiantian <gaogaotiantian@hotmail.com>
* [3.10] gh-96931: Fix incorrect results in ssl.SSLSocket.shared_ciphers ↵Miss Islington (bot)2023-03-241-3/+3
| | | | | | | | (GH-96932) (#102919) 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>
* [3.10] gh-102947: Improve traceback when calling `fields()` on a ↵Alex Waygood2023-03-232-1/+13
| | | | non-dataclass (#102948) (#102954)
* [3.10] gh-102721: Improve coverage of ↵Nikita Sobolev2023-03-171-7/+30
| | | | | | | `_collections_abc._CallableGenericAlias` (GH-102790) This is a manual backport of https://github.com/python/cpython/pull/102722 but without `typing.py` changes and without `TypeVarTuple` case, because it was added in 3.11 Automerge-Triggered-By: GH:AlexWaygood
* gh-94440: Fix issue of ProcessPoolExecutor shutdown hanging (GH-94468)Miss Islington (bot)2023-03-162-0/+33
| | | | | | | | Fix an issue of concurrent.futures ProcessPoolExecutor shutdown hanging. (cherry picked from commit 2dc94634b50f0e5e207787e5ac1d56c68b22c3ae) Co-authored-by: yonatanp <yonatan.perry@gmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-101377: improving test_locale_calendar_formatweekday of calendar (GH-101378)Miss Islington (bot)2023-03-151-2/+6
| | | | | | | | | --------- (cherry picked from commit 5e0865f22eed9f3f3f0e912c4ada196effbd8ce0) Co-authored-by: Andre Hora <andrehora@users.noreply.github.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.10] GH-101673: Fix pdb bug where local variable changes are lost after ↵Irit Katriel2023-03-132-11/+31
| | | | | | | | | longlist (#101674) (#102633) GH-101673: Fix pdb bug where local variable changes are lost after longlist (#101674) (cherry picked from commit 5d677c556f03a34d1c2d86e4cc96025870c20c12) Co-authored-by: gaogaotiantian <gaogaotiantian@hotmail.com>
* Fix broken link to MSDN (GH-102355)Miss Islington (bot)2023-03-132-2/+2
| | | | | (cherry picked from commit 9a8b66b58c74236959a01d579e2c156d9c2e7cb3) Co-authored-by: 谭九鼎 <109224573@qq.com>
* gh-101100: Fix Sphinx warnings in `turtle` module (GH-102340)Miss Islington (bot)2023-03-131-1/+1
| | | | | | (cherry picked from commit 78e4e6c3d71980d4e6687f07afa6ddfc83e29b04) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* GH-102537: Handle check for PYTHONTZPATH failing in zoneinfo test (GH-102538)Miss Islington (bot)2023-03-131-1/+8
| | | | | | | | It is possible but unlikely for the `python_tzpath_context` function to fail between the start of the `try` block and the point where `os.environ.get` succeeds, in which case `old_env` will be undefined. In this case, we want to take no action. Practically speaking this will really only happen in an error condition anyway, so it doesn't really matter, but we should probably do it right anyway. (cherry picked from commit 64bde502cf89963bc7382b03ea9e1c0967d22e35) Co-authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com>
* gh-102433: Add tests for how classes with properties interact with ↵Miss Islington (bot)2023-03-111-0/+88
| | | | | | | | `isinstance()` checks on `typing.runtime_checkable` protocols (GH-102449) (cherry picked from commit 5ffdaf748d98da6065158534720f1996a45a0072) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Carl Meyer <carl@oddbird.net>
* [3.10] GH-102397: Fix segfault from race condition in signal handling ↵Miss Islington (bot)2023-03-081-0/+15
| | | | | | | | | (GH-102399) (#102527) GH-102397: Fix segfault from race condition in signal handling (GH-102399) (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>
* [3.10] gh-102444: Fix minor bugs in `test_typing` highlighted by pyflakes ↵Alex Waygood2023-03-051-11/+1
| | | | | (#102445) (#102452) (cherry picked from commit 96e1022)
* GH-102341: Improve the test function for pow (GH-102342)Miss Islington (bot)2023-03-051-6/+5
| | | | | | (cherry picked from commit 32220543e2db36c6146ff2704ed1714a6adecc1b) Co-authored-by: Partha P. Mukherjee <ppm.floss@gmail.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* Fix unused classes in a typing test (GH-102437)Miss Islington (bot)2023-03-051-2/+2
| | | | | | | As part of investigation issue https://github.com/python/cpython/issues/102433, I discovered what I believe to be an error where two classes `CI` and `DI` are not being used. The assertions beneath them act on `C` and `D`, duplicating existing assertions in this test. (cherry picked from commit 7894bbe94ba319eb650f383cb5196424c77b2cfd) Co-authored-by: JosephSBoyle <48555120+JosephSBoyle@users.noreply.github.com> Automerge-Triggered-By: GH:AlexWaygood
* gh-101979: argparse: fix a bug where parentheses in metavar argument of ↵Miss Islington (bot)2023-03-052-3/+32
| | | | | | | add_argument() were dropped (GH-102318) (cherry picked from commit 9a478be1a4314734c697dda7a7b0e633a6fb0751) Co-authored-by: Yeojin Kim <yeojin.dev@gmail.com>
* gh-102356: Add thrashcan macros to filter object dealloc (GH-102426)Miss Islington (bot)2023-03-051-0/+10
| | | | | | Add thrashcan macros to the deallocator of the filter objects to protect against deeply nested destruction of chains of nested filters. (cherry picked from commit 66aa78cbe604a7c5731f074b869f92174a8e3b64) Co-authored-by: Marta Gómez Macías <mgmacias@google.com>
* gh-101992: update pstlib module documentation (GH-102133)Miss Islington (bot)2023-03-051-7/+16
| | | | | (cherry picked from commit e4609cbe4ca2d3d4fc07c19a7d0bdec52f054c63) Co-authored-by: Dustin Rodrigues <dust.rod@gmail.com>
* [3.10] gh-102179: Fix `os.dup2` error reporting for negative fds (GH-102180) ↵Miss Islington (bot)2023-03-041-0/+16
| | | | | | | | | (#102419) * gh-102179: Fix `os.dup2` error reporting for negative fds (GH-102180) (cherry picked from commit c2bd55d26f8eb2850eb9f9026b5d7f0ed1420b65) Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru> Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* [3.10] gh-101892: Fix `SystemError` when a callable iterator call exhausts ↵Oleg Iarygin2023-03-041-0/+25
| | | | | | | | | | the iterator (GH-101896) (#102422) gh-101892: Fix `SystemError` when a callable iterator call exhausts the iterator (#101896) Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net> (cherry picked from commit 705487c6557c3d8866622b4d32528bf7fc2e4204) Co-authored-by: Raj <51259329+workingpayload@users.noreply.github.com>
* [3.10] Fix typos in documentation and comments (GH-102374) (#102377)Alex Waygood2023-03-021-1/+1
| | | | | | | | | | | Fix typos in documentation and comments (GH-102374) Found some duplicate `to`s in the documentation and some code comments and fixed them. [Misc/NEWS.d/3.12.0a1.rst](https://github.com/python/cpython/blob/ed55c69ebd74178115cd8b080f7f8e7588cd5fda/Misc/NEWS.d/3.12.0a1.rst) also contains two duplicate `to`s, but I wasn't sure if it's ok to touch that file. Looks auto generated. I'm happy to amend the PR if requested. :) Automerge-Triggered-By: GH:AlexWaygood Co-authored-by: Michael K <michael-k@users.noreply.github.com>
* IDLE: Simplify DynOptionsMenu __init__code (GH-101371)Miss Islington (bot)2023-02-281-14/+11
| | | | | | | | | Refactor DynOptionMenu's initializer to not copy kwargs dict and use subscripting; improve its htest. (cherry picked from commit c41af812c948ec3cb07b2ef7a46a238f5cab3dc2) Co-authored-by: JosephSBoyle <48555120+JosephSBoyle@users.noreply.github.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* gh-102252: Improve coverage of test_bool.py (GH-102253)Miss Islington (bot)2023-02-251-0/+6
| | | | | | Add tests for conversion from bool to complex. (cherry picked from commit 41970436373f4be813fe8f5a07b6da04d5f4c80e) Co-authored-by: Eclips4 <80244920+Eclips4@users.noreply.github.com>
* [3.10] gh-101765: Fix SystemError / segmentation fault in iter `__reduce__` ↵Ionite2023-02-251-0/+80
| | | | | | when internal access of `builtins.__dict__` exhausts the iterator (GH-101769) (#102229) (cherry picked from commit 54dfa14c5a94b893b67a4d9e9e403ff538ce9023)
* [3.10] gh-95675: fix uid and gid at test_add_dir_getmember (gh-102207) ↵Miss Islington (bot)2023-02-251-6/+7
| | | | | | | | (gh-102230) gh-95675: fix uid and gid at test_add_dir_getmember (gh-102207) (cherry picked from commit 56e93c8020e89e1712aa238574bca2076a225028) Co-authored-by: Seonkyo Ok <seonkyo.ok@linecorp.com>
* gh-102158: Add tests for `softkwlist` (GH-102159)Miss Islington (bot)2023-02-241-0/+18
| | | | | | | | --------- (cherry picked from commit 9f3ecd1aa3566947648a053bd9716ed67dd9a718) Co-authored-by: Eclips4 <80244920+Eclips4@users.noreply.github.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.10] gh-101936: Update the default value of fp from io.StringIO to ↵Miss Islington (bot)2023-02-222-1/+2
| | | | | | | | io.BytesIO (gh-102100) (#102118) gh-101936: Update the default value of fp from io.StringIO to io.BytesIO (gh-102100) (cherry picked from commit 0d4c7fcd4f078708a5ac6499af378ce5ee8eb211) Co-authored-by: Long Vo <long.vo@linecorp.com>
* [3.10] gh-95672 fix typo SkitTest to SkipTest (gh-102119) (gh-102122)Miss Islington (bot)2023-02-222-2/+2
| | | | | | gh-95672 fix typo SkitTest to SkipTest (gh-102119) (cherry picked from commit d5c7954d0c3ff874d2d27d33dcc207bb7356f328) Co-authored-by: HyunKyun Moon <hyunkyun.moon@linecorp.com>
* [3.10] gh-101961 fileinput.hookcompressed should not set the encoding value ↵Miss Islington (bot)2023-02-212-12/+29
| | | | | | | | for the binary mode (gh-102068) (#102099) gh-101961 fileinput.hookcompressed should not set the encoding value for the binary mode (gh-102068) (cherry picked from commit 6f25657b83d7a680a97849490f6e973b3a695e1a) Co-authored-by: Gihwan Kim <gihwan.kim@linecorp.com>