summaryrefslogtreecommitdiffstats
path: root/Modules/_testcapimodule.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Close #19787: PyThread_set_key_value() now always set the value. In Python 3.3,Victor Stinner2013-12-131-0/+4
| | | | | | | | the function did nothing if the key already exists (if the current value is a non-NULL pointer). _testcapi.run_in_subinterp() now correctly sets the new Python thread state of the current thread when a subinterpreter is created.
* (Merge 3.3) Issue #14432: Fix compilation when thread support is disabledVictor Stinner2013-12-131-0/+5
|\
| * Issue #14432: Fix compilation when thread support is disabledVictor Stinner2013-12-131-0/+4
| |
| * Issue #14432: Generator now clears the borrowed reference to the thread stateVictor Stinner2013-12-131-0/+89
| | | | | | | | | | | | | | Fix a crash when a generator is created in a C thread that is destroyed while the generator is still used. The issue was that a generator contains a frame, and the frame kept a reference to the Python state of the destroyed C thread. The crash occurs when a trace function is setup.
* | Issue #14432: Remove the thread state field from the frame structure. Fix aVictor Stinner2013-12-131-0/+89
| | | | | | | | | | | | | | crash when a generator is created in a C thread that is destroyed while the generator is still used. The issue was that a generator contains a frame, and the frame kept a reference to the Python state of the destroyed C thread. The crash occurs when a trace function is setup.
* | Issue #19674: inspect.signature() now produces a correct signatureLarry Hastings2013-11-231-0/+44
| | | | | | | | for some builtins.
* | Issue #19433: test_capi: check signness of some C typesVictor Stinner2013-10-291-10/+34
| |
* | Issue #19433: test_capi: add tests on the size of some C typesVictor Stinner2013-10-291-0/+40
| |
* | Issue #18783: Removed existing mentions of Python long type in docstrings,Serhiy Storchaka2013-08-271-1/+1
|\ \ | |/ | | | | error messages and comments.
| * Issue #18783: Removed existing mentions of Python long type in docstrings,Serhiy Storchaka2013-08-271-1/+1
| | | | | | | | error messages and comments.
* | Fix warning: ‘ptr2’ may be used uninitialized in this functionChristian Heimes2013-08-021-0/+1
| |
* | Test Py_IncRef() and Py_DecRef() C functionsChristian Heimes2013-07-311-0/+11
| |
* | Issue #18112: PEP 442 implementation (safe object finalization).Antoine Pitrou2013-07-301-0/+80
| |
* | Handle yet another potential failure in testcapiChristian Heimes2013-07-261-0/+2
|\ \ | |/ | | | | CID 1058280