| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
* Fix implementation of %#T and %#N (they were implemented as %T# and
%N#).
* Restore tests removed in gh-116417.
|
|
|
|
|
| |
This keeps track of the per-thread total reference count operations in
PyThreadState in the free-threaded builds. The count is merged into the
interpreter's total when the thread exits.
|
| |
|
|
|
|
|
|
|
|
|
| |
Most mutable data is protected by a striped lock that is keyed on the
referenced object's address. The weakref's hash is protected using the
weakref's per-object lock.
Note that this only affects free-threaded builds. Apart from some minor
refactoring, the added code is all either gated by `ifdef`s or is a no-op
(e.g. `Py_BEGIN_CRITICAL_SECTION`).
|
| |
|
|
|
|
|
|
|
|
|
| |
The worker thread may still be alive after it enqueues it's last result,
which can lead to a delay of 30 seconds after the test finishes. This
happens much more frequently in the free-threaded build with the GIL
disabled.
This changes run_workers.py to track of live workers by enqueueing a
`WorkerExited()` instance before the worker exits.
|
| |
|
|
|
|
|
| |
The test suite fetches the C recursion limit from the _testcapi
extension module. Test extension modules can be disabled using the
--disable-test-modules configure option.
|
|
|
| |
The function _PyObject_FastCall() was restored.
|
|
|
| |
Co-authored-by: Erlend E. Aasland <erlend@python.org>
|
|
|
|
|
| |
* remove load extension doctest since we cannot skip it conditionally
* remove sys.unraisablehook example; using unraisable hooks is not "an
improved debug experience"
|
| |
|
|
|
|
| |
Remove all temporary databases in a dedicated 'testcleanup' step
at the end of the file.
|
| |
|
|
|
| |
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
| |
|
| |
|
| |
|
|
|
| |
Co-authored-by: Duprat <yduprat@gmail.com>
|
|
|
|
|
|
|
| |
- re-enable test_fcntl_64_bit on Linux aarch64, but disable it on all
Android ABIs
- use support.setswitchinterval in all relevant tests
- skip test_fma_zero_result on Android x86_64
- accept EACCES when calling os.get_terminal_size on Android
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace tri-state `follow_symlinks` with boolean `recurse_symlinks` argument. The new argument controls whether symlinks are followed when expanding recursive `**` wildcards. The possible argument values correspond as follows:
follow_symlinks recurse_symlinks
=============== ================
False N/A
None False
True True
We therefore drop support for not following symlinks when expanding non-recursive pattern parts; it wasn't requested in the original issue, and it's a feature not found in any shells.
This makes the API a easier to grok by eliminating `None` as an option.
No news blurb as `follow_symlinks` was new in 3.13.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-117569)
gh-116609: Ignore UTF-16 BOM in importlib.resources._functional tests
To test the `errors` argument, we read a UTF-16 file as UTF-8
with "backslashreplace" error handling. However, the utf-16
codec adds an endian-specific byte-order mark, so on big-endian
machines the expectation doesn't match the test file (which was
saved on a little-endian machine).
Use endswith to ignore the BOM.
|
|
|
|
| |
*endianness* (GH-116053)
|
|
|
|
|
|
|
|
|
|
|
| |
Apply the following optimizations to `posixpath.realpath()`:
- Remove use of recursion
- Construct child paths directly rather than using `join()`
- Use `os.getcwd[b]()` rather than `abspath()`
- Use `startswith(sep)` rather than `isabs()`
- Use slicing rather than `split()`
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
|
|
|
| |
subdirectory support (GH-116609)
|
| |
|
|
|
|
| |
is given (#117554)
|
| |
|
|
|
| |
Otherwise it might not compile with C++ (or certain C compilers/flags?).
|
|
|
|
| |
In the free-threaded build, the GIL will typically be disabled so
`py-bt` will not show threads waiting on the GIL.
|
|
|
| |
Make _PyDict_LoadGlobal threadsafe
|
|
|
| |
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
|
|
|
|
| |
Use critical sections to make acquire, release, and _count thread-safe
without the GIL.
|
|
|
|
| |
file (#117496)
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce a unified 16-bit backoff counter type (``_Py_BackoffCounter``),
shared between the Tier 1 adaptive specializer and the Tier 2 optimizer. The
API used for adaptive specialization counters is changed but the behavior is
(supposed to be) identical.
The behavior of the Tier 2 counters is changed:
- There are no longer dynamic thresholds (we never varied these).
- All counters now use the same exponential backoff.
- The counter for ``JUMP_BACKWARD`` starts counting down from 16.
- The ``temperature`` in side exits starts counting down from 64.
|
|
|
|
|
|
|
|
| |
* gh-109802: Add coverage test for complex_abs()
This tests overflow on L594.
// line numbers wrt to 0f2fa6150b
|
|
|
|
| |
example. (GH-117541)
|
| |
|
|
|
| |
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add libclinic.parser module and move the following classes and
functions there:
* Parser
* PythonParser
* create_parser_namespace()
Add libclinic.dsl_parser module and move the following classes,
functions and variables there:
* ConverterArgs
* DSLParser
* FunctionNames
* IndentStack
* ParamState
* StateKeeper
* eval_ast_expr()
* unsupported_special_methods
Add libclinic.app module and move the Clinic class there.
Add libclinic.cli module and move the following functions there:
* create_cli()
* main()
* parse_file()
* run_clinic()
|
| |
|
| |
|
|
|
|
| |
during deprecation period (GH-117354)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add libclinic.clanguage module and move the following classes and
functions there:
* CLanguage
* declare_parser()
Add libclinic.codegen and move the following classes there:
* BlockPrinter
* BufferSeries
* Destination
Move the following functions to libclinic.function:
* permute_left_option_groups()
* permute_optional_groups()
* permute_right_option_groups()
|
|
|
| |
This merges all `_CHECK_STACK_SPACE` uops in a trace into a single `_CHECK_STACK_SPACE_OPERAND` uop that checks whether there is enough stack space for all calls included in the entire trace.
|
|
|
|
|
| |
I had meant to switch everything to InterpreterError when I added it a while back. At the time I missed a few key spots.
As part of this, I've added print-the-exception to _PyXI_InitTypes() and fixed an error case in `_PyStaticType_InitBuiltin().
|
|
|
|
|
|
|
|
|
|
| |
This change gives a significant speedup, as the METH_FASTCALL calling
convention is now used. The following methods are adapted:
- str.count
- str.find
- str.index
- str.rfind
- str.rindex
|
|
|
|
|
|
|
|
|
| |
(#117481)
On Linux >= 2.6.36 with glibc < 2.27, `getcwd()` can return a relative
pathname starting with '(unreachable)'. We detect this and fail with
ENOENT, matching new glibc behaviour.
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
| |
|