summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* bpo-43417: Better buffer handling for ast.unparse (GH-24772)Batuhan Taskaya2021-05-082-65/+86
|
* bpo-43149: Correct the syntax error message for multiple exception types ↵Pablo Galindo2021-05-081-5/+5
| | | | | (GH-25996) Automerge-Triggered-By: GH:pablogsal
* bpo-31904: Correct error string in test_file_not_exists() for VxWorks (GH-25965)pxinwr2021-05-081-1/+1
| | | The error string on VxWorks is "no such file or directory" for FileNotFoundError. That is, the 1st letter of the error string has lower case.
* Do not use Py_ssize_clean_t (GH-25940)Inada Naoki2021-05-081-28/+24
|
* bpo-44026: Idle - display interpreter's 'did you mean' hints (GH-25912)E-Paine2021-05-073-5/+61
| | | | | | | A C function accessible by the default exception handler, but not by python code, finds the existing name closest to the name causing a name or attribute error. For such errors, call the default handler after capturing stderr and retrieve its message line. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-44063: set the missing end locations on the compiler (GH-25956)Batuhan Taskaya2021-05-071-0/+7
|
* bpo-41730: Show deprecation warnings for tkinter.tix (GH-22186)wyz23x22021-05-072-6/+18
| | | | Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com> Co-authored-by: Zachary Ware <zach@python.org>
* bpo-40222: "Zero cost" exception handling (GH-25729)Mark Shannon2021-05-079-132/+193
| | | | | | | | "Zero cost" exception handling. * Uses a lookup table to determine how to handle exceptions. * Removes SETUP_FINALLY and POP_TOP block instructions, eliminating (most of) the runtime overhead of try statements. * Reduces the size of the frame object by about 60%.
* bpo-44029: Remove Py_UNICODE APIs (GH-25881)Inada Naoki2021-05-071-34/+0
| | | | | | | | | | | | Remove deprecated `Py_UNICODE` APIs: `PyUnicode_Encode`, `PyUnicode_EncodeUTF7`, `PyUnicode_EncodeUTF8`, `PyUnicode_EncodeUTF16`, `PyUnicode_EncodeUTF32`, `PyUnicode_EncodeLatin1`, `PyUnicode_EncodeMBCS`, `PyUnicode_EncodeDecimal`, `PyUnicode_EncodeRawUnicodeEscape`, `PyUnicode_EncodeCharmap`, `PyUnicode_EncodeUnicodeEscape`, `PyUnicode_TransformDecimalToASCII`, `PyUnicode_TranslateCharmap`, `PyUnicodeEncodeError_Create`, `PyUnicodeTranslateError_Create`. See :pep:`393` and :pep:`624` for reference.
* bpo-40943: Fix skipitem() didn't raise SystemError (GH-25937)Inada Naoki2021-05-071-0/+7
| | | | `convertitem()` raises `SystemError` when '#' is used without `PY_SSIZE_T_CLEAN`. This commit makes `skipitem()` raise it too.
* bpo-43972: Set content-length to 0 for http.server.SimpleHTTPRequestHandler ↵Stephen Rosen2021-05-062-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 301s (GH-25705) * Set content-length for simple http server 301s When http.server.SimpleHTTPRequestHandler sends a 301 (Moved Permanently) due to a missing file, it does not set a Content-Length of 0. Unfortunately, certain clients can be left waiting for the connection to be closed in this circumstance, even though no body will be sent. At time of writing, both curl and Firefox demonstrate this behavior. * Test Content-Length on simple http server redirect When serving a redirect, the SimpleHTTPRequestHandler will now send `Content-Length: 0`. Several tests for http.server already cover various behaviors and checks including redirection. This change only adds one check for the expected Content-Length on the simplest case for a redirect. * Add news entry for SimpleHTTPRequestHandler fix * Clarify the specific kind of 301 Co-authored-by: Senthil Kumaran <skumaran@gatech.edu>
* bpo-44059: Register the SerenityOS Browser in the webbrowser module (GH-25947)Linus Groh2021-05-061-0/+4
| | | Automerge-Triggered-By: GH:gpshead
* Eliminate duplicated calculations and unnecessary work for linear regression ↵Raymond Hettinger2021-05-061-2/+7
| | | | (GH-25922)
* bpo-44017: Update test_contextlib_async not to emit DeprecationWarn (GH-25918)Dong-hee Na2021-05-062-9/+6
|
* bpo-43882 Remove the newline, and tab early. From query and fragments. ↵Senthil Kumaran2021-05-052-11/+21
| | | | (GH-25921)
* bpo-44022: Fix http client infinite line reading (DoS) after a HTTP 100 ↵Gen Xu2021-05-052-18/+30
| | | | | | | Continue (GH-25916) Fixes http.client potential denial of service where it could get stuck reading lines from a malicious server after a 100 Continue response. Co-authored-by: Gregory P. Smith <greg@krypto.org>
* bpo-35753: Fix crash in doctest with unwrap-able functions (#22981)Alfred Perlstein2021-05-052-3/+27
| | | | | | | | | Ignore objects that inspect.unwrap throws due to too many wrappers. This is a very rare case, however it can easily be surfaced when a module under doctest imports unitest.mock.call into its namespace. We simply skip any object that throws this exception. This should handle the majority of cases.
* typing: format patch with make patchcheck (GH-25919)Dong-hee Na2021-05-051-1/+1
|
* bpo-44040: Update broken link in pathlib source (GH-25905)Kevin Follstad2021-05-051-6/+6
|
* bpo-40521: Convert deque freelist from global vars to instance vars (GH-25906)Raymond Hettinger2021-05-051-1/+2
|
* bpo-40297: Fix test_socket.CANTest.testSendFrame (GH-19548)karl ding2021-05-041-2/+1
| | | | | | | | | | The address tuple for CAN_RAW no longer returns the address family after the introduction of CAN ISO-TP support in a30f6d45ac3. However, updating test_socket.CANTest.testSendFrame was missed as part of the change, so the test incorrectly attempts to index past the last tuple item to retrieve the address family. This removes the now-redundant check for equality against socket.AF_CAN, as the tuple will not contain the address family.
* Fix inconsistent fsum vs sum and fmean vs mean (GH-25898)Raymond Hettinger2021-05-041-3/+3
|
* Fix typo in ast.py (GH-25740)Ikko Ashimine2021-05-041-2/+2
| | | parantheses -> parentheses
* bpo-38352: Add to typing.__all__ (#25821)Jelle Zijlstra2021-05-041-0/+7
| | | | | | This adds IO, TextIO, BinaryIO, Match, and Pattern. Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
* bpo-40465: Remove random module features deprecated in 3.9 (GH-25874)Raymond Hettinger2021-05-042-51/+15
|
* bpo-43666: Lib/_aix_support.py routines may fail in a WPAR environment ↵Michael Felt2021-05-041-12/+14
| | | | | | | | | (GH-25095) Since WPAR and LPAR both have a builddate for teh fileset bos.rte The name of the fileset checked is modified. To prevent a similiar situation (no builddate in ODM) a value sufficient for pep425 activity if retrieved buildate is zero or NULL Patch by M Felt.
* update docstring for `win_getpass` to reflect code changes (GH-24967)Jürgen Gmach2021-05-041-1/+1
| | | | | | | The code was updated in https://github.com/python/cpython/commit/0ec88b33d093db00ec68b220247681354a650f0c but the docstring was left untouched. => updated the docstring to reflect the code changes
* fix enum and backslash warnings (GH-25861)Ethan Furman2021-05-042-2/+2
| | | | - Enum warning in test_faulthandler - backslash warning in test_ipaddress
* bpo-43822: Prioritize tokenizer errors over custom syntax errors when ↵Pablo Galindo2021-05-041-1/+1
| | | | raising parser exceptions (GH-25866)
* bpo-44018: random.seed() no longer mutates its inputs (GH-25856)Raymond Hettinger2021-05-032-2/+6
|
* Remove Enum warnings from test_httpservers (GH-25844)Shreyan Avigyan2021-05-031-2/+2
|
* bpo-38530: Refactor and improve AttributeError suggestions (GH-25776)Dennis Sweeney2021-05-031-18/+84
| | | | | | | | | | | | | | | | | | | | - Make case-swaps half the cost of any other edit - Refactor Levenshtein code to not use memory allocator, and to bail early on no match. - Add comments to Levenshtein distance code - Add test cases for Levenshtein distance behind a debug macro - Set threshold to `(name_size + item_size + 3) * MOVE_COST / 6`. - Reasoning: similar to `difflib.SequenceMatcher.ratio()` >= 2/3: ``` "Multiset Jaccard similarity" >= 2/3 matching letters / total letters >= 2/3 (name_size - distance + item_size - distance) / (name_size + item_size) >= 2/3 1 - (2*distance) / (name_size + item_size) >= 2/3 1/3 >= (2*distance) / (name_size + item_size) (name_size + item_size) / 6 >= distance With rounding: (name_size + item_size + 3) // 6 >= distance ``` Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
* bpo-43943: ssl tests: Increase server socket timeout, backlog, debugging ↵Christian Heimes2021-05-031-5/+11
| | | | | (GH-25850) Signed-off-by: Christian Heimes <christian@python.org>
* bpo-44011: Revert "New asyncio ssl implementation (GH-17975)" (GH-25848)Pablo Galindo2021-05-0311-2478/+527
| | | | This reverts commit 5fb06edbbb769561e245d0fe13002bab50e2ae60 and all subsequent dependent commits.
* Increase test timeout (GH-25842)Andrew Svetlov2021-05-031-3/+3
|
* bpo-42725: Render annotations effectless on symbol table with PEP 563 (GH-25583)Batuhan Taskaya2021-05-031-6/+55
|
* bpo-44011: Fix asyncio tests without ssl module (GH-25840)Christian Heimes2021-05-032-3/+9
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-44015: dataclasses should allow KW_ONLY to be specified only once per ↵Eric V. Smith2021-05-032-0/+82
| | | | | class (GH-25841) bpo-44015: Raise a TypeError if KW_ONLY is specified more than once.
* bpo-25478: Add total() method to collections.Counter (GH-25829)Raymond Hettinger2021-05-032-0/+8
|
* bpo-37903: IDLE: add shell sidebar mouse interactions (GH-25708)Tal Einat2021-05-038-212/+336
| | | | | | Left click and drag to select lines. With selection, right click for context menu with copy and copy-with-prompts. Also add copy-with-prompts to the text-box context menu. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-43568: Drop support for MACOSX_DEPLOYMENT_TARGET < 10.3 (GH-25827)Ned Deily2021-05-033-8/+12
| | | | | | | | | | Only complain if the config target is >= 10.3 and the current target is < 10.3. The check was originally added to ensure that incompatible LDSHARED flags are not used, because -undefined dynamic_lookup is used when building for 10.3 and later, and is not supported on older OS versions. Apart from that, there should be no problem in general with using an older target. Authored-by: Joshua Root <jmr@macports.org>
* bpo-43977: Make sure that tp_flags for pattern matching are inherited ↵Mark Shannon2021-05-022-0/+47
| | | | correctly. (GH-25813)
* bpo-44011: New asyncio ssl implementation (#17975)Andrew Svetlov2021-05-0211-527/+2472
|
* bpo-43434: Move sqlite3.connect audit events to sqlite3.Connection.__init__ ↵Erlend Egeberg Aasland2021-05-022-4/+5
| | | | (GH-25818)
* bpo-43926: Cleaner metadata with PEP 566 JSON support. (GH-25565)Jason R. Coombs2021-05-0210-26/+237
| | | | | | | | | * bpo-43926: Cleaner metadata with PEP 566 JSON support. * Add blurb * Add versionchanged and versionadded declarations for changes to metadata. * Use descriptor for PEP 566
* bpo-43754: Eliminate bindings for partial pattern matches (GH-25229)Brandt Bucher2021-05-023-5/+80
|
* bpo-36384: Leading zeros in IPv4 addresses are no longer tolerated (GH-25099)Christian Heimes2021-05-022-4/+22
| | | | | | | | | Reverts commit e653d4d8e820a7a004ad399530af0135b45db27a and makes parsing even more strict. Like socket.inet_pton() any leading zero is now treated as invalid input. Signed-off-by: Christian Heimes <christian@python.org> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-32745: Fix a regression in the handling of ctypes' c_wchar_p type (#8721)Zackery Spytz2021-05-021-0/+8
| | | | | | Embedded nulls would cause a ValueError to be raised. Thanks go to Eryk Sun for their analysis. Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-43908: Mark ssl, hash, and hmac types as immutable (GH-25792)Christian Heimes2021-05-023-0/+31
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-43733: netrc try to use UTF-8 before using locale encoding. (GH-25781)Inada Naoki2021-05-021-2/+6
|