| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
(cherry picked from commit 4c496f1f115a7910d4606b4de233d14874c77bfa)
Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
|
|
|
|
|
|
|
| |
`test_zipimport.py` (GH-93236)
(cherry picked from commit 484a2357c8385694a077cf2ce0517f327fb0b172)
Co-authored-by: jackh-ncl <1750152+jackh-ncl@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Documentation for `pathlib` says:
> Spurious slashes and single dots are collapsed, but double dots ('..') are not, since this would change the meaning of a path in the face of symbolic links:
However, it omits that initial double slashes also aren't collapsed.
Later, in documentation of `PurePath.drive`, `PurePath.root`, and `PurePath.name` it mentions UNC but:
- this abbreviation says nothing to a person who is unaware about existence of UNC (Wikipedia doesn't help either by [giving a disambiguation page](https://en.wikipedia.org/wiki/UNC))
- it shows up only if a person needs to use a specific property or decides to fully learn what the module provides.
For context, see the BPO entry.
(cherry picked from commit 78f1a436949209dab1f4a9d04036a1a42b165086)
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
|
|
|
|
|
|
|
|
| |
patterns in match statements (GH-93680) (#93690)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>.
(cherry picked from commit 53a8b17895e91d08f76a2fb59a555d012cd85ab4)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
| |
case-folding (GH-93674)
Co-authored-by: AN Long <aisk@users.noreply.github.com>
|
|
|
|
|
|
|
|
| |
copy.copy() and copy.deepcopy() now always raise a TypeError if
__reduce__() returns a tuple with length 6 instead of silently ignore
the 6th item or produce incorrect result.
(cherry picked from commit a365dd64c2a1f0d142540d5031003f24986f489f)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
|
| |
(GH-30617)
Co-authored-by: XD Trol <milestonejxd@gmail.com>
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
(cherry picked from commit 30610d28374f5a9698d456cebf3ae496ac01af51)
Co-authored-by: Leo Trol <milestone.jxd@gmail.com>
|
|
|
|
|
| |
(GH-93526) (GH-93599)
(cherry picked from commit 875de61)
|
|
|
|
|
|
|
|
| |
(cherry picked from commit f0d0be3493fc5855eccfe0fbb3f25bf12760041f)
Co-authored-by: Sean Fleming
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
|
|
|
|
|
|
|
|
| |
tasks are needed (GH-93258) (GH-93567)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 75ceae05c11461beda65e6170b67b0b42fd55cd0)
Co-authored-by: Andreas Grommek <76997441+agrommek@users.noreply.github.com>
|
|
|
|
|
|
|
| |
(GH-92915) (GH-92942)
(cherry picked from commit 8a6af5a34642f5564220eb50d72caada8f17fc78)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 57e8ee7086bf3f5c50c901e9d5896275644bbb54)
Co-authored-by: Davide Rizzo <sorcio@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
Character ranges with upper bound less that lower bound (e.g. [c-a])
are now interpreted as empty ranges, for compatibility with other glob
pattern implementations. Previously it was re.error.
(cherry picked from commit 0902c3d8edf7ef67972dd95f6a21670f5d1a4251)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
| |
(GH-93237)
(cherry picked from commit 8150b8cf7fe09d601246f5bdc6456a0e31f31bca)
Co-authored-by: jackh-ncl <1750152+jackh-ncl@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-93273)
When a `_PathParents` object has a drive or a root, the length of the
object is *one less* than than the length of `self._parts`, which resulted
in an off-by-one error when `path.parents[-n]` was fed through to
`self._parts[:-n - 1]`. In particular, `path.parents[-1]` was a malformed
path object with spooky properties.
This is addressed by adding `len(self)` to negative indices.
(cherry picked from commit f32e6b48d12834ba3bde01ec21c14da33abd26d6)
Co-authored-by: Barney Gale <barney.gale@gmail.com>
|
|
|
|
|
|
|
|
|
| |
but no closing brace. (gh-93419) (gh-93423)
(cherry picked from commit ee70c70aa93d7a41cbe47a0b361b17f9d7ec8acd)
Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-42272: improve message/module warning filter docs
"The Warnings Filter" section of the warnings module documentation
describes the message and module filters as "a string containing a
regular expression". While that is true when they are arguments to the
filterwarnings function, it is not true when they appear in -W or
$PYTHONWARNINGS where they are matched literally (after stripping any
starting/ending whitespace). Update the documentation to note when they
are matched literally. Also clarify that module matches the
"fully-qualified module name", rather than "module name" which is
ambiguous.
skip news (since this is a doc fix)
Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
* bpo-42272: remove bad submodule warning filter doc
The `error:::mymodule[.*]` example in the "Describing Warning Filters"
section of the warnings module documentation does not behave as the
comment describes. Since the module portion of the filter string is
interpreted literally, it would match a module with a fully-qualified
name that is literally `mymodule[.*]`.
Unfortunately, there is not a way to match '"module" and any subpackages
of "mymodule"' as documented, since the module part of a filter string
is matched literally. Instead, update the filter and comment to match
only "mymodule".
skip news (since this is a doc fix)
Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
* bpo-42272: add warning filter doc changes to NEWS
Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
(cherry picked from commit 8136606769661c103c46d142e52ecbbbb88803f6)
Co-authored-by: Kevin Locke <kevin@kevinlocke.name>
|
| |
|
|
|
|
|
|
|
| |
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
(cherry picked from commit 877ad7b3b2778a305d3989d58ebd68cb01baf26e)
Co-authored-by: georgically <40323509+georgically@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Fix __ltrace__ debug feature if the stdout encoding is not UTF-8.
If the stdout encoding is not UTF-8, the first call to
lltrace_resume_frame() indirectly sets lltrace to 0 when calling
unicode_check_encoding_errors() which calls
encodings.search_function().
Add test_lltrace.test_lltrace() test.
|
|
|
|
|
|
|
|
|
|
|
| |
corrupt ZIP file (GH-32291) (GH-93140)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit 202ed2506c84cd98e9e35621b5b2929ceb717864)
Co-authored-by: Sam Ezeh <sam.z.ezeh@gmail.com>
Automerge-Triggered-By: GH:serhiy-storchaka
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-93146)
Also while there, clarify a few things about why we reduce the hash to 32 bits.
Co-authored-by: Eli Libman <eli@hyro.ai>
Co-authored-by: Yury Selivanov <yury@edgedb.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit c1f5c903a7e4ed27190488f4e33b00d3c3d952e5)
|
| |
|
|
|
|
|
|
|
|
| |
* fix issue 93010
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 71abeb0895f7563dc5ac4b4f077a8f87dab57e7a)
Co-authored-by: oda-gitso <105083118+oda-gitso@users.noreply.github.com>
|
|
|
|
|
|
|
| |
builds (GH-92985)
(cherry picked from commit 38feffa09c74d9a853745908b7813903bae33b96)
Co-authored-by: David Machaj <46852402+dmachaj@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
| |
(GH-30498) (#92981)
(cherry picked from commit 8db2b3b6878aba9f12844526bce966b7eed81aee)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
| |
(GH-92966)
(cherry picked from commit fb082c2fc5a925085b179e63ca10b7f60b356d2f)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
|
|
|
|
|
|
| |
(GH-92718)
(cherry picked from commit 654032ac5f6982b36d45e024037f37fb65166aed)
Co-authored-by: Ayappan Perumal <ayappap2@in.ibm.com>
|
|
|
|
|
|
|
|
|
| |
returns `None` (GH-30575)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit b86d783a4eff96306f315acf9a6f1aca85d47fc3)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
| |
(cherry picked from commit 2153daf0a02a598ed5df93f2f224c1ab2a2cca0d)
This patch fixes gh-87740 too.
Co-authored-by: Crowthebird <78076854+thatbirdguythatuknownot@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
| |
threading.Condition.notify (GH-92534) (GH-92830)
If Condition.notify() was interrupted just after it released the waiter lock,
but before removing it from the queue, the following calls of notify() failed
with RuntimeError: cannot release un-acquired lock.
(cherry picked from commit 70af994fee7c0850ae859727d9468a5f29375a38)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `utc_to_seconds` call can fail, here's a minimal reproducer on
Linux:
TZ=UTC python -c "from datetime import *; datetime.fromtimestamp(253402300799 + 1)"
The old behavior still raised an error in a similar way, but only
because subsequent calculations happened to fail as well. Better to fail
fast.
This also refactors the tests to split out the `fromtimestamp` and
`utcfromtimestamp` tests, and to get us closer to the actual desired
limits of the functions. As part of this, we also changed the way we
detect platforms where the same limits don't necessarily apply (e.g.
Windows).
As part of refactoring the tests to hit this condition explicitly (even
though the user-facing behvior doesn't change in any way we plan to
guarantee), I noticed that there was a difference in the places that
`datetime.utcfromtimestamp` fails in the C and pure Python versions, which
was fixed by skipping the "probe for fold" logic for UTC specifically —
since UTC doesn't have any folds or gaps, we were never going to find a
fold value anyway. This should prevent some failures in the pure python
`utcfromtimestamp` method on timestamps close to 0001-01-01.
There are two separate news entries for this because one is a
potentially user-facing change, the other is an internal code
correctness change that, if anything, changes some error messages. The
two happen to be coupled because of the test refactoring, but they are
probably best thought of as independent changes.
Fixes GH-91581
(cherry picked from commit 83c0247d47b99f4571e35ea95361436e1d2a61cd)
Co-authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
(cherry picked from commit b69297ea23c0ab9866ae8bd26a347a9b5df567a6)
Co-authored-by: 狂男风 <CrazyBoyFeng@Live.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
declaration (GH-91903) (GH-92664)
ElementTree method write() and function tostring() now use the text file's
encoding ("UTF-8" if not available) instead of locale encoding in XML
declaration when encoding="unicode" is specified.
(cherry picked from commit 707839b0fe02ba2c891a40f40e7a869d84c2c9c5)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Automerge-Triggered-By: GH:serhiy-storchaka
|
|
|
|
|
|
| |
* [3.10] bpo-46785: Fix race condition between os.stat() and unlink on Windows (GH-31858).
(cherry picked from commit 39e6b8ae6a5b49bb23746fdcc354d148ff2d98e3)
Co-authored-by: Itai Steinherz <itaisteinherz@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit c56e2bb9949c95ec8911cd5554b07044a564796f)
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Some handlers were wrongly described as text-encoding only, but actually they can also be used in text-decoding.
* Add more description to each handler.
* Add two REPL examples.
* Add indexes for Error Handler's name.
Co-authored-by: Kyle Stanley <aeros167@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 5bc2390229bbcb4f13359e867fd8a140a1d5496b)
Co-authored-by: Ma Lin <animalize@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-91598) (#92497)
Do not spawn ProcessPool workers on demand when they spawn via fork.
This avoids potential deadlocks in the child processes due to forking from
a multithreaded process..
(cherry picked from commit ebb37fc3fdcb03db4e206db017eeef7aaffbae84)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
|
|
|
| |
(GH-92449). (GH-92457)
|
|
|
|
|
|
|
| |
(#92370)
(cherry picked from commit 85354ed78c0edb6d81a2bd53cabc85e547b8b26e)
Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
|
|
|
|
|
|
| |
They caused duplicated sections.
(cherry picked from commit 9b491ae04c900579ec82776aacdf71b2fd1e9d6a)
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#92274)
* [3.10] gh-80254: Disallow recursive usage of cursors in `sqlite3` converters (#29054)
(cherry picked from commit f629dcfe835e349433e4c5099381d668e8fe69c8)
Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* Fix ref leak in pysqlite_cursor_iternext
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a crash in subinterpreters related to the garbage collector. When
a subinterpreter is deleted, untrack all objects tracked by its GC.
To prevent a crash in deallocator functions expecting objects to be
tracked by the GC, leak a strong reference to these objects on
purpose, so they are never deleted and their deallocator functions
are not called.
(cherry picked from commit 14243369b5f80613628a565c224bba7fb3fcacd8)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
| |
collection and explicit close (GH-31913)
(cherry picked from commit dfb1b9da8a4becaeaed3d9cffcaac41bcaf746f4)
Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
|
|
|
|
|
|
| |
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit b295a92c50b128e494f47c28f12b8e9eac2927ea)
Co-authored-by: Humbled Drugman <humbled.drugman@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ipaddress.ip_{address,network,interface} helper functions (GH-30642)
`IPv*Network` and `IPv*Interface` constructors accept a 2-tuple of
(address description, netmask) as the address parameter.
When the tuple-based address is used errors are not propagated
correctly through the `ipaddress.ip_*` helper because of the %-formatting now expecting several arguments:
In [7]: ipaddress.ip_network(("192.168.100.0", "fooo"))
...
TypeError: not all arguments converted during string formatting
Compared to:
In [8]: ipaddress.IPv4Network(("192.168.100.0", "foo"))
...
NetmaskValueError: 'foo' is not a valid netmask
Use an f-string to make sure the error is always properly formatted.
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 52dc9c3066bcdc67a7a45d41cf158ecb1434d5f3)
Co-authored-by: Thomas Cellerier <thomascellerier@gmail.com>
|