Antoine Pitrou
932ff83682
Issue #18608 : Avoid keeping a strong reference to the locale module inside the _io module.
2013-08-01 21:04:50 +02:00
Antoine Pitrou
2d350fd8af
Issue #18619 : Fix atexit leaking callbacks registered from sub-interpreters, and make it GC-aware.
2013-08-01 20:56:12 +02:00
Tim Golden
6b528067c5
Issue #9035 : os.path.ismount now recognises volumes mounted below
...
a drive root on Windows. Original patch by Atsuo Ishimoto.
2013-08-01 12:44:00 +01:00
Christian Heimes
abe639f115
Initialize utime with 0. It fixes a couple of compiler warnung:
...
warning: 'utime.mtime_ns' may be used uninitialized in this function [-Wmaybe-uninitialized]
2013-08-01 00:12:06 +02:00
Antoine Pitrou
c27cd71cd7
Merge
2013-07-31 21:54:18 +02:00
Antoine Pitrou
5c30a75722
Issue #15699 : The readline module now uses PEP 3121-style module initialization, so as to reclaim allocated resources (Python callbacks) at shutdown.
...
Original patch by Robin Schreiber.
2013-07-31 21:52:53 +02:00
Christian Heimes
0ce642ebca
yet another WITH_THREADS typo
2013-07-31 13:32:40 +02:00
Christian Heimes
6ffa5ce1f3
Fix _sha3 module to actually release the GIL around its update function.
...
gcov is great.
2013-07-31 11:58:18 +02:00
Christian Heimes
4efdb4177e
Test Py_IncRef() and Py_DecRef() C functions
2013-07-31 02:36:43 +02:00
Christian Heimes
72f455e96c
Fix use of uninitialized scalar variable, see 3f994367a979
...
CID 1058763
2013-07-31 01:33:50 +02:00
Antoine Pitrou
796564c27b
Issue #18112 : PEP 442 implementation (safe object finalization).
2013-07-30 19:59:21 +02:00
Christian Heimes
d49a371e91
Issue #18599 : Fix name attribute of _sha1.sha1() object. It now returns
...
'SHA1' instead of 'SHA'.
Add more tests for hashlib and hash object attributes
2013-07-30 15:35:54 +02:00
Raymond Hettinger
77578204d6
Restore the data block size to 62.
...
The former block size traded away good fit within cache lines in
order to gain faster division in deque_item(). However, compilers
are getting smarter and can now replace the slow division operation
with a fast integer multiply and right shift. Accordingly, it makes
sense to go back to a size that lets blocks neatly fill entire
cache-lines.
GCC-4.8 and CLANG 4.0 both compute "x // 62" with something
roughly equivalent to "x * 9520900167075897609 >> 69".
2013-07-28 02:39:49 -07:00
Raymond Hettinger
3223dd5c22
Assertions key off NDEBUG
2013-07-26 23:14:22 -07:00
Victor Stinner
c588feeea9
Issue #15893 : Improve error handling in main() and Py_FrozenMain()
...
* handle _PyMem_RawStrdup() failure
* Py_FrozenMain() releases memory on error
* Py_FrozenMain() duplicates the old locale, as done in main()
2013-07-27 02:39:09 +02:00
Christian Heimes
f6e7e36c3d
Issue #18561 : Skip name in ctypes' _build_callargs() if name is NULL.
...
CID 486199
2013-07-26 23:04:39 +02:00
Christian Heimes
f446d21708
Issue #18559 : Fix NULL pointer dereference error in _pickle module
2013-07-26 22:45:47 +02:00
Victor Stinner
d4095d95f8
Issue #18519 : the Python authorizer callback of sqlite3 must not raise Python exceptions
...
The exception is printed if sqlite3.enable_callback_tracebacks(True) has been
called, otherwise the exception is cleared.
2013-07-26 22:23:33 +02:00
Christian Heimes
ebf4204e84
Handle yet another potential failure in testcapi
...
CID 1058280
2013-07-26 15:54:13 +02:00
Christian Heimes
9bfcaa6fb3
Check return value of PyLong_FromLong(X509_get_version()). It might be NULL if
...
X509_get_version() grows beyond our small int cache.
CID 1058279
2013-07-26 15:51:35 +02:00
Christian Heimes
dd6f3899f7
remove surplus and wrong Py_DECREF() introduced in 33891989c9cf
2013-07-26 15:26:26 +02:00
Christian Heimes
cb7ca526e8
Fix memory leaks and add checks for failing malloc() calls to testcapi module
...
CID 1058288
Fix declaration-after-statement of d49f65ff4f3c
2013-07-26 15:07:34 +02:00
Christian Heimes
5e3de55b01
Fix possible NULL pointer dereferences in testcapi module
...
CID 1058280
CID 1058282
CID 1058284
2013-07-26 14:52:26 +02:00
Christian Heimes
ef86368ea6
Fix possible NULL pointer dereference in PyCurses_Start_Color()
...
CID 1058276
2013-07-26 14:46:02 +02:00
Brett Cannon
5d7c1b1a2b
merge for issue #18556
2013-07-25 17:36:15 -04:00
Christian Heimes
7c8cd257e4
Issue #18549 : Eliminate dead code in socket_ntohl().
...
CID 982369
2013-07-25 11:47:25 +02:00
Ezio Melotti
3e1e97a99a
#16937 : merge with 3.3.
2013-07-25 05:04:50 +02:00
Victor Stinner
1c8f059019
Issue #18520 : Add a new PyStructSequence_InitType2() function, same than
...
PyStructSequence_InitType() except that it has a return value (0 on success,
-1 on error).
* PyStructSequence_InitType2() now raises MemoryError on memory allocation failure
* Fix also some calls to PyDict_SetItemString(): handle error
2013-07-22 22:24:54 +02:00
Christian Heimes
de0e63bd9c
Issue #15905 : Fix theoretical buffer overflow in handling of sys.argv[0],
...
prefix and exec_prefix if the operation system does not obey MAXPATHLEN.
2013-07-22 12:54:21 +02:00
Victor Stinner
3a8573230c
Issue #18488 : Fix _pysqlite_final_callback()
...
Restore behaviour of Python 3.3: print the finalizer() error if
sqlite3.enable_callback_tracebacks() has been called, clear the error
otherwise.
But keep (save/restore) also the AttributeError raised in
_pysqlite_step_callback().
2013-07-22 08:34:32 +02:00
Christian Heimes
e5378e2223
Now all error paths of _freeze_importlib use 'goto error' and the error label cleans up all used resources.
2013-07-21 23:05:11 +02:00
Christian Heimes
71945880fb
Issue #18514 : Fix unreachable Py_DECREF() call in PyCData_FromBaseObj()
2013-07-21 16:25:30 +02:00
Christian Heimes
992fe2ab84
Fix reference and memory leaks in _freeze_importlib
2013-07-21 16:19:16 +02:00
Victor Stinner
41801f5812
Issue #18519 , #18408 : Fix sqlite authorizer callback
...
If a previous call to the authorizer callback failed and raised an exception,
don't call the Python authorizer callback, but just return SQLITE_DENY.
2013-07-21 13:05:38 +02:00
Raymond Hettinger
b97cc49c3a
Minor code simplification by eliminating an unnecessary temporary variable.
2013-07-21 01:51:07 -07:00
Christian Heimes
603bd2d374
Check return value of PyEval_GetGlobals() for NULL
...
CID 486814
2013-07-20 22:54:39 +02:00
Christian Heimes
5df8ff01d9
Check return value of flush_character_buffer()
...
CID 486663
2013-07-20 22:42:06 +02:00
Mark Dickinson
60d634ae4a
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 18:00:06 +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
3f95bdcdbe
Add missing check of PyDict_SetItem()'s return value
...
CID 486659
2013-07-20 15:01:36 +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
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
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