| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds several of unspecialized opcodes to superblocks:
TO_BOOL, BINARY_SUBSCR, STORE_SUBSCR,
UNPACK_SEQUENCE, LOAD_GLOBAL, LOAD_ATTR,
COMPARE_OP, BINARY_OP.
While we may not want that eventually, for now this helps finding bugs.
There is a rudimentary test checking for UNPACK_SEQUENCE.
Once we're ready to undo this, that would be simple:
just replace the call to variable_used_unspecialized
with a call to variable_used (as shown in a comment).
Or add individual opcdes to FORBIDDEN_NAMES_IN_UOPS.
|
|
|
|
|
|
| |
Instead of special-casing specific instructions,
we add a few more special values to the 'size' field of expansions,
so in the future we can automatically handle
additional super-instructions in the generator.
|
|
|
|
| |
(#106477)
|
|
|
|
| |
close(). (#106504)
|
| |
|
|
|
| |
With test.
|
|
|
|
|
|
|
|
|
| |
`sys.executable` is `None` (#106464)
Prevent `multiprocessing.spawn` from failing to *import* in environments
where `sys.executable` is `None`. This regressed in 3.11 with the addition
of support for path-like objects in multiprocessing.
Adds a test decorator to have tests only run when part of test_multiprocessing_spawn to `_test_multiprocessing.py` so we can start to avoid re-running the same not-global-state specific test in all 3 modes when there is no need.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The uops test wasn't testing anything by default,
and was failing when run with -Xuops.
Made the two executor-related context managers global,
so TestUops can use them (notably `with temporary_optimizer(opt)`).
Made clear_executor() a little more thorough.
Fixed a crash upon finalizing a uop optimizer,
by adding a `tp_dealloc` handler.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
When `_PyOptimizer_BackEdge` returns `NULL`, we should restore `next_instr` (and `stack_pointer`). To accomplish this we should jump to `resume_with_error` instead of just `error`.
The problem this causes is subtle -- the only repro I have is in PR gh-106393, at commit d7df54b139bcc47f5ea094bfaa9824f79bc45adc. But the fix is real (as shown later in that PR).
While we're at it, also improve the debug output: the offsets at which traces are identified are now measured in bytes, and always show the start offset. This makes it easier to correlate executor calls with optimizer calls, and either with `dis` output.
<!-- gh-issue-number: gh-104584 -->
* Issue: gh-104584
<!-- /gh-issue-number -->
|
|
|
|
|
|
|
| |
(GH-106366)
Mark `testthreadingmock.py` with `threading_helper.requires_working_threading`.
Also add longer delays to reduce the change of a race conditions on the tests that validate short timeouts.
|
|
|
|
| |
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
|
|
|
|
|
| |
`contextlib.redirect_stdout` (#106478)
clinic.py: Don't needlessly reimplement `contextlib.redirect_stdout`
|
|
|
| |
Co-authored-by: Ariel Eizenberg <ariel.eizenberg@pagaya.com>
|
| |
|
| |
|
|
|
| |
* gh-105340: include hidden fast-locals in locals()
|
|
|
|
|
| |
* gh-106292: restore checking __dict__ in cached_property.__get__
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
|
| |
|
|
|
| |
As the versionchanged notice says, this note is no longer true on 3.12+.
|
|
|
|
|
| |
Remove unused bytes object and bytes slicing
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
|
|
|
| |
This change makes it explicit that asyncio.CancelledError is not a subclass of Exception.
|
|
|
|
|
|
|
| |
Revert the two commits that introduced the regressions:
- gh-104152
- gh-104507
|
| |
|
| |
|
|
|
| |
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
| |
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
| |
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
| |
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
| |
(#106434)
Compilation of Python/specialize.c was broken on macOS for me by gh-106400.
|
|
|
| |
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
| |
(#106423)
|
|
|
|
|
|
| |
mock: Rename `wait_until_any_call` to `wait_until_any_call_with`
Rename the method to be more explicit that it expects the args and
kwargs to wait for.
|
|
|
| |
array: suppress warning in test_array
|
|
|
|
|
| |
Remove the _PyInterpreterState_HasFeature() function from the C API:
move it to the internal C API (pycore_interp.h). No longer export
the function.
|
|
|
| |
* Add len() and indexing support to uop superblocks.
|
| |
|
| |
|
|
|
| |
Added new test class PermutationTests()
|
| |
|
|
|
|
|
|
|
| |
Remove private pylifecycle.h functions: move them to the internal C
API ( pycore_atexit.h, pycore_pylifecycle.h and pycore_signal.h). No
longer export most of these functions.
Move _testcapi.test_atexit() to _testinternalcapi.
|
|
|
|
|
|
|
|
| |
Remove private _PyUnicode_TransformDecimalAndSpaceToASCII() and other
private _PyUnicode C API functions: move them to the internal C API
(pycore_unicodeobject.h). No longer most of these functions.
Replace _testcapi.unicode_transformdecimalandspacetoascii() with
_testinternal._PyUnicode_TransformDecimalAndSpaceToASCII().
|
|
|
|
| |
Remove the _PyBytesWriter C API: move it to the internal C API
(pycore_bytesobject.h).
|
|
|
|
|
| |
Remove private _PyUnicode codecs C API functions: move them to the
internal C API (pycore_unicodeobject.h). No longer export most of
these functions.
|
|
|
|
|
|
| |
Add:
- test_disallowed_gropuing__no_matching_bracket
- test_double_slash
|
|
|
| |
Replace PyAPI_DATA() with PyAPI_FUNC().
|
| |
|
|
|
|
|
|
| |
* Remove private _PyImport C API functions: move them to the internal
C API (pycore_import.h).
* No longer export most of these private functions.
* _testcapi avoids private _PyImport_GetModuleAttrString().
|