| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
of PyArg_Parse*() functions.
|
|
|
|
|
|
|
| |
Issue #25274: sys.setrecursionlimit() now raises a RecursionError if the new
recursion limit is too low depending at the current recursion depth. Modify
also the "lower-water mark" formula to make it monotonic. This mark is used to
decide when the overflowed flag of the thread state is reset.
|
|\ |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Known limitations of the current implementation:
- documentation changes are incomplete
- there's a reference leak I haven't tracked down yet
The leak is most visible by running:
./python -m test -R3:3 test_importlib
However, you can also see it by running:
./python -X showrefcount
Importing the array or _testmultiphase modules, and
then deleting them from both sys.modules and the local
namespace shows significant increases in the total
number of active references each cycle. By contrast,
with _testcapi (which continues to use single-phase
initialisation) the global refcounts stabilise after
a couple of cycles.
|
| | |
|
| |
| |
| |
| | |
docstrings.
|
| |
| |
| |
| |
| | |
Fix also _Py_InitializeEx_Private(): initialize time before initializing
import, import_init() uses the _PyTime API (for thread locks).
|
| |
| |
| |
| |
| |
| | |
_PyTime_AsMicroseconds() rounding.
Add also unit tests.
|
| |
| |
| |
| | |
Use _PyTime_ROUND_FLOOR and _PyTime_ROUND_CEILING instead.
|
| |
| |
| |
| | |
Add also more tests for ROUNd_FLOOR.
|
| |
| |
| |
| |
| | |
Add _PyTime_AsTimeval_noraise() function. Call it when it's not possible (or
not useful) to raise a Python exception on overflow.
|
| |
| |
| |
| |
| | |
* Remove _PyTime_gettimeofday()
* Add _PyTime_GetSystemClock()
|
| |
| |
| |
| |
| | |
module. time.clock_settime() now uses this rounding method instead of
_PyTime_ROUND_DOWN to handle correctly dates before 1970.
|
| |
| |
| |
| |
| |
| |
| | |
* _PyTime_AsTimeval() now ensures that tv_usec is always positive
* _PyTime_AsTimespec() now ensures that tv_nsec is always positive
* _PyTime_AsTimeval() now returns an integer on overflow instead of raising an
exception
|
| |
| |
| |
| |
| | |
* Add _PyTime_AsTimespec()
* Add unit tests for _PyTime_AsTimespec()
|
| |
| |
| |
| |
| |
| | |
* Add _PyTime_FromNanoseconds()
* Add _PyTime_AsSecondsDouble()
* Add unit tests for _PyTime_AsSecondsDouble()
|
| |
| |
| |
| |
| |
| | |
* Rename _PyTime_FromObject() to _PyTime_FromSecondsObject()
* Add _PyTime_AsNanosecondsObject() and _testcapi.pytime_fromsecondsobject()
* Add unit tests
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
which returned an invalid result (result+error or no result without error) in
the exception message.
Add also unit test to check that the exception contains the name of the
function.
Special case: the final _PyEval_EvalFrameEx() check doesn't mention the
function since it didn't execute a single function but a whole frame.
|
| | |
|
| |
| |
| |
| | |
errors of _testcapimodule.c with older versions of gcc.
|
| | |
|
|\ \
| |/
| |
| | |
overflows. Added few missed PyErr_NoMemory().
|
| |
| |
| |
| | |
overflows. Added few missed PyErr_NoMemory().
|
|\ \
| |/ |
|
| | |
|
| | |
|
| |
| |
| |
| | |
and array_buffer_getbuf().
|
| |
| |
| |
| |
| | |
and bytearray_getbuffer(). Both functions now raise BufferError in that
case.
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| | |
compiler warnings in the Modules/ subdirectory.
|
| |
| |
| |
| | |
type) can now be weakref'ed. Patch by Wei Wu.
|
| |
| |
| |
| |
| |
| |
| |
| | |
- Use _testcapi.raise_signal() in test_signal
- close also os.pipe() file descriptors in some test_signal tests where they
were not closed properly
- Remove faulthandler._sigill() and faulthandler._sigbus(): reuse
_testcapi.raise_signal() in test_faulthandler
|
| |
| |
| |
| |
| | |
make sure that the code using it will be adapted for the new "calloc" field
(instead of crashing).
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| |
| |
| | |
PyObject_Calloc(), _PyObject_GC_Calloc(). bytes(int) and bytearray(int) are now
using ``calloc()`` instead of ``malloc()`` for large objects which is faster
and use less memory (until the bytearray buffer is filled with data).
|
| |
| |
| |
| | |
..\Modules\_testcapimodule.c(3320): warning C4098: 'matmulType_dealloc' : 'void' function returning a value
|
|/ |
|
|
|
|
|
|
| |
aways from zero, instead of rounding towards zero.
It should make test_asyncio more reliable, especially test_timeout_rounding() test.
|
|
|
|
|
|
|
| |
The new syntax is highly human readable while still preventing false
positives. The syntax also extends Python syntax to denote "self" and
positional-only parameters, allowing inspect.Signature objects to be
totally accurate for all supported builtins in Python 3.4.
|
|
|
|
|
|
|
|
|
|
| |
annotate text signatures in docstrings, resulting in fewer false
positives. "self" parameters are also explicitly marked, allowing
inspect.Signature() to authoritatively detect (and skip) said parameters.
Issue #20326: Argument Clinic now generates separate checksums for the
input and output sections of the block, allowing external tools to verify
that the input has not changed (and thus the output is not out-of-date).
|
|
|
|
|
|
| |
PyMethodDescr_Type, _PyMethodWrapper_Type, and PyWrapperDescr_Type)
have been modified to provide introspection information for builtins.
Also: many additional Lib, test suite, and Argument Clinic fixes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* You may now specify an expression as the default value for a
parameter! Example: "sys.maxsize - 1". This support is
intentionally quite limited; you may only use values that
can be represented as static C values.
* Removed "doc_default", simplified support for "c_default"
and "py_default". (I'm not sure we still even need
"py_default", but I'm leaving it in for now in case a
use presents itself.)
* Parameter lines support a trailing '\\' as a line
continuation character, allowing you to break up long lines.
* The argument parsing code generated when supporting optional
groups now uses PyTuple_GET_SIZE instead of PyTuple_GetSize,
leading to a 850% speedup in parsing. (Just kidding, this
is an unmeasurable difference.)
* A bugfix for the recent regression where the generated
prototype from pydoc for builtins would be littered with
unreadable "=<object ...>"" default values for parameters
that had no default value.
* Converted some asserts into proper failure messages.
* Many doc improvements and fixes.
|
|
|
|
|
| |
default values. inspect.Signature correspondingly supports them in
__text_signature__ fields for builtins.
|
|
|
|
| |
test_capi is failing and the fix is not trivial, I prefer to revert
|