summaryrefslogtreecommitdiffstats
path: root/Modules/_testcapimodule.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue #26198: Added tests for "es", "et", "es#", "et#" and "C" format unitsSerhiy Storchaka2016-01-281-1/+93
| | | | of PyArg_Parse*() functions.
* sys.setrecursionlimit() now raises RecursionErrorVictor Stinner2015-10-121-0/+10
| | | | | | | 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.
* Issue #24489: ensure a previously set C errno doesn't disturb cmath.polar().Antoine Pitrou2015-06-231-0/+13
|\
| * Issue #24489: ensure a previously set C errno doesn't disturb cmath.polar().Antoine Pitrou2015-06-231-0/+13
| |
* | Issue 24017: Drop getawaitablefunc and friends in favor of unaryfunc.Yury Selivanov2015-05-281-1/+1
| |
* | PEP 489: Multi-phase extension module initializationNick Coghlan2015-05-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | PEP 0492 -- Coroutines with async and await syntax. Issue #24017.Yury Selivanov2015-05-121-0/+97
| |
* | Issue #20586: Argument Clinic now ensures signatures on functions without ↵Zachary Ware2015-04-131-0/+9
| | | | | | | | docstrings.
* | Issue #22117: Add a new _PyTime_FromSeconds() functionVictor Stinner2015-04-031-0/+13
| | | | | | | | | | Fix also _Py_InitializeEx_Private(): initialize time before initializing import, import_init() uses the _PyTime API (for thread locks).
* | Issue #22117, issue #23485: Fix _PyTime_AsMilliseconds() andVictor Stinner2015-04-011-0/+38
| | | | | | | | | | | | _PyTime_AsMicroseconds() rounding. Add also unit tests.
* | Issue #22117: Remove _PyTime_ROUND_DOWN and _PyTime_ROUND_UP rounding methodsVictor Stinner2015-03-301-2/+1
| | | | | | | | Use _PyTime_ROUND_FLOOR and _PyTime_ROUND_CEILING instead.
* | Issue #22117: Add _PyTime_ROUND_CEILING rounding method for timestampsVictor Stinner2015-03-301-1/+1
| | | | | | | | Add also more tests for ROUNd_FLOOR.
* | Issue #22117: Fix usage of _PyTime_AsTimeval()Victor Stinner2015-03-301-4/+1
| | | | | | | | | | Add _PyTime_AsTimeval_noraise() function. Call it when it's not possible (or not useful) to raise a Python exception on overflow.
* | Issue #22117: Use the _PyTime_t API in _datetime.datetime() constructorVictor Stinner2015-03-291-1/+1
| | | | | | | | | | * Remove _PyTime_gettimeofday() * Add _PyTime_GetSystemClock()
* | Issue #22117: Add the new _PyTime_ROUND_FLOOR rounding method for the datetimeVictor Stinner2015-03-281-1/+2
| | | | | | | | | | module. time.clock_settime() now uses this rounding method instead of _PyTime_ROUND_DOWN to handle correctly dates before 1970.
* | Issue #22117: Write unit tests for _PyTime_AsTimeval()Victor Stinner2015-03-281-0/+31
| | | | | | | | | | | | | | * _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
* | Issue #22117: The signal modules uses the new _PyTime_t APIVictor Stinner2015-03-271-0/+20
| | | | | | | | | | * Add _PyTime_AsTimespec() * Add unit tests for _PyTime_AsTimespec()
* | Issue #22117: time.monotonic() now uses the new _PyTime_t APIVictor Stinner2015-03-271-1/+16
| | | | | | | | | | | | * Add _PyTime_FromNanoseconds() * Add _PyTime_AsSecondsDouble() * Add unit tests for _PyTime_AsSecondsDouble()
* | Issue #22117: Fix rounding in _PyTime_FromSecondsObject()Victor Stinner2015-03-271-0/+17
| | | | | | | | | | | | * Rename _PyTime_FromObject() to _PyTime_FromSecondsObject() * Add _PyTime_AsNanosecondsObject() and _testcapi.pytime_fromsecondsobject() * Add unit tests
* | Issue #23571: _Py_CheckFunctionResult() now gives the name of the functionVictor Stinner2015-03-211-0/+22
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Removed unintentional trailing spaces in non-external and non-generated C files.Serhiy Storchaka2015-03-181-1/+1
| |
* | Fix regression introduced by changeset 7c6e3358221a that caused compileNed Deily2015-03-051-2/+2
| | | | | | | | errors of _testcapimodule.c with older versions of gcc.
* | Silenced minor GCC warnings.Serhiy Storchaka2015-02-261-0/+7
| |
* | Issue #23446: Use PyMem_New instead of PyMem_Malloc to avoid possible integerSerhiy Storchaka2015-02-161-1/+1
|\ \ | |/ | | | | overflows. Added few missed PyErr_NoMemory().
| * Issue #23446: Use PyMem_New instead of PyMem_Malloc to avoid possible integerSerhiy Storchaka2015-02-161-1/+1
| | | | | | | | overflows. Added few missed PyErr_NoMemory().
* | Issue #23392: Added tests for marshal C API that works with FILE*.Serhiy Storchaka2015-02-061-0/+166
|\ \ | |/
| * Issue #23392: Added tests for marshal C API that works with FILE*.Serhiy Storchaka2015-02-061-0/+166
| |
* | Issue #14203: Temporary fix for the compile failure on Windows.Stefan Krah2015-02-031-0/+4
| |
* | Issue #14203: Remove obsolete support for view==NULL in bytesiobuf_getbuffer()Stefan Krah2015-02-031-2/+20
| | | | | | | | and array_buffer_getbuf().
* | Issue #14203: Remove obsolete support for view==NULL in PyBuffer_FillInfo()Stefan Krah2015-02-031-0/+34
| | | | | | | | | | and bytearray_getbuffer(). Both functions now raise BufferError in that case.
* | Merge from 3.4.Stefan Krah2015-02-011-0/+51
|\ \ | |/
| * Issue #23370: Fix off-by-one error for non-contiguous buffers.Stefan Krah2015-02-011-0/+51
| |
* | Merge 3.4Victor Stinner2014-10-091-1/+1
|\ \ | |/
| * Issue #22588: Fix typo in _testcapi.test_incref_decref_API()Victor Stinner2014-10-091-1/+1
| |
* | Issue #22156: Fix some "comparison between signed and unsigned integers"Victor Stinner2014-08-151-1/+1
| | | | | | | | compiler warnings in the Modules/ subdirectory.
* | Issue #22116: C functions and methods (of the 'builtin_function_or_method' ↵Antoine Pitrou2014-08-061-0/+16
| | | | | | | | type) can now be weakref'ed. Patch by Wei Wu.
* | Issue #22018: Add _testcapi.raise_signal()Victor Stinner2014-07-211-0/+21
| | | | | | | | | | | | | | | | - 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
* | Issue #21233: Rename the C structure "PyMemAllocator" to "PyMemAllocatorEx" toVictor Stinner2014-06-021-2/+2
| | | | | | | | | | make sure that the code using it will be adapted for the new "calloc" field (instead of crashing).
* | (Merge 3.4) Issue #21639: Fix name of _testcapi test functionsVictor Stinner2014-06-021-2/+2
|\ \ | |/
| * Issue #21639: Fix name of _testcapi test functionsVictor Stinner2014-06-021-2/+2
| |
* | Issue #21233: Add new C functions: PyMem_RawCalloc(), PyMem_Calloc(),Victor Stinner2014-05-021-5/+68
| | | | | | | | | | | | 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).
* | Fix compiler warning on WindowsZachary Ware2014-04-231-1/+1
| | | | | | | | ..\Modules\_testcapimodule.c(3320): warning C4098: 'matmulType_dealloc' : 'void' function returning a value
* | PEP 465: a dedicated infix operator for matrix multiplication (closes #21176)Benjamin Peterson2014-04-101-0/+107
|/
* Issue #20320: select.select() and select.kqueue.control() now round the timeoutVictor Stinner2014-02-161-6/+25
| | | | | | aways from zero, instead of rounding towards zero. It should make test_asyncio more reliable, especially test_timeout_rounding() test.
* Issue #20530: Argument Clinic's signature format has been revised again.Larry Hastings2014-02-091-5/+22
| | | | | | | 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.
* Issue #20326: Argument Clinic now uses a simple, unique signature toLarry Hastings2014-01-281-4/+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).
* Issue #20189: Four additional builtin types (PyTypeObject,Larry Hastings2014-01-241-4/+4
| | | | | | 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.
* Issue #20226: Major improvements to Argument Clinic.Larry Hastings2014-01-161-1/+3
| | | | | | | | | | | | | | | | | | | | | | | * 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.
* Issue #20144: Argument Clinic now supports simple constants as parameterLarry Hastings2014-01-071-0/+12
| | | | | default values. inspect.Signature correspondingly supports them in __text_signature__ fields for builtins.
* Backout changeset 46393019b650Victor Stinner2013-12-131-4/+0
| | | | test_capi is failing and the fix is not trivial, I prefer to revert