summaryrefslogtreecommitdiffstats
path: root/Modules/_testcapimodule.c
Commit message (Collapse)AuthorAgeFilesLines
* [3.5] bpo-30184: Add tests for invalid use of PyArg_ParseTupleAndKeywords. ↵Serhiy Storchaka2017-05-041-2/+2
| | | | | (GH-1316). (#1442) (cherry picked from commit 5f161fd86dd5bb936a1a2a13391b13b7e59ec201)
* Issue #28147: Fix a memory leak in split-table dictionariesINADA Naoki2016-12-201-0/+10
| | | | setattr() must not convert combined table into split table.
* Issue #28701: Replace PyUnicode_CompareWithASCIIString with ↵Serhiy Storchaka2016-11-161-1/+1
| | | | | | _PyUnicode_EqualToASCIIString. The latter function is more readable, faster and doesn't raise exceptions.
* Issue #28379: Added sanity checks and tests for PyUnicode_CopyCharacters().Serhiy Storchaka2016-10-081-0/+34
| | | | Patch by Xiang Zhang.
* Issue #28295: Fixed the documentation and added tests for PyUnicode_AsUCS4().Serhiy Storchaka2016-10-021-0/+31
| | | | Original patch by Xiang Zhang.
* Issue #27895: Spelling fixes (Contributed by Ville Skyttä).Martin Panter2016-09-071-1/+1
|
* Issue #26168: Fixed possible refleaks in failing Py_BuildValue() with the "N"Serhiy Storchaka2016-05-201-0/+95
| | | | format unit.
* Issue #26995: Added tests for "f", "d", "D", "S", "Y", and "U" format codesSerhiy Storchaka2016-05-161-0/+63
| | | | in PyArg_ParseTuple().
* Backported tests for issue #18531.Serhiy Storchaka2016-05-161-0/+22
|
* 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).