summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
...
* [3.11] gh-95649: Document that asyncio contains uvloop code (GH-107536) ↵Alois Klink2024-01-144-0/+16
| | | | | | | | | | | | (#114045) Some of the asyncio SSL changes in GH-31275 [1] were taken from v0.16.0 of the uvloop project [2]. In order to comply with the MIT license, we need to just need to document the copyright information. [1]: https://github.com/python/cpython/pull/31275 [2]: https://github.com/MagicStack/uvloop/tree/v0.16.0 (cherry picked from commit dce30c9cbc212e5455e100f35ac6afeb30dfd23e)
* [3.11] gh-114014: Update `fractions.Fraction()`'s rational parsing regex ↵Mark Dickinson2024-01-132-10/+34
| | | | | | | | | | | (GH-114015) (#114025) Fix a bug in the regex used for parsing a string input to the `fractions.Fraction` constructor. That bug led to an inconsistent exception message being given for some inputs. --------- Co-authored-by: Crowthebird <78076854+thatbirdguythatuknownot@users.noreply.github.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.11] gh-113027: Fix test_variable_tzname in test_email (GH-113821) (GH-113832)Miss Islington (bot)2024-01-121-2/+2
| | | | | | | | | Determine the support of the Kyiv timezone by checking the result of astimezone() which uses the system tz database and not the one populated by zoneinfo. (cherry picked from commit 931d7e052e22aa01e18fcc67ed71b6ea305aff71) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.11] gh-113903: Fix an IDLE configdialog test (GH-113973) (#113975)Miss Islington (bot)2024-01-122-16/+15
| | | | | | | | | | | | | | test_configdialog.HighPageTest.test_highlight_target_text_mouse fails if a line of the Highlight tab text sample is not visible. If so, bbox() in click_char() returns None and the unpacking iteration fails. This occurred on a Devuan Linux system. Fix by moving the 'see character' call inside click_char, just before the bbox call. Also, reduce the click_char calls to just one per tag name and replace the other nested function with a dict comprehension. (cherry picked from commit c4992f4106aa509375f5beca8dc044a7f6c36a72) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* gh-81489: Use Unicode APIs for mmap tagname on Windows (GH-14133)Steve Dower2024-01-111-2/+4
| | | | Co-authored-by: Zackery Spytz <zspytz@gmail.com> Co-authored-by: Erlend E. Aasland <erlend@python.org>
* gh-87868: Sort and remove duplicates in getenvironment() (GH-102731)Miss Islington (bot)2024-01-111-0/+46
| | | | | | | | (cherry picked from commit c31be58da8577ef140e83d4e46502c7bb1eb9abf) Co-authored-by: AN Long <aisk@users.noreply.github.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* [3.11] gh-109858: Protect zipfile from "quoted-overlap" zipbomb (GH-110016) ↵Miss Islington (bot)2024-01-112-0/+72
| | | | | | | | | (GH-113913) Raise BadZipFile when try to read an entry that overlaps with other entry or central directory. (cherry picked from commit 66363b9a7b9fe7c99eba3a185b74c5fdbf842eba) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.11] gh-113594: Fix UnicodeEncodeError in TokenList.fold() (GH-113730) ↵Miss Islington (bot)2024-01-102-0/+46
| | | | | | | | (GH-113908) It occurred when try to re-encode an unknown-8bit part combined with non-unknown-8bit part. (cherry picked from commit e9d5b6ea2d68564f176fdf70c2d7028e060c62b5) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.11] gh-113877: Fix Tkinter method winfo_pathname() on 64-bit Windows ↵Miss Islington (bot)2024-01-102-0/+14
| | | | | | | | | | (GH-113900) (GH-113902) winfo_id() converts the result of "winfo id" command to integer, but "winfo pathname" command requires an argument to be a hexadecimal number on Win64. (cherry picked from commit 1b7e0024a16c1820f61c04a8a100498568410afd) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.11] gh-113781: Silence AttributeError in warning module during Python ↵Miss Islington (bot)2024-01-091-3/+4
| | | | | | | | finalization (GH-113813) (GH-113874) The tracemalloc module can already be cleared. (cherry picked from commit 0297418cacf998e778bc0517aa11eaac827b8c0f) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.11] gh-74678: Increase base64 test coverage (GH-21913) (GH-113810)Miss Islington (bot)2024-01-081-0/+3
| | | | | | | | Ensure the character y is disallowed within an Ascii85 5-tuple. (cherry picked from commit 802d4954f12541ba28dd7f18bf4a65054941a80d) Co-authored-by: Zackery Spytz <zspytz@gmail.com> Co-authored-by: Lee Cannon <leecannon@leecannon.xyz>
* [3.11] gh-80109: Fix io.TextIOWrapper dropping the internal buffer during ↵Miss Islington (bot)2024-01-082-4/+14
| | | | | | | | | write() (GH-22535) (GH-113809) io.TextIOWrapper was dropping the internal decoding buffer during read() and write() calls. (cherry picked from commit 73c93265634257b1488262097e024c1727260cfd) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* [3.11] gh-113729: Fix IDLE's Help -> "IDLE Help" menu bug in 3.12.1 and ↵Miss Islington (bot)2024-01-064-20/+25
| | | | | | | | 3.11.7 (GH-113731) (#113766) (cherry picked from commit 66f39648154214621d388f519210442d5fce738f) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.11] gh-85567: Fix resouce warnings in pickle and pickletools CLIs ↵Miss Islington (bot)2024-01-052-13/+28
| | | | | | | | (GH-113618) (GH-113759) Explicitly open and close files instead of using FileType. (cherry picked from commit bd754b93ca837aa1f239252437a211271d068b71) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.11] gh-110190: Fix ctypes structs with array on PPCLE64 (GH-112959) (#113167)Diego Russo2024-01-051-148/+84
| | | | | | | Fix the same issue of PR #112604 on PPC64LE platform Refactor tests to make easier to add more platfroms if needed. (cherry picked from commit 6644ca45cde9ca1b80513a90dacccfeea2d98620) Change-Id: I1ada30808c0d593a43eca3fa7a628c26bc276310
* [3.11] gh-113538: Don't error in stream reader protocol callback when task ↵Miss Islington (bot)2024-01-042-7/+16
| | | | | | | is cancelled (GH-113690) (#113714) (cherry picked from commit 4681a5271a8598b46021cbc556ac8098ab8a1d81) Co-authored-by: Guido van Rossum <guido@python.org>
* [3.11] gh-113628: Fix test_site test with long stdlib paths (GH-113640) ↵Miss Islington (bot)2024-01-031-22/+21
| | | | | | | | (#113672) gh-113628: Fix test_site test with long stdlib paths (GH-113640) (cherry picked from commit 5dc79e3d7f26a6a871a89ce3efc9f1bcee7bb447) Co-authored-by: Itamar Oren <itamarost@gmail.com>
* [3.11] gh-113602: Bail out when the parser tries to override existing errors ↵Miss Islington (bot)2024-01-021-0/+2
| | | | | | | | | (GH-113607) (#113653) gh-113602: Bail out when the parser tries to override existing errors (GH-113607) (cherry picked from commit 9ed36d533ab8b256f0a589b5be6d7a2fdcf4aff2) Signed-off-by: Pablo Galindo <pablogsal@gmail.com> Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* [3.11] gh-62260: Fix ctypes.Structure subclassing with multiple layers ↵Serhiy Storchaka2024-01-011-0/+63
| | | | | | | | | | | | | | | (GH-13374) (GH-113624) The length field of StgDictObject for Structure class contains now the total number of items in ffi_type_pointer.elements (excluding the trailing null). The old behavior of using the number of elements in the parent class can cause the array to be truncated when it is copied, especially when there are multiple layers of subclassing. (cherry picked from commit 5f3cc90a12d6df404fd6f48a0df1334902e271f2) Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com>
* [3.11] gh-113543: Make sure that `MacOSXOSAScript` sends `webbrowser.open` ↵Miss Islington (bot)2023-12-291-0/+1
| | | | | | | | audit event (GH-113544) (#113550) gh-113543: Make sure that `MacOSXOSAScript` sends `webbrowser.open` audit event (GH-113544) (cherry picked from commit fba324154e65b752e42aa59dea287d639935565f) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.11] gh-57795: Add news to idlelib/News3.txt (GH-113522) (#113524)Miss Islington (bot)2023-12-271-0/+4
| | | | | | gh-57795: Add news to idlelib/News3.txt (GH-113522) (cherry picked from commit 6c98fce33a4c2d6671978f6286377af0d6e22182) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.11] gh-67641: Clarify documentation on bytes vs text with non-seeking ↵Miss Islington (bot)2023-12-271-4/+5
| | | | | | | tarfile stream (GH-31610) (GH-113520) (cherry picked from commit 0651936ae2bc6999f488f8c519b8d07a06a11557) Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
* [3.11] bpo-26791: Update shutil.move() to provide the same symlink move ↵Miss Islington (bot)2023-12-272-1/+30
| | | | | | | behavior as the mv shell when moving a symlink into a directory that is the target of the symlink (GH-21759) (GH-113518) (cherry picked from commit c66b577d9f7a11ffab57985fd6fb22e9dfd4f245) Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com>
* [3.11] gh-57795: IDLE: Enter the selected text when opening the "Replace" ↵Miss Islington (bot)2023-12-271-16/+7
| | | | | | | | | dialog (GH-17593) (GH-113515) (cherry picked from commit 712afab5acbe27ceb1eddde5aa559078ae7eaa3b) Co-authored-by: Zackery Spytz <zspytz@gmail.com> Co-authored-by: Roger Serwy <roger.serwy@gmail.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.11] bpo-36959: Fix error messages for invalid ISO format string in ↵Serhiy Storchaka2023-12-262-32/+55
| | | | | | | | | | _strptime() (GH-13408) (GH-113499) Previously some error messages complained about incompatible combinations of directives that are not contained in the format string. (cherry picked from commit 4b2c3e8e436b5191039cbe8cd9932654a60803e6) Co-authored-by: Gordon P. Hemsley <me@gphemsley.org>
* [3.11] bpo-37013: Fix the error handling in socket.if_indextoname() ↵Miss Islington (bot)2023-12-251-0/+13
| | | | | | | | | (GH-13503) (GH-112598) * Fix a crash when pass UINT_MAX. * Fix an integer overflow on 64-bit non-Windows platforms. (cherry picked from commit 0daf555c6fb3feba77989382135a58215e1d70a5) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* [3.11] gh-76785: Make test.test_interpreters executable (GH-112982) ↵Miss Islington (bot)2023-12-251-0/+4
| | | | | | | | | | (GH-113470) (GH-113473) This is so that we can run python -m test.test_interpreters. As such it backports that aspect of commit 86a77f4e1a5ceaff1036b0072521e12752b5df47, where it is implemented by a package __main__.py. (cherry picked from commit bdad5c367f60d4939d6945f78d94608e4521009f) Co-authored-by: Jeff Allen <ja.py@farowl.co.uk>
* [3.11] gh-113440: Ignore the "ver" command failure with exit code 0xc0000142 ↵Miss Islington (bot)2023-12-241-0/+2
| | | | | | | (GH-113435) (GH-113452) (cherry picked from commit 53330f167792a2947ab8b0faafb11019d7fb09b6) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.11] gh-113421: Fix multiprocessing logger for "%(filename)s" (GH-113423) ↵Miss Islington (bot)2023-12-242-4/+27
| | | | | | | (GH-113451) (cherry picked from commit ce77ee50358c0668eda5078f50b38f0770a370ab) Co-authored-by: Xu Song <xusong.vip@gmail.com>
* [3.11] gh-113028: Correctly memoize str in pickle when escapes added ↵Miss Islington (bot)2023-12-242-7/+15
| | | | | | | | | | (GH-113436) (GH-113449) This fixes a divergence between the Python and C implementations of pickle for protocol 0, such that it pickle.py fails to re-use the first pickled representation of strings involving characters that have to be escaped. (cherry picked from commit 08398631a0298dcf785ee7bd0e26c7844823ce59) Co-authored-by: Jeff Allen <ja.py@farowl.co.uk>
* [3.11] gh-112559: Avoid unnecessary conversion attempts to enum_klass in ↵Miss Islington (bot)2023-12-243-2/+48
| | | | | | | | signal.py (GH-113040) (#113444) gh-112559: Avoid unnecessary conversion attempts to enum_klass in signal.py (GH-113040) (cherry picked from commit 050783cb37d6a09d8238fa640814df8a915f6a68) Co-authored-by: Yilei Yang <yileiyang@google.com>
* [3.11] gh-109989: Fix test_c_locale_coercion when PYTHONIOENCODING is set ↵Miss Islington (bot)2023-12-231-5/+49
| | | | | | | | | | | | | | | | | | (GH-113378) (#113399) gh-109989: Fix test_c_locale_coercion when PYTHONIOENCODING is set (GH-113378) * gh-109989: Fix test_c_locale_coercion when PYTHONIOENCODING is set This fixes the existing tests when PYTHONIOENCODING is set by unsetting PYTHONIOENCODING. Also add a test that explicitly checks what happens when PYTHONIOENCODING is set. (cherry picked from commit 5f665e99e0b8a52415f83c2416eaf28abaacc3ae) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com> Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.11] gh-81682: Fix test failures when CPython is built without docstrings ↵Serhiy Storchaka2023-12-2311-16/+39
| | | | | (GH-113410) (GH-113430) (cherry picked from commit 4e5b27e6a3be85853bd04d45128dd7cc706bb1c8)
* [3.11] gh-113188: Fix shutil.copymode() and shutil.copystat() on Windows ↵Miss Islington (bot)2023-12-232-23/+37
| | | | | | | | | | | (GH-113285) (GH-113426) Previously they worked differenly if dst is a symbolic link: they modified the permission bits of dst itself rather than the file it points to if follow_symlinks is true or src is not a symbolic link, and did nothing if follow_symlinks is false and src is a symbolic link. (cherry picked from commit c7874bb56f862dd96a9a74b809dbea5688fa6c1c) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.11] gh-113384: Skip test_freeze for framework builds on macOS (GH-113390) ↵Miss Islington (bot)2023-12-221-0/+2
| | | | | | | | (#113396) gh-113384: Skip test_freeze for framework builds on macOS (GH-113390) (cherry picked from commit bee627c1e29a070562d1a540a6e513d0daa322f5) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
* [3.11] GH-113214: Fix SSLProto exception handling in SSL-over-SSL scenarios ↵Miss Islington (bot)2023-12-212-8/+20
| | | | | | | | | | | (GH-113334) (#113340) When wrapped, `_SSLProtocolTransport._force_close(exc)` is called just like in the unwrapped scenario `_SelectorTransport._force_close(exc)` or `_ProactorBasePipeTransport._force_close(exc)` would be called, except here the exception needs to be passed through the `SSLProtocol._abort()` method, which didn't accept an exception object. This commit ensures that this path works, in the same way that the uvloop implementation of SSLProto passes on the exception (on which the current implementation of SSLProto is based). (cherry picked from commit 1ff02385944924db7e683a607da2882462594764) Co-authored-by: Martijn Pieters <mj@zopatista.com>
* [3.11] gh-113255: Clarify docs for `typing.reveal_type` (#113286) (#113326)Alex Waygood2023-12-201-2/+2
| | | | | (cherry-picked from commit 11ee912327) Co-authored-by: Kir <note351@hotmail.com>
* [3.11] gh-102362: Fix macOS version number in result of ↵Miss Islington (bot)2023-12-191-0/+5
| | | | | | | | | | | | | | | | sysconfig.get_platform() (GH-112942) (#113265) gh-102362: Fix macOS version number in result of sysconfig.get_platform() (GH-112942) Change _osx_support.get_platform_osx() to make sure that the version number in the result includes at least a major and minor version (e.g. 14.2) even if MACOSX_DEPLOYMENT_TARGET is set to just a major version (e.g. 14). This matches the versions expected by pip when selecting appropriate wheels for installation. (cherry picked from commit 893c9ccf48eacb02fa6ae93632f2d0cb6778dbb6) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
* [3.11] gh-113269: IDLE - Fix test_editor hang (macOS) (GH-113271) (#113273)Miss Islington (bot)2023-12-192-1/+3
| | | | | | | | | gh-113269: IDLE - Fix test_editor hang (macOS) (GH-113271) Hangs on installed 3.13.0a2 on macOS Catalina. Behavior on installed 3.12.1 and 3.11.7 is unknown. (cherry picked from commit fa9ba02353d79632983b9fe24da851894877e342) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.11] gh-113199: Make read1() and readline() of HTTPResponse close IO after ↵Miss Islington (bot)2023-12-182-2/+18
| | | | | | | reading all data (GH-113200) (GH-113260) (cherry picked from commit 41336a72b90634d5ac74a57b6826e4dd6fe78eac) Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
* [3.11] gh-113246: Updated bundled pip to 23.3.2 (gh-113249) (#113254)Stéphane Bidoul2023-12-182-1/+1
| | | | Updated bundled pip to 23.3.2. (cherry picked from commit 4a24bf9a13a7cf055113c04bde0874186722c62c)
* [3.11] IDLE: Add util and stub example comments (GH-113222) (#113224)Miss Islington (bot)2023-12-172-3/+5
| | | | | (cherry picked from commit cde1335485b7bffb12c378d230ae48ad77d76ab1) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.11] gh-113009: Fix multiprocessing Process.terminate() on Windows ↵Miss Islington (bot)2023-12-151-24/+30
| | | | | | | | | | | | | (GH-113128) (#113178) gh-113009: Fix multiprocessing Process.terminate() on Windows (GH-113128) On Windows, Process.terminate() no longer sets the returncode attribute to always call WaitForSingleObject() in Process.wait(). Previously, sometimes the process was still running after TerminateProcess() even if GetExitCodeProcess() is not STILL_ACTIVE. (cherry picked from commit 4026ad5b2c595b855a3605420cfa0e3d49e63db7) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] gh-61648: Detect line numbers of properties in doctests (GH-113161) ↵Miss Islington (bot)2023-12-153-0/+20
| | | | | | | (GH-113165) (cherry picked from commit 8f8f0f97e126db9ca470fd7e7b2944c150db6305) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.11] gh-112716: Fix SystemError when __builtins__ is not a dict ↵Serhiy Storchaka2023-12-141-0/+26
| | | | | | | | | (GH-112770) (GH-113105) It was raised in two cases: * in the import statement when looking up __import__ * in pickling some builtin type when looking up built-ins iter, getattr, etc. (cherry picked from commit 1161c14e8c68296fc465cd48970b32be9bee012e)
* [3.11] gh-113090: Fix test.support.os_support.can_chmod() on Windows ↵Miss Islington (bot)2023-12-144-6/+12
| | | | | | | (GH-113091) (GH-113100) (cherry picked from commit c6e953be125c491226adc1a5bc9c804ce256aa17) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.11] gh-113086: Add tests for os.chmod() and os.lchmod() (GH-113087) ↵Miss Islington (bot)2023-12-142-1/+118
| | | | | | | | (GH-113089) Also make test_copymode_symlink_to_symlink in test_shutil more strict. (cherry picked from commit b4f2c89118d5a48ce6c495ba931d7f6493422029) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.11] bpo-40648: Test modes that file can get with chmod() on Windows ↵Miss Islington (bot)2023-12-131-0/+7
| | | | | | | | | (GH-20130) (GH-113069) Order of tests matter second part makes testing file writable and possible to remove again. (cherry picked from commit f5c05e015c178975f24b77e5a8975a22d694e019) Co-authored-by: Pavol Babinčák‏ <scroolik@gmail.com>
* [3.11] [pprint]: Add docstring about `PrettyPrinter.underscore_numbers` ↵Miss Islington (bot)2023-12-131-0/+3
| | | | | | | | | parameter (GH-112963) (#113052) [pprint]: Add docstring about `PrettyPrinter.underscore_numbers` parameter (GH-112963) (cherry picked from commit 2a3c37c273762d2dc40bfdae3899cb09b7c88d4a) Co-authored-by: Sequew <88668176+KrySeyt@users.noreply.github.com> Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* [3.11] gh-112999: Replace the outdated "deprecated" directives with ↵Serhiy Storchaka2023-12-121-1/+1
| | | | | "versionchanged" (GH-113000) (GH-113020) (cherry picked from commit fe9991bb672dd95fb9cd38b5a03180719ac4e722)