summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '3.10' into enum-private-310enum-private-310Ethan Furman2021-10-2060-6140/+11673
|\
| * bpo-44559: [Enum] restore fixes lost in 3.9 reversion (GH-29114)Ethan Furman2021-10-203-42/+194
| | | | | | | | - fix exception leaks - re-add deprecation warnings
| * bpo-45192: Fix a bug that infers the type of an os.PathLike[bytes] object as ↵Miss Islington (bot)2021-10-203-0/+28
| | | | | | | | | | | | | | | | | | | | | | str (GH-28323) (GH-29111) An object implementing the os.PathLike protocol can represent a file system path as a str or bytes object. Therefore, _infer_return_type function should infer os.PathLike[str] object as str type and os.PathLike[bytes] object as bytes type. (cherry picked from commit 6270d3eeaf17b50abc4f8f4d97790d66179638e4) Co-authored-by: Kyungmin Lee <rekyungmin@gmail.com>
| * bpo-45464: [doc] Explain that subclassing multiple exceptions is fragile ↵Miss Islington (bot)2021-10-202-0/+27
| | | | | | | | | | | | | | | | (GH-29094) (GH-29104) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com> (cherry picked from commit dff0b713436e286bb1afdd7c6f3093c8e8db16dd) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
| * bpo-45532: Replace 'default' with 'main' as default in sys.version (GH-29100)Miss Islington (bot)2021-10-202-2/+5
| | | | | | | | | | (cherry picked from commit d2cd5eef0c3fc0431bfe3fc24b4c020ebfcf8aad) Co-authored-by: Jeong YunWon <69878+youknowone@users.noreply.github.com>
| * bpo-45229: Make doctest tests discoverable (GH-28986) (GH-29095)Miss Islington (bot)2021-10-202-23/+18
| | | | | | | | | | (cherry picked from commit 8d6740f489fca67a44de165d29d9e0ad86285779) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
| * Cleanup a couple of comments left on PR 28775 post-merge. (GH-29079)Miss Islington (bot)2021-10-202-2/+2
| | | | | | | | | | (cherry picked from commit 1dfac27dffbe771f9d88bd1726f7362ce0341437) Co-authored-by: Gregory P. Smith <greg@krypto.org>
| * bpo-45536: Check OpenSSL APIs in configure (GH-29088)Miss Islington (bot)2021-10-203-0/+105
| | | | | | | | | | (cherry picked from commit 81520fe677d15cc7f9af5140bc5f9eca8409ad90) Co-authored-by: Christian Heimes <christian@python.org>
| * Add PEPs 593 & 647 to list of PEPs at top of typing docs (GH-29097)Miss Islington (bot)2021-10-201-1/+1
| | | | | | | | | | (cherry picked from commit d9e1dae35ac20acfeb2509b0dea4c3943693e79d) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
| * bpo-45436: Fix tkinter tests with Tcl/Tk 8.6.11+ (GH-29077) (GH-29080)Miss Islington (bot)2021-10-202-5/+11
| | | | | | | | | | | | | | | | | | | | Since v8.6.11, a few configuration options seem to accept an empty value where they did not previously; particularly the `type` of a `Menu` widget, and the `compound` of any ttk widget with a label. Providing an explicit expected error message to `checkEnumParam` bypasses the check of an empty value, which no longer raises `TclError`. (cherry picked from commit 4fe454c6f54b0948af67b53af6c2f35af6377e69) Co-authored-by: Zachary Ware <zach@python.org>
| * bpo-39679: Add tests for classmethod/staticmethod singledispatchmethods ↵Miss Islington (bot)2021-10-202-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-29034) (GH-29072) In Python 3.8 and 3.9, stacking `@functools.singledispatchmethod` on top of `@classmethod` or `@staticmethod` caused an exception to be raised if the method was registered using type-annotations rather than `@method.register(int)`. This was not caught by unit tests, however, as the tests only tested the `@method.register(int)` way of registering additional implementations. The bug is no longer present in Python 3.10+, but `test_functools.py` is still lacking regression tests for these cases. This commit adds these test cases. (cherry picked from commit ad6d162e518963711d24c80f1b7d6079bd437584) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
| * [3.10] bpo-45494: Fix parser crash when reporting errors involving invalid ↵Łukasz Langa2021-10-195-123/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | continuation characters (GH-28993) (GH-29070) There are two errors that this commit fixes: * The parser was not correctly computing the offset and the string source for E_LINECONT errors due to the incorrect usage of strtok(). * The parser was not correctly unwinding the call stack when a tokenizer exception happened in rules involving optionals ('?', [...]) as we always make them return valid results by using the comma operator. We need to check first if we don't have an error before continuing.. (cherry picked from commit a106343f632a99c8ebb0136fa140cf189b4a6a57) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
| * [3.10] bpo-45500: Rewrite test_dbm (GH-29002) (GH-29069)Łukasz Langa2021-10-191-64/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Generate test classes at import time. It allows to filter them when run with unittest. E.g: "./python -m unittest test.test_dbm.TestCase_gnu -v". * Create a database class in a new directory which will be removed after test. It guarantees that all created files and directories be removed and will not conflict with other dbm tests. * Restore dbm._defaultmod after tests. Previously it was set to the last dbm module (dbm.dumb) which affected other tests. * Enable the whichdb test for dbm.dumb. * Move test_keys to the correct test class. It does not test whichdb(). * Remove some outdated code and comments.. (cherry picked from commit 975b94b9de969777218e96a9950c1dab2dab65a0) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
| * bpo-45449: add note about PEP 585 in collections.abc's documentation ↵Miss Islington (bot)2021-10-192-0/+4
| | | | | | | | | | | | | | | | | | (GH-29047) (GH-29067) Signed-off-by: Filipe Laíns <lains@riseup.net> Co-authored-by: Łukasz Langa <lukasz@langa.pl> (cherry picked from commit 7bafa0cf586227987d3d662264d491e3780024b7)
| * bpo-45515: Add zoneinfo to the datetime documentation (GH-29038) (GH-29065)Miss Islington (bot)2021-10-192-4/+9
| | | | | | | | | | | | | | | | We should have done this way back when 3.9 was released, but it fell off the radar. Co-authored-by: Paul Ganssle <git@m.ganssle.io> (cherry picked from commit 8e40ca127fa92d6113617c80710e0a077977a84d)
| * bpo-45475: Revert `__iter__` optimization for GzipFile, BZ2File, and ↵Miss Islington (bot)2021-10-184-12/+4
| | | | | | | | | | | | | | | | LZMAFile. (GH-29016) This reverts commit d2a8e69c2c605fbaa3656a5f99aa8d295f74c80e. (cherry picked from commit 0a4c82ddd34a3578684b45b76f49cd289a08740b) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
| * [3.10] bpo-45221: Fix handling of LDFLAGS and CPPFLAGS options in setup.py ↵Miss Islington (bot)2021-10-182-0/+15
| | | | | | | | | | | | | | | | | | | | (GH-29031) (GH-29037) (cherry picked from commit 6a533a423869e28d9086cf4d79029f59e9eec916) Co-authored-by: andrei kulakov <andrei.avk@gmail.com> Automerge-Triggered-By: GH:ned-deily
| * Improve multiserver queue recipe (GH-29012) (GH-29013)Miss Islington (bot)2021-10-171-5/+6
| |
| * bpo-45229: Make test_http_cookiejar discoverable (GH-29004)Miss Islington (bot)2021-10-171-10/+1
| | | | | | | | | | (cherry picked from commit b3f0ceae919c1627094ff628c87184684a5cedd6) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
| * [3.10] bpo-45495: Add 'case' and 'match' to IDLE completions list. ↵Miss Islington (bot)2021-10-163-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | (GH-29000) (GH-29001) Since the keyword list is frozen, only compute it once per session. The colorizer already handles context keywords. (cherry picked from commit 42ac06dcd234bdda989dcfe854ac5173337024c9) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Automerge-Triggered-By: GH:terryjreedy
| * bpo-45249: Fix caret location when end_offset is set to 0 (GH-28855)Miss Islington (bot)2021-10-163-1/+13
| | | | | | | | | | (cherry picked from commit fe0d9e22a52a10c4cbe52254b51f2d4e74d83568) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
| * [3.10]bpo-45463: Clarify that global statements allows multiple names ↵Miss Islington (bot)2021-10-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-28851) (GH-28989) The global statement allows specifying a list of identifiers (https://docs.python.org/3/reference/simple_stmts.htmlGH-the-global-statement). The "Execution model" chapter described the global statement as if it only allowed one single name. Pluralize "name" in the appropriate places. (cherry picked from commit 4ecd119b007cb766b8bede2dc78b70d29cd932dd) Co-authored-by: Luca Chiodini <luca@chiodini.org> Co-authored-by: Luca Chiodini <luca@chiodini.org>
| * bpo-45428: Fix reading filenames from stdin in py_compile (GH-28848)Miss Islington (bot)2021-10-152-1/+2
| | | | | | | | | | | | Strip trailing '\n'. (cherry picked from commit 59a633d3e2071d65aa6638da5cf767a5c1310271) Co-authored-by: Graham Inggs <ginggs@debian.org>
| * [3.10] bpo-45467: Fix IncrementalDecoder and StreamReader in the ↵Serhiy Storchaka2021-10-148-324/+412
| | | | | | | | | | | | | | | | | | | | | | "raw-unicode-escape" codec (GH-28944) (GH-28952) They support now splitting escape sequences between input chunks. Add the third parameter "final" in codecs.raw_unicode_escape_decode(). It is True by default to match the former behavior. (cherry picked from commit 39aa98346d5dd8ac591a7cafb467af21c53f1e5d) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
| * [3.10] bpo-45461: Fix IncrementalDecoder and StreamReader in the ↵Miss Islington (bot)2021-10-149-5801/+10855
| | | | | | | | | | | | | | | | | | | | | | | | "unicode-escape" codec (GH-28939) (GH-28943) They support now splitting escape sequences between input chunks. Add the third parameter "final" in codecs.unicode_escape_decode(). It is True by default to match the former behavior. (cherry picked from commit c96d1546b11b4c282a7e21737cb1f5d16349656d) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
| * [3.10] no-issue: Make silence about warning '_POSIX_C_SOURCE redefined' ↵Dong-hee Na2021-10-151-4/+4
| | | | | | | | (GH-28948) (GH-28951)
* | add reference to name manglingEthan Furman2021-10-201-3/+3
|/
* bpo-45386: Handle strftime's ValueError graciously in xmlrpc.client ↵Miss Islington (bot)2021-10-132-2/+11
| | | | | | | | | | | | | | | | (GH-28765) (GH-28934) At import time, the xmlrpc.client module uses different date formats to test strftime so it can format years with 4 digits consistently. Depending on the underlying C library and its strftime implementation some of these calls can result in ValueErrors, blocking the xmlrpc.client module from being imported. This commit changes the behavior of this bit of code to react to ValueError exceptions, treating the format that caused them as an non-viable option. (cherry picked from commit 1c831353816ff699b54e804047a7242a09e98f5b) Co-authored-by: rtobar <rtobarc@gmail.com>
* bpo-24444: fix an error in argparse help when help for an option is blank ↵Miss Islington (bot)2021-10-133-5/+44
| | | | | | | (GH-28050) (GH-28931) (cherry picked from commit 6fafc25aea8689048314b5bf7a9bb986bb1ce238) Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
* [3.10] bpo-45239: Fix parsedate_tz when time has more than 2 dots in it ↵Łukasz Langa2021-10-133-0/+6
| | | | | | | | (GH-28452) (GH-28930) Co-authored-by: Łukasz Langa <lukasz@langa.pl> (cherry picked from commit b9e687618d3489944f29adbd2be50b46940c9e70) Co-authored-by: Ben Hoyt <benhoyt@gmail.com>
* bpo-45229: Make tkinter tests discoverable (GH-28637) (GH-28927)Miss Islington (bot)2021-10-1318-606/+498
| | | | | (cherry picked from commit f59ed3c310a7ceebf2a56a84ea969a7f75d95b64) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [docs] lexical_analysis: Expand the text on ``_`` (GH-28903) (GH-28933)Miss Islington (bot)2021-10-131-4/+16
| | | | | | | | | | | | | | | | Also: * Expand the discussion into its own entry. (Even before this, text on ``_`` was longet than the text on ``_*``.) * Briefly note the other common convention for `_`: naming unused variables. Co-authored-by: Brandt Bucher <brandtbucher@gmail.com> Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl> (cherry picked from commit 3dee0cb6217db326e844955a7f8b424c67990557) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* bpo-45453: Fix test_embed.StdPrinterTests (GH-28916) (GH-28917)Miss Islington (bot)2021-10-131-7/+4
| | | | | | | | | | test_embed.StdPrinterTests now always use the file descriptor 1 for stdout, rather than using sys.__stdout__.fileno(). PyFile_NewStdPrinter() does crash if the argument is not 1 or 2. Fix also a few pyflakes warnings: remove unused import and variables. (cherry picked from commit 678433f25e0d08dad7edf72be8f0cf9420e4ed2c) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-20692: Add Programming FAQ entry for 1.__class__ error. (GH-28918)Miss Islington (bot)2021-10-122-0/+23
| | | | | | To avoid error, add either space or parentheses. (cherry picked from commit 380c44087505d0d560f97e325028f27393551164) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.10] bpo-45405: Prevent ``internal configure error`` when running ↵Miss Islington (bot)2021-10-123-6/+12
| | | | | | | | | | | | | | ``configure`` with recent versions of non-Apple clang. (GH-28845) (GH-28911) Change the configure logic to function properly on macOS when the compiler outputs a platform triplet for option --print-multiarch. Co-authored-by: Ned Deily <nad@python.org> (cherry picked from commit 9c4766772cda67648184f8ddba546a5fc0167f91) Co-authored-by: David Bohman <debohman@gmail.com> Automerge-Triggered-By: GH:ned-deily
* Fix format string in _PyImport_LoadDynamicModuleWithSpec() (GH-28863)Miss Islington (bot)2021-10-121-1/+1
| | | | | (cherry picked from commit f79f3b41c8c1360d4e0ae884a52d0a486974ca53) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Slight correct grammar (GH-28860) Miss Islington (bot)2021-10-121-1/+1
| | | | | (cherry picked from commit 1b11582f0e00f08833da6adc44030a8b1961989a) Co-authored-by: nobodyatandnothing <91722596+nobodyatandnothing@users.noreply.github.com>
* bpo-45441: Update some moved URLs in documentation (GH-28861)Miss Islington (bot)2021-10-124-6/+6
| | | | | (cherry picked from commit b37dc9b3bc9575adc039c6093c643b7ae5e917e1) Co-authored-by: 180909 <wjh180909@gmail.com>
* bpo-45401: Fix a resource warning in test_logging (GH-28864) (GH-28872)Miss Islington (bot)2021-10-121-0/+1
| | | | | | (cherry picked from commit 15188b115a2da815556053372c912a81a74be43b) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-42253: Update xml.dom.minidom.rst (GH-23126) (GH-28874)Miss Islington (bot)2021-10-121-0/+8
| | | | | | | | Document that the "standalone" parameter was added in Python 3.9. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> (cherry picked from commit c7e81fcf9548ab6a0a4828d6f2db9ece9d204826) Co-authored-by: Jens Diemer <github.com@jensdiemer.de>
* bpo-45351, asyncio: Enhance echo server example, print all addresses (GH-28828)Miss Islington (bot)2021-10-111-2/+2
| | | | | (cherry picked from commit 659812b451aefe1f0e5f83540296519a5fb8f313) Co-authored-by: Olaf van der Spek <olafvdspek@gmail.com>
* Handle error when PyUnicode_GetLength returns a negative value. (GH-28859)Miss Islington (bot)2021-10-111-0/+3
| | | | | (cherry picked from commit 560a79f94e94de66a18f2a5e4194c2fe51e2adf1) Co-authored-by: Dong-hee Na <donghee.na@python.org>
* bpo-45401: Change shouldRollover() methods to only rollover regular f… ↵Miss Islington (bot)2021-10-112-4/+25
| | | | | | | | | | | | (GH-28822) (#28867) …iles. Also changed some historical return values from 1 -> True and 0 -> False. (cherry picked from commit 62a667784ba7b84611ebd50fa8a1a464cde32235) Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk> Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
* Fix a leak in _PyImport_LoadDynamicModuleWithSpec() after failing ↵Miss Islington (bot)2021-10-111-1/+1
| | | | | | | PySys_Audit() (GH-28862) (cherry picked from commit 9883ca498d654a4792d530bd8d6d64fef4dc971c) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Fix the "Finding all Adverbs" example (GH-21420) (#28839)Miss Islington (bot)2021-10-101-2/+2
| | | | | | Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> (cherry picked from commit dbd62e74dadda7868f1c0d497414c8f7e4c0b12b) Co-authored-by: Rim Chatti <chattiriim@gmail.com>
* bpo-45416: Fix use of asyncio.Condition() with explicit Lock objects (GH-28850)Miss Islington (bot)2021-10-103-13/+57
| | | | | | Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> (cherry picked from commit 1a7892414e654aa5c99efa31db767baba7f4a424) Co-authored-by: Joongi Kim <joongi@lablup.com>
* Fix class pattern docs to refer to class patterns (GH-28849)Miss Islington (bot)2021-10-101-1/+1
| | | | | (cherry picked from commit 0bcc5ade9bff086a0b24d71307fae0a891f4efd2) Co-authored-by: Christophe Nanteuil <35002064+christopheNan@users.noreply.github.com>
* [3.10] bpo-45419: Fix interfaces on DegenerateFiles.Path (GH-28844)Jason R. Coombs2021-10-102-1/+3
|
* bpo-45353: Remind sys.modules users to copy when iterating. (GH-28842)Miss Islington (bot)2021-10-091-1/+5
| | | | | | | | | | | This is true of all dictionaries in Python, but this one tends to catch people off guard as they don't realize when sys.modules might change out from underneath them as a hidden side effect of their code. Copying it first avoids the RuntimeError. An example when this happens in single threaded code are codecs being loaded which are an implicit time of use import that most need not think about. (cherry picked from commit 3d1ca867ed0e3ae343166806f8ddd9739e568ab4) Co-authored-by: Gregory P. Smith <greg@krypto.org>
* Fix dataclassses spelling (GH-28837) (GH-28841)Miss Islington (bot)2021-10-093-3/+3
| | | | | | | (cherry picked from commit 5b4a7675bcfc6368aff955f4a6231579718f5dad) Co-authored-by: Landon Yarrington <33426811+jly36963@users.noreply.github.com> Co-authored-by: Landon Yarrington <33426811+jly36963@users.noreply.github.com>