summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* bpo-11105: reduce the recursion limit for tests (GH-26550)Batuhan Taskaya2021-06-082-2/+13
|
* bpo-43795: Note Stable ABI PEP in What's New (GH-26479)Petr Viktorin2021-06-081-0/+10
| | | | Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
* bpo-44329: Refactor sqlite3 statement creation (GH-26566)Erlend Egeberg Aasland2021-06-081-43/+35
| | | | | Call SQLite API's first, and return early in case of error. At the end, allocate the object and initialise members. We now avoid unneeded alloc/dealloc's in case the statement creation fails.
* Revert "bpo-43693: Add the MAKE_CELL opcode and interleave fast locals ↵Pablo Galindo2021-06-0816-4466/+4231
| | | | | offsets. (gh-26396)" (GH-26597) This reverts commit 631f9938b1604d4f893417ec339b9e0fa9196fb1.
* Fix compiler errors for unused variables (GH-26601)Pablo Galindo2021-06-082-1/+2
|
* bpo-44335: Fix a regression when identifying invalid characters in syntax ↵Pablo Galindo2021-06-083-1/+6
| | | | errors (GH-26589)
* bpo-44348: Revert "bpo-39573: Py_TYPE becomes a static inline function ↵Pablo Galindo2021-06-085-52/+9
| | | | | | (GH-26493)" (GH-26596) This reverts commit f3fa63ec75fdbb4a08a10957a5c631bf0c4a5970 as is causing crashes in some Windows tests in the buildbots.
* Use `from` imports (GH-26594)Machinexa22021-06-081-5/+4
| | | from imports
* bpo-42238: Doc CI: Disable suspicious checks. (GH-26575)Julien Palard2021-06-082-2/+2
| | | | They are slow and raise too many false positive, I'm in the slow process to try to change this.
* fix: use unambiguous punction in 'invalid escape sequence' message (GH-26582)Ned Batchelder2021-06-082-3/+3
|
* bpo-43693: Silence some compiler warnings. (gh-26588)Eric Snow2021-06-072-5/+2
| | | | | | | The plan is to eventually make PyCodeObject opaque in the public C-API, with the full struct moved to Include/internal/pycore_code.h. _PyLocalsPlusKinds and _PyLocalsPlusKind started off there but were needed on PyCodeObject, hence the duplication. This led to warnings with some compilers. (Apparently it does not trigger a warning on my install of GCC.) This change eliminates the superfluous typedef. https://bugs.python.org/issue43693
* bpo-43693: Add the MAKE_CELL opcode and interleave fast locals offsets. ↵Eric Snow2021-06-0716-4231/+4466
| | | | | | | (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-41299: Reduce lag in Windows threading timeouts by using a higher ↵Ryan Hileman2021-06-072-4/+11
| | | | precision time source (GH-26568)
* bpo-43693: Un-revert commits 2c1e258 and b2bf2bc. (gh-26577)Eric Snow2021-06-0723-5707/+6041
| | | | | | | | | | 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-0712-12/+416
| | | | | | | | | | | | | | * 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-075-11/+85
| | | | | | | | | | | | | | | | | | | * 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-073-5/+5
| | | | | | | | | | | | | * `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-44322: Document more SyntaxError details. (GH-26562)Terry Jan Reedy2021-06-072-2/+11
| | | | | | 1. SyntaxError args have a tuple of other attributes. 2. Attributes are adjusted for errors in f-string field expressions. 3. Compile() can raise SyntaxErrors.
* bpo-44326: Remove unused members from pysqlite_Statement (GH-26564)Erlend Egeberg Aasland2021-06-062-16/+2
| | | | | * Remove unused db member of pysqlite_Statement * Remove unused sql method from statement object
* bpo-44327: Remove unused members from pysqlite_Connection (GH-26565)Erlend Egeberg Aasland2021-06-062-8/+0
| | | | | * Remove timeout_started * Remove timeout member
* Update bisect docstrings (GH-26548)hrchu2021-06-062-11/+11
|
* bpo-44320: Fix markup for W3C C14N test suite (GH-26556)NAKAMURA Osamu2021-06-061-1/+1
|
* bpo-44304: Ensure the sqlite3 destructor callback is always called with the ↵Pablo Galindo2021-06-052-0/+7
| | | | GIL held (GH-26551)
* bpo-44304: Fix crash in the sqlite3 module when the GC clears Statement ↵Pablo Galindo2021-06-053-7/+23
| | | | 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-44279: revert 'exceptions are raised' back to 'exceptions occur' (GH-26492)Irit Katriel2021-06-041-1/+1
|
* Align comment for better readability. (GH-26192)Kazantcev Andrey2021-06-041-5/+5
|
* bpo-44315: Remove unused connection argument from pysqlite_step() (GH-26535)Erlend Egeberg Aasland2021-06-044-7/+8
|
* bpo-43853: Handle sqlite3_value_text() errors (GH-25422)Erlend Egeberg Aasland2021-06-043-13/+21
|
* 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-0423-6026/+5705
| | | | | | | | | | | | | 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.
* Removing myself from ssl code ownership (GH-26529)Christian Heimes2021-06-041-3/+3
| | | | | I'm taking a break. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-43693: Compute deref offsets in compiler (gh-25152)Mark Shannon2021-06-0411-209/+222
| | | | | | 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-32280: Store _PyRuntime in a named section (GH-4802)Max Bélanger2021-06-031-2/+28
| | | | | This commit stores the _PyRuntime structure in a section of the same name. This allows a debugging or crash reporting tool to quickly locate this structure at runtime without requiring the symbol table. Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
* bpo-44305: Improve syntax error for try blocks without except or finally ↵Pablo Galindo2021-06-035-269/+383
| | | | (GH-26523)
* bpo-44042: Optimize sqlite3 begin transaction (GH-25908)Erlend Egeberg Aasland2021-06-033-46/+38
|
* 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-034-4/+840
| | | | | | | 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-42862: Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module ↵Erlend Egeberg Aasland2021-06-0312-438/+77
| | | | | (GH-24203) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-39573: Py_TYPE becomes a static inline function (GH-26493)Victor Stinner2021-06-035-9/+52
| | | | | Convert the Py_TYPE() and Py_SIZE() macros to static inline functions. The Py_SET_TYPE() and Py_SET_SIZE() functions must now be used to set an object type and size.
* bpo-42213: Remove redundant cyclic GC hack in sqlite3 (GH-26517)Erlend Egeberg Aasland2021-06-035-39/+37
| | | | | | | | | | 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-0321-5659/+5967
| | | | | | | | | | | | | | | | | 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-032-14/+9
| | | | 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-032-16/+35
| | | | | | | | | 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-034-2971/+3027
|
* bpo-39560: Document PyUnicode_FromKindAndData() kind transformation (GH-23848)Zackery Spytz2021-06-031-0/+6
|
* bpo-43858: Add logging.getLevelNamesMapping() (GH-26459)andrei kulakov2021-06-034-1/+21
| | | Added a function that returns a copy of a dict of logging levels.