| Commit message (Collapse) | Author | Age |
| |
|
|
|
| |
Adds some additional test xfails for Emscripten stack overflows. Also corrects a test skip for test_io.
|
|
|
|
|
|
| |
Fixed an assertion error (so, it could be reproduced only in builds with assertions enabled)
for `exec` when the `source` argument is a string and the `closure` argument is not `None`.
Co-authored-by: sobolevn <mail@sobolevn.me>
|
|
|
|
| |
arg (#131737)
|
|
|
|
|
|
|
|
|
|
| |
In the free threaded build, the `_PyObject_LookupSpecial()` call can lead to
reference count contention on the returned function object becuase it
doesn't use stackrefs. Refactor some of the callers to use
`_PyObject_MaybeCallSpecialNoArgs`, which uses stackrefs internally.
This fixes the scaling bottleneck in the "lookup_special" microbenchmark
in `ftscalingbench.py`. However, the are still some uses of
`_PyObject_LookupSpecial()` that need to be addressed in future PRs.
|
| |
|
|
|
|
|
| |
variable at once (#131280)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
The use of PySys_GetObject() and _PySys_GetAttr(), which return a borrowed
reference, has been replaced by using one of the following functions, which
return a strong reference and distinguish a missing attribute from an error:
_PySys_GetOptionalAttr(), _PySys_GetOptionalAttrString(),
_PySys_GetRequiredAttr(), and _PySys_GetRequiredAttrString().
|
|
|
|
|
|
|
|
|
|
|
| |
* Implement C recursion protection with limit pointers for Linux, MacOS and Windows
* Remove calls to PyOS_CheckStack
* Add stack protection to parser
* Make tests more robust to low stacks
* Improve error messages for stack overflow
|
| |
|
|
|
| |
It failed if it was preceded by test_builtin.
|
|
|
|
|
| |
Modifying locale-related environment variables in `Lib/test/test_builtin.py`,
`Lib/test/test_io.py` and `Lib/test/test_locale.py` is now achieved by using
an `EnvironmentVarGuard` context instead of an explicit `try-finally` block.
|
|
|
| |
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
|
|
|
|
|
|
| |
On 32-bit Free Threading systems, immortal reference count
is 5 << 28, instead of 7 << 28.
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
|
|
|
|
| |
First step towards deprecating the asyncio policy system.
This deprecates `asyncio.set_event_loop_policy` and will be removed in Python 3.16.
|
|
|
|
|
| |
* Set a bit in the unused part of the refcount on 64 bit machines and the free-threaded build.
* Use the top of the refcount range on 32 bit machines
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"Generally, mixed-mode arithmetic combining real and complex variables should
be performed directly, not by first coercing the real to complex, lest the sign
of zero be rendered uninformative; the same goes for combinations of pure
imaginary quantities with complex variables." (c) Kahan, W: Branch cuts for
complex elementary functions.
This patch implements mixed-mode arithmetic rules, combining real and
complex variables as specified by C standards since C99 (in particular,
there is no special version for the true division with real lhs
operand). Most C compilers implementing C99+ Annex G have only these
special rules (without support for imaginary type, which is going to be
deprecated in C2y).
|
|
|
|
|
|
| |
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
|
|
|
|
| |
(GH-125251)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
classes (GH-123613)
* Setting the __module__ attribute for a class now removes the
__firstlineno__ item from the type's dict.
* The _collections_abc and _pydecimal modules now completely replace the
collections.abc and decimal modules after importing them. This
allows to get the source of classes and functions defined in these
modules.
* inspect.findsource() now checks whether the first line number for a
class is out of bound.
|
| |
|
|
|
|
|
|
|
|
| |
* Use compensated summation for complex sums with floating-point items.
This amends #121176.
* sum() specializations for floats and complexes now use
PyLong_AsDouble() instead of PyLong_AsLongAndOverflow() and
compensated summation as well.
|
|
|
| |
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
|
|
|
|
|
| |
(GH-114882)
Previously it raised OverflowError for very large or very small values.
|
|
|
|
| |
(#114662)
|
|
|
|
|
| |
Fix DeprecationWarning in test___ne__().
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
| |
It was raised in two cases:
* in the import statement when looking up __import__
* in pickling some builtin type when looking up built-ins iter, getattr, etc.
|
|
|
|
| |
(#112504)
|
|
|
|
|
|
|
| |
If the input prompt to the builtin input function on terminal has any null
character, then raise ValueError instead of silently truncating it.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
| |
bytearray.join (GH-112626)
|
|
|
|
|
|
|
|
| |
test_builtin and test_socketserver no longer use signal.alarm() to
implement a watchdog with a hardcoded timeout (2 and 60 seconds).
Python test runner regrtest has two watchdogs: faulthandler and
timeout on running worker processes. Tests using short hardcoded
timeout can fail on slowest buildbots just because the timeout is too
short.
|
|
|
|
| |
Only mark tests which spend significant system or user time,
by itself or in subprocesses.
|
| |
|
| |
|
|
|
|
|
|
| |
Python 3 (#13172)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
|
|
|
| |
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
This is the implementation of PEP683
Motivation:
The PR introduces the ability to immortalize instances in CPython which bypasses reference counting. Tagging objects as immortal allows up to skip certain operations when we know that the object will be around for the entire execution of the runtime.
Note that this by itself will bring a performance regression to the runtime due to the extra reference count checks. However, this brings the ability of having truly immutable objects that are useful in other contexts such as immutable data sharing between sub-interpreters.
|
|
|
| |
Add thrashcan macros to the deallocator of the filter objects to protect against deeply nested destruction of chains of nested filters.
|
| |
|
| |
|
| |
|