summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Add bpo-42914 to What's New (GH-25124)Wm. Keith van der Meulen2021-06-032-0/+4
| | | | | BPO-42914 was not added to the What's New in #24864. This includes it in the "Improved Modules" section. Automerge-Triggered-By: GH:gpshead
* 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-022-2/+11
| | | | Fix test_pha_required_nocert() of test_ssl: catch two more EOF cases (when the recv() method returns an empty string).
* build(deps): bump actions/cache from 2.1.5 to 2.1.6 (GH-26476)dependabot[bot]2021-06-021-2/+2
| | | | | | | | | Bumps [actions/cache](https://github.com/actions/cache) from 2.1.5 to 2.1.6. - [Release notes](https://github.com/actions/cache/releases) - [Commits](https://github.com/actions/cache/compare/v2.1.5...v2.1.6) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Typo fix in asyncio-eventloop.rst (GH-26482)Zac Bentley2021-06-021-1/+1
|
* bpo-44285: getpath.c: Assert that env_file is NULL during an error check ↵stratakis2021-06-021-0/+1
| | | | | (GH-26486) This was flagged by a static analyzer, but the logic of why this is NULL on error is hard to follow for humans as well.
* bpo-44165: pysqlite_statement_create now returns a Py object, not an int ↵Erlend Egeberg Aasland2021-06-021-1/+1
| | | | | (GH-26484) GH-26206 was broken by GH-26475.
* bpo-17792: more accurate error message for unbound variable access ↵Irit Katriel2021-06-022-3/+4
| | | | exceptions (GH-24976)
* Remove duplicate address in CommonTestMixin_v4.test_leading_zeros() (GH-26326)Mariusz Felisiak2021-06-021-1/+0
|
* bpo-44165: Optimise sqlite3 statement preparation by passing string size ↵Erlend Egeberg Aasland2021-06-023-7/+25
| | | | (GH-26206)
* bpo-44263: Py_TPFLAGS_HAVE_GC requires tp_traverse (GH-26463)Victor Stinner2021-06-013-3/+40
| | | | | The PyType_Ready() function now raises an error if a type is defined with the Py_TPFLAGS_HAVE_GC flag set but has no traverse function (PyTypeObject.tp_traverse).
* Fix typo in block comment in Include/internal/pycore_condvar.h (GH-26457)Rishi2021-06-011-1/+1
|
* bpo-44279: [doc] reword contextlib.suppress documentation (GH-26428)MapleCCC2021-06-011-2/+3
|
* bpo-44273: Improve syntax error message for assigning to "..." (GH-26477)Serhiy Storchaka2021-06-012-2/+2
| | | Use "ellipsis" instead of "Ellipsis" in syntax error messages to eliminate confusion with built-in variable Ellipsis.
* bpo-42972: Track sqlite3 statement objects (GH-26475)Erlend Egeberg Aasland2021-06-014-48/+40
| | | | | | | | | | | Allocate and track statement objects in pysqlite_statement_create. By allocating and tracking creation of statement object in pysqlite_statement_create(), the caller does not need to worry about GC syncronization, and eliminates the possibility of getting a badly created object. All related fault handling is moved to pysqlite_statement_create(). Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-44260: Do not read system entropy without need in Random() (GH-26455)Serhiy Storchaka2021-05-313-44/+38
|
* bpo-44246: Remove note about access by index now that a compatibility shim ↵Jason R. Coombs2021-05-311-4/+1
| | | | is offered. (GH-26472)
* bpo-44246: Restore compatibility in entry_points (GH-26468)Jason R. Coombs2021-05-313-1/+125
| | | | | | | * bpo-44246: Entry points performance improvements. From importlib_metadata 4.3.1. * bpo-44246: Sync with importlib_metadata 4.4
* bpo-44246: Entry points performance improvements. (GH-26467)Jason R. Coombs2021-05-313-1/+30
| | | From importlib_metadata 4.3.1.
* bpo-44263: Fix _decimal and _testcapi GC protocol (GH-26464)Victor Stinner2021-05-312-2/+9
| | | | | | * _testcapi.heapgctype: implement a traverse function since the type is defined with Py_TPFLAGS_HAVE_GC. * _decimal: PyDecSignalDictMixin_Type is no longer defined with Py_TPFLAGS_HAVE_GC since it has no traverse function.
* bpo-42972: Fix sqlite3 traverse/clear functions (GH-26452)Erlend Egeberg Aasland2021-05-316-41/+44
|
* bpo-42972: Fully implement GC protocol for xxlimited (GH-26451)Hai Shi2021-05-312-0/+16
|
* Fixing typos in turtle.rst (GH-24385)Jules Lasne2021-05-301-5/+5
| | | | | | | | | | | * Fixing typos in turtle.rst * Update turtle.rst * Update turtle.rst * Update turtle.rst * Update turtle.rst
* bpo-44235: Remove deprecated functions in the gettext module. (GH-26378)Dong-hee Na2021-05-305-447/+40
|
* Trivial change in fractions module docs: real -> rational numbers (GH-25009)Sergey B Kirpichev2021-05-291-1/+1
| | | | | Obviously, the former was a little misleading: not only rationals may be considered as "infinite-precision, real numbers" - but, for example, any real finite extension of the rationals.
* bpo-43750: Fix incorrect reference to PACKET_MULTIHOST in the docs (GH-25241)Zackery Spytz2021-05-291-1/+1
| | | It should be PACKET_MULTICAST, not PACKET_MULTIHOST.
* bpo-42085: [docs] Add versionadded for am_send in type object documentation ↵Martmists2021-05-291-0/+2
| | | | (GH-25465)
* bpo-44254: On Mac, remove disfunctional colors from turtledemo buttons ↵Terry Jan Reedy2021-05-292-16/+30
| | | | | | (GH-26448) On macOS, tk defers to system setting for button background when in normal state. Give turtledemo button text a color that works on either light or dark background.
* bpo-44263: Mention PyType_Ready in the gc protocol warning (GH-26445)Pablo Galindo2021-05-292-9/+12
|
* bpo-44263: Better explain the GC contract for PyType_FromSpecWithBases ↵Pablo Galindo2021-05-292-0/+18
| | | | (GH-26442)
* Remove duplicate mime type mapping .bmp -> image/x-ms-bmp (GH-26300)Andreas Jansson2021-05-291-1/+0
| | | Thanks for the contribution @andreasjansson
* Fix MSVC compiler warnings in dictobject.c (GH-26432)Mark Shannon2021-05-292-4/+6
|
* bpo-44252: Correctly implement gc support for SSLError objects (GH-26439)Pablo Galindo2021-05-281-2/+1
|