| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
for "parity" between PyArg_ParseTuple() and the Python/getargs.c static
function skipitem() for all possible "format units".
|
| |
|
| |
|
|
|
|
| |
Patch by Stefan Behnel.
|
|
|
|
|
|
| |
They're optional-only for now (unlike in pure Python) but that's all
I needed. The syntax can easily be relaxed if we want to support
required keyword-only arguments for extension types in the future.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
timeval or timespec
time.ctime(), gmtime(), time.localtime(), datetime.date.fromtimestamp(),
datetime.datetime.fromtimestamp() and datetime.datetime.utcfromtimestamp() now
raises an OverflowError, instead of a ValueError, if the timestamp does not fit
in time_t.
datetime.datetime.fromtimestamp() and datetime.datetime.utcfromtimestamp() now
round microseconds towards zero instead of rounding to nearest with ties going
away from zero.
|
|
|
|
| |
Add a private API to convert an int or float to a C timespec structure.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and lifetime issues of dynamically allocated Py_buffer members (#9990)
as well as crashes (#8305, #7433). Many new features have been added
(See whatsnew/3.3), and the documentation has been updated extensively.
The ndarray test object from _testbuffer.c implements all aspects of
PEP-3118, so further development towards the complete implementation
of the PEP can proceed in a test-driven manner.
Thanks to Nick Coghlan, Antoine Pitrou and Pauli Virtanen for review
and many ideas.
- Issue #12834: Fix incorrect results of memoryview.tobytes() for
non-contiguous arrays.
- Issue #5231: Introduce memoryview.cast() method that allows changing
format and shape without making a copy of the underlying memory.
|
| |
|
|\
| |
| |
| | |
(prelude to issue #6531).
|
| |
| |
| |
| | |
(prelude to issue #6531).
|
| |
| |
| |
| |
| | |
* Add tests for PyUnicode_EncodeDecimal() and PyUnicode_TransformDecimalToASCII()
* Remove the unused "e" variable in replace()
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88550 | antoine.pitrou | 2011-02-24 21:50:49 +0100 (jeu., 24 févr. 2011) | 4 lines
Issue #11286: Raise a ValueError from calling PyMemoryView_FromBuffer with
a buffer struct having a NULL data pointer.
........
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Test the following functions:
* codecs.raw_unicode_escape_decode()
* PyUnicode_FromWideChar()
* PyUnicode_FromUnicode()
* "unicode_internal" and "unicode_escape" decoders
|
| |
| |
| |
| |
| | |
Add tests for PyUnicode_EncodeDecimal() and
PyUnicode_TransformDecimalToASCII().
|
| |
| |
| |
| | |
PyUnicode_GET_SIZE() => PyUnicode_GET_LENGTH()
|
| |
| |
| |
| | |
the deprecate Py_UNICODE type
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
PyLong_AsDouble() and PyLong_AsUnsignedLongLong() now raise TypeError (rather
than SystemError) when passed a non-integer argument, matching the behavior of
all the other PyLong_As*() functions.
|
| |
| |
| |
| |
| |
| |
| | |
As a side effect, this now allows the rjust, ljust and center methods of
bytes and bytearray to accept a bytearray argument.
Patch by Petri Lehtinen
|
| |
| |
| |
| |
| | |
PyOS_snprintf() to avoid temporary buffer allocated on the stack and a
conversion from bytes to Unicode.
|
| |
| |
| |
| | |
PyOS_snprintf().
|
|/
|
|
| |
a buffer struct having a NULL data pointer.
|
|
|
|
|
| |
Instead of _testcapi.format_unicode() because it has a limited API: it requires
exactly one argument of type unicode.
|
| |
|
|
|
|
| |
NULL
|
| |
|
| |
|
| |
|
|
|
|
|
| |
All unicode functions uses PyObject* except PyUnicode_AsWideChar(). Fix the
prototype for the new function PyUnicode_AsWideCharString().
|
|
|
|
|
| |
* test_aswidechar() => unicode_aswidechar()
* test_aswidecharstring() => unicode_aswidecharstring()
|
| |
|
| |
|
|
|
|
|
|
| |
character
And write unit tests for PyUnicode_AsWideChar() and PyUnicode_AsWideCharString().
|
|
|
|
|
|
| |
a non-ASCII byte in the format string.
Document also the encoding.
|
|
|
|
| |
"w*" format instead. Add tests for "w*" format.
|
|
|
|
|
| |
formats if the string contains a null byte/character. Write unit tests for
string formats.
|
|
|
|
|
| |
producing the expected error message. The test only tests what it's supposed
to test in pydebug mode though. Fixes issue 8726.
|
|
|
|
|
|
|
| |
would Py_FatalError, which called PyErr_Occurred, resulting in a semi-infinite
recursion.
Fixes issue 3605.
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r79661 | mark.dickinson | 2010-04-03 11:27:05 +0100 (Sat, 03 Apr 2010) | 14 lines
Fix a couple of issues with the test_structmembersType class in _testcapimodule
- rename to _test_structmembersType to avoid the class being automatically
called by test_capi
- allow space for trailing NUL in inplace_member field of all_structmembers
- use T_STRING_INPLACE instead of T_INPLACE_STRING as keyword argument
to _test_structmembersType initializer
- don't attempt to initialize inplace_member field if T_STRING_INPLACE
argument wasn't supplied.
........
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r79642 | benjamin.peterson | 2010-04-02 20:08:34 -0500 (Fri, 02 Apr 2010) | 1 line
split out large test function
........
r79644 | benjamin.peterson | 2010-04-02 20:28:57 -0500 (Fri, 02 Apr 2010) | 1 line
give TypeError when trying to set T_STRING_INPLACE
........
|
|
|
|
|
| |
internal error on non-integer input: they now raise TypeError instead.
This is needed for attributes declared via PyMemberDefs.
|
|
|
|
| |
failures fixed in r78172.
|
|
|
|
|
| |
test_capi, due to test_capsule failing to clear an exception. Many
thanks to Florent Xicluna for the diagnosis and fix.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r77866 | benjamin.peterson | 2010-01-30 17:26:05 -0600 (Sat, 30 Jan 2010) | 1 line
move test outside WITH_THREAD section
........
r77867 | benjamin.peterson | 2010-01-30 17:28:38 -0600 (Sat, 30 Jan 2010) | 1 line
be robust against test being run over and over (such as -R)
........
|
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r77916 | antoine.pitrou | 2010-02-02 23:36:17 +0100 (mar., 02 févr. 2010) | 4 lines
Issue #7385: Fix a crash in `MemoryView_FromObject` when
`PyObject_GetBuffer` fails. Patch by Florent Xicluna.
........
|
|
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r77842 | mark.dickinson | 2010-01-30 10:08:33 +0000 (Sat, 30 Jan 2010) | 4 lines
Issue #7767: Add new C-API function PyLong_AsLongLongAndOverflow, a
long long variant of PyLong_AsLongAndOverflow. Patch by Case Van
Horsen.
........
|