summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* Python 3.9.3v3.9.3Łukasz Langa2021-04-021-4/+6
|
* bpo-37945: Fix test_locale.test_getsetlocale_issue1813() (GH-25110) (GH-25112)Miss Islington (bot)2021-03-311-1/+7
| | | | | | Skip the test if setlocale() fails. (cherry picked from commit f3ab670fea75ebe177e3412a5ebe39263cd428e3) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-42225: IDLE - document two unix-related problems. (GH-25078)Miss Islington (bot)2021-03-311-7/+20
| | | | | | | 1. Bad IP masquerade rules can prevent startup. 2. X cannot handle some complex colored chars. (cherry picked from commit 1b4a9c7956d5dc64f8002f62bf0faae2d1892f90) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-43399: Fix ElementTree.extend not working on iterators (GH-24751)Miss Islington (bot)2021-03-302-1/+4
| | | | | (cherry picked from commit 51a85ddce8b336addcb61b96f04c9c5edef07296) Co-authored-by: Alex Prengère <2138730+alexprengere@users.noreply.github.com>
* bpo-43660: Fix crash when displaying exceptions with custom values for ↵Miss Islington (bot)2021-03-291-0/+15
| | | | | | | | | sys.stderr (GH-25075) (GH-25083) (cherry picked from commit 09b90a037d18f5d4acdf1b14082e57bda78e85d3) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-43562: fix test_ssl to skip on unreachable network (GH-24937) (GH-25046)Miss Islington (bot)2021-03-291-0/+2
| | | | | | | | This test checks result code of the connection directly, so it never raises an exception that can be suppressed by `support.transient_internet`. Directly support skipping the test in case of unreachable network. (cherry picked from commit 29c451c6989c3c94fa0a9facf187c24f3cbf2420) Co-authored-by: Carl Meyer <carl@oddbird.net> Co-authored-by: Carl Meyer <carl@oddbird.net>
* bpo-43659: Fix test_curses on AIX (GH-25074)Miss Islington (bot)2021-03-291-0/+1
| | | | | | | | curses.update_lines_cols() is only defined when the curses library provides either resizeterm() or resize_term() functions which are optional and are not provided on AIX. (cherry picked from commit c8b5738810516df5722caf049003e9b319427bec) Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
* bpo-35930: Raising an exception raised in a "future" instance will create ↵Miss Islington (bot)2021-03-291-15/+23
| | | | | | | | | | | | reference cycles (GH-24995) (#25070) Before: https://lists.es.python.org/pipermail/general/attachments/20201229/0c14bc58/attachment-0002.png After: https://lists.es.python.org/pipermail/general/attachments/20201229/0c14bc58/attachment-0003.png (cherry picked from commit 32430aadadf6e012e39167d3c18a24e49fb84874) Co-authored-by: Jesús Cea <jcea@jcea.es> Co-authored-by: Jesús Cea <jcea@jcea.es>
* bpo-43433: Preserve query and fragment in the URL of the server in ↵Miss Islington (bot)2021-03-292-3/+43
| | | | | | | ServerProxy. (GH-25057) (cherry picked from commit c1b073a630bb731de18bb17afb2b8b1388b92a72) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-42988: Remove the pydoc getfile feature (GH-25015)Miss Islington (bot)2021-03-292-24/+0
| | | | | | | | | | CVE-2021-3426: Remove the "getfile" feature of the pydoc module which could be abused to read arbitrary files on the disk (directory traversal vulnerability). Moreover, even source code of Python modules can contain sensitive data like passwords. Vulnerability reported by David Schwörer. (cherry picked from commit 9b999479c0022edfc9835a8a1f06e046f3881048) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-43555: Report the column offset for invalid line continuation character ↵Miss Islington (bot)2021-03-221-0/+5
| | | | | | | | | (GH-24939) (#24975) (cherry picked from commit 96eeff516204b7cc751103fa33dcc665e387846e) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-43577: Fix deadlock with SSLContext._msg_callback and sni_callback ↵Miss Islington (bot)2021-03-211-0/+22
| | | | | | | | | | | | | | | (GH-24957) OpenSSL copies the internal message callback from SSL_CTX->msg_callback to SSL->msg_callback. SSL_set_SSL_CTX() does not update SSL->msg_callback to use the callback value of the new context. PySSL_set_context() now resets the callback and _PySSL_msg_callback() resets thread state in error path. Signed-off-by: Christian Heimes <christian@python.org> (cherry picked from commit 77cde5042a2f1eae489c11a67540afaf43cd5cdf) Co-authored-by: Christian Heimes <christian@python.org>
* [3.9] bpo-43517: Fix false positive in detection of circular imports ↵Antoine Pitrou2021-03-203-1/+78
| | | | | | | | | (GH-24895) (GH-24948) (cherry picked from commit 2fd16ef406bba239b1334057fb499496a84b3aa2) Co-authored-by: Antoine Pitrou <antoine@python.org> Automerge-Triggered-By: GH:pitrou
* bpo-43521: Allow ast.unparse with empty sets and NaN (GH-24897)Miss Islington (bot)2021-03-182-9/+26
| | | | | | Automerge-Triggered-By: GH:pablogsal (cherry picked from commit 08ff4369afca84587b1c82034af4e9f64caddbf2) Co-authored-by: Kodi Arfer <Kodiologist@users.noreply.github.com>
* bpo-41561: Add workaround for Ubuntu's custom security level (GH-24915)Miss Islington (bot)2021-03-181-0/+29
| | | | | | | | | | | | | Ubuntu 20.04 comes with a patched OpenSSL 1.1.1. Default security level 2 blocks TLS 1.0 and 1.1 connections. Regular OpenSSL 1.1.1 builds allow TLS 1.0 and 1.1 on security level 2. See: See: https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/1899878 See: https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/1917625 Signed-off-by: Christian Heimes <christian@python.org> (cherry picked from commit f6c6b5821bff815bdc810de53992fd1fbdb2edd4) Co-authored-by: Christian Heimes <christian@python.org>
* bpo-35883: Py_DecodeLocale() escapes invalid Unicode characters (GH-24843)Miss Islington (bot)2021-03-171-26/+60
| | | | | | | | | | | | | Python no longer fails at startup with a fatal error if a command line argument contains an invalid Unicode character. The Py_DecodeLocale() function now escapes byte sequences which would be decoded as Unicode characters outside the [U+0000; U+10ffff] range. Use MAX_UNICODE constant in unicodeobject.c. (cherry picked from commit 9976834f807ea63ca51bc4f89be457d734148682) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-43285 Make ftplib not trust the PASV response. (GH-24838)Miss Islington (bot)2021-03-152-3/+35
| | | | | | | | | | | | | | | | | | bpo-43285: Make ftplib not trust the PASV response. The IPv4 address value returned from the server in response to the PASV command should not be trusted. This prevents a malicious FTP server from using the response to probe IPv4 address and port combinations on the client network. Instead of using the returned address, we use the IP address we're already connected to. This is the strategy other ftp clients adopted, and matches the only strategy available for the modern IPv6 EPSV command where the server response must return a port number and nothing else. For the rare user who _wants_ this ugly behavior, set a `trust_server_pasv_ipv4_address` attribute on your `ftplib.FTP` instance to True. (cherry picked from commit 0ab152c6b5d95caa2dc1a30fa96e10258b5f188e) Co-authored-by: Gregory P. Smith <greg@krypto.org>
* Update client.py (GH-24827)Miss Islington (bot)2021-03-131-3/+0
| | | | | (cherry picked from commit b6884ad2688451dd3cbc5984b23da5840e1b6df8) Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
* bpo-27820: Fix AUTH LOGIN logic in smtplib.SMTP (GH-24118) (#24832)Miss Islington (bot)2021-03-132-3/+57
| | | | | | | | | * Fix auth_login logic (bpo-27820) * Also fix a longstanding bug in the SimSMTPChannel.found_terminator() method that causes inability to test SMTP AUTH with initial_response_ok=False. (cherry picked from commit 7591d9455eb37525c832da3d65e1a7b3e6dbf613) Co-authored-by: Pandu E POLUAN <pepoluan@gmail.com>
* [3.9] bpo-43353: Document that logging.getLevelName() accepts string ↵Mariusz Felisiak2021-03-121-2/+6
| | | | | | | representation of logging level. (GH-24693) (GH-24826) (cherry picked from commit bbba28212ce0f58096a4043f32442c6e727b74fc) Automerge-Triggered-By: GH:vsajip
* bpo-43423 Fix IndexError in subprocess _communicate function (GH-24777)Miss Islington (bot)2021-03-121-4/+2
| | | | | | | | Check to make sure stdout and stderr are not empty before selecting an item from them in Windows subprocess._communicate. Co-authored-by: Gregory P. Smith <greg@krypto.org> (cherry picked from commit b4fc44bb2d209182390b4f9fdf074a46b0165a2f) Co-authored-by: Chris Griffith <chris@cdgriffith.com>
* bpo-43406: Fix test_signal.test_stress_modifying_handlers() (GH-24815) ↵Miss Islington (bot)2021-03-101-3/+13
| | | | | | | | | | | | | | (GH-24817) Fix a race condition of test_stress_modifying_handlers() of test_signal: only raise signals while we are in the catch_unraisable_exception() context manager. Moreover, don't check if we received at least one signal if at least one signal got ignored. (cherry picked from commit 1fa17e8cc62775a2e34b158135ce8589f9394f03) Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.9] bpo-43439: Add audit hooks for gc functions (GH-24794). (GH-24811)Pablo Galindo2021-03-102-0/+31
| | | | | (cherry picked from commit b4f9089d4aa787c5b74134c98e5f0f11d9e63095) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-43332: Buffer proxy connection setup packets before sending. (GH-24780)Miss Islington (bot)2021-03-082-10/+29
| | | | | | | | We now buffer the CONNECT request + tunnel HTTP headers into a single send call. This prevents the OS from generating multiple network packets for connection setup when not necessary, improving efficiency. (cherry picked from commit c25910a135c2245accadb324b40dd6453015e056) Co-authored-by: Gregory P. Smith <greg@krypto.org>
* [3.9] bpo-43406: Fix possible race condition where ``PyErr_CheckSignals`` ↵Miss Islington (bot)2021-03-061-0/+50
| | | | | | | | | tries to execute a non-Python signal handler (GH-24756) (GH-24761) We can receive signals (at the C level, in `trip_signal()` in signalmodule.c) while `signal.signal` is being called to modify the corresponding handler. Later when `PyErr_CheckSignals()` is called to handle the given signal, the handler may be a non-callable object and would raise a cryptic asynchronous exception. (cherry picked from commit 68245b7a1030287294c65c298975ab9026543fd2) Co-authored-by: Antoine Pitrou <antoine@python.org>
* [3.9] bpo-37193: Remove thread objects which finished process its request ↵Miss Islington (bot)2021-03-042-12/+62
| | | | | | | | | | | (GH-23127) (GH-24750) This reverts commit aca67da4fe68d5420401ac1782203d302875eb27. (cherry picked from commit b5711c940f70af89f2b4cf081a3fcd83924f3ae7) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com> Automerge-Triggered-By: GH:jaraco
* [3.9] bpo-42782: Fail fast for permission errors in shutil.move() (GH-24001) ↵Senthil Kumaran2021-03-032-0/+48
| | | | | | | | | | | | (#24725) * Fail fast in shutil.move() to avoid creating destination directories on failure. Co-authored-by: Zackery Spytz <zspytz@gmail.com> (cherry picked from commit 132131b404e06ee1a19b040a1f96cd1118abed0c) Co-authored-by: Winson Luk <winson.luk@gmail.com> Co-authored-by: Winson Luk <winson.luk@gmail.com>
* bpo-42500: Fix recursion in or after except (GH-23568) (#24501)Mark Shannon2021-03-022-41/+57
| | | | | * Use counter, rather boolean state when handling soft overflows. (cherry picked from commit 4e7a69bdb63a104587759d7784124492dcdd496e)
* bpo-43144: Mark unicodedata's test_normalization as requiring network (GH-24650)Miss Islington (bot)2021-02-261-0/+1
| | | | | | Co-authored-by: Arkadiusz Miśkiewicz <arekm@maven.pl> (cherry picked from commit c6ccdfb479cb0a4a491575ef0bafaa0d29daae1a) Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
* bpo-43316: gzip: Fix sys.exit() usage. (GH-24652)Miss Islington (bot)2021-02-262-2/+2
| | | | | (cherry picked from commit 9525a18b5bb317d9fb206c992ab62aa41559b0c8) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
* bpo-43316: gzip: CLI uses non-zero return code on error. (GH-24647)Miss Islington (bot)2021-02-262-6/+5
| | | | | | | Exit code is now 1 instead of 0. A message is printed to stderr instead of stdout. This is the proper behaviour for a tool that can be used in scripts. (cherry picked from commit cc3df6368d4f3f6c9c9b716876c7e7b79c7abf3f) Co-authored-by: Ruben Vorderman <r.h.p.vorderman@lumc.nl>
* [3.9] bpo-41841: revise header (GH-24634)Terry Jan Reedy2021-02-241-8/+3
|
* bpo-43283: Add IDLE doc paragraph about print speed (GH-24615)Miss Islington (bot)2021-02-242-1/+13
| | | | | | | | Printing to IDLE's Shell is often slower than printing to a system terminal, but it can be made faster by pre-formatting a single string before printing. (cherry picked from commit 2827e8a177c2a6584fada594bca6829c53a2872f) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-43260: io: Prevent large data remains in textio buffer. (GH-24592)Inada Naoki2021-02-221-0/+27
| | | | | | | | | When very large data remains in TextIOWrapper, flush() may fail forever. So prevent that data larger than chunk_size is remained in TextIOWrapper internal buffer. Co-Authored-By: Eryk Sun (cherry picked from commit 01806d5)
* [3.9] bpo-43288: Fix bug in test_importlib test. (GH-24616)Neil Schemenauer2021-02-211-0/+4
| | | | * bpo-43288: Fix bug in test_importlib test. (GH-24612) * Fix failed merge of bpo-43288. (GH-24614)
* bpo-43283: Rearrange some IDLE doc paragraphs. (GH-24604)Miss Islington (bot)2021-02-211-22/+22
| | | | | | | In the Running User Code section, gather together paragraphs about two processes and the sys.stdstream replacements, preparing to add another. (cherry picked from commit 4cf7bb8e22bf37e6d65bf4cb5618d09c4a8ad612) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.9] bpo-43272: Fix old parser test failures for backported grammar ↵Pablo Galindo2021-02-203-23/+33
| | | | constructs (GH-24591)
* Python 3.9.2v3.9.2Łukasz Langa2021-02-191-1/+1
|
* Python 3.9.2rc1v3.9.2rc1Łukasz Langa2021-02-161-65/+76
|
* [3.9] bpo-42967: only use '&' as a query string separator (GH-24297) (#24528)Senthil Kumaran2021-02-154-41/+98
| | | | | | | | | | | | | (cherry picked from commit fcbe0cb04d35189401c0c880ebfb4311e952d776) * [3.9] bpo-42967: only use '&' as a query string separator (GH-24297) bpo-42967: [security] Address a web cache-poisoning issue reported in urllib.parse.parse_qsl(). urllib.parse will only us "&" as query string separator by default instead of both ";" and "&" as allowed in earlier versions. An optional argument seperator with default value "&" is added to specify the separator. Co-authored-by: Éric Araujo <merwok@netwok.org> Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Co-authored-by: Adam Goldschmidt <adamgold7@gmail.com>
* bpo-43102: Set namedtuple __new__'s internal builtins to a dict. (GH-24439) ↵Miss Islington (bot)2021-02-052-1/+6
| | | | (GH-24452)
* Fix typo (GH-23019)Miss Islington (bot)2021-02-031-1/+1
| | | | | | Fixed possible typo in comment (cherry picked from commit bfe544d2f2c2e7a7c03a764bed3276a1e27a0f5c) Co-authored-by: Harry <harry.lees@gmail.com>
* bpo-41748: Handles unquoted attributes with commas (GH-24072)Miss Islington (bot)2021-02-012-37/+57
| | | | | | | | | | | | | | | | | | | | | * bpo-41748: Adds tests for unquoted attributes with comma * bpo-41748: Handles unquoted attributes with comma * bpo-41748: Addresses review comments * bpo-41748: Addresses review comments * Adds more test cases * Simplifies the regex for handling spaces * bpo-41748: Moves attributes tests under the right class * bpo-41748: Addresses review about duplicate attributes * bpo-41748: Adds NEWS.d entry for this patch (cherry picked from commit 9eb11a139fac5514d8456626806a68b3e3b7eafb) Co-authored-by: Karl Dubost <karl+github@la-grange.net>
* bpo-43016: Fix test_curses on platform without cursesw (GH-24405) (GH-24407)Miss Islington (bot)2021-02-011-5/+23
| | | | | | (cherry picked from commit a1e9a1e120a11c563e166c15721169184c802f8b) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-42504: Ensure that get_config_var('MACOSX_DEPLOYMENT_TARGET') is a ↵Miss Islington (bot)2021-02-014-5/+17
| | | | | | | | string (GH-24341) (GH-24410) * bpo-42504: Ensure that get_config_var('MACOSX_DEPLOYMENT_TARGET') is a string (cherry picked from commit 49926cf2bcc8b44d9b8f148d81979ada191dd9d5) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
* [3.9] bpo-43016: Rewrite tests for curses (GH-24312). (GH-24399)Serhiy Storchaka2021-01-311-214/+783
| | | | (cherry picked from commit d64fd4bb5bb4fd2e3277f39d3ad99b5a8d193e1b)
* bpo-43008: Add 'Patch by Ken Hilton' (GH-24370) (#24374)Miss Islington (bot)2021-01-291-1/+1
| | | | (cherry picked from commit 11d75ec807f05eff1148c049e38b808d11c23b8a) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-23544: Disable IDLE Stack Viewer when running user code (GH-17163)Miss Islington (bot)2021-01-285-5/+35
| | | | | | | | Starting stack viewer when user code is running, including when Debugger is active, hangs or crashes IDLE. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> (cherry picked from commit 23a567c11ca36eedde0e119443c85cc16075deaf) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-43008: Make IDLE respect sys.excepthook (GH-24302)Miss Islington (bot)2021-01-273-12/+61
| | | | | | Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> (cherry picked from commit 7a34380ad788886f5ad50d4175ceb2d5715b8cff) Co-authored-by: Ken <kenny2minecraft@gmail.com>
* [3.9] bpo-41841: Prepare IDLE NEWS for 3.9.2 (#GH-4343)Terry Jan Reedy2021-01-261-2/+7
|