| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
offsets. (gh-26396)" (GH-26597)
This reverts commit 631f9938b1604d4f893417ec339b9e0fa9196fb1.
|
|
|
|
| |
errors (GH-26589)
|
|
|
| |
from imports
|
| |
|
|
|
|
|
|
|
| |
(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
|
|
|
| |
Relative imports do not work when running test_x as main.
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
* 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:...
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* `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>
|
|
|
|
| |
objects (GH-26545)
|
|
|
|
| |
suite (GH-26542)
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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
|
|
|
|
| |
(GH-26523)
|
|
|
| |
Don't catch OSError, and check the SSLError message.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Fix test_ssl.test_wrong_cert_tls13(): use suppress_ragged_eofs=False,
since read() can raise ssl.SSLEOFError on Windows.
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
| |
Added a function that returns a copy of a dict of logging levels.
|
|
|
|
| |
It wasn't actually detecting the regression due to the
assertion being too lenient.
|
|
|
|
|
| |
(GH-26491)
Signed-off-by: Tal Einat <532281+taleinat@users.noreply.github.com>
|
|
|
|
| |
Fix test_pha_required_nocert() of test_ssl: catch two more EOF cases
(when the recv() method returns an empty string).
|
| |
|
|
|
| |
Use "ellipsis" instead of "Ellipsis" in syntax error messages to eliminate confusion with built-in variable Ellipsis.
|
| |
|
|
|
|
|
|
|
| |
* bpo-44246: Entry points performance improvements.
From importlib_metadata 4.3.1.
* bpo-44246: Sync with importlib_metadata 4.4
|
|
|
| |
From importlib_metadata 4.3.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.
|
|
|
|
|
|
| |
(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.
|
|
|
| |
Thanks for the contribution @andreasjansson
|
| |
|
|
|
|
|
| |
And also of lowercase vs lower-case.
The `-` notation should only be used for adjectives.
|
|
|
|
|
|
|
|
| |
* Store log2(size) instead of size in dict-keys.
* Use enum instead of function pointer to record kind of keys.
* Add version number to dict keys.
|
|
|
|
|
|
|
| |
AutoCompleteWindow.winconfig_event() (GH-26404)
Since the <Configure> event may occur after the
completion window is gone, catch potential
TclError exceptions when accessing acw.
|
|
|
|
| |
(GH-26412)
|
|
|
|
|
| |
This is an internal-only API that helps us manage the many values used to create a code object.
https://bugs.python.org/issue43693
|
| |
|
| |
|
| |
|
|
|
|
|
| |
5.0.6). (GH-26387)
Automerge-Triggered-By: GH:jaraco
|
|
|
|
|
|
|
|
|
|
| |
* Move up the comment about fields using in hashing/comparision.
* Group the fields more clearly.
* Add co_ncellvars and co_nfreevars.
* Raise ValueError if nlocals != len(varnames), rather than aborting.
|