Commit graph

108762 commits

Author SHA1 Message Date
Miss Islington (bot)
399cd466d0
bpo-45022: Pin current libffi build to fixed version in preparation for upcoming update (GH-27982)
Also improve the build script for libffi, which is not used as part of the regular build.
(cherry picked from commit 969ae7f735)

Co-authored-by: Steve Dower <steve.dower@python.org>
2021-08-27 09:28:30 -07:00
Miss Islington (bot)
2351ff2c8f
Fix typo in a comment in Modules/_ssl.c: s/validata/validate/ (GH-27993) (GH-27998)
(cherry picked from commit 28db1f61f2)

Co-authored-by: Adam Dangoor <adamdangoor@gmail.com>
2021-08-27 13:59:23 +02:00
Miss Islington (bot)
9500dd5144
bpo-44997: macOS does not support loadable SQLite extensions (GH-27979) (GH-27995)
Authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
(cherry picked from commit 2ec9428e35)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-08-27 13:36:17 +02:00
Miss Islington (bot)
02437641d2
bpo-45018: Fix rangeiter_reduce in rangeobject.c (GH-27938) (GH-27991)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 94a3d2a632)

Co-authored-by: chilaxan <chilaxan@gmail.com>
2021-08-27 12:52:07 +02:00
Miss Islington (bot)
f1e3fc4631
bpo-40635: Fix getfqdn() docstring and docs (GH-27971)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit fdcb675eed)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2021-08-26 12:55:22 -07:00
Miss Islington (bot)
970533e65c
[3.9] bpo-45011: Fix test_asyncio without C module _asyncio (GH-27968) (GH-27970)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 7dc505b865)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-08-26 19:56:50 +02:00
Miss Islington (bot)
2cdbd3b8b2
bpo-45001: Make email date parsing more robust against malformed input (GH-27946) (GH-27973)
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 989f6a3800)

Co-authored-by: wouter bolsterlee <wouter@bolsterl.ee>
2021-08-26 17:48:20 +02:00
Miss Islington (bot)
46970fdd8d
bpo-45003: Change __div__ to __truediv__ in py3 language reference. (GH-27951) (GH-27962)
(cherry picked from commit 806e25fd31)

Co-authored-by: Objectivitix <79152594+Objectivitix@users.noreply.github.com>
2021-08-26 10:03:18 +03:00
Erlend Egeberg Aasland
0ec17a2494
[3.9] bpo-43853: Amend NEWS entry for latest changes in sqlite3 (GH-27922) (GH-27952)
(cherry picked from commit 7903a10963)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-08-25 20:26:28 +01:00
Erlend Egeberg Aasland
52702e8ba0
[3.9] bpo-27334: roll back transaction if sqlite3 context manager fails to commit (GH-26202) (GH-27944) 2021-08-25 20:02:25 +01:00
Miss Islington (bot)
9d3b6b2472
[3.9] bpo-34990: Treat the pyc header's mtime in compileall as an unsigned int (GH-19708)
(cherry picked from commit bb21e28fd0)

Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
2021-08-24 11:07:31 -04:00
Miss Islington (bot)
834a2eb945
[doc] Fix typo c-api/exceptions.rst (GH-27847) (GH-27919)
Co-authored-by: Tianqing Peng <pengtianqing@yimian.com.cn>
(cherry picked from commit dcbf7ff6a7)

Co-authored-by: Sunny Bean <ptq008@gmail.com>
2021-08-23 22:09:52 +02:00
Miss Islington (bot)
28de5622ab
[doc] Added mailing list link for comp.lang.python (GH-27852) (GH-27916)
(cherry picked from commit 7b550dfce6)

Co-authored-by: Mike Smith <mikesmith@screamingjoypad.com>
2021-08-23 21:24:12 +02:00
Miss Islington (bot)
de49eacee8
bpo-44980: fix test_constructor to return None value (GH-27898) (GH-27914)
(cherry picked from commit 27b761a11a)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2021-08-23 21:20:29 +02:00
Łukasz Langa
b0df288c94
[3.9] bpo-44984: Rewrite test_null_strings in _testcapi (GH-27904) (GH-27910)
Test also PyObject_Repr(NULL) and PyObject_Bytes(NULL)..
(cherry picked from commit 4d68917386)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-08-23 20:48:04 +02:00
Miss Islington (bot)
7543e7fc26
[doc] Fix typo in idle.rst (GH-27903)
intially -> initially
(cherry picked from commit 0e8695ece0)

