summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Python 3.9.7v3.9.7Łukasz Langa2021-08-3094-209/+984
|
* [3.9] bpo-43913: Fix bugs in cleaning up classes and modules in unittest. ↵Serhiy Storchaka2021-08-304-69/+719
| | | | | | | | | | | | | | | | | | | (GH-28006) (GH-28071) * 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>
* bpo-44449: faulthandler don't modify frame refcnt (GH-27850)Miss Islington (bot)2021-08-302-5/+7
| | | | | | | Fix a crash in the signal handler of the faulthandler module: no longer modify the reference count of frame objects. (cherry picked from commit fe997e1a67835a929705c8c305d41c4d7dd326e3) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-41620: TestCase.run() now always return a TestResult instance (GH-28030) ↵Miss Islington (bot)2021-08-303-24/+34
| | | | | | | | | | | (GH-28065) 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>
* [3.9] bpo-45007: Update multissl to openssl 1.1.1l as well (GH-28044) (GH-28062)Christian Heimes2021-08-301-2/+2
| | | | | | This was missed while upgrading CI.. (cherry picked from commit d6cb5dd9e19210f5963ff8beadde7ca2fda71574) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-44689: ctypes.util.find_library() now finds macOS 11+ system libraries ↵Miss Islington (bot)2021-08-302-3/+31
| | | | | | | | when built on older macOS systems (GH-27251) (GH-28053) 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>
* bpo 45007: Update macOS installer builds to use OpenSSL 1.1.1l. (GH-28051)Miss Islington (bot)2021-08-303-3/+64
| | | | | (cherry picked from commit 94b2639fad50d7ff8acd12c11e5fe5f9a6e1da5c) Co-authored-by: Ned Deily <nad@python.org>
* [3.9] bpo-45007: Update to OpenSSL 1.1.1l in Windows build and CI (GH-28009) ↵Łukasz Langa2021-08-296-22/+23
| | | | | | | (GH-28040) (cherry picked from commit d3bdbbf9a4352a24fc2bfc7a63a024b244b61aba) Co-authored-by: Steve Dower <steve.dower@python.org>
* bpo-43124: Fix smtplib multiple CRLF injection (GH-25987) (GH-28035)Miss Islington (bot)2021-08-293-3/+65
| | | | | | Co-authored-by: Łukasz Langa <lukasz@langa.pl> (cherry picked from commit 0897253f426068ea6a6fbe0ada01689af9ef1019) Co-authored-by: Miguel Brito <5544985+miguendes@users.noreply.github.com>
* bpo-44394: Update libexpat copy to 2.4.1 (GH-26945) (GH-28032)Miss Islington (bot)2021-08-2922-191/+1389
| | | | | | | | | | 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>
* bpo-42278: Use tempfile.TemporaryDirectory rather than tempfile.mktemp in ↵Miss Islington (bot)2021-08-292-6/+9
| | | | | | | | pydoc (GH-23200) (GH-28025) 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>
* [3.9] bpo-25130: Add calls of gc.collect() in tests to support PyPy ↵Serhiy Storchaka2021-08-2936-15/+143
| | | | | | (GH-28005). (GH-28028) (cherry picked from commit 2a8127cafe1d196f858a3ecabf5f1df3eebf9a12)
* [3.9] bpo-25130: Make SQLite tests more compatible with PyPy (GH-28021) ↵Serhiy Storchaka2021-08-293-3/+7
| | | | | | (GH-28023) (cherry picked from commit 07d3d54)
* [3.9] bpo-25130: Make unit-test about restricting the maximum number of ↵Serhiy Storchaka2021-08-281-32/+36
| | | | | | | | | | | | nested blocks cpython-only (GH-28002) (GH-28017) PyPy and potentially other implementations have different or no contraints on the number of blocks that can be statically nested. move the test that checks for this behaviour into a unit test and mark it as CPython-only.. (cherry picked from commit eb263f9a356f5c5f21b8d5ce20bac92f31c40cad) Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>
* bpo-44962: Fix a race in WeakKeyDict, WeakValueDict and WeakSet when two ↵Miss Islington (bot)2021-08-283-12/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | threads attempt to commit the last pending removal (GH-27921) (GH-28014) 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>
* bpo-45022: Pin current libffi build to fixed version in preparation for ↵Miss Islington (bot)2021-08-273-9/+17
| | | | | | | | 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 969ae7f7356584e30667b4e490ffa2ffa1810429) Co-authored-by: Steve Dower <steve.dower@python.org>
* Fix typo in a comment in Modules/_ssl.c: s/validata/validate/ (GH-27993) ↵Miss Islington (bot)2021-08-271-1/+1
| | | | | | | (GH-27998) (cherry picked from commit 28db1f61f20352c02e4ae1518e5aeb6505df3045) Co-authored-by: Adam Dangoor <adamdangoor@gmail.com>
* bpo-44997: macOS does not support loadable SQLite extensions (GH-27979) ↵Miss Islington (bot)2021-08-271-0/+2
| | | | | | | | (GH-27995) Authored-by: Ronald Oussoren <ronaldoussoren@mac.com> (cherry picked from commit 2ec9428e3516b6e7c6583687aa3b39fb96925577) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-45018: Fix rangeiter_reduce in rangeobject.c (GH-27938) (GH-27991)Miss Islington (bot)2021-08-273-17/+33
| | | | | | Co-authored-by: Łukasz Langa <lukasz@langa.pl> (cherry picked from commit 94a3d2a6329ab7941e93ad2f5bcbb8af2b8b80d2) Co-authored-by: chilaxan <chilaxan@gmail.com>
* bpo-40635: Fix getfqdn() docstring and docs (GH-27971)Miss Islington (bot)2021-08-262-4/+6
| | | | | | Co-authored-by: Łukasz Langa <lukasz@langa.pl> (cherry picked from commit fdcb675eed47b1f6054fae381af4388b16a6fff4) Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
* [3.9] bpo-45011: Fix test_asyncio without C module _asyncio (GH-27968) ↵Miss Islington (bot)2021-08-266-7/+14
| | | | | | | | (GH-27970) Co-authored-by: Łukasz Langa <lukasz@langa.pl> (cherry picked from commit 7dc505b8655b3e48b93a4274dfd26e5856d9c64f) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-45001: Make email date parsing more robust against malformed input ↵Miss Islington (bot)2021-08-263-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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 989f6a3800f06b2bd31cfef7c3269a443ad94fac) Co-authored-by: wouter bolsterlee <wouter@bolsterl.ee>
* bpo-45003: Change __div__ to __truediv__ in py3 language reference. ↵Miss Islington (bot)2021-08-261-1/+1
| | | | | | | | (GH-27951) (GH-27962) (cherry picked from commit 806e25fd3173a80021e6df87b81263b5f6056f38) Co-authored-by: Objectivitix <79152594+Objectivitix@users.noreply.github.com>
* [3.9] bpo-43853: Amend NEWS entry for latest changes in sqlite3 (GH-27922) ↵Erlend Egeberg Aasland2021-08-251-3/+7
| | | | | | | (GH-27952) (cherry picked from commit 7903a1096343d8018e889029f025d39bdd077170) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* [3.9] bpo-27334: roll back transaction if sqlite3 context manager fails to ↵Erlend Egeberg Aasland2021-08-253-12/+102
| | | | commit (GH-26202) (GH-27944)
* [3.9] bpo-34990: Treat the pyc header's mtime in compileall as an unsigned ↵Miss Islington (bot)2021-08-244-11/+35
| | | | | | | | 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>
* [doc] Fix typo c-api/exceptions.rst (GH-27847) (GH-27919)Miss Islington (bot)2021-08-231-1/+1
| | | | | | Co-authored-by: Tianqing Peng <pengtianqing@yimian.com.cn> (cherry picked from commit dcbf7ff6a700b63e637a0445d68866670a398024) Co-authored-by: Sunny Bean <ptq008@gmail.com>
* [doc] Added mailing list link for comp.lang.python (GH-27852) (GH-27916)Miss Islington (bot)2021-08-231-1/+2
| | | | | (cherry picked from commit 7b550dfce64bd134c5604fd1f2d4c43ae2b669e4) Co-authored-by: Mike Smith <mikesmith@screamingjoypad.com>
* bpo-44980: fix test_constructor to return None value (GH-27898) (GH-27914)Miss Islington (bot)2021-08-231-1/+1
| | | | | (cherry picked from commit 27b761a11a14521617a01257eb3767150bec3a74) Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
* [3.9] bpo-44984: Rewrite test_null_strings in _testcapi (GH-27904) (GH-27910)Łukasz Langa2021-08-232-8/+28
| | | | | | Test also PyObject_Repr(NULL) and PyObject_Bytes(NULL).. (cherry picked from commit 4d689173861257c69adc6dc1dca4171946ddb57f) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [doc] Fix typo in idle.rst (GH-27903)Miss Islington (bot)2021-08-231-1/+1
| | | | | | intially -> initially (cherry picked from commit 0e8695ece0d3569eeb1b89c91a1b0aa3d34f228e) Co-authored-by: Ikko Ashimine <eltociear@gmail.com>
* [3.9] bpo-4442: Document use of __new__ for subclasses of immutable types ↵Łukasz Langa2021-08-221-0/+48
| | | | | | | (GH-27866) (GH-27900) (cherry picked from commit eec340ea3af27887fcaac4029ebdee99f3713bff) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
* [3.9] bpo-42560: rework external references in Tkinter docs (GH-27838) ↵Łukasz Langa2021-08-221-32/+19
| | | | | | | | | | | | | | | (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 d1049d1d6b43296d4db1aa8668aa4ca807bf7adb) Co-authored-by: Mark Roseman <mark@markroseman.com>
* bpo-42560: reorganize Tkinter docs modules section for clarity (GH-27840) ↵Miss Islington (bot)2021-08-221-17/+36
| | | | | | | | | | (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 d5dbe8bca792350f4997c027535e0ca498abd1bb) Co-authored-by: Mark Roseman <mark@markroseman.com>
* bpo-42560: tweaks to intro of Tkinter docs- add macOS, drop ActiveState ↵Miss Islington (bot)2021-08-221-3/+2
| | | | | | | (GH-27835) (GH-27892) (cherry picked from commit 141c7a4fce8def67baa9d24f542c105b8502893e) Co-authored-by: Mark Roseman <mark@markroseman.com>
* bpo-44940: Clarify the documentation of re.findall() (GH-27849) (GH-27880)Miss Islington (bot)2021-08-221-4/+14
| | | | | | | | 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>
* bpo-44955: Always call stopTestRun() for implicitly created TestResult ↵Miss Islington (bot)2021-08-223-53/+104
| | | | | | | | | | | | 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 a9640d75531d6cbbfd254b65435f238c26bf5cd9) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-44966: Fix out-of-date traceback message (GH-27867) (GH-27876)Miss Islington (bot)2021-08-221-1/+1
|
* bpo-44968: Fix test_subprocess_wait_no_same_group in test_asyncio (GH-27870)Miss Islington (bot)2021-08-211-1/+2
| | | | | | | 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>
* bpo-44954: Fix wrong result in float.fromhex corner case (GH-27834) (GH-27855)Miss Islington (bot)2021-08-203-2/+18
| | | | | (cherry picked from commit 60b93d9e4922eeae25052bc15909d1f4152babde) Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
* bpo-44949: Fix test_readline auto history tests (GH-27813) (GH-27822)Miss Islington (bot)2021-08-192-2/+8
| | | | | (cherry picked from commit 6fb62b42f4db56ed5efe0ca4c1059049276c1083) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-36384: [doc] Mention CVE-2021-29921 fix in 3.8.12 (GH-27824) (GH-27827)Miss Islington (bot)2021-08-192-0/+18
| | | | | (cherry picked from commit 0fd66e46b2f472d0d206a185dc8892f4f0347cb6) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-44830: [doc] Restore missing Mozilla devguide link (GH-27818) (GH-27821)Miss Islington (bot)2021-08-191-0/+4
| | | | | (cherry picked from commit 942d1a4284e9341df47c48d7c63e921136dc9719) Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
* [3.9] bpo-44947: Refine the syntax error for trailing commas in import ↵Łukasz Langa2021-08-184-6/+18
| | | | | | | statements (GH-27814) (GH-27817) (cherry picked from commit b2f68b190035540872072ac1d2349e7745e85596) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* [3.9] bpo-44815: Always show deprecation in asyncio.gather/sleep() (GH-27569)Sam Bull2021-08-183-12/+45
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-44852: Support filtering over warnings without a set message (GH-27793) ↵Miss Islington (bot)2021-08-181-4/+5
| | | | | | | | | | | | | | | (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 8cf07d3db3eed02b43350a5f9dbf68f1c839ea82) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-44508: [Doc] Document failure mode for loop.call_soon_threadsafe ↵Miss Islington (bot)2021-08-171-0/+4
| | | | | | | | (GH-27688) (GH-27805) Co-authored-by: Łukasz Langa <lukasz@langa.pl> (cherry picked from commit 3240bc62f4e0afa09964f3afc845697f0a0806b9) Co-authored-by: meowmeowmeowcat <meowmeowcat1211@gmail.com>
* introduce omitted index default before using it (GH-27775) (GH-27803)Miss Islington (bot)2021-08-171-8/+8
| | | | | (cherry picked from commit 599f5c8481ca258ca3a5d13eaee7d07a9103b5f2) Co-authored-by: Jefferson Oliveira <jefferson.dev.insights@gmail.com>
* bpo-44698: Restore complex pow behaviour for small integral exponents ↵Miss Islington (bot)2021-08-173-21/+37
| | | | | | | (GH-27772) (GH-27797) (cherry picked from commit 4b9a2dcf19e5d13c3bc2afea2de1f65cd994c699) Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
* bpo-44903: Removed othergui.rst and list of GUI frameworks (GH-27762) (GH-27790)Miss Islington (bot)2021-08-174-148/+13
| | | | | (cherry picked from commit 6a358bb9482f7595b858ea7b800cbe66f0de5fa1) Co-authored-by: Gautam Chaudhuri <gautam.chaudhuri.1803@gmail.com>