| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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-27958)
(cherry picked from commit c764dfbcbc12c4653fc8ab39773cf973c9db2757)
Co-authored-by: Dong-hee Na <donghee.na@python.org>
|
|
|
|
|
|
|
|
| |
(GH-27951) (GH-27963)
(cherry picked from commit 806e25fd3173a80021e6df87b81263b5f6056f38)
Co-authored-by: Objectivitix <79152594+Objectivitix@users.noreply.github.com>
|
|
|
|
|
|
|
| |
(GH-27953)
(cherry picked from commit 7903a1096343d8018e889029f025d39bdd077170)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
|
|
|
|
|
| |
(cherry picked from commit 23384a1749359f0ae7aaae052073d44b59e715a1)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
(cherry picked from commit e41912c6348362489d2514565a70782591f23902)
Co-authored-by: Mark Roseman <mark@markroseman.com>
|
|
|
|
|
|
| |
Co-authored-by: Tianqing Peng <pengtianqing@yimian.com.cn>
(cherry picked from commit dcbf7ff6a700b63e637a0445d68866670a398024)
Co-authored-by: Sunny Bean <ptq008@gmail.com>
|
|
|
|
|
|
| |
Test also PyObject_Repr(NULL) and PyObject_Bytes(NULL).
(cherry picked from commit 4d689173861257c69adc6dc1dca4171946ddb57f)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 7b550dfce64bd134c5604fd1f2d4c43ae2b669e4)
Co-authored-by: Mike Smith <mikesmith@screamingjoypad.com>
|
|
|
|
|
|
|
|
|
| |
online (GH-27836)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
(cherry picked from commit 1eb451031a64b4f28d737ee7f394252ae9a76118)
Co-authored-by: Mark Roseman <mark@markroseman.com>
|
|
|
|
|
| |
(cherry picked from commit 27b761a11a14521617a01257eb3767150bec3a74)
Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
|
|
|
|
|
|
| |
intially -> initially
(cherry picked from commit 0e8695ece0d3569eeb1b89c91a1b0aa3d34f228e)
Co-authored-by: Ikko Ashimine <eltociear@gmail.com>
|
|
|
|
|
|
|
| |
(GH-27872)
(cherry picked from commit 1a995b0ceefdf7eb59963f3ab395c47d8da226e3)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
(cherry picked from commit eec340ea3af27887fcaac4029ebdee99f3713bff)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-27893)
- reorganized from two sections (tkinter vs. tcl/tk) into three (tkinter, tcl/tk, and books)
- main (recommended) tkinter docs have one tutorial (tkdocs) and one reference (shipman), added better descriptions
- dropped link to Tkinter page on wiki (suggestion by E. Paine; outdated, most material already linked to from python.org)
- replaced Tcl/Tk recent man pages and core dev home with single link to main Tcl/Tk page (which holds both of these)
- updated Modern Tkinter link to book page on TkDocs site (was Amazon link to old version), dropped description
- replaced Grayson book by Moore book (newer, covers ttk)
- changed Ousterhout ref to second edition, covers ttk
- dropped link to Welch book (old).
(cherry picked from commit d1049d1d6b43296d4db1aa8668aa4ca807bf7adb)
Co-authored-by: Mark Roseman <mark@markroseman.com>
|
|
|
|
|
|
|
|
| |
- move description of internal modules (_tkinter and tkinter.constants) from section intro to list of additional modules at end of section, as not most important info
- added missing ttk and tix here
- emphasized up front that most apps will need tkinter and ttk
(cherry picked from commit d5dbe8bca792350f4997c027535e0ca498abd1bb)
Co-authored-by: Mark Roseman <mark@markroseman.com>
|
|
|
|
|
|
|
| |
(GH-27835)
(cherry picked from commit 141c7a4fce8def67baa9d24f542c105b8502893e)
Co-authored-by: Mark Roseman <mark@markroseman.com>
|
|
|
|
|
|
|
| |
(GH-27859) (GH-27860)
(cherry picked from commit 16b9be4861e007ad483611ba0479feb2b90ea783)
Co-authored-by: Maximilian Hils <git@maximilianhils.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Vedran Čačić <vedgar+github@gmail.com>
(cherry picked from commit 64f9e7b19dc1603fcbd07c17c9860085b9d21465)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 15a64d89a31b7e91f0361c305b7b27d8761db93d)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
|
|
|
|
|
|
|
| |
The code of the test was never executed because the test function
was unintentionally converted to a generator function.
(cherry picked from commit 585390fdd8661b4bc08bdfc27551292da9b4b9b8)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Because setting non-empty _name affects behavior of other code.
In most cases __name__ can be derived from __origin__.__name__.
(cherry picked from commit 4ceec495598e78f0776dd46d511dcc612a434dc3)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 60b93d9e4922eeae25052bc15909d1f4152babde)
Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
|
|
|
|
|
|
|
|
|
| |
The signature of field() had an extraneous colon at the end, causing it
to appear all bold and without the module name.
(cherry picked from commit d26dbba9297adb59bc49a6583c647804ef56fc58)
Co-authored-by: Jean-Abou-Samra <37271310+Jean-Abou-Samra@users.noreply.github.com>
Co-authored-by: Jean-Abou-Samra <37271310+Jean-Abou-Samra@users.noreply.github.com>
|
|
|
|
|
| |
(cherry picked from commit 0fd66e46b2f472d0d206a185dc8892f4f0347cb6)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
|
| |
(cherry picked from commit 6fb62b42f4db56ed5efe0ca4c1059049276c1083)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
| |
(cherry picked from commit 942d1a4284e9341df47c48d7c63e921136dc9719)
Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
|
|
|
|
|
|
|
| |
(GH-27814)
(cherry picked from commit b2f68b190035540872072ac1d2349e7745e85596)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Additional improvements:
- messages which were compiled regular expressions aren't unpacked back into
strings for unmatched warnings;
- removed unnecessary "if tokens:" check (there's one before the for loop);
- took `endswith` calculation out of the for loop.
(cherry picked from commit 8cf07d3db3eed02b43350a5f9dbf68f1c839ea82)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
|
|
| |
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 3240bc62f4e0afa09964f3afc845697f0a0806b9)
Co-authored-by: meowmeowmeowcat <meowmeowcat1211@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 599f5c8481ca258ca3a5d13eaee7d07a9103b5f2)
Co-authored-by: Jefferson Oliveira <jefferson.dev.insights@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>
|
|
|
|
|
|
|
| |
fixed (GH-27761)
(cherry picked from commit 62bc716fde20fcb7b47416c7959be9e66df93212)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
|
|
|
|
|
|
|
| |
(GH-27664) (GH-27666)
(cherry picked from commit ebecffdb6d5fffa4249f9a813f1fc1915926feb5)
Co-authored-by: Senthil Kumaran <senthil@python.org>
|
|
|
|
|
|
| |
(cherry picked from commit ed524b4569b1e4a166886c880018418d46284378)
Co-authored-by: meowmeowmeowcat <meowmeowcat1211@gmail.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>
|
|
|
|
|
| |
(cherry picked from commit 230403a6a19042b174374c3825904d2e857f38b0)
Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
|