summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* bpo-44356: [Enum] allow multiple data-type mixins if they are all the same ↵Ethan Furman2021-06-102-4/+51
| | | | | | | | | | | | | | (GH-26649) This enables, for example, two base Enums to both inherit from `str`, and then both be mixed into the same final Enum: class Str1Enum(str, Enum): # some behavior here class Str2Enum(str, Enum): # some more behavior here class FinalStrEnum(Str1Enum, Str2Enum): # this now works
* bpo-33962: Use ttk spinbox for IDLE indent space config (GH-22954)Mark Roseman2021-06-102-118/+71
| | | | | If ttk.Spinbox is not available (Tk < 8.5.9) use readonly ttk.Combobox. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-44357:Add `math.cbrt()` function: Cube Root (GH-26622)Ajith Ramachandran2021-06-101-0/+16
| | | | | | * Add math.cbrt() function: Cube Root Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
* bpo-44364:Add non integral tests for `sqrt()` (#26625)Ajith Ramachandran2021-06-101-0/+4
| | | | | * Add non integral tests for `sqrt()` Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
* bpo-44348: Move trace-info to thread-state (GH-26623)Mark Shannon2021-06-101-2/+2
| | | | | * Move trace-info to thread state. * Correct output for pdb when turning on tracing in middle of line
* bpo-44337: Port LOAD_ATTR to PEP 659 adaptive interpreter (GH-26595)Mark Shannon2021-06-102-1/+10
| | | | | | | | | | | | | | * Specialize LOAD_ATTR with LOAD_ATTR_SLOT and LOAD_ATTR_SPLIT_KEYS * Move dict-common.h to internal/pycore_dict.h * Add LOAD_ATTR_WITH_HINT specialized opcode. * Quicken in function if loopy * Specialize LOAD_ATTR for module attributes. * Add specialization stats
* bpo-35800: Remove smtpd.MailmanProxy since 3.11 (GH-26617)Dong-hee Na2021-06-091-93/+0
|
* bpo-44368: Ensure we don't raise incorrect custom syntax errors with soft ↵Pablo Galindo2021-06-092-1/+20
| | | | keywords (GH-26630)
* bpo-40468: Split IDLE settings General tab (GH-26621)Terry Jan Reedy2021-06-092-139/+180
| | | | | | | Replace it with Windows tab for Shell and Editor options and Shell/Ed for options exclusive to one of them. Create room for more options and make dialog shorter, to better fit small windows.
* bpo-44242: [Enum] remove missing bits test from Flag creation (GH-26586)Ethan Furman2021-06-092-26/+225
| | | | Move the check for missing named flags in flag aliases from Flag creation to a new *verify* decorator.
* Delete line that was accidentally copied. (GH-26624)Mark Shannon2021-06-091-1/+0
|
* bpo-40468: Factor out class ExtPage in idlelib.configdialog (GH-26618)Terry Jan Reedy2021-06-092-201/+216
|
* bpo-44349: Fix edge case when displaying text from files with encoding in ↵Pablo Galindo2021-06-081-0/+16
| | | | syntax errors (GH-26611)
* bpo-43833: Emit warnings for numeric literals followed by keyword (GH-25466)Serhiy Storchaka2021-06-082-3/+91
| | | | | | | | Emit a deprecation warning if the numeric literal is immediately followed by one of keywords: and, else, for, if, in, is, or. Raise a syntax error with more informative message if it is immediately followed by other keyword or identifier. Automerge-Triggered-By: GH:pablogsal
* bpo-43693: Un-revert commit f3fa63e. (#26609)Eric Snow2021-06-084-66/+129
| | | | | | | | | This was reverted in GH-26596 (commit 6d518bb) due to some bad memory accesses. * Add the MAKE_CELL opcode. (gh-26396) The memory accesses have been fixed. https://bugs.python.org/issue43693
* bpo-40468: Move IDLE helplist settings to extensions page of dialog. (GH-26593)Terry Jan Reedy2021-06-082-139/+188
| | | | These are the settings that extend the help menu. Moving them shortens the dialog and will help with it being too tall for small screens.
* bpo-11105: document the new test.support.infinite_recursion context manager ↵Batuhan Taskaya2021-06-081-1/+7
| | | | (GH-26604)
* bpo-11105: reduce the recursion limit for tests (GH-26550)Batuhan Taskaya2021-06-082-2/+13
|
* Revert "bpo-43693: Add the MAKE_CELL opcode and interleave fast locals ↵Pablo Galindo2021-06-084-129/+66
| | | | | offsets. (gh-26396)" (GH-26597) This reverts commit 631f9938b1604d4f893417ec339b9e0fa9196fb1.
* bpo-44335: Fix a regression when identifying invalid characters in syntax ↵Pablo Galindo2021-06-081-0/+1
| | | | errors (GH-26589)
* Use `from` imports (GH-26594)Machinexa22021-06-081-5/+4
| | | from imports
* fix: use unambiguous punction in 'invalid escape sequence' message (GH-26582)Ned Batchelder2021-06-081-1/+1
|
* bpo-43693: Add the MAKE_CELL opcode and interleave fast locals offsets. ↵Eric Snow2021-06-074-66/+129
| | | | | | | (gh-26396) This moves logic out of the frame initialization code and into the compiler and eval loop. Doing so simplifies the runtime code and allows us to optimize it better. https://bugs.python.org/issue43693
* Use absolute imports in IDLE tests (GH-26581)Terry Jan Reedy2021-06-071-1/+1
| | | Relative imports do not work when running test_x as main.
* bpo-43693: Un-revert commits 2c1e258 and b2bf2bc. (gh-26577)Eric Snow2021-06-074-50/+53
| | | | | | | | | | These were reverted in gh-26530 (commit 17c4edc) due to refleaks. * 2c1e258 - Compute deref offsets in compiler (gh-25152) * b2bf2bc - Add new internal code objects fields: co_fastlocalnames and co_fastlocalkinds. (gh-26388) This change fixes the refleaks. https://bugs.python.org/issue43693
* bpo-44187: Quickening infrastructure (GH-26264)Mark Shannon2021-06-071-2/+3
| | | | | | | | | | | | | | * Add co_firstinstr field to code object. * Implement barebones quickening. * Use non-quickened bytecode when tracing. * Add NEWS item * Add new file to Windows build. * Don't specialize instructions with EXTENDED_ARG.
* bpo-44258: support PEP 515 for Fraction's initialization from string (GH-26422)Sergey B Kirpichev2021-06-072-10/+73
| | | | | | | | | | | | | | | | | | | * bpo-44258: support PEP 515 for Fraction's initialization from string * regexps's version * A different regexps version, which doesn't suffer from catastrophic backtracking * revert denom -> den * strip "_" from the decimal str, add few tests * drop redundant tests * Add versionchanged & whatsnew entry * Amend Fraction constructor docs * Change .. versionchanged:...
* bpo-37449: ensurepip uses importlib.resources.files() traversable APIs (#22659)wim glenn2021-06-072-5/+4
| | | | | | | | | | | | | * `ensurepip` now uses `importlib.resources.files()` traversable APIs * Update Lib/ensurepip/__init__.py Co-authored-by: Jason R. Coombs <jaraco@jaraco.com> * Update Misc/NEWS.d/next/Library/2020-10-11-20-23-48.bpo-37449.f-t3V6.rst Co-authored-by: Jason R. Coombs <jaraco@jaraco.com> Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* bpo-44304: Fix crash in the sqlite3 module when the GC clears Statement ↵Pablo Galindo2021-06-051-0/+17
| | | | objects (GH-26545)
* bpo-38323: Skip SubprocessMultiLoopWatcherTest as they can hang the test ↵Pablo Galindo2021-06-041-0/+2
| | | | suite (GH-26542)
* Update nonstandard variable names (GH-26540)Raymond Hettinger2021-06-041-5/+5
|
* bpo-43853: Handle sqlite3_value_text() errors (GH-25422)Erlend Egeberg Aasland2021-06-041-5/+7
|
* bpo-44041: Add test for sqlite3 column count (GH-25907)Erlend Egeberg Aasland2021-06-041-0/+11
|
* bpo-43693: Revert commits 2c1e2583fdc4db6b43d163239ea42b0e8394171f and ↵Pablo Galindo2021-06-044-53/+50
| | | | | | | | | | | | | b2bf2bc1ece673d387341e06c8d3c2bc6e259747 (GH-26530) * Revert "bpo-43693: Compute deref offsets in compiler (gh-25152)" This reverts commit b2bf2bc1ece673d387341e06c8d3c2bc6e259747. * Revert "bpo-43693: Add new internal code objects fields: co_fastlocalnames and co_fastlocalkinds. (gh-26388)" This reverts commit 2c1e2583fdc4db6b43d163239ea42b0e8394171f. These two commits are breaking the refleak buildbots.
* bpo-44048: Fix two hashlib test cases under FIPS mode (GH-26470)stratakis2021-06-041-2/+10
| | | | | test_disallow_instantiation and test_readonly_types try to test all the available digests, however under FIPS mode, while the algorithms are available, trying to use them will fail with a ValueError.
* bpo-43693: Compute deref offsets in compiler (gh-25152)Mark Shannon2021-06-043-25/+23
| | | | | | Merges locals and cells into a single array. Saves a pointer in the interpreter and means that we don't need the LOAD_CLOSURE opcode any more https://bugs.python.org/issue43693
* bpo-44305: Improve syntax error for try blocks without except or finally ↵Pablo Galindo2021-06-031-0/+8
| | | | (GH-26523)
* bpo-43921: Cleanup test_ssl.test_wrong_cert_tls13() (GH-26520)Victor Stinner2021-06-031-12/+5
| | | Don't catch OSError, and check the SSLError message.
* bpo-11105: Do not crash when compiling recursive ASTs (GH-20594)Batuhan Taskaya2021-06-031-0/+14
| | | | | | | When compiling an AST object with a direct / indirect reference cycles, on the conversion phase because of exceeding amount of calls, a segfault was raised. This patch adds recursion guards to places for preventing user inputs to not to crash AST but instead raise a RecursionError.
* bpo-42213: Remove redundant cyclic GC hack in sqlite3 (GH-26517)Erlend Egeberg Aasland2021-06-032-18/+35
| | | | | | | | | | The sqlite3 module now fully implements the GC protocol, so there's no need for this workaround anymore. - Add and use managed resource helper for connections using TESTFN - Sort test imports - Split open-tests into their own test case Automerge-Triggered-By: GH:vstinner
* bpo-43693: Add new internal code objects fields: co_fastlocalnames and ↵Eric Snow2021-06-033-28/+33
| | | | | | | | | | | | | | | | | co_fastlocalkinds. (gh-26388) A number of places in the code base (notably ceval.c and frameobject.c) rely on mapping variable names to indices in the frame "locals plus" array (AKA fast locals), and thus opargs. Currently the compiler indirectly encodes that information on the code object as the tuples co_varnames, co_cellvars, and co_freevars. At runtime the dependent code must calculate the proper mapping from those, which isn't ideal and impacts performance-sensitive sections. This is something we can easily address in the compiler instead. This change addresses the situation by replacing internal use of co_varnames, etc. with a single combined tuple of names in locals-plus order, along with a minimal array mapping each to its kind (local vs. cell vs. free). These two new PyCodeObject fields, co_fastlocalnames and co_fastllocalkinds, are not exposed to Python code for now, but co_varnames, etc. are still available with the same values as before (though computed lazily). Aside from the (mild) performance impact, there are a number of other benefits: * there's now a clear, direct relationship between locals-plus and variables * code that relies on the locals-plus-to-name mapping is simpler * marshaled code objects are smaller and serialize/de-serialize faster Also note that we can take this approach further by expanding the possible values in co_fastlocalkinds to include specific argument types (e.g. positional-only, kwargs). Doing so would allow further speed-ups in _PyEval_MakeFrameVector(), which is where args get unpacked into the locals-plus array. It would also allow us to shrink marshaled code objects even further. https://bugs.python.org/issue43693
* bpo-43921: Fix test_ssl.test_wrong_cert_tls13() on Windows (GH-26502)Victor Stinner2021-06-031-14/+6
| | | | Fix test_ssl.test_wrong_cert_tls13(): use suppress_ragged_eofs=False, since read() can raise ssl.SSLEOFError on Windows.
* bpo-42213: Check connection in sqlite3.Connection.__enter__ (GH-26512)Erlend Egeberg Aasland2021-06-031-0/+20
| | | | | | | | | Try to harden connection close: - add tests that exercise stuff against a closed database - add wrapper for sqlite3_close_v2() - check connection on __enter__ - explicitly free pending statements before close() - sqlite3_close_v2() always returns SQLITE_OK
* bpo-44298: Fix line numbers for early exits in with statements. (GH-26513)Mark Shannon2021-06-031-0/+46
|
* bpo-43858: Add logging.getLevelNamesMapping() (GH-26459)andrei kulakov2021-06-032-1/+12
| | | Added a function that returns a copy of a dict of logging levels.
* bpo-44022: Improve the regression test. (GH-26503)Gregory P. Smith2021-06-031-1/+6
| | | | It wasn't actually detecting the regression due to the assertion being too lenient.
* bpo-44282: Fix occasional test_incremental_editing failures on buildbots ↵Tal Einat2021-06-023-43/+49
| | | | | (GH-26491) Signed-off-by: Tal Einat <532281+taleinat@users.noreply.github.com>
* bpo-43921: Fix test_ssl.test_pha_required_nocert() (GH-26489)Victor Stinner2021-06-021-2/+9
| | | | Fix test_pha_required_nocert() of test_ssl: catch two more EOF cases (when the recv() method returns an empty string).
* Remove duplicate address in CommonTestMixin_v4.test_leading_zeros() (GH-26326)Mariusz Felisiak2021-06-021-1/+0
|
* bpo-44273: Improve syntax error message for assigning to "..." (GH-26477)Serhiy Storchaka2021-06-011-1/+1
| | | Use "ellipsis" instead of "Ellipsis" in syntax error messages to eliminate confusion with built-in variable Ellipsis.