Co-authored-by: Ikko Ashimine <eltociear@gmail.com>
2021-08-23 10:57:05 -07:00
Łukasz Langa
ac87b07a10
[3.9] bpo-4442: Document use of __new__ for subclasses of immutable types (GH-27866) (GH-27900)
(cherry picked from commit eec340ea3a)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2021-08-22 22:14:25 +02:00
Łukasz Langa
c579f0ba62
[3.9] bpo-42560: rework external references in Tkinter docs (GH-27838) (GH-27896)
- 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 d1049d1d6b)

Co-authored-by: Mark Roseman <mark@markroseman.com>
2021-08-22 21:06:06 +02:00
Miss Islington (bot)
986750be5c
bpo-42560: reorganize Tkinter docs modules section for clarity (GH-27840) (GH-27895)
- 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 d5dbe8bca7)

Co-authored-by: Mark Roseman <mark@markroseman.com>
2021-08-22 21:05:46 +02:00
Miss Islington (bot)
e74cf8667d
bpo-42560: tweaks to intro of Tkinter docs- add macOS, drop ActiveState (GH-27835) (GH-27892)
(cherry picked from commit 141c7a4fce)

Co-authored-by: Mark Roseman <mark@markroseman.com>
2021-08-22 21:02:12 +02:00
Miss Islington (bot)
d006392245
bpo-44940: Clarify the documentation of re.findall() (GH-27849) (GH-27880)
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 64f9e7b19d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-08-22 21:15:38 +03:00
Miss Islington (bot)
4e5162fd36
bpo-44955: Always call stopTestRun() for implicitly created TestResult objects (GH-27831) (GH-27882)
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 a9640d7553)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-08-22 21:15:10 +03:00
Miss Islington (bot)
407b3e0bb0
bpo-44966: Fix out-of-date traceback message (GH-27867) (GH-27876) 2021-08-21 19:36:54 -05:00
Miss Islington (bot)
d5781e9730
bpo-44968: Fix test_subprocess_wait_no_same_group in test_asyncio (GH-27870)
The code of the test was never executed because the test function
was unintentionally converted to a generator function.
(cherry picked from commit 585390fdd8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-08-21 13:29:18 -07:00
Miss Islington (bot)
7ef0673de4
bpo-44954: Fix wrong result in float.fromhex corner case (GH-27834) (GH-27855)
(cherry picked from commit 60b93d9e49)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
2021-08-20 12:37:41 +01:00
Miss Islington (bot)
0215257c61
bpo-44949: Fix test_readline auto history tests (GH-27813) (GH-27822)
(cherry picked from commit 6fb62b42f4)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-08-19 12:35:28 +02:00
Miss Islington (bot)
98820250a3
bpo-36384: [doc] Mention CVE-2021-29921 fix in 3.8.12 (GH-27824) (GH-27827)
(cherry picked from commit 0fd66e46b2)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-08-19 11:20:47 +02:00
Miss Islington (bot)
fb6074f5d7
bpo-44830: [doc] Restore missing Mozilla devguide link (GH-27818) (GH-27821)
(cherry picked from commit 942d1a4284)

Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
2021-08-19 10:36:55 +02:00
Łukasz Langa
4e4d35d332
[3.9] bpo-44947: Refine the syntax error for trailing commas in import statements (GH-27814) (GH-27817)
(cherry picked from commit b2f68b1900)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-08-18 23:03:59 +02:00
Sam Bull
b2779b2aa1
[3.9] bpo-44815: Always show deprecation in asyncio.gather/sleep() (GH-27569)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-08-18 20:47:55 +02:00
Miss Islington (bot)
ebe7e6d86c
bpo-44852: Support filtering over warnings without a set message (GH-27793) (GH-27810)
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 8cf07d3db3)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-08-18 14:10:39 +02:00
Miss Islington (bot)
e2320c6a34
bpo-44508: [Doc] Document failure mode for loop.call_soon_threadsafe (GH-27688) (GH-27805)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 3240bc62f4)

Co-authored-by: meowmeowmeowcat <meowmeowcat1211@gmail.com>
2021-08-18 01:18:22 +02:00
Miss Islington (bot)
1bc05419b8
introduce omitted index default before using it (GH-27775) (GH-27803)
(cherry picked from commit 599f5c8481)

Co-authored-by: Jefferson Oliveira <jefferson.dev.insights@gmail.com>
2021-08-17 23:49:53 +02:00
Miss Islington (bot)
beb3a835da
bpo-44698: Restore complex pow behaviour for small integral exponents (GH-27772) (GH-27797)
(cherry picked from commit 4b9a2dcf19)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
2021-08-17 18:38:39 +01:00
Miss Islington (bot)
e21b66b044
bpo-44903: Removed othergui.rst and list of GUI frameworks (GH-27762) (GH-27790)
(cherry picked from commit 6a358bb948)

