summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [3.12] subprocess docs: Fix semantically important typo (GH-119752) (#119758)Miss Islington (bot)2024-05-301-1/+1
| | | | | | | | | | subprocess docs: Fix semantically important typo (GH-119752) GH-25416 accidentally replaced a reference to the *stderr* argument of `subprocess.run` with a reference to the *stdin* argument. *stdin* is not affected by the `check_output` option. (cherry picked from commit 2cc3502f98bb9aea386ab55443fc077ddcdde91d) Co-authored-by: Zachary Ware <zach@python.org>
* [3.12] GH-89727: Fix FD leak on `os.fwalk()` generator finalization. ↵Miss Islington (bot)2024-05-302-2/+30
| | | | | | | | | | | (GH-119766) (#119768) GH-89727: Fix FD leak on `os.fwalk()` generator finalization. (GH-119766) Follow-up to 3c890b50. Ensure we `os.close()` open file descriptors when the `os.fwalk()` generator is finalized. (cherry picked from commit a5fef800d31648d19cecc240a2fa0dc71371753e) Co-authored-by: Barney Gale <barney.gale@gmail.com>
* [3.12] GH-89727: Fix `os.fwalk()` recursion error on deep trees (GH-119638) ↵Miss Islington (bot)2024-05-303-40/+56
| | | | | | | | | | | (#119765) GH-89727: Fix `os.fwalk()` recursion error on deep trees (GH-119638) Implement `os.fwalk()` using a list as a stack to avoid emitting recursion errors on deeply nested trees. (cherry picked from commit 3c890b503c740767d0eb9a0e74b47f17a1e69452) Co-authored-by: Barney Gale <barney.gale@gmail.com>
* [3.12] gh-119260: Clarify is_dataclass Behavior for Subclasses in ↵Miss Islington (bot)2024-05-302-2/+20
| | | | | | | | | Documentation and Tests (GH-119480) (#119761) gh-119260: Clarify is_dataclass Behavior for Subclasses in Documentation and Tests (GH-119480) (cherry picked from commit bf4ff3ad2e362801e87c85fffd9e140b774cef26) Co-authored-by: Aditya Borikar <adityaborikar2@gmail.com> Co-authored-by: Carl Meyer <carl@oddbird.net>
* [3.12] GH-89727: Partially fix `shutil.rmtree()` recursion error on deep ↵Barney Gale2024-05-294-24/+32
| | | | | | | | | | | | | | trees (GH-119634) (#119749) * GH-89727: Partially fix `shutil.rmtree()` recursion error on deep trees (#119634) Make `shutil._rmtree_unsafe()` call `os.walk()`, which is implemented without recursion. `shutil._rmtree_safe_fd()` is not affected and can still raise a recursion error. Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> (cherry picked from commit a150679f90c6e3f017bd75cac3b8f727063cc4aa)
* gh-119070: Avoid test crash due to Unicode in stderr output (GH-119747)Steve Dower2024-05-291-1/+1
|
* gh-119070: Fix py.exe handling of /usr/bin/env commands missing extension ↵Steve Dower2024-05-293-1/+14
| | | | (GH-119426)
* [3.12] gh-119704: Fix reference leak in the ``Python/Python-tokenize.c`` ↵Miss Islington (bot)2024-05-291-0/+1
| | | | (GH-119705) (#119708)
* [3.12] gh-119538: Add missing expat build dependencies (GH-119647) (#119686)Miss Islington (bot)2024-05-281-1/+3
| | | | | | | | xmltok_impl.c and xmltok_ns.c are _included_ in xmltok.c by the C pre-processor. (cherry picked from commit 606be663622c6784aed4ffa55b877adbd6fe8e54) Co-authored-by: Erlend E. Aasland <erlend@python.org>
* [3.12] gh-119118: Fix performance regression in tokenize module (GH-119615) ↵Miss Islington (bot)2024-05-284-4/+68
| | | | | | | | | | | | | (#119683) - Cache line object to avoid creating a Unicode object for all of the tokens in the same line. - Speed up byte offset to column offset conversion by using the smallest buffer possible to measure the difference. (cherry picked from commit d87b0151062e36e67f9e42e1595fba5bf23a485c) Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
* [3.12] gh-119011: `type.__type_params__` now return an empty tuple ↵Jelle Zijlstra2024-05-284-1/+19
| | | | | | | (GH-119296) (#119681) (cherry picked from commit 6b240c2308a044e38623900ccb8fa58c3549d4ae) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.12] gh-119581: Add a test of InitVar with name shadowing (GH-119582) ↵Miss Islington (bot)2024-05-281-0/+23
| | | | | | | | (#119673) gh-119581: Add a test of InitVar with name shadowing (GH-119582) (cherry picked from commit 6ec371223dff4da7719039e271f35a16a5b861c6) Co-authored-by: Steven Troxler <steven.troxler@gmail.com>
* [3.12] Clarify base64.a85encode docs: *wrapcols* doesn't count the newline ↵Miss Islington (bot)2024-05-282-2/+2
| | | | | | | | (GH-119409) (GH-119482) Clarify base64.a85encode docs: *wrapcols* doesn't count the newline (GH-119409) (cherry picked from commit ffa24aab107b5bc3c6ad31a6a245c226bf24b208) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* [3.12] [doc] Clarify the nature of the root logger in the `logging` ↵Miss Islington (bot)2024-05-281-9/+11
| | | | | documentation (GH-119440) (GH-119652) (cherry picked from commit b407ad38fb93585332c370b8fa56905fb238cdfd)
* [3.12] Re-order imports to align with zipp 3.18.2 (GH-119587) (#119590)Miss Islington (bot)2024-05-282-3/+3
| | | | | | Re-order imports to align with zipp 3.18.2 (GH-119587) (cherry picked from commit 5482a939ac18f4cd861d212c759960af8fa2b19d) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* gh-118263: Add additional arguments to path_t (Argument Clinic type) in ↵Nice Zombies2024-05-287-267/+314
| | | | posixmodule (GH-119608)
* [3.12] gh-116860: Remove outdated `test_parserhack` from `test_future` ↵Miss Islington (bot)2024-05-281-20/+0
| | | | | | | | (GH-116861) (#119648) gh-116860: Remove outdated `test_parserhack` from `test_future` (GH-116861) (cherry picked from commit 669175bf8edc2c02d48401bac0e4c7d99a33f15b) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.12] Misc cleanups and wording improvements for the itertools docs (gh-119631)Raymond Hettinger2024-05-271-122/+116
|
* [3.12] gh-119580: Improve version added section for convenience variable ↵Miss Islington (bot)2024-05-271-0/+2
| | | | | | (GH-119583) (#119625) Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
* [3.12] Docs: Only install sphinx-autobuild for `make htmllive` (GH-119607) ↵Miss Islington (bot)2024-05-272-2/+5
| | | | | | (#119622) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* [3.12] gh-119467: Fix Py_buffer.format type and correct documentation typo ↵Miss Islington (bot)2024-05-271-2/+2
| | | | | | | | (GH-119475) (#119603) gh-119467: Fix Py_buffer.format type and correct documentation typo (GH-119475) (cherry picked from commit 3b26cd8ca0e6c65e4b61effea9aa44d06e926797) Co-authored-by: Aditya Borikar <adityaborikar2@gmail.com>
* [3.12] Fix typos in HISTORY documentation (GH-119453) (#119598)Miss Islington (bot)2024-05-272-35/+36
| | | | Co-authored-by: Xie Yanbo <xieyanbo@gmail.com>
* [3.12] docs: fix a few typos identified by codespell (GH-119516) (#119571)Hugo van Kemenade2024-05-2617-21/+21
| | | | Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
* [3.12] FAQ: Add reference to Python version numbering scheme (GH-119225) ↵Miss Islington (bot)2024-05-251-2/+2
| | | | | | (#119545) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* [3.12] Misc improvements to the docs for itertools (gh-119532)Raymond Hettinger2024-05-241-55/+55
|
* [3.12] Regen ``Doc/requirements-oldest-sphinx.txt`` (GH-119520) (#119523)Miss Islington (bot)2024-05-241-1/+1
| | | | Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* [3.12] GH-119496: accept UTF-8 BOM in .pth files (GH-119509)Miss Islington (bot)2024-05-241-1/+3
| | | | | | | | | | | | | `Out-File -Encoding utf8` and similar commands in Windows Powershell 5.1 emit UTF-8 with a BOM marker, which the regular `utf-8` codec decodes incorrectly. `utf-8-sig` accepts a BOM, but also works correctly without one. This change also makes .pth files match the way Python source files are handled. (cherry picked from commit bf5b6467f8cc06759f3396ab1a8ad64fe7d1db2e) Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com> Co-authored-by: Inada Naoki <songofacandy@gmail.com>
* [3.12] gh-69214: Fix fcntl.ioctl() request type (#119498) (#119505)Victor Stinner2024-05-243-8/+12
| | | | | | | | gh-69214: Fix fcntl.ioctl() request type (#119498) Use an 'unsigned long' instead of an 'unsigned int' for the request parameter of fcntl.ioctl() to support requests larger than UINT_MAX. (cherry picked from commit 92fab3356f4c61d4c73606e4fae705c6d8f6213b)
* [3.12] gh-119317: findall instead of traverse for docutils nodes (GH-119319) ↵Miss Islington (bot)2024-05-242-4/+4
| | | | | | | | (#119487) gh-119317: findall instead of traverse for docutils nodes (GH-119319) (cherry picked from commit 0867bce45768454ee31bee95ca33fdc2c9d8b0fa) Co-authored-by: Carlos Meza <hire@carlosmeza.com>
* [3.12] [3.13] gh-119461: Fix ThreadedVSOCKSocketStreamTest (GH-119465) ↵Miss Islington (bot)2024-05-231-4/+6
| | | | | | | | | | | | | | | | | | | | | (GH-119479) (#119484) [3.13] gh-119461: Fix ThreadedVSOCKSocketStreamTest (GH-119465) (GH-119479) gh-119461: Fix ThreadedVSOCKSocketStreamTest (GH-119465) Fix ThreadedVSOCKSocketStreamTest: if get_cid() returns the host address or the "any" address, use the local communication address (loopback): VMADDR_CID_LOCAL. On Linux 6.9, apparently, the /dev/vsock device is now available but get_cid() returns VMADDR_CID_ANY (-1). (cherry picked from commit c750061047ee520d8299334df4b112fd983d7e48) Co-authored-by: Victor Stinner <vstinner@python.org> (cherry picked from commit e94dbe4ed83460f18bd72563c5f09f6cdc71f604) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.12] gh-90562: Mention slots pitfall in dataclass docs (GH-107391) (#119351)Miss Islington (bot)2024-05-231-1/+4
| | | | | | | | Co-authored-by: Josh Cannon <joshdcannon@gmail.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Erlend E. Aasland <erlend@python.org> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* [3.12] gh-119213: Be More Careful About _PyArg_Parser.kwtuple Across ↵Eric Snow2024-05-2210-869/+1032
| | | | | | | | | | | Interpreters (gh-119331) (gh-119425) _PyArg_Parser holds static global data generated for modules by Argument Clinic. The _PyArg_Parser.kwtuple field is a tuple object, even though it's stored within a static global. In some cases the tuple is statically allocated and thus it's okay that it gets shared by multiple interpreters. However, in other cases the tuple is set lazily, allocated from the heap using the active interprepreter at the point the tuple is needed. This is a problem once that interpreter is destroyed since _PyArg_Parser.kwtuple becomes at dangling pointer, leading to crashes. It isn't a problem if the tuple is allocated under the main interpreter, since its lifetime is bound to the lifetime of the runtime. The solution here is to temporarily switch to the main interpreter. The alternative would be to always statically allocate the tuple. This change also fixes a bug where only the most recent parser was added to the global linked list. (cherry picked from commit 81865002aee8eaaeb3c7e402f86183afa6de77bf)
* [3.12] gh-70795: Rework RLock documentation (GH-103853) (#119437)Miss Islington (bot)2024-05-221-24/+51
| | | | | | | | | | | | | | | | | | | | | gh-70795: Rework RLock documentation (GH-103853) Attempted to simultaneously reduce verbosity, while more descriptively describing behavior. Fix links (RLock acquire/release previously linking to Lock acquire/release, seems like bad copy pasta). Add a seealso for with-locks. Switch section to use bullet points. --------- (cherry picked from commit 2fbea81d646688cf438be1dc0be82112a9ae4325) Co-authored-by: uıɐɾ ʞ ʇɐɯɐs <_@skj.io> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* gh-118507 : Refactor ntpath native functions (gh-119381)Nice Zombies2024-05-225-379/+335
| | | | This refactoring will make future backports easier without changing behaviours, apart from correcting a bug when passing a pipe to `ntpath.isfile`.
* [3.12] gh-118643: Fix AttributeError in the email module (GH-119099) (GH-119390)Miss Islington (bot)2024-05-223-5/+24
| | | | | | | | | | Fix regression introduced in gh-100884: AttributeError when re-fold a long address list. Also fix more cases of incorrect encoding of the address separator in the address list missed in gh-100884. (cherry picked from commit 858b9e85fcdd495947c9e892ce6e3734652c48f2) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] Fix version number in use_load_tests deprecation reference ↵Miss Islington (bot)2024-05-221-1/+1
| | | | | | | | (GH-119151) (GH-119387) Deprecation took place in d78742a260ba09e53c844de7b1fd11a11c674945 (3.5) (cherry picked from commit aee8f03abbebfb76357f459dfb297026862e3c0b) Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
* [3.12] Clarify that dklen is expected in bytes for the hashlib functions ↵Miss Islington (bot)2024-05-221-2/+2
| | | | | | | (GH-106624) (GH-119384) (cherry picked from commit 5adf78f546a5dc3f5b8eeaa209a2e8437ae96ac8) Co-authored-by: Mathijs Mortimer <thiezn@users.noreply.github.com>
* [3.12] gh-110383: Align dict.get(), .fromkeys(), and .setdefault() docs with ↵Miss Islington (bot)2024-05-221-3/+3
| | | | | | | docstrings (GH-119330) (#119371) (cherry picked from commit 0e3c8cda1f04c983994e76aea93600dbb4714832) Co-authored-by: Landon Wood <landon@elkrange.com>
* [3.12] gh-119189: Add yet more tests for mixed Fraction arithmetic ↵Miss Islington (bot)2024-05-211-3/+32
| | | | | | | (GH-119298) (GH-119347) (cherry picked from commit 10b1bd926a5546e0f5cbd1a47d00dc5ff84f1979) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] Fix typos in documentation (GH-119295) (#119338)Miss Islington (bot)2024-05-217-9/+9
| | | | Co-authored-by: Xie Yanbo <xieyanbo@gmail.com>
* [3.12] gh-110383: Document `socket.makefile()` accepts combined modes ↵Miss Islington (bot)2024-05-212-2/+4
| | | | | | | | (GH-119150) (#119325) The supported mode values are 'r', 'w', and 'b', or a combination of those. (cherry picked from commit 62a29be5bb01c2d0f72d8f9b1b5539816e65310c) Co-authored-by: Daniel Williams <dann0a@gmail.com>
* [3.12] GH-110383: Improve Tutorial for Input Ouput (GH-119230) (GH-119327)Miss Islington (bot)2024-05-211-4/+16
| | | | | | | | GH-110383: Improve Tutorial for Input Ouput (GH-119230) (cherry picked from commit 9db2fd7edaa9d03e8c649c3bb0e8d963233cde22) Co-authored-by: Blaise Pabon <blaise@gmail.com> Co-authored-by: edson duarte <eduarte.uatach@gmail.com>
* [3.12] Docs: Ensure no warnings are found in the NEWS file before a given ↵Hugo van Kemenade2024-05-217-8/+49
| | | | line number (GH-119221) (#119266)
* [3.12] gh-119174: Fix high DPI causes turtledemo(turtle-graphics examples) ↵Miss Islington (bot)2024-05-215-11/+26
| | | | | | | | | | | windows blurry (GH-119175) (#119290) gh-119174: Fix high DPI causes turtledemo(turtle-graphics examples) windows blurry (GH-119175) ------ (cherry picked from commit 538ed5e4818aa0d0aa759634e8bfa23e317434a1) Co-authored-by: Wulian233 <71213467+Wulian233@users.noreply.github.com>
* [3.12] gh-118912: Remove description of issue fixed in 3.5 from autospeccing ↵Miss Islington (bot)2024-05-201-32/+8
| | | | | | | | | | | | | | | | | | guide (GH-119232) (#119283) gh-118912: Remove description of issue fixed in 3.5 from autospeccing guide (GH-119232) * Remove description of issue fixed in 3.5 from autospeccing guide * Make autospeccing note text more succint and lint whitespace * Add linting changes (missed in last commit) --------- (cherry picked from commit 7e57640c7ec6b7b5ce9b5eac465f6b771fd6ae69) Co-authored-by: Shauna <shaunagm@gmail.com> Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
* [3.12] gh-119050: Add XML support to libregrtest refleak checker (#119148) ↵Victor Stinner2024-05-205-25/+39
| | | | | | | | | | | | | | | (#119272) gh-119050: Add XML support to libregrtest refleak checker (#119148) regrtest test runner: Add XML support to the refleak checker (-R option). * run_unittest() now stores XML elements as string, rather than objects, in support.junit_xml_list. * runtest_refleak() now saves/restores XML strings before/after checking for reference leaks. Save XML into a temporary file. (cherry picked from commit 9257731f5d3e9d4f99e314b23a14506563e167d7)
* [3.12] gh-108267 Fix another dataclasses docs typo (GH-119277) (#119280)Miss Islington (bot)2024-05-201-1/+2
| | | | | | gh-108267 Fix another dataclasses docs typo (GH-119277) (cherry picked from commit 423bbcbbc43cacfb6a217c04f890a47d3cf7c3a9) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] gh-119189: Add more tests for mixed Fraction arithmetic (GH-119236) ↵Miss Islington (bot)2024-05-201-0/+263
| | | | | | | (GH-119256) (cherry picked from commit fe67af19638d208239549ccac8b4f4fb6480e801) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] Use correct markup in unittest.mock.reset_mock documentation ↵Miss Islington (bot)2024-05-201-3/+3
| | | | | | | | (GH-119207) (GH-119249) Use correct markup in unittest.mock.reset_mock documentation (GH-119207) (cherry picked from commit 6b80a5b20f31a067bd1c374295608df5f1210f49) Co-authored-by: Tialo <65392801+Tialo@users.noreply.github.com>
* [3.12] gh-92081: Fix for email.generator.Generator with whitespace between ↵Miss Islington (bot)2024-05-204-8/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | encoded words. (GH-92281) (#119246) * Fix for email.generator.Generator with whitespace between encoded words. email.generator.Generator currently does not handle whitespace between encoded words correctly when the encoded words span multiple lines. The current generator will create an encoded word for each line. If the end of the line happens to correspond with the end real word in the plaintext, the generator will place an unencoded space at the start of the subsequent lines to represent the whitespace between the plaintext words. A compliant decoder will strip all the whitespace from between two encoded words which leads to missing spaces in the round-tripped output. The fix for this is to make sure that whitespace between two encoded words ends up inside of one or the other of the encoded words. This fix places the space inside of the second encoded word. A second problem happens with continuation lines. A continuation line that starts with whitespace and is followed by a non-encoded word is fine because the newline between such continuation lines is defined as condensing to a single space character. When the continuation line starts with whitespace followed by an encoded word, however, the RFCs specify that the word is run together with the encoded word on the previous line. This is because normal words are filded on syntactic breaks by encoded words are not. The solution to this is to add the whitespace to the start of the encoded word on the continuation line. Test cases are from GH-92081 * Rename a variable so it's not confused with the final variable. (cherry picked from commit a6fdb31b6714c9f3c65fefbb3fe388b2b139a75f) Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>