Antoine Pitrou
c53204b947
Issue #4885 : Add weakref support to mmap objects. Patch by Valerie Lambert.
13 years ago
Mark Dickinson
fb29a164df
Issue #18661 : typo in grp.struct_group docstring. Thanks Vajrasky Kok.
13 years ago
Raymond Hettinger
d7bd7a5525
Silence compiler warnings for strict function prototype declarations.
13 years ago
Alexander Belopolsky
df7027bb9e
Reuse us_per_second in delta_total_seconds.
13 years ago
Alexander Belopolsky
790d269d39
Fixes #8860 : Round half-microseconds to even in the timedelta constructor.
(Original patch by Mark Dickinson.)
13 years ago
Serhiy Storchaka
1f35ae0a3c
Issue #17998 : Fix an internal error in regular expression engine.
13 years ago
Christian Heimes
865d12a2d9
Fix warning: ‘ptr2’ may be used uninitialized in this function
13 years ago
Ned Deily
bd143c3760
Issue #18627 : Fix typo noticed by Vajrasky Kok.
13 years ago
Ned Deily
b5dd6d2287
Issue #17557 : Fix os.getgroups() to work with the modified behavior of
getgroups(2) on OS X 10.8. Original patch by Mateusz Lenik.
13 years ago
Larry Hastings
2e3e593e34
Issue #17899 : Fix rare file descriptor leak in os.listdir().
(Done as separate patch from trunk as the code has diverged quite a bit.)
13 years ago
Larry Hastings
4dbc95e258
Issue #17899 : Fix rare file descriptor leak in os.listdir().
13 years ago
Victor Stinner
ffff763161
Issue #18519 : Fix test_sqlite on old versions of libsqlite3
With old SQLite versions, _sqlite3_result_error() sets a new Python exception,
so don't restore the previous exception.
13 years ago
Victor Stinner
044c516854
Issue #18609 , #18408 : _ctypes_add_traceback() now clears the current exception
while adding the traceback, because it may call indirectly a Python function
and Python functions must not be called with an exception set.
In the case of the issue #18609 , _ctypes_add_traceback() called the iso8859-1
decoder which is implemented in Python. Python has a ISO-8859-1 codec
implemented in C. It is not used because PyUnicode_Decode() only uses the C
codec for other names (aliases) of this codec ("latin-1", "latin1" and
"iso-8859-1").
13 years ago
Antoine Pitrou
932ff83682
Issue #18608 : Avoid keeping a strong reference to the locale module inside the _io module.
13 years ago
Antoine Pitrou
2d350fd8af
Issue #18619 : Fix atexit leaking callbacks registered from sub-interpreters, and make it GC-aware.
13 years ago
Tim Golden
6b528067c5
Issue #9035 : os.path.ismount now recognises volumes mounted below
a drive root on Windows. Original patch by Atsuo Ishimoto.
13 years ago
Christian Heimes
b3c872403d
Initialize utime with 0. It fixes a couple of compiler warnung:
warning: 'utime.mtime_ns' may be used uninitialized in this function [-Wmaybe-uninitialized]
13 years ago
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.
13 years ago
Christian Heimes
0ce642ebca
yet another WITH_THREADS typo
13 years ago
Christian Heimes
6ffa5ce1f3
Fix _sha3 module to actually release the GIL around its update function.
gcov is great.
13 years ago
Christian Heimes
4efdb4177e
Test Py_IncRef() and Py_DecRef() C functions
13 years ago
Christian Heimes
72f455e96c
Fix use of uninitialized scalar variable, see 3f994367a979
CID 1058763
13 years ago
Antoine Pitrou
796564c27b
Issue #18112 : PEP 442 implementation (safe object finalization).
13 years ago
Christian Heimes
4fec4314cf
Issue #18599 : Fix name attribute of _sha1.sha1() object. It now returns
'SHA1' instead of 'SHA'.
13 years ago
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".
13 years ago
Raymond Hettinger
3223dd5c22
Assertions key off NDEBUG
13 years ago
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()
13 years ago
Victor Stinner
36577e4e8c
Issue #15893 : frozenmain.c now handles PyMem_Malloc() failure
13 years ago
Christian Heimes
6ca8a05f10
Issue #18561 : Skip name in ctypes' _build_callargs() if name is NULL.
CID 486199
13 years ago
Christian Heimes
9ee5c37c8f
Issue #18559 : Fix NULL pointer dereference error in _pickle module
13 years ago
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.
13 years ago
Christian Heimes
66eda26a72
Handle yet another potential failure in testcapi
CID 1058280
13 years ago
Christian Heimes
5962bef8aa
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
13 years ago
Christian Heimes
ec2309b03d
remove surplus and wrong Py_DECREF() introduced in 33891989c9cf
13 years ago
Christian Heimes
3205e74d88
Fix declaration-after-statement of d49f65ff4f3c
13 years ago
Christian Heimes
7e138027ff
Fix memory leaks and add checks for failing malloc() calls to testcapi module
CID 1058288
13 years ago
Christian Heimes
ff369a5595
Fix possible NULL pointer dereferences in testcapi module
CID 1058280
CID 1058282
CID 1058284
13 years ago
Christian Heimes
a956e645c1
Fix possible NULL pointer dereference in PyCurses_Start_Color()
CID 1058276
13 years ago
Brett Cannon
845f7845aa
Issue #18556 : Check the return value for PyUnicode_AsWideChar() in
U_set() from ctypes.
CID #486657
13 years ago
Christian Heimes
9228837e31
Issue #18549 : Eliminate dead code in socket_ntohl().
CID 982369
13 years ago
Ezio Melotti
61b0c672b5
#16937 : document that stdin is always buffered, even when -u is used. Patch by Elena Oat.
13 years ago
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
13 years ago
Christian Heimes
60a6067709
Issue #15905 : Fix theoretical buffer overflow in handling of sys.argv[0],
prefix and exec_prefix if the operation system does not obey MAXPATHLEN.
13 years ago
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().
13 years ago
Christian Heimes
43d82df406
Now all error paths of _freeze_importlib use 'goto error' and the error label cleans up all used resources.
13 years ago
Christian Heimes
8c4c1f6e66
Issue #18514 : Fix unreachable Py_DECREF() call in PyCData_FromBaseObj()
13 years ago
Christian Heimes
96f628f487
Fix reference and memory leaks in _freeze_importlib
13 years ago
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.
13 years ago
Raymond Hettinger
b97cc49c3a
Minor code simplification by eliminating an unnecessary temporary variable.
13 years ago
Christian Heimes
a6404ad43c
Check return value of PyEval_GetGlobals() for NULL
CID 486814
13 years ago