| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
(GH-28199)
Fix PyAiter_Check to only check for the `__anext__` presense (not for
`__aiter__`). Rename `PyAiter_Check()` to `PyAIter_Check()`,
`PyObject_GetAiter()` -> `PyObject_GetAIter()`.
|
|
|
|
|
|
|
| |
(GH-28197)
(cherry picked from commit a5c6bcf24479934fe9c5b859dd1cf72685a0003a)
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
|
|
|
|
|
|
|
|
| |
(GH-27955)
Co-authored-by: Yury Selivanov <yury@edgedb.com>
(cherry picked from commit 533e725821b15e2df2cd4479a34597c1d8faf616)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 19871fce3b74fc3f37e334a999e00d0ef65a8f1e)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
|
| |
skipped (GH-28060)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit dd7b816ac87e468e2fa65ce83c2a03fe1da8503e)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
| |
It happened with fast range iterator when the calculated stop = start + step * len
was out of the C long range.
(cherry picked from commit 936f6a16b9ef85bd56b18a247b962801e954c30e)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
| |
(GH-28121)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit 0635e201beaf52373f776ff32702795e38f43ae3)
Co-authored-by: Yurii Karabas <1998uriyyo@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Functions registered with addModuleCleanup() were not called unless
the user defines tearDownModule() in their test module.
* Functions registered with addClassCleanup() were not called if
tearDownClass is set to None.
* Buffering in TestResult did not work with functions registered
with addClassCleanup() and addModuleCleanup().
* Errors in functions registered with addClassCleanup() and
addModuleCleanup() were not handled correctly in buffered and
debug modes.
* Errors in setUpModule() and functions registered with
addModuleCleanup() were reported in wrong order.
* And several lesser bugs.
(cherry picked from commit 08d9e597c8ef5a2b26375ac954fdf224f5d82c3c)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Previously it returned None if the test class or method was
decorated with a skipping decorator.
Co-authored-by: Iman Tabrizian <iman.tabrizian@gmail.com>
(cherry picked from commit 7e246a3a7b43762480ee4fe0cfb859e8e997a8c8)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
| |
Fix a crash in the signal handler of the faulthandler module: no
longer modify the reference count of frame objects.
|
|
|
|
|
|
|
|
| |
(GH-28009) (GH-28039)
(cherry picked from commit d3bdbbf9a4352a24fc2bfc7a63a024b244b61aba)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
|
|
|
|
|
|
|
| |
when built on older macOS systems (GH-27251)
Previously, when built on older macOS systems, `find_library` was not able to find macOS system libraries when running on Big Sur due to changes in how system libraries are stored.
(cherry picked from commit 71853a73024a98aa38a3c0444fe364dbd9709134)
Co-authored-by: Tobias Bergkvist <tobias@bergkv.ist>
|
|
|
|
|
| |
(cherry picked from commit 94b2639fad50d7ff8acd12c11e5fe5f9a6e1da5c)
Co-authored-by: Ned Deily <nad@python.org>
|
|
|
|
|
|
| |
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 0897253f426068ea6a6fbe0ada01689af9ef1019)
Co-authored-by: Miguel Brito <5544985+miguendes@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
| |
Update the vendored copy of libexpat to 2.4.1 (from 2.2.8) to get the
fix for the CVE-2013-0340 "Billion Laughs" vulnerability. This copy
is most used on Windows and macOS.
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 3fc5d84046ddbd66abac5b598956ea34605a4e5d)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
| |
pydoc (GH-23200)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit c9227df5a9d8e958a2324cf0deba8524d1ded26a)
Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
|
|
|
|
| |
commit (GH-26202) (GH-27943)
|
|
|
|
|
|
|
|
| |
forms in `typing` (GH-27710)
This was a Python 3.9 regression.
(cherry picked from commit a3a4d20d6798aa2975428d51f3a4f890248810cb)
Co-authored-by: Yurii Karabas <1998uriyyo@gmail.com>
|
|
|
|
|
|
| |
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 94a3d2a6329ab7941e93ad2f5bcbb8af2b8b80d2)
Co-authored-by: chilaxan <chilaxan@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
threads attempt to commit the last pending removal (GH-27921)
Fixes:
Traceback (most recent call last):
File "/home/graingert/projects/asyncio-demo/demo.py", line 36, in <module>
sys.exit(main())
File "/home/graingert/projects/asyncio-demo/demo.py", line 30, in main
test_all_tasks_threading()
File "/home/graingert/projects/asyncio-demo/demo.py", line 24, in test_all_tasks_threading
results.append(f.result())
File "/usr/lib/python3.10/concurrent/futures/_base.py", line 438, in result
return self.__get_result()
File "/usr/lib/python3.10/concurrent/futures/_base.py", line 390, in __get_result
raise self._exception
File "/usr/lib/python3.10/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/lib/python3.10/asyncio/runners.py", line 47, in run
_cancel_all_tasks(loop)
File "/usr/lib/python3.10/asyncio/runners.py", line 56, in _cancel_all_tasks
to_cancel = tasks.all_tasks(loop)
File "/usr/lib/python3.10/asyncio/tasks.py", line 53, in all_tasks
tasks = list(_all_tasks)
File "/usr/lib/python3.10/_weakrefset.py", line 60, in __iter__
with _IterationGuard(self):
File "/usr/lib/python3.10/_weakrefset.py", line 33, in __exit__
w._commit_removals()
File "/usr/lib/python3.10/_weakrefset.py", line 57, in _commit_removals
discard(l.pop())
IndexError: pop from empty list
Also fixes:
Exception ignored in: weakref callback <function WeakKeyDictionary.__init__.<locals>.remove at 0x00007fe82245d2e0>
Traceback (most recent call last):
File "/usr/lib/pypy3/lib-python/3/weakref.py", line 390, in remove
del self.data[k]
KeyError: <weakref at 0x00007fe76e8d8180; dead>
Exception ignored in: weakref callback <function WeakKeyDictionary.__init__.<locals>.remove at 0x00007fe82245d2e0>
Traceback (most recent call last):
File "/usr/lib/pypy3/lib-python/3/weakref.py", line 390, in remove
del self.data[k]
KeyError: <weakref at 0x00007fe76e8d81a0; dead>
Exception ignored in: weakref callback <function WeakKeyDictionary.__init__.<locals>.remove at 0x00007fe82245d2e0>
Traceback (most recent call last):
File "/usr/lib/pypy3/lib-python/3/weakref.py", line 390, in remove
del self.data[k]
KeyError: <weakref at 0x000056548f1e24a0; dead>
See: https://github.com/agronholm/anyio/issues/362GH-issuecomment-904424310
See also: https://bugs.python.org/issue29519
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 206b21ed9f64fedff67bfea7cf73e423e3e32393)
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-27946)
Various date parsing utilities in the email module, such as
email.utils.parsedate(), are supposed to gracefully handle invalid
input, typically by raising an appropriate exception or by returning
None.
The internal email._parseaddr._parsedate_tz() helper used by some of
these date parsing routines tries to be robust against malformed input,
but unfortunately it can still crash ungracefully when a non-empty but
whitespace-only input is passed. This manifests as an unexpected
IndexError.
In practice, this can happen when parsing an email with only a newline
inside a ‘Date:’ header, which unfortunately happens occasionally in the
real world.
Here's a minimal example:
$ python
Python 3.9.6 (default, Jun 30 2021, 10:22:16)
[GCC 11.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import email.utils
>>> email.utils.parsedate('foo')
>>> email.utils.parsedate(' ')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.9/email/_parseaddr.py", line 176, in parsedate
t = parsedate_tz(data)
File "/usr/lib/python3.9/email/_parseaddr.py", line 50, in parsedate_tz
res = _parsedate_tz(data)
File "/usr/lib/python3.9/email/_parseaddr.py", line 72, in _parsedate_tz
if data[0].endswith(',') or data[0].lower() in _daynames:
IndexError: list index out of range
The fix is rather straight-forward: guard against empty lists, after
splitting on whitespace, but before accessing the first element.
(cherry picked from commit 989f6a3800f06b2bd31cfef7c3269a443ad94fac)
Co-authored-by: wouter bolsterlee <wouter@bolsterl.ee>
|
|
|
|
|
|
| |
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 7dc505b8655b3e48b93a4274dfd26e5856d9c64f)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
| |
(cherry picked from commit 551da597a0996b0fb3af425f48aa5bc63ea6b963)
|
|
|
|
|
|
|
| |
(GH-27953)
(cherry picked from commit 7903a1096343d8018e889029f025d39bdd077170)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
|
|
|
|
|
|
|
|
|
|
| |
Broadened scope of the document to explicitly discuss and differentiate between ``__main__.py`` in packages versus the ``__name__ == '__main__'`` expression (and the idioms that surround it), as well as ``import __main__``.
Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
Co-authored-by: Éric Araujo <merwok@netwok.org>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 7cba23164cf82f6619db002cd30021b5dfb1f809)
Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
|
|
|
|
|
|
|
|
| |
int (GH-19708)
(cherry picked from commit bb21e28fd08f894ceff2405544a2f257d42b1354)
Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
objects (GH-27831)
Method stopTestRun() is now always called in pair with method startTestRun()
for TestResult objects implicitly created in TestCase.run().
Previously it was not called for test methods and classes decorated with
a skipping decorator.
(cherry picked from commit a9640d75531d6cbbfd254b65435f238c26bf5cd9)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 60b93d9e4922eeae25052bc15909d1f4152babde)
Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
|
|
|
|
|
| |
(cherry picked from commit 6fb62b42f4db56ed5efe0ca4c1059049276c1083)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
| |
(GH-27814)
(cherry picked from commit b2f68b190035540872072ac1d2349e7745e85596)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Enable posix_spawn() on Solaris
(cherry picked from commit b1930bf75f276cd7ca08c4455298128d89adf7d1)
Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
Automerge-Triggered-By: GH:gpshead
|
|
|
|
|
|
|
| |
(GH-27772) (GH-27796)
(cherry picked from commit 4b9a2dcf19e5d13c3bc2afea2de1f65cd994c699)
Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
|
|
|
|
|
| |
(cherry picked from commit 6a358bb9482f7595b858ea7b800cbe66f0de5fa1)
Co-authored-by: Gautam Chaudhuri <gautam.chaudhuri.1803@gmail.com>
|
|
|
|
|
|
|
| |
regrtest (GH-27634) (GH-27784)
(cherry picked from commit a0a6d39295a30434b088f4b66439bf5ea21a3e4e)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
|
|
| |
Co-authored-by: Micky Yun Chan <michan@redhat.com>
(cherry picked from commit 1512bc21d60f098a9e9f37b44a2f6a9b49a3fd4f)
Co-authored-by: Maximilian Hils <git@maximilianhils.com>
|
|
|
|
|
|
|
| |
leaked tasks (GH-27765)
(cherry picked from commit 2cb1a6806c0cefab0c3a40fdd428a89a4392570e)
Co-authored-by: Bar Harel <bar.harel@biocatch.com>
|
|
|
|
|
|
| |
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit e43b9bbc31c22a0d97dc4fc420300e40c2d74166)
Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
|
|
|
|
|
|
| |
Co-authored-by: Cornelius Diekmann <c.diekmann@googlemail.com>
(cherry picked from commit dd8eb303b90d63e1f56684bedadca6674bb74a29)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
|
|
| |
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit a2ce538e16d5e3a6168704366bdd7a8c5af29881)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
| |
and repeated expressions (GH-27729) (GH-27743)
(cherry picked from commit 8e832fb2a2cb54d7262148b6ec15563dffb48d63)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On non-Linux POSIX platforms, like FreeBSD or macOS,
the FD used to read a forked PTY may signal its exit not
by raising an error but by sending empty data to the read
syscall. This case wasn't handled, leading to hanging
`pty.spawn` calls.
Co-authored-by: Reilly Tucker Siemens <reilly@tuckersiemens.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 81ab8db235580317edcb0e559cd4c983f70883f5)
Co-authored-by: Zephyr Shannon <geoffpshannon@gmail.com>
|
|
|
|
|
|
|
|
| |
docs (GH-27717)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 08caf2d5d4a9994976e9eafaf345b5a1a4012a81)
Co-authored-by: Mark Roseman <mark@markroseman.com>
|
|
|
|
|
|
|
| |
(GH-27678) (GH-27719)
(cherry picked from commit bfc2d5a5c4550ab3a2fadeb9459b4bd948ff61a2)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
| |
in its context chain (GH-27626)
Co-authored-by: Dennis Sweeney 36520290+sweeneyde@users.noreply.github.com
(cherry picked from commit d5c217475c4957a8084ac3f92ae012ece5edc7cb)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
|
|
|
|
|
| |
(cherry picked from commit 149addd4960d634ce672ab5fc17e0e785a0cdcd0)
Co-authored-by: Zsolt Dollenstein <zsol.zsol@gmail.com>
|
|
|
|
|
|
| |
It has not been true for several years and likely never was.
(cherry picked from commit 6b37d0d5300813de31d66df1c77dad7e1027e4d8)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
| |
|
|
|
|
|
|
| |
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit c5c5326d4799fe4ae566aff32ed3461af95859cc)
Co-authored-by: Anthony Shaw <anthony.p.shaw@gmail.com>
|