Co-authored-by: Gautam Chaudhuri <gautam.chaudhuri.1803@gmail.com>
2021-08-17 12:09:09 +02:00
Łukasz Langa
27fd313110
[3.9] bpo-38956: don't print BooleanOptionalAction's default twice (GH-27672) (GH-27788)
Co-authored-by: Micky Yun Chan <michan@redhat.com>.
(cherry picked from commit 1512bc21d6)

Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2021-08-17 11:17:00 +02:00
Łukasz Langa
c7c4cbc58e
[3.9] bpo-44852: Support ignoring specific DeprecationWarnings wholesale in regrtest (GH-27634) (GH-27785)
(cherry picked from commit a0a6d39295)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-08-16 22:47:08 +02:00
Miss Islington (bot)
43bab0537c
bpo-44907: Update error messages in tutorial examples (GH-27755)
(cherry picked from commit ed524b4569)

Co-authored-by: meowmeowmeowcat <meowmeowcat1211@gmail.com>
2021-08-13 20:25:38 -04:00
Pablo Galindo Salgado
282fc5c007
[3.9] Fix the test suite for the old parser (GH-27749)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-08-13 12:26:07 +02:00
Pablo Galindo Salgado
4b86c9c514
[3.9] bpo-44885: Correct the ast locations of f-strings with format specs and repeated expressions (GH-27729) (GH-27744)
(cherry picked from commit 8e832fb2a2)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-08-12 18:46:35 +01:00
Miss Islington (bot)
f7635f0e54
[3.9] bpo-33930: Fix typo in the test name. (GH-27733) (GH-27734)
[bpo-33930](): Fix typo in the test name. (GH-27733)
(cherry picked from commit f08e6d1bb3)


Co-authored-by: Benjamin Peterson <benjamin@python.org>

Automerge-Triggered-By: GH:benjaminp
2021-08-11 19:20:21 -07:00
Miss Islington (bot)
8c93a63c03
Add .DS_Store on ignore (GH-27711) (GH-27724)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 1841c70f2b)

Co-authored-by: 180909 <wjh180909@gmail.com>
2021-08-11 13:09:43 +02:00
Miss Islington (bot)
15f0a45b28
bpo-33930: Fix segfault with deep recursion when cleaning method objects (GH-27678) (GH-27720)
(cherry picked from commit bfc2d5a5c4)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-08-11 10:32:24 +02:00
Miss Islington (bot)
d27e2f4d11
bpo-44854: Add .editorconfig file to help enforce make patchcheck (GH-27638) (GH-27714)
(cherry picked from commit c0ab59f7de)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-08-10 19:22:15 +02:00
Miss Islington (bot)
897c87045c
bpo-14853: add back the stdin test, skip if stdin is redirected (GH-27694) (GH-27698)
(cherry picked from commit 8ed1833912)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2021-08-10 15:09:42 +02:00
Miss Islington (bot)
6f4cdeddb9
bpo-25782: avoid hang in PyErr_SetObject when current exception has a cycle in its context chain (GH-27626) (GH-27707)
Co-authored-by: Dennis Sweeney 36520290+sweeneyde@users.noreply.github.com
(cherry picked from commit d5c217475c)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2021-08-10 13:08:41 +02:00
Miss Islington (bot)
c7dfbd2f41
bpo-33479: Remove unqualified tkinter threadsafe claim. (GH-6990) (GH-27705)
It has not been true for several years and likely never was.
(cherry picked from commit 6b37d0d530)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-08-10 11:58:05 +02:00
Miss Islington (bot)
0e63776c4f
make lib2to3 parse async generators everywhere (GH-6588) (GH-27703)
(cherry picked from commit 149addd496)

Co-authored-by: Zsolt Dollenstein <zsol.zsol@gmail.com>
2021-08-10 11:56:50 +02:00
Irit Katriel
ede1dc416d
bpo-44872: use new trashcan macros in framobject.c (GH-27683) (GH-27691) 2021-08-10 09:55:39 +02:00
Miss Islington (bot)
fcbe8c63d7
bpo-39498 Start linking the security warnings in the stdlib modules (GH-18272) (GH-27699)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit c5c5326d47)

Co-authored-by: Anthony Shaw <anthony.p.shaw@gmail.com>
2021-08-10 09:51:33 +02:00