| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
|
|
|
|
|
| |
(#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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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-119426)
|
|
|
|
| |
(GH-119705) (#119708)
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#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>
|
|
|
|
|
|
|
| |
(GH-119296) (#119681)
(cherry picked from commit 6b240c2308a044e38623900ccb8fa58c3549d4ae)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
|
| |
(#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>
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
| |
documentation (GH-119440) (GH-119652)
(cherry picked from commit b407ad38fb93585332c370b8fa56905fb238cdfd)
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
posixmodule (GH-119608)
|
|
|
|
|
|
|
|
| |
(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>
|
| |
|
|
|
|
|
|
| |
(GH-119583) (#119625)
Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
|
|
|
|
|
|
| |
(#119622)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
| |
Co-authored-by: Xie Yanbo <xieyanbo@gmail.com>
|
|
|
|
| |
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
|
|
|
|
|
|
| |
(#119545)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
|
| |
|
|
|
|
| |
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`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>
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
| |
(#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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
This refactoring will make future backports easier without changing behaviours,
apart from correcting a bug when passing a pipe to `ntpath.isfile`.
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
(GH-119151) (GH-119387)
Deprecation took place in d78742a260ba09e53c844de7b1fd11a11c674945 (3.5)
(cherry picked from commit aee8f03abbebfb76357f459dfb297026862e3c0b)
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
|
|
|
|
|
|
|
| |
(GH-106624) (GH-119384)
(cherry picked from commit 5adf78f546a5dc3f5b8eeaa209a2e8437ae96ac8)
Co-authored-by: Mathijs Mortimer <thiezn@users.noreply.github.com>
|
|
|
|
|
|
|
| |
docstrings (GH-119330) (#119371)
(cherry picked from commit 0e3c8cda1f04c983994e76aea93600dbb4714832)
Co-authored-by: Landon Wood <landon@elkrange.com>
|
|
|
|
|
|
|
| |
(GH-119298) (GH-119347)
(cherry picked from commit 10b1bd926a5546e0f5cbd1a47d00dc5ff84f1979)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
| |
Co-authored-by: Xie Yanbo <xieyanbo@gmail.com>
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
line number (GH-119221) (#119266)
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#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)
|
|
|
|
|
|
| |
gh-108267 Fix another dataclasses docs typo (GH-119277)
(cherry picked from commit 423bbcbbc43cacfb6a217c04f890a47d3cf7c3a9)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
|
|
| |
(GH-119256)
(cherry picked from commit fe67af19638d208239549ccac8b4f4fb6480e801)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|