Mark Dickinson
58ceecfe5a
Issue #18513 : Add workaround for OS X 10.8 cexp bug that leads to wrong cmath.rect(0.0,-0.0) results.
2013-07-20 17:59:13 +01:00
Christian Heimes
2ef710e40f
Add missing check of PyDict_Update()'s return value in _elementtree.c
...
CID 719637
2013-07-20 15:12:19 +02:00
Christian Heimes
7ed4294d7f
Add missing check of PyDict_Update()'s return value in _elementtree.c
...
CID 719637
2013-07-20 15:12:09 +02:00
Christian Heimes
3f95bdcdbe
Add missing check of PyDict_SetItem()'s return value
...
CID 486659
2013-07-20 15:01:36 +02:00
Christian Heimes
97cb67b9ca
Add missing check of PyDict_SetItem()'s return value
...
CID 486659
2013-07-20 15:01:26 +02:00
Christian Heimes
abfc4d838a
Fix fishy sizeof(Py_ssize_t *).
...
sizeof(Py_ssize_t *) == sizeof(Py_ssize_t) but it's not a portable assumption.
CID 486403
2013-07-20 14:11:52 +02:00
Christian Heimes
e91ad501c5
Use strncat() instead of strcat() to silence some warnings.
...
CID 486616, CID 486617, CID 486615
2013-07-20 14:11:28 +02:00
Raymond Hettinger
5ea0f80165
Make the GCC-4.8 compiler happy by moving declarations to the top of the function.
2013-07-19 19:52:04 -07:00
Ronald Oussoren
ced1226cce
(3.3->default): #18480 : Add missing PyType_Ready call to _elementtree extension
2013-07-19 11:14:05 +02:00
Ronald Oussoren
138d080a28
#18480 : Add missing PyType_Ready call to _elementtree extension
2013-07-19 11:11:25 +02:00
Victor Stinner
d85032e25d
(Merge 3.3) Fix posix_chflags(): return_value was uninitialized when
...
follow_symlinks=False whereas the fchmodat() function is not avaialble.
2013-07-18 23:58:08 +02:00
Victor Stinner
45e90394e7
Fix posix_chflags(): return_value was uninitialized when follow_symlinks=False
...
whereas the fchmodat() function is not avaialble.
2013-07-18 23:57:35 +02:00
Victor Stinner
9e09c26e8a
Issue #18501 , #18408 : Fix expat handlers in pyexpat, don't call Python
...
functions if a Python exception was raised
2013-07-18 23:17:01 +02:00
Victor Stinner
3fd8cbd5e4
Issue #18408 : Fix _elementtree.c, don't call Python function from an expat
...
handler if a Python exception is set
2013-07-18 22:46:14 +02:00
Victor Stinner
ca713c014e
Fix a compiler warning on FreeBSD
...
Modules/python.c:40: warning: ISO C90 forbids mixed declarations and code
2013-07-18 02:43:47 +02:00
Victor Stinner
569f364017
Issue #18408 : Fix PyInit__curses_panel(), handle import_curses() failure
...
Don't call PyErr_NewException() if an exception is set, or type_call() would
fail with an assertion error.
2013-07-18 02:31:21 +02:00
Victor Stinner
4abda5d5b0
Issue #18408 : Fix _pysqlite_fetch_one_row(), in debug mode, don't call
...
type_call() with an exception set
2013-07-18 01:54:37 +02:00
Victor Stinner
ace47d7efd
Issue #18408 : PyEval_EvalFrameEx() and PyEval_CallObjectWithKeywords() now fail
...
with an assertion error if they are called with an exception set
(PyErr_Occurred()).
If these functions are called with an exception set, the exception may be
cleared and so the caller looses its exception.
Add also assertions to PyEval_CallObjectWithKeywords() and call_function() to
check if the function succeed with no exception set, or the function failed
with an exception set.
2013-07-18 01:41:08 +02:00
Victor Stinner
e9af4cface
Issue #18488 : _pysqlite_final_callback() should not clear the exception set by
...
the last call to the step() method of a user function
2013-07-18 01:42:04 +02:00
Victor Stinner
4755beac3c
Issue #18408 : Fix array_tolist(), handle PyList_SetItem() failure
2013-07-18 01:12:35 +02:00
Victor Stinner
0b142e2809
Issue #18408 : Fix array_index(), handle getarrayitem() failure
2013-07-17 23:01:30 +02:00
Victor Stinner
764a46d2ed
Issue #18408 : Fix heapq.heappop(), handle PyList_SetSlice() failure
2013-07-17 21:50:21 +02:00
Victor Stinner
2ff51b83b8
Issue #18408 : Fix time.tzset(), detect exception when calling PyInit_timezone()
2013-07-17 21:42:45 +02:00
Victor Stinner
d594f24fbc
Issue #18408 : Fix locale.localeconv(), handle PyDict_SetItemString() failure
2013-07-17 00:55:57 +02:00
Victor Stinner
6684bdf73d
Issue #18408 : Fix typo in build_node_tree() of the parser module
...
Type "o" format of Py_BuildValue() is invalid: it must be "O".
2013-07-17 00:13:52 +02:00
Victor Stinner
1e53bbaced
Issue #18408 : handle PySys_GetObject() failure, raise a RuntimeError
2013-07-16 22:26:05 +02:00
Victor Stinner
d1f9942ae3
Issue #18408 : Fix cjkcodecs decoders, add a new MBERR_EXCEPTION constant to
...
notify exceptions raised by the _PyUnicodeWriter API
2013-07-16 21:41:43 +02:00
Victor Stinner
85c761d3d3
Issue #18408 : Fix fileio_read() on _PyBytes_Resize() failure
...
bytes is NULL on _PyBytes_Resize() failure
2013-07-16 21:36:02 +02:00
Victor Stinner
a4ced86f03
Issue #18408 : random_seed() now raises a MemoryError on memory allocation
...
failure
2013-07-15 20:00:36 +02:00
Victor Stinner
33283ba300
Issue #18408 : Fix CJK decoders, raise MemoryError on memory allocation failure
2013-07-15 17:47:39 +02:00
Victor Stinner
54b2d2ec69
Issue #18408 : Fix pyexpat.ParserCreate()
...
Check if XML_ParserCreate_MM() failed (ex: MemoryError) before using
self->itself.
2013-07-15 17:15:57 +02:00
Ronald Oussoren
0fedb37c47
Issue #18393 : Remove use of deprecated API on OSX
...
The "Gestalt" function on OSX is deprecated (starting with OSX 10.8),
remove its usage from the stdlib. The patch removes a number of private
functions and a private module, but does not change the public API.
The removed code was effectively dead, the platform module has used
other code to fetch the OSX version for years and could only use
on the Gestalt-based code as a fallback. That fallback can only trigger
on broken OSX installs (that is, someone has removed parts of the system
install)
2013-07-15 18:32:09 +02:00
Richard Oudkerk
9ba6962a04
Issue #18344 : Fix potential ref-leaks in _bufferedreader_read_all().
2013-07-15 16:10:28 +01:00
Richard Oudkerk
9ad51ec81b
Issue #18344 : Fix potential ref-leaks in _bufferedreader_read_all().
2013-07-15 16:05:22 +01:00
Raymond Hettinger
90dea4ce43
Tweak the deque struct by moving the least used fields (maxlen and weakref) to the end.
2013-07-13 22:30:25 -07:00
Raymond Hettinger
840533bf1c
Use a do-while loop in the inner loop for rotate (m is always greater than zero).
2013-07-13 17:03:58 -07:00
Raymond Hettinger
3959af9b2a
Move the freeblock() call outside the main loop to speed-up and simplify the block re-use logic.
2013-07-13 02:34:08 -07:00
Victor Stinner
d917dcbe5e
Issue #18408 : Fix constructors of _elementtree.c
...
* Use Py_DECREF() instead of PyObject_GC_Del() to release correctly all
resources
* Raise MemoryError on memory allocation failure
2013-07-12 02:05:17 +02:00
Victor Stinner
81aac734e1
Issue #18408 : Fix create_extra() of _elementtree.c, raise MemoryError on memory
...
allocation failure
2013-07-12 02:03:34 +02:00
Victor Stinner
df4572cc71
Issue #18408 : parser module: fix error handling in node2tuple()
...
Handle PyLong_FromLong() and PyUnicode_FromString() failures
2013-07-12 01:35:10 +02:00
Victor Stinner
3bd6abd129
Issue #18408 : Fix parser.sequence2st() and parser.tuple2st(): raise MemoryError
...
on memory allocation failure
Instead of ignoring the memory allocation failure and create invalid objects.
2013-07-12 01:33:59 +02:00
Victor Stinner
4202456cd4
Issue #18408 : _pickle.c: Add missing PyErr_NoMemory() on memory allocation failures
2013-07-12 00:53:57 +02:00
Victor Stinner
8ca72e2e3d
Issue #18408 : _PyMemoTable_ResizeTable() now restores the old table if
...
allocating a bigger table failed
PyMemoTable destructor does crash if mt_table is NULL.
2013-07-12 00:53:26 +02:00
Victor Stinner
c31df04234
Issue #18408 : Oh, I was wrong: Pickler_New() must call Py_DECREF() to destroy
...
the newly created pickler, and not PyObject_GC_Del().
2013-07-12 00:08:59 +02:00
Victor Stinner
71c8b7ec04
Issue #18408 : Different fixes in _elementtree.c to handle correctly MemoryError
...
* create_new_element() initializes all attributes before handling errors,
to fix a crash in the destructor
* create_new_element() calls PyObject_GC_Del() on error, instead of
PyObject_Del(), because the object was created by PyObject_GC_New()
* subelement() now handles create_new_element() failure
* element_getattro() now handles element_get_text() failure
* makeuniversal() now handles PyBytes_FromStringAndSize() failure
2013-07-11 23:08:39 +02:00
Victor Stinner
4d46343340
Cleanup _elementtree.c
2013-07-11 23:05:03 +02:00
Victor Stinner
5f0af23f5e
Issue #18408 : _elementtree.c now handles create_extra() failure
2013-07-11 23:01:36 +02:00
Victor Stinner
68c8ea25f1
Issue #18408 : Fix _Pickler_New() and _Unpickler_New(): initialize all
...
attributes before handling errors
_Pickler_New() now calls PyObject_GC_Del() instead of Py_DECREF() on error,
because the pickle object is created using PyObject_GC_New().
Fix a crash in the destructor when an attribute is not initiallized.
2013-07-11 22:56:25 +02:00
Serhiy Storchaka
50ae3f680b
Issue #18101 : Tcl.split() now process strings nested in a tuple as it
...
do with byte strings.
Added tests for Tcl.split() and Tcl.splitline().
2013-07-11 20:36:00 +03:00
Serhiy Storchaka
275d5fdbe4
Issue #18101 : Tcl.split() now process strings nested in a tuple as it
...
do with byte strings.
Added tests for Tcl.split() and Tcl.splitline().
2013-07-11 20:34:47 +03:00
Serhiy Storchaka
e3ed4edb94
Issue #18338 : `python --version` now prints version string to stdout, and
...
not to stderr. Patch by Berker Peksag and Michael Dickens.
2013-07-11 20:01:17 +03:00
R David Murray
609142ef05
Merge: #18399 : fix comment typo.
2013-07-10 11:57:39 -04:00
R David Murray
296b73c83d
#18399 : fix comment typo.
...
Patch by Andrew Rowe.
2013-07-10 10:57:39 -04:00
Raymond Hettinger
d9c116ca40
Add a spacing saving heuristic to deque's extend methods
2013-07-09 00:13:21 -07:00
Victor Stinner
bbf8ce5b87
Issue #18408 : Fix select.select() to handle PyList_New() failure (MemoryError)
...
in set2list()
2013-07-09 00:49:03 +02:00
Victor Stinner
7979926616
Issue #18408 : Fix usage of _PyBytes_Resize()
...
_PyBytes_Resize(&v, new_size) sets v to NULL on error, so v cannot be used
anymore. Replace "Py_DECREF(v); v = NULL;" with "Py_CLEAR(v);".
2013-07-09 00:35:22 +02:00
Victor Stinner
bf2e2f9bdf
Issue #18408 : Fix zlib.compressobj() to handle PyThread_allocate_lock() failure
...
(MemoryError).
2013-07-09 00:29:03 +02:00
Victor Stinner
3f15cf0961
Issue #18408 : Fix ConvParam() of the ctypes module to handle paramfunc failure
...
(MemoryError).
2013-07-09 00:27:12 +02:00
Victor Stinner
064bbdc79b
fix indentation
2013-07-08 22:28:27 +02:00
Victor Stinner
5d1866c78a
Issue #18408 : PyObject_GC_NewVar() now raises SystemError exception if nitems
...
is negative
2013-07-08 22:17:52 +02:00
Victor Stinner
c1eb26cd2f
gcmodule.c: strip trailing spaces
2013-07-08 22:15:05 +02:00
Victor Stinner
49fc8ece81
Issue #18203 : Add _PyMem_RawStrdup() and _PyMem_Strdup()
...
Replace strdup() with _PyMem_RawStrdup() or _PyMem_Strdup(), depending if the
GIL is held or not.
2013-07-07 23:30:24 +02:00
Christian Heimes
fa535f5220
Issue #18227 : pyexpat now uses a static XML_Memory_Handling_Suite. cElementTree uses the same approach since at least Python 2.6
2013-07-07 17:35:11 +02:00
Victor Stinner
b7f1f65f1c
Issue #18227 : "Free" function of bz2, lzma and zlib modules has no return value (void)
2013-07-07 17:10:34 +02:00
Victor Stinner
11ebff2757
Issue #18203 : Replace malloc() with PyMem_Malloc() in _ssl for the password
2013-07-07 17:07:52 +02:00
Victor Stinner
5064a52bcb
Issue #18227 : Use PyMem_RawAlloc() in bz2, lzma and zlib modules
2013-07-07 16:50:27 +02:00
Victor Stinner
6ce0dbf460
Fix a compiler warning in posix_sendfile() on FreeBSD:
...
Modules/posixmodule.c: In function 'posix_sendfile':
Modules/posixmodule.c:7700: warning: ISO C90 forbids mixed declarations and code
2013-07-07 16:32:36 +02:00
Victor Stinner
b64049183c
Issue #18203 : Replace malloc() with PyMem_Malloc() in Python modules
...
Replace malloc() with PyMem_Malloc() when the GIL is held, or with
PyMem_RawMalloc() otherwise.
2013-07-07 16:21:41 +02:00
Victor Stinner
1a7425f67a
Issue #18203 : Replace malloc() with PyMem_RawMalloc() at Python initialization
...
* Replace malloc() with PyMem_RawMalloc()
* Replace PyMem_Malloc() with PyMem_RawMalloc() where the GIL is not held.
* _Py_char2wchar() now returns a buffer allocated by PyMem_RawMalloc(), instead
of PyMem_Malloc()
2013-07-07 16:25:15 +02:00
Raymond Hettinger
b385529ddf
Fix #ifdef
2013-07-07 02:07:23 -10:00
Raymond Hettinger
82df925451
Use macros for marking and checking endpoints in the doubly-linked list of blocks.
...
* Add comment explaining the endpoint checks
* Only do the checks in a debug build
* Simplify newblock() to only require a length argument
and leave the link updates to the calling code.
* Also add comment for the freelisting logic.
2013-07-07 01:43:42 -10:00
Raymond Hettinger
ef9b47f0b8
merge
2013-07-06 17:50:01 -10:00
Raymond Hettinger
f3a67b7e57
Improve variable names in deque_count()
2013-07-06 17:49:06 -10:00
Victor Stinner
0507bf56f0
Issue #3329 : Implement the PEP 445
...
Add new enum:
* PyMemAllocatorDomain
Add new structures:
* PyMemAllocator
* PyObjectArenaAllocator
Add new functions:
* PyMem_RawMalloc(), PyMem_RawRealloc(), PyMem_RawFree()
* PyMem_GetAllocator(), PyMem_SetAllocator()
* PyObject_GetArenaAllocator(), PyObject_SetArenaAllocator()
* PyMem_SetupDebugHooks()
Changes:
* PyMem_Malloc()/PyObject_Realloc() now always call malloc()/realloc(), instead
of calling PyObject_Malloc()/PyObject_Realloc() in debug mode.
* PyObject_Malloc()/PyObject_Realloc() now falls back to
PyMem_Malloc()/PyMem_Realloc() for allocations larger than 512 bytes.
* Redesign debug checks on memory block allocators as hooks, instead of using C
macros
2013-07-07 02:05:46 +02:00
Raymond Hettinger
df715ba54d
Apply the PyObject_VAR_HEAD and Py_SIZE macros
...
to be consistent with practices in other modules.
2013-07-06 13:01:13 -10:00
Raymond Hettinger
5bfa8671bc
Refactor deque_traverse().
...
Hoist conditional expression out of the loop.
Use rightblock as the guard instead of checking for NULL.
2013-07-06 11:58:09 -10:00
Raymond Hettinger
98054b4c1b
Remove unnecessary branches from count() and reverse().
2013-07-06 09:07:06 -10:00
Raymond Hettinger
de68e0cf0e
Speed-up deque indexing by changing the deque block length to a power of two.
...
The division and modulo calculation in deque_item() can be compiled
to fast bitwise operations when the BLOCKLEN is a power of two.
Timing before:
~/cpython $ py -m timeit -r7 -s 'from collections import deque' -s 'd=deque(range(10))' 'd[5]'
10000000 loops, best of 7: 0.0627 usec per loop
Timing after:
~/cpython $ py -m timeit -r7 -s 'from collections import deque' -s 'd=deque(range(10))' 'd[5]'
10000000 loops, best of 7: 0.0581 usec per loop
2013-07-05 18:05:29 -10:00
Victor Stinner
0857ab4c77
(Merge 3.3) Issue #18343 : faulthandler.register() now keeps the previous signal
...
handler when the function is called twice, so faulthandler.unregister()
restores correctly the original signal handler.
2013-07-02 00:17:14 +02:00
Victor Stinner
8d3795474e
Issue #18343 : faulthandler.register() now keeps the previous signal handler
...
when the function is called twice, so faulthandler.unregister() restores
correctly the original signal handler.
2013-07-02 00:14:56 +02:00
Christian Heimes
54882bfc18
Singular form just like the other error message.
2013-07-01 15:23:48 +02:00
Christian Heimes
8087879349
Singular form just like the other error message.
2013-07-01 15:23:39 +02:00
Christian Heimes
bfafab1849
Issue #18339 : Negative ints keys in unpickler.memo dict no longer cause a
...
segfault inside the _pickle C extension.
2013-07-01 15:18:49 +02:00
Christian Heimes
a24b4d260b
Issue #18339 : Negative ints keys in unpickler.memo dict no longer cause a
...
segfault inside the _pickle C extension.
2013-07-01 15:17:45 +02:00
Christian Heimes
721724270d
Fix segfault in pyexpat.c caused by 84375
...
u can be NULL, use XDECREF
2013-06-29 21:49:27 +02:00
Christian Heimes
82e6b94b95
Fix resource leak in pickle module
...
CID 983309 (#1 of 1): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable unicode_str going out of scope leaks the storage it points to.
2013-06-29 21:37:34 +02:00
Christian Heimes
b91ffaa1d8
Fix NULL ptr dereferencing in local_timezone(). nameo can be NULL
...
CID 1040362 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)
var_deref_op: Dereferencing null pointer _py_decref_tmp.
2013-06-29 20:52:33 +02:00
Christian Heimes
b582155789
Fix memory leak in pyexpat PyUnknownEncodingHandler
...
CID 1040367 (#1 of 1): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable u going out of scope leaks the storage it points to.
2013-06-29 20:43:13 +02:00
Victor Stinner
dd3a6a5533
Fix os.confstr(): the result type of the C function is size_t, not int
2013-06-25 23:13:47 +02:00
Victor Stinner
93037498d1
Fix time.mktime() and datetime.datetime.timestamp() on AIX
...
On AIX, the C function mktime() alwaysd sets tm_wday, even on error. So tm_wday
cannot be used as a sentinel to detect an error, we can only check if the
result is (time_t)-1.
2013-06-25 22:54:35 +02:00
Victor Stinner
d7a034bd75
(Merge 3.3) Fix time.strftime("%Y") on AIX: raise a ValueError for year > 9999
...
time.strtime("%Y") returned "2345" when formatting year 12345.
2013-06-25 02:34:13 +02:00
Victor Stinner
36b82d85a3
Fix time.strftime("%Y") on AIX: raise a ValueError for year > 9999
...
time.strtime("%Y") returned "2345" when formatting year 12345.
2013-06-25 02:33:53 +02:00
Victor Stinner
7e00151e1f
_ssl.c: strip trailing spaces
2013-06-25 00:44:31 +02:00
Victor Stinner
86073dc3c2
(Merge 3.3) Issue #18135 : ssl.SSLSocket.write() now raises an OverflowError if
...
the input string in longer than 2 gigabytes, and
ssl.SSLContext.load_cert_chain() raises a ValueError if the password is longer
than 2 gigabytes. The ssl module does not support partial write.
2013-06-25 00:43:47 +02:00
Victor Stinner
6efa965a27
Issue #18135 : ssl.SSLSocket.write() now raises an OverflowError if the input
...
string in longer than 2 gigabytes, and ssl.SSLContext.load_cert_chain() raises
a ValueError if the password is longer than 2 gigabytes. The ssl module does
not support partial write.
2013-06-25 00:42:31 +02:00
Victor Stinner
14b9b11098
If MS_WIN64 is defined, MS_WINDOWS is also defined: #ifdef can be simplified.
2013-06-25 00:37:25 +02:00
Victor Stinner
9a644b23cc
Issue #9566 : recv(), recvfrom(), send(), sendall() and sendto() methods
...
of socket.socket objects now truncate the input buffer to INT_MAX bytes on
Windows to avoid an integer overflow.
(sendall() still send the whole buffer.)
2013-06-24 23:47:41 +02:00
Victor Stinner
71765770a4
Issue #9566 : _winapi.WriteFile() now truncates length to DWORD_MAX (4294967295)
2013-06-24 23:13:24 +02:00
Victor Stinner
bc8ccce729
Issue #9566 : zlib: Explicit cast to unsigned int to fix a compiler warning on Windows x64
2013-06-24 23:02:51 +02:00
Victor Stinner
9a282975ef
Issue #9566 : _io: Use Py_SAFE_DOWNCAST for fix a compiler warning on Windows x64
2013-06-24 23:01:33 +02:00
Raymond Hettinger
b4f39eea49
merge
2013-06-23 15:47:03 -07:00
Raymond Hettinger
20b0f87e1d
Misc improvements to collections.deque()
...
* Clarified comment on the impact of BLOCKLEN on deque_index
(with a power-of-two, the division and modulo
computations are done with a right-shift and bitwise-and).
* Clarified comment on the overflow check to note that
it is general and not just applicable the 64-bit builds.
* In deque._rotate(), the "deque->" indirections are
factored-out of the loop (loop invariant code motion),
leaving the code cleaner looking and slightly faster.
* In deque._rotate(), replaced the memcpy() with an
equivalent loop. That saved the memcpy setup time
and allowed the pointers to move in their natural
leftward and rightward directions.
See comparative timings at: http://pastebin.com/p0RJnT5N
2013-06-23 15:44:33 -07:00
Christian Heimes
5b2f18411b
Issue #11016 : Don't define macros and constants that are already set by pyport.h
2013-06-24 00:13:14 +02:00
Christian Heimes
99d6135a15
Define S_IFMT and S_IFLNK in pyport.h so posixmodule.c can use named constants instead
...
of arbitrary looking numbers.
2013-06-23 23:56:05 +02:00
Christian Heimes
9975877f46
Check for correct macro, code uses S_ISDIR().
2013-06-23 23:52:40 +02:00
Christian Heimes
91e8b8180d
Check for correct macro, code uses S_ISDIR().
2013-06-23 23:51:44 +02:00
Victor Stinner
1ce46d99db
Issue #11016 : Detect integer conversion on conversion from Python int to C mode_t
2013-06-23 22:57:43 +02:00
Christian Heimes
858c947155
Fix a typo in S_ISDIR, S_ISCHR, S_ISBLK and S_ISREG.
...
Add extra braces to S_IS*() macros
2013-06-23 22:57:02 +02:00
Victor Stinner
8cfd67cfe7
(Merge 3.3) Issue #18135 : Fix a possible integer overflow in
...
ssl.SSLSocket.write() and in ssl.SSLContext.load_cert_chain() for strings and
passwords longer than 2 gigabytes.
2013-06-23 15:09:26 +02:00
Victor Stinner
9ee0203057
Issue #18135 : Fix a possible integer overflow in ssl.SSLSocket.write()
...
and in ssl.SSLContext.load_cert_chain() for strings and passwords longer
than 2 gigabytes.
2013-06-23 15:08:23 +02:00
Victor Stinner
4569cd5eab
_ssl.c: strip trailing spaces
2013-06-23 14:58:43 +02:00
Victor Stinner
c6ebd16a20
Issue #11016 : Try to fix compilaton of the new _stat.c module on Windows
2013-06-23 01:49:42 +02:00
Andrew Kuchling
0e03d6f2e9
Merge from 3.3
2013-06-22 19:27:59 -04:00
Andrew Kuchling
da30acf50b
Closes #18220 : expand itertools.islice docstring to 2 lines
2013-06-22 19:20:54 -04:00
Andrew Kuchling
446a39f78f
Close #18285 : add 'repeat' parameter to docstring for product
2013-06-22 19:04:11 -04:00
Christian Heimes
c77d9f38c2
Issue #11016 : Add C implementation of the stat module as _stat
2013-06-22 21:05:02 +02:00
Andrew Kuchling
6ce8d17d02
Merge from 3.3
2013-06-22 14:57:45 -04:00
Andrew Kuchling
9290dd14b0
#18113 : avoid segfault if Py_XDECREF triggers code that calls set_panel_userptr again
...
Problem noted & original patch by Serhiy Storchaka; I tweaked the patch a bit.
2013-06-22 14:50:56 -04:00
Andrew Kuchling
3468d25a80
Merge from 3.3
2013-06-21 08:07:35 -04:00
Andrew Kuchling
b003ffa0ab
Closes #18239 : correct description of count() in module docstring
2013-06-21 07:58:35 -04:00
Brett Cannon
83358c9f13
Grammatical mistake in a comment
2013-06-20 21:30:32 -04:00
Benjamin Peterson
15a7d2e8d6
merge 3.3 ( #18248 )
2013-06-19 09:01:58 -07:00
Benjamin Peterson
19886b8adc
fix libffi build on AIX ( closes #18248 )
2013-06-19 09:01:42 -07:00
Christian Heimes
262e7f389c
fixed libffi on PPC without __NO_FPRS__
...
ISO C90 forbids mixed declarations and code
2013-06-19 02:43:19 +02:00
Christian Heimes
2f13f546e6
fixed libffi on PPC without __NO_FPRS__
...
ISO C90 forbids mixed declarations and code
2013-06-19 02:40:38 +02:00
Christian Heimes
71515510d8
Issue #18259 : Declare sethostname in socketmodule.c for AIX
2013-06-19 02:07:20 +02:00
Christian Heimes
d2774c7d09
Issue #18259 : Declare sethostname in socketmodule.c for AIX
2013-06-19 02:06:29 +02:00
Christian Heimes
360b89ca5e
Fix for r84195: add HAVE_ALLOCA_H to configure and only include alloca.h if it's available
2013-06-18 13:22:37 +02:00
Christian Heimes
f0400baba8
Fix for r84195: add HAVE_ALLOCA_H to configure and only include alloca.h if it's available
2013-06-18 13:22:17 +02:00
Victor Stinner
8f0aae54ba
(Merge 3.3) ctypes: AIX needs an explicit #include <alloca.h> to get alloca()
2013-06-17 22:02:14 +02:00
Victor Stinner
43b2639fe2
ctypes: AIX needs an explicit #include <alloca.h> to get alloca()
2013-06-17 22:01:53 +02:00
Christian Heimes
9a5395ae2b
Issue #18147 : Add diagnostic functions to ssl.SSLContext().
...
get_ca_list() lists all loaded CA certificates and cert_store_stats() returns
amount of loaded X.509 certs, X.509 CA certs and CRLs.
2013-06-17 15:44:12 +02:00
Andrew Kuchling
f567727abc
Merge with 3.3
2013-06-16 13:02:55 -04:00
Andrew Kuchling
c7b6c50f29
Describe 'surrogateescape' in the documentation.
...
Also, improve some docstring descriptions of the 'errors' parameter.
Closes #14015 .
2013-06-16 12:58:48 -04:00
Andrew Kuchling
8a2a902f88
Merge with 3.3
2013-06-15 15:10:08 -04:00
Andrew Kuchling
53e5ea7951
#18113 : Objects associated to a curses.panel object with set_userptr() were leaked.
...
Reported by Atsuo Ishimoto.
2013-06-15 14:04:04 -04:00
Victor Stinner
36f01ad9ac
Revert changeset 6661a8154eb3: Issue #3329 : Add new APIs to customize memory allocators
...
The new API require more discussion.
2013-06-15 03:37:01 +02:00
Victor Stinner
4d7056258b
Issue #3329 : Add new APIs to customize memory allocators
...
* Add a new PyMemAllocators structure
* New functions:
- PyMem_RawMalloc(), PyMem_RawRealloc(), PyMem_RawFree(): GIL-free memory
allocator functions
- PyMem_GetRawAllocators(), PyMem_SetRawAllocators()
- PyMem_GetAllocators(), PyMem_SetAllocators()
- PyMem_SetupDebugHooks()
- _PyObject_GetArenaAllocators(), _PyObject_SetArenaAllocators()
* Add unit test for PyMem_Malloc(0) and PyObject_Malloc(0)
* Add unit test for new get/set allocators functions
* PyObject_Malloc() now falls back on PyMem_Malloc() instead of malloc() if
size is bigger than SMALL_REQUEST_THRESHOLD, and PyObject_Realloc() falls
back on PyMem_Realloc() instead of realloc()
* PyMem_Malloc() and PyMem_Realloc() now always call malloc() and realloc(),
instead of calling PyObject_Malloc() and PyObject_Realloc() in debug mode
2013-06-15 00:37:46 +02:00
Christian Heimes
200bb1b08c
Simplify return value of ssl.get_default_verify_paths
...
prefix function with PySSL_, too. Other module level functions have a prefix, too.
2013-06-14 15:14:29 +02:00
Christian Heimes
75b8426698
fixd refleak
2013-06-10 10:47:22 +02:00
Ronald Oussoren
36451f076b
(3.3->default) Ensure that the fix for #17269 also works on OSX 10.4
...
AI_NUMERICSERV isn't defined on OSX 10.4.
2013-06-10 10:37:12 +02:00
Ronald Oussoren
a822d36675
Ensure that the fix for #17269 also works on OSX 10.4
...
AI_NUMERICSERV isn't defined on OSX 10.4.
2013-06-10 10:36:28 +02:00
Christian Heimes
46bebee25f
Issue #17134 : Add ssl.enum_cert_store() as interface to Windows' cert store.
2013-06-09 19:03:31 +02:00
Christian Heimes
142ec2c014
get_default_verify_paths doesn't belong inside the ifdef block
2013-06-09 18:29:54 +02:00
Christian Heimes
6d7ad13a45
Issue #18143 : Implement ssl.get_default_verify_paths() in order to debug
...
the default locations for cafile and capath.
2013-06-09 18:02:55 +02:00
Richard Oudkerk
ac0ad884d1
Issue #17931 : Resolve confusion on Windows between pids and process handles.
2013-06-05 23:29:30 +01:00
Łukasz Langa
6f69251980
Add reference implementation for PEP 443
...
PEP accepted: http://mail.python.org/pipermail/python-dev/2013-June/126734.html
2013-06-05 12:20:24 +02:00
Victor Stinner
072318b178
Issue #13772 : Use syntax for literal wchar_t character
2013-06-05 02:07:46 +02:00
Victor Stinner
31b3b92f7a
Issue #13772 : Mark helper functions as private (static)
...
Cleanup also the code to follow the Python coding style (PEP 7).
2013-06-05 01:49:17 +02:00
Victor Stinner
e87267dc6e
Issue #13772 : Fix a compiler warning on Windows
2013-06-05 01:30:25 +02:00
Victor Stinner
5a4367600f
Issue #13772 : fix _check_dirA(): call *A() functions, not *W() functions
2013-06-05 00:37:12 +02:00
Victor Stinner
e7e7eba108
Issue #13772 : Fix compiler warnings on Windows
2013-06-05 00:35:54 +02:00
Victor Stinner
fbf50d43da
Issue #9566 : Fix compiler warning on Windows 64-bit in _bz2module.c
2013-06-04 23:18:48 +02:00
Victor Stinner
640c35ce13
Reuse Py_MIN and Py_MAX macros: remove duplicate MIN/MAX macros
...
multiprocessing.h: remove unused MIN and MAX macros
2013-06-04 23:14:37 +02:00
Victor Stinner
0b81111b18
(Merge 3.3) Close #18109 : os.uname() now decodes fields from the locale
...
encoding, and socket.gethostname() now decodes the hostname from the locale
encoding, instead of using the UTF-8 encoding in strict mode.
2013-06-03 22:09:14 +02:00
Victor Stinner
a534fc4b3b
Close #18109 : os.uname() now decodes fields from the locale encoding, and
...
socket.gethostname() now decodes the hostname from the locale encoding, instead
of using the UTF-8 encoding in strict mode.
2013-06-03 22:07:27 +02:00
Stefan Krah
04754b0fd4
Support multiarch build in tests.
2013-05-29 20:58:19 +02:00
Stefan Krah
891ca9e06a
Backport bff16086f03b and bcaaaa00425b.
2013-05-29 19:14:17 +02:00
Stefan Krah
6edda14b29
Issue #17768 : Support newline fill character in decimal.py and NUL fill
...
character in _decimal.c.
2013-05-29 15:45:38 +02:00
Serhiy Storchaka
37a79a12d1
Issue #18025 : Fixed a segfault in io.BufferedIOBase.readinto() when raw
...
stream's read() returns more bytes than requested.
2013-05-28 16:24:45 +03:00
Jason R. Coombs
3a09286790
Issue #13772 : Restored directory detection of targets in `os.symlink` on Windows, which was temporarily removed in Python 3.2.3 due to an incomplete implementation. The implementation now works even if the symlink is created in a location other than the current directory.
2013-05-27 23:21:28 -04:00
Eli Bendersky
6dc32b34dd
Issue #13612 : handle unknown encodings without a buffer overflow.
...
This affects pyexpat and _elementtree. PyExpat_CAPI now exposes a new
function - DefaultUnknownEncodingHandler.
Based on a patch by Serhiy Storchaka.
2013-05-25 05:25:48 -07:00
Benjamin Peterson
3b08a2978e
indicate that read/write work with bytes ( closes #18009 )
2013-05-24 14:35:57 -07:00
Ronald Oussoren
27a4ac535f
Issue #17269 : Workaround for a platform bug in getaddrinfo on OSX
...
Without this patch socket.getaddrinfo crashed when called
with some unusual argument combinations.
2013-05-24 13:47:37 +02:00
Serhiy Storchaka
66d53fa9ad
Issue #16986 : ElementTree now correctly parses a string input not only when
...
an internal XML encoding is UTF-8 or US-ASCII.
2013-05-22 17:07:51 +03:00
Eli Bendersky
6a55dc3b4a
Issue #17989 : fix typo in error message
2013-05-19 16:59:59 -07:00
Eli Bendersky
08231a9c6a
Issue #17901 : fix TreeBuilder construction for an explicit element_factory=None
...
Based on report and patch by Aaron Oakley.
2013-05-18 15:47:16 -07:00
Eli Bendersky
ef9683b73f
Issue #17989 : element_setattro returned incorrect error value.
...
This caused an exception to be raised later than expected.
2013-05-18 07:52:34 -07:00
Victor Stinner
725e421222
Fix compilater warnings on Windows 64-bit
2013-05-17 00:19:59 +02:00
Stefan Krah
b6cc0aad4b
Merge 3.3.
2013-05-29 21:12:46 +02:00
Stefan Krah
a0547b8ac4
Mark untestable lines for gcov.
2013-05-29 19:08:34 +02:00
Stefan Krah
8d90e383a3
Merge 3.3.
2013-05-29 15:47:24 +02:00
Serhiy Storchaka
281945f427
Issue #18025 : Fixed a segfault in io.BufferedIOBase.readinto() when raw
...
stream's read() returns more bytes than requested.
2013-05-28 16:27:08 +03:00
Jason R. Coombs
8f1a8e32b1
Merge with 3.3
2013-05-27 23:26:36 -04:00
Benjamin Peterson
da5eb5a31c
don't expand the operand to Py_XINCREF/XDECREF/CLEAR/DECREF multiple times ( closes #17206 )
...
A patch from Illia Polosukhin.
2013-05-27 14:46:14 -07:00
Eli Bendersky
7b3022f24f
Issue #13612 : handle unknown encodings without a buffer overflow.
...
This affects pyexpat and _elementtree. PyExpat_CAPI now exposes a new
function - DefaultUnknownEncodingHandler.
Based on a patch by Serhiy Storchaka.
2013-05-25 05:27:10 -07:00
Antoine Pitrou
19fef69b75
Fix compilation under MSVC: ssl_set_mode() is a macro, and the MSVC preprocessor doesn't process #ifdef's inside a macro argument list.
...
(found explanation at http://www.tech-archive.net/Archive/VC/microsoft.public.vc.language/2007-05/msg00385.html )
2013-05-25 13:23:03 +02:00
Antoine Pitrou
3a65ad7f08
Issue #8240 : Set the SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER flag on SSL sockets.
2013-05-25 13:02:32 +02:00
Benjamin Peterson
e08b583d88
merge 3.3
2013-05-24 14:36:04 -07:00
Ronald Oussoren
dc3e6cc452
(3.3->default) Issue #17269 : Workaround for a platform bug in getaddrinfo on OSX
...
Without this patch socket.getaddrinfo crashed when called
with some unusual argument combinations.
2013-05-24 13:51:21 +02:00
Serhiy Storchaka
447b6e3c6e
Issue #16986 : ElementTree now correctly parses a string input not only when
...
an internal XML encoding is UTF-8 or US-ASCII.
2013-05-22 17:21:06 +03:00
Giampaolo Rodola'
80e1c43ddf
Fix issue #17996 : expose socket.AF_LINK constant on BSD and OSX.
2013-05-21 21:02:04 +02:00
Charles-François Natali
b10c71daa2
Backed out changeset c0f2b038fc12
2013-05-21 10:45:46 +02:00
Charles-François Natali
c7c333d25d
Issue #17683 : socket module: return AF_UNIX addresses in Linux abstract
...
namespace as string.
2013-05-21 09:49:18 +02:00
Charles-Francois Natali
74ca886788
Issue #17917 : Use PyModule_AddIntMacro() instead of PyModule_AddIntConstant()
...
when applicable.
2013-05-20 19:13:19 +02:00
Charles-Francois Natali
7c4f8dacf4
Issue #17914 : We can now inline _bsd_cpu_count().
2013-05-20 17:40:32 +02:00
Charles-Francois Natali
d59087de5b
Issue #17914 : Remove OS-X special-case, and use the correct int type.
2013-05-20 17:31:06 +02:00
Charles-Francois Natali
44feda3cd0
Issue #17914 : Add os.cpu_count(). Patch by Yogesh Chaudhari, based on an
...
initial patch by Trent Nelson.
2013-05-20 14:40:46 +02:00
Eli Bendersky
a369923cab
Get rid of ugly code duplication for ElementTree.parse when the accelerator
...
is imported. Instead, ElementTree.parse can look for a special internal method
defined by the accelerator.
2013-05-19 18:47:23 -07:00
Eli Bendersky
3a36756ba1
Issue #17989 : fix typo in error message
2013-05-19 17:00:28 -07:00
Eli Bendersky
3a4fbd8241
_elementtree.XMLParser._setevents should support any sequence, not just tuples
...
Also clean up some code around this
2013-05-19 09:01:49 -07:00
Antoine Pitrou
fef34e3186
Issue #17937 : Try harder to collect cyclic garbage at shutdown.
2013-05-19 01:11:58 +02:00
Eli Bendersky
20c1cdd64a
Issue #17901 : fix TreeBuilder construction for an explicit element_factory=None
...
Based on report and patch by Aaron Oakley.
2013-05-18 15:47:58 -07:00
Eli Bendersky
1a8c3e247a
Issue #17989 : element_setattro returned incorrect error value.
...
This caused an exception to be raised later than expected.
2013-05-18 07:53:47 -07:00
Victor Stinner
3e269397e3
FileIO.readall(): remove trailing space from an exception message
2013-05-18 00:38:43 +02:00
Richard Oudkerk
af7260e81a
Issue #15758 : Fix FileIO.readall() so it no longer has O(n**2) complexity.
2013-05-17 23:34:42 +01:00
Serhiy Storchaka
fff61f2cd3
Issue #14596 : The struct.Struct() objects now use more compact implementation.
2013-05-17 10:49:44 +03:00
Benjamin Peterson
aa96588399
merge 3.3
2013-05-16 15:30:09 -05:00
Benjamin Peterson
18b7191653
C89 declaration compliance
2013-05-16 15:29:44 -05:00
Victor Stinner
6fdd7b81fa
Issue #17964 : Fix os.sysconf(): the return type of the C sysconf() function
...
is long, not int.
2013-05-16 22:26:29 +02:00
doko@ubuntu.com
94fd53ba4e
- Fix typos in the multiprocessing module.
2013-05-15 18:08:03 +02:00
doko@ubuntu.com
9df891ca41
- Fix typos in the multiprocessing module.
2013-05-15 18:06:56 +02:00
Antoine Pitrou
9396356948
Backout c89febab4648 following private feedback by Guido.
...
(Issue #17807 : Generators can now be finalized even when they are part of a reference cycle)
2013-05-14 20:37:52 +02:00
Benjamin Peterson
cde88dcf10
merge 3.3 ( #17968 )
2013-05-13 19:56:35 -05:00
Benjamin Peterson
dedac52731
prevent double free in cleanup code ( #17968 )
2013-05-13 19:55:40 -05:00
Antoine Pitrou
5f18791902
Issue #17968 : Fix memory leak in os.listxattr().
2013-05-13 19:48:46 +02:00
Antoine Pitrou
7f987398b7
Issue #17968 : Fix memory leak in os.listxattr().
2013-05-13 19:46:29 +02:00
Antoine Pitrou
04e70d19e7
Issue #17807 : Generators can now be finalized even when they are part of a reference cycle.
2013-05-08 18:12:35 +02:00
Antoine Pitrou
070cb3c9be
Issue #1545463 : At shutdown, defer finalization of codec modules so that stderr remains usable.
...
(should fix Windows buildbot failures on test_gc)
2013-05-08 13:23:25 +02:00
Ezio Melotti
0fbdf26158
#16523 : merge with 3.3.
2013-05-08 10:56:32 +03:00
Ezio Melotti
babc8227cc
#16523 : improve attrgetter/itemgetter/methodcaller documentation.
2013-05-08 10:53:11 +03:00
Victor Stinner
70792d268e
Fix compiler warnings: explicit cast to int in sha256/sha512 modules
2013-05-08 00:00:44 +02:00
Victor Stinner
e8289618bf
zlib: Explicit cast to fix a compiler warning
2013-05-07 23:50:21 +02:00
Victor Stinner
f2b9a340ef
audioop: explicit cast to fix a compiler warning
2013-05-07 23:49:15 +02:00
Antoine Pitrou
9b5d4d8cef
Issue #17289 : The readline module now plays nicer with external modules or applications changing the rl_completer_word_break_characters global variable.
...
Initial patch by Bradley Froehle.
2013-05-06 21:54:07 +02:00
Antoine Pitrou
a7f7deb6ed
Issue #17289 : The readline module now plays nicer with external modules or applications changing the rl_completer_word_break_characters global variable.
...
Initial patch by Bradley Froehle.
2013-05-06 21:51:03 +02:00
Charles-Francois Natali
b1294fa9f4
Issue #12181 : select module: Fix struct kevent definition on OpenBSD 64-bit
...
platforms. Patch by Federico Schwindt.
2013-05-06 21:26:05 +02:00
Charles-Francois Natali
002a77d2f7
Issue #12181 : select module: Fix struct kevent definition on OpenBSD 64-bit
...
platforms. Patch by Federico Schwindt.
2013-05-06 21:24:31 +02:00
Antoine Pitrou
5f454a07a0
Issue #1545463 : Global variables caught in reference cycles are now garbage-collected at shutdown.
2013-05-06 21:15:57 +02:00
Antoine Pitrou
52c5f85cf9
Issue #14173 : Avoid crashing when reading a signal handler during interpreter shutdown.
2013-05-04 23:21:09 +02:00
Antoine Pitrou
c8c952ce2a
Issue #14173 : Avoid crashing when reading a signal handler during interpreter shutdown.
2013-05-04 23:16:59 +02:00
Antoine Pitrou
1a6cb30a34
Issue #5845 : Enable tab-completion in the interactive interpreter by default, thanks to a new sys.__interactivehook__.
...
(original patch by Éric Araujo)
2013-05-04 20:08:35 +02:00
Gregory P. Smith
d8fe1f7881
* Fix remaining bits of issue 17192 for 3.4 - these changes
...
were missing from a messed up merge during the libffi 3.0.13
import. the diffs from upstream libffi 3.0.13 are now small.
2013-04-30 00:03:30 -07:00
Gregory P. Smith
5dc268ed26
* Fix remaining bits of issue 17192 for 3.3 - these changes
...
were missing from a messed up merge during the libffi 3.0.13
import. the diffs from upstream libffi 3.0.13 are now small.
2013-04-30 00:03:01 -07:00
Gregory P. Smith
6897267759
* Fix PART of issue 17192 for 3.4 - reapply the issue11729 patch
...
that was undone in the merge fun from upstream which already
had it in 3.0.13.
* Add the missing update to libffi.info.
2013-04-29 23:48:03 -07:00
Gregory P. Smith
e9d0633d36
* Fix PART of issue 17192 for 3.3 - reapply the issue11729 patch
...
that was undone in the merge fun from upstream which already
had it in 3.0.13.
* Add the missing update to libffi.info.
2013-04-29 23:47:17 -07:00
Gregory P. Smith
933059710c
* Fix issue 17192 for 3.2 - reapply the issue11729 patch that was undone
...
in the merge fun from upstream which already had it in 3.0.13.
* Add the missing update to libffi.info.
2013-04-29 23:45:38 -07:00
Serhiy Storchaka
5f99fa7287
Issue #17857 : Prevent build failures with pre-3.5.0 versions of sqlite3,
...
such as was shipped with Centos 5 and Mac OS X 10.4.
2013-04-28 14:11:55 +03:00
Serhiy Storchaka
d160b12292
Issue #17857 : Prevent build failures with pre-3.5.0 versions of sqlite3,
...
such as was shipped with Centos 5 and Mac OS X 10.4.
2013-04-28 14:10:27 +03:00
Antoine Pitrou
9f14681959
Issue #17804 : New function ``struct.iter_unpack`` allows for streaming struct unpacking.
2013-04-27 00:20:04 +02:00
Eli Bendersky
45f3d2fff0
Revert c9674421d78e, leaving an additional comment
2013-04-24 05:34:07 -07:00
Eli Bendersky
1859fe80c4
Simplify the code of get_attrib_from_keywords somewhat.
2013-04-22 05:52:16 -07:00
Eli Bendersky
ed8b86d323
Issue #17736 : fix misleading comment in _elementtree.c
...
Patch by Jonas Wagner
2013-04-22 05:29:09 -07:00
Eli Bendersky
d4cb4b7451
Issue #17736 : fix misleading comment in _elementtree.c
...
Patch by Jonas Wagner
2013-04-22 05:25:25 -07:00
Alexandre Vassalotti
4fe2184a0f
Merge 3.3
2013-04-20 21:28:49 -07:00
Alexandre Vassalotti
637c7c475a
Fix reference leak in _pickle.
2013-04-20 21:28:21 -07:00
Antoine Pitrou
a85017fbe3
Issue #16694 : Add a pure Python implementation of the operator module.
...
Patch by Zachary Ware.
2013-04-20 19:21:44 +02:00
Eli Bendersky
ddcc6798f6
Remove useless #define and #ifdefs
2013-04-20 06:36:43 -07:00
Eli Bendersky
bf05df2396
Make license notices more consistent and remove old changelog.
...
Also remove unused macro.
2013-04-20 05:44:01 -07:00
Victor Stinner
8f674ccd64
Close #17694 : Add minimum length to _PyUnicodeWriter
...
* Add also min_char attribute to _PyUnicodeWriter structure (currently unused)
* _PyUnicodeWriter_Init() has no more argument (except the writer itself):
min_length and overallocate must be set explicitly
* In error handlers, only enable overallocation if the replacement string
is longer than 1 character
* CJK decoders don't use overallocation anymore
* Set min_length, instead of preallocating memory using
_PyUnicodeWriter_Prepare(), in many decoders
* _PyUnicode_DecodeUnicodeInternal() checks for integer overflow
2013-04-17 23:02:17 +02:00
Richard Oudkerk
245bbee0d5
Merge.
2013-04-17 21:24:58 +01:00
Antoine Pitrou
cf8a1e51ec
- Issue #17782 : Fix undefined behaviour on platforms where ``struct timespec``'s "tv_nsec" member is not a C long.
2013-04-17 22:06:44 +02:00
Alexandre Vassalotti
7c5e094cbf
Make C and Python implementations of pickle load STRING opcodes the same way.
...
The C version tried to remove trailing whitespace between the last quote and
the newline character. I am not sure why it had this because pickle never
generated such pickles---for this to happen repr(some_string) would need to
return trailing whitespace. It was maybe there to make it easier for people
to write pickles in text editors. Anyhow, the Python version doesn't do this
so there is no point keeping this around anymore.
Also, I've changed the exception raised when a bad pickle is encountered.
Again this unlikely to make much difference to anyone though it does make
testing slightly nicer for us.
2013-04-15 23:14:55 -07:00
Benjamin Peterson
48a2e7c357
merge 3.3
2013-04-15 21:38:33 -04:00
Benjamin Peterson
51ce29c530
remove pointless code ( closes #17738 )
2013-04-15 21:38:25 -04:00
Antoine Pitrou
af94051a93
Issue #17710 : Fix pickle raising a SystemError on bogus input.
2013-04-15 21:55:14 +02:00
Antoine Pitrou
3034efdd29
Issue #17710 : Fix pickle raising a SystemError on bogus input.
2013-04-15 21:51:09 +02:00
Victor Stinner
322cc7438c
Issue #17693 : Fix memory/reference leaks
2013-04-14 18:11:41 +02:00
Alexandre Vassalotti
cc7571727f
Style cleanups for pickle.py and _pickle.
2013-04-14 02:25:10 -07:00
Alexandre Vassalotti
6d9e14593e
Merge 3.3
2013-04-14 02:11:16 -07:00