| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Co-authored-by: trag1c <trag1cdev@yahoo.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-118320) (GH-118691)
gh-118314: Fix padding edge case in binascii.a2b_base64 strict mode (GH-118320)
Fix an edge case in `binascii.a2b_base64` strict mode, where
excessive padding was not detected when no padding is necessary.
(cherry picked from commit fe47d9bee319528ffeb5fd60a615d7f02c7b5585)
Co-authored-by: Youfu Zhang <1315097+zhangyoufu@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
int to str conversion (GH-118483) (GH-118590)
For converting large ints to strings, CPython invokes a function in _pylong.py,
which uses the decimal module to implement an asymptotically waaaaay
sub-quadratic algorithm. But if the C decimal module isn't available, CPython
uses _pydecimal.py instead. Which in turn frequently does str(int). If the int
is very large, _pylong ends up doing the work, which in turn asks decimal to do
"big" arithmetic, which in turn calls str(big_int), which in turn ... it can
become infinite mutual recursion.
This change introduces a different int->str function that doesn't use decimal.
It's asymptotically worse, "Karatsuba time" instead of quadratic time, so
still a huge improvement. _pylong switches to that when the C decimal isn't
available. It is also used for not too large integers (less than 450_000 bits),
where it is faster (up to 2 times for 30_000 bits) than the asymptotically
better implementation that uses the C decimal.
(cherry picked from commit 711c80bfca5dd17cb7c6ec26f0e44848b33aec04)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Tim Peters <tim.peters@gmail.com>
|
|
|
|
|
|
| |
gh-117389: Fix `test_compileall.EncodingTest` (GH-117390)
(cherry picked from commit 44f67916dafd3583f482e6d001766581a1a734fc)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-118503) (GH-118584)
Serhiy and I independently concluded that exact powers of 10
aren't possible in these contexts, so just checking the
string length is sufficient.
(cherry picked from commit 999f0c512281995fb61a0d9eda075fd846e8c505)
Co-authored-by: Tim Peters <tim.peters@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
| |
gh-118569: Add a test for dynamic PEP695 classes (GH-118570)
(cherry picked from commit 5f547585fa56c94c5d836b5313a7200f4937ebc4)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
|
|
|
| |
global in the other (GH-118526) (#118548)
gh-118513: Fix sibling comprehensions with a name bound in one and global in the other (GH-118526)
(cherry picked from commit c8deb1e4b495bf97ab00c710dfd63f227e1fb645)
Co-authored-by: Carl Meyer <carl@oddbird.net>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
|
|
|
|
|
|
|
|
| |
(GH-118163) (#118517)
gh-90848: Fixed create_autospec ignoring configure_mock style kwargs (GH-118163)
(cherry picked from commit b28a3339e4c63ea3a801dba9bbbc6af5af42c3a0)
Co-authored-by: infohash <46137868+infohash@users.noreply.github.com>
|
|
|
|
| |
closed (#118451)
|
|
|
|
|
|
|
| |
(GH-117882) (#118458)
GH-117881: fix athrow().throw()/asend().throw() concurrent access (GH-117882)
(cherry picked from commit fc7e1aa3c001bbce25973261fba457035719a559)
|
|
|
|
|
|
| |
Uncomment one grammar test (GH-118361)
(cherry picked from commit 23d0371bb99b1df183c36883e256f82fdf6a4bea)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-118348) (#118477)
gh-116767: fix crash on 'async with' with many context managers (GH-118348)
Account for `add_stopiteration_handler` pushing a block for `async with`.
To allow generator functions that previously almost hit the `CO_MAXBLOCKS`
limit by nesting non-async blocks, the limit is increased by 1.
This increase allows one more block in non-generator functions.
(cherry picked from commit c1bf4874c1e9db2beda1d62c8c241229783c789b)
|
|
|
|
|
|
|
|
|
|
| |
(GH-118176) (GH-118432)
Add tests for "import", pkgutil.resolve_name() and unittest.mock.path()
for cases when "import a.b as x" and "from a import b as x" give
different results.
(cherry picked from commit c0eaa232f63a62e0e0408911ab5f118dca2af607)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
| |
(GH-118405) (GH-118424)
(cherry picked from commit 11f8348d78c22f85694d7a424541b34d6054a8ee)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-117567) (GH-118391)
gh-117566: fix IPv6Address.is_loopback for IPv4-mapped loopbacks (GH-117567)
While properties like IPv6Address.is_private account for IPv4-mapped
IPv6 addresses, such as for example:
>>> ipaddress.ip_address("192.168.0.1").is_private
True
>>> ipaddress.ip_address("::ffff:192.168.0.1").is_private
True
...the same doesn't currently apply to the is_loopback property:
>>> ipaddress.ip_address("127.0.0.1").is_loopback
True
>>> ipaddress.ip_address("::ffff:127.0.0.1").is_loopback
False
At minimum, this inconsistency between different properties is
counter-intuitive. Moreover, ::ffff:127.0.0.0/104 is for all intents and
purposes a loopback address, and should be treated as such.
(cherry picked from commit fb7f79b4da35b75cdc82ff3cf20816d2bf93d416)
Co-authored-by: Faidon Liambotis <paravoid@debian.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#118223) (#118270)
sqlite3.iterdump() depends on the row factory returning resulting rows
as tuples; it will fail with custom row factories like for example a
dict factory.
With this commit, we explicitly reset the row factory of the cursor used
by iterdump(), so we always get predictable results. This does not
affect the row factory of the parent connection.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
| |
StopIteration (GH-117851) (GH-118226)
(cherry picked from commit 7d369d471cf2b067c4d795d70b75201c48b46f5b)
|
|
|
|
|
|
| |
(GH-118202) (#118232)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-113179) (GH-113186) (GH-118177)
* GH-113171: Fix "private" (non-global) IP address ranges (GH-113179)
The _private_networks variables, used by various is_private
implementations, were missing some ranges and at the same time had
overly strict ranges (where there are more specific ranges considered
globally reachable by the IANA registries).
This patch updates the ranges with what was missing or otherwise
incorrect.
100.64.0.0/10 is left alone, for now, as it's been made special in [1].
The _address_exclude_many() call returns 8 networks for IPv4, 121
networks for IPv6.
[1] https://github.com/python/cpython/issues/61602
* GH-65056: Improve the IP address' is_global/is_private documentation (GH-113186)
It wasn't clear what the semantics of is_global/is_private are and, when
one gets to the bottom of it, it's not quite so simple (hence the
exceptions listed).
(cherry picked from commit 2a4cbf17af19a01d942f9579342f77c39fbd23c4)
(cherry picked from commit 40d75c2b7f5c67e254d0a025e0f2e2c7ada7f69f)
---------
Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
|
|
|
|
|
|
|
|
| |
Message-ID, address, routes, etc (GH-20790) (GH-117974)
(cherry picked from commit 1aa8bbe62f27b564cf15e2aad591c62744354a4e)
Co-authored-by: Ivan Savin <acccko@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
| |
(#118178)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
(GH-15242) (GH-117508)
* gh-59215: unittest: restore _top_level_dir at end of discovery (GH-15242)
(cherry picked from commit fc5f68e58ecfbc8c452e1c2f33a2a53d3f2d7ea2)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
|
|
|
|
|
|
|
| |
(GH-117982) (GH-118011)
(cherry picked from commit 6078f2033ea15a16cf52fe8d644a95a3be72d2e3)
Co-authored-by: NGRsoftlab <78017794+NGRsoftlab@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
|
|
| |
(GH-118151)
(cherry picked from commit 287d939ed4445089e8312ab44110cbb6b6306a5c)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
params (GH-118001) (#118142)
Filter out '?NNN' placeholders when looking for named params.
(cherry picked from commit 550483b7e6c54b2a25d4db0c4ca41bd9c1132f93)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: AN Long <aisk@users.noreply.github.com>
|
| |
|
|
|
|
|
|
| |
``get_type_hints`` (#118009) (#118104)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
|
|
|
|
|
|
| |
/ (GH-118056) (GH-118058)
(cherry picked from commit ccdcd1d95a9d6eda4df86811c4539f204beef817)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
| |
positional-only (#117939)
|
|
|
|
|
|
|
|
|
|
| |
(GH-117998)
It was raised when the charset is rfc2231 encoded, e.g.:
Content-Type: text/plain; charset*=ansi-x3.4-1968''utf-8
(cherry picked from commit deaecb88fa5da68cbffca413c63af95fd99578dd)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
MemoryHandler. (GH-117976) (GH-117986)
(cherry picked from commit 6d0bb43232dd6ebc5245daa4fe29f07f815f0bad)
|
|
|
|
|
|
|
|
|
|
| |
separators (GH-117369) (GH-117971)
Only treat '\n', '\r' and '\r\n' as line separators in re-folding the email
messages. Preserve control characters '\v', '\f', '\x1c', '\x1d' and '\x1e'
and Unicode line separators '\x85', '\u2028' and '\u2029' as is.
(cherry picked from commit aec1dac4efe36a7db51f08385ddcce978814dbe3)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
| |
posixpath.expanduser() (GH-117504) (GH-117970)
They are now supported in bytes paths as well as in string paths.
(cherry picked from commit 51132da0c4dac13500d9bb86b2fdad42091d3fd9)
|
|
|
|
|
|
|
| |
(GH-117932) (GH-117969)
(cherry picked from commit 8429b4565deaef7a86bffc0ce58bc0eab1d7ae48)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-117934) (GH-117965)
In particularly, one-off addresses generated by Microsoft Outlook:
https://learn.microsoft.com/en-us/office/client-developer/outlook/mapi/one-off-addresses
(cherry picked from commit f74e51229c83e3265f905dc15283bfe0ec1a659e)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: fsc-eriker <72394365+fsc-eriker@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
| |
ending with a dot (GH-15600) (GH-117964)
(cherry picked from commit 8cc9adbfddc8e37cf7d621b12754eecb0584f5da)
Co-authored-by: tsufeki <tsufeki@ymail.com>
Co-authored-by: Tim Bell <timothybell@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
| |
deprecation warnings (GH-117872) (GH-117930)
gh-117691: Add an appropriate stacklevel for PEP-706 tarfile deprecation warnings (GH-117872)
(cherry picked from commit cff0a2db00b6379f60fe273a9782f71773d0a4cb)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
|
|
|
| |
(#117921)
gh-117797: Improve `test_descr.test_not_implemented` (GH-117798)
(cherry picked from commit 1a1e013a4a526546c373afd887f2e25eecc984ad)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
| |
to reduce warnings (GH-117817)
|
| |
|
|
|
|
|
|
|
|
|
| |
Reuse support.check_cflags_pgo() in test_peg_generator to check for
PGO build.
Log PGO_PROF_USE_FLAG in test.pythoninfo.
(cherry picked from commit 64cd6fc9a6a3c3c19091a1c81cbbe8994583017d)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-91568) (GH-117890)
gh-91565: Replace bugs.python.org links with Devguide/GitHub ones (GH-91568)
(cherry picked from commit 3de09cadde788065a4f2d45117e789c9353bbd12)
Co-authored-by: Steve (Gadget) Barnes <gadgetsteve@hotmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 57bdb75975ff90f95248c59fda34345f3bfff3c4)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
|
|
|
|
|
| |
available (GH-117588) (GH-117718)
(cherry picked from commit dfcae4379f2cc4d352a180f9fef2381570aa9bcb)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-117712) (#117749)
gh-117711: Only check for 'test/wheeldata' when it's actually used (GH-117712)
It's possible to build Python with option `--with-wheel-pkg-dir`
pointing to a custom wheel directory. Don't include the directory in the test
set if the wheels are used from a different location.
(cherry picked from commit d4963871b03cc76fe7d9648d022d12007585beae)
Co-authored-by: Karolina Surma <33810531+befeleme@users.noreply.github.com>
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
|
|
|
|
|
|
|
|
|
| |
(GH-117670) (#117745)
gh-117606: Truncate extremely long error message in `test_exceptions` (GH-117670)
(cherry picked from commit 02f1385f8ad6bf45376377c41f106b386d3a7eb0)
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
|
|
|
|
| |
`builtin_or_method` (GH-117699) (#117708)
* gh-117692: Fix `AttributeError` in `DocTestFinder` on wrapped `builtin_or_method` (GH-117699)
(cherry picked from commit 4bb7d121bc0a3fd00a3c72cd915b5dd8fac5616e)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#117689)
gh-117534: Add checking for input parameter in iso_to_ymd (GH-117543)
Moves the validation for invalid years in the C implementation of the `datetime` module into a common location between `fromisoformat` and `fromisocalendar`, which improves the error message and fixes a failed assertion when parsing invalid ISO 8601 years using one of the "ISO weeks" formats.
---------
(cherry picked from commit d5f1139c79525b4e7e4e8ad8c3e5fb831bbc3f28)
Co-authored-by: Vlad4896 <166005126+Vlad4896@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
|
|
|
|
|
|
|
| |
(g… (gh-117616)
gh-117594: Require cpu resource to test_search_anchor_at_beginning (gh-117595)
(cherry picked from commit 784623c63c45a4d13dfb04318c39fdb1ab790218)
|