Commit Graph

7572 Commits

Author SHA1 Message Date
Richard Oudkerk 84ed9a68bd Issue #8713: Support alternative start methods in multiprocessing on Unix.
See http://hg.python.org/sandbox/sbt#spawn
2013-08-14 15:35:41 +01:00
Antoine Pitrou 9ed5f27266 Issue #18722: Remove uses of the "register" keyword in C code. 2013-08-13 20:18:52 +02:00
Larry Hastings e70f2d588a Issue #18667: Add missing "HAVE_FCHOWNAT" symbol to posix._have_functions. 2013-08-12 13:53:20 -04:00
Larry Hastings 00964ed216 Issue #18667: Add missing "HAVE_FCHOWNAT" symbol to posix._have_functions. 2013-08-12 13:49:30 -04:00
Antoine Pitrou 584e815114 Fix refcounting issue with extension types in tkinter.
(issue #15721)
2013-08-11 00:22:30 +02:00
Ethan Furman a4998a7041 Close #18264: int- and float-derived enums now converted to int or float. 2013-08-10 13:01:45 -07:00
Eli Bendersky 532d03e547 Issue #15651: PEP 3121 refactoring for _elementtree
Patch by Antoine Pitrou (based on Robin Schreiber's original patch)
2013-08-10 08:00:39 -07:00
Christian Heimes ad73a9cf97 Issue #16400: Add command line option for isolated mode.
-I

    Run Python in isolated mode. This also implies -E and -s. In isolated mode
    sys.path contains neither the script’s directory nor the user’s
    site-packages directory. All PYTHON* environment variables are ignored,
    too. Further restrictions may be imposed to prevent the user from
    injecting malicious code.
2013-08-10 16:36:18 +02:00
Larry Hastings a27b83ad2d Issue #15301: Parsing fd, uid, and gid parameters for builtins
in Modules/posixmodule.c is now far more robust.
2013-08-08 00:19:50 -07:00
Antoine Pitrou 257cf2fb83 In _PyGC_Fini(), lose the reference that was kept to the time module 2013-08-06 20:50:48 +02:00
Antoine Pitrou c53204b947 Issue #4885: Add weakref support to mmap objects. Patch by Valerie Lambert. 2013-08-05 23:17:30 +02:00
Mark Dickinson e5192cdbb9 Issue #18661: typo in grp.struct_group docstring (fix merged from 3.3). Thanks Vajrasky Kok. 2013-08-05 17:57:54 +01:00
Mark Dickinson fb29a164df Issue #18661: typo in grp.struct_group docstring. Thanks Vajrasky Kok. 2013-08-05 17:57:01 +01:00
Raymond Hettinger d7bd7a5525 Silence compiler warnings for strict function prototype declarations. 2013-08-04 12:43:37 -07:00
Raymond Hettinger 28dc9b9fc0 merge 2013-08-04 12:43:59 -07:00
Alexander Belopolsky df7027bb9e Reuse us_per_second in delta_total_seconds. 2013-08-04 15:18:58 -04:00
Alexander Belopolsky 790d269d39 Fixes #8860: Round half-microseconds to even in the timedelta constructor.
(Original patch by Mark Dickinson.)
2013-08-04 14:51:35 -04:00
Serhiy Storchaka b94f61b6fb Issue #17998: Fix an internal error in regular expression engine. 2013-08-03 19:22:28 +03:00
Serhiy Storchaka 1f35ae0a3c Issue #17998: Fix an internal error in regular expression engine. 2013-08-03 19:18:38 +03:00
Christian Heimes 865d12a2d9 Fix warning: ‘ptr2’ may be used uninitialized in this function 2013-08-02 11:10:51 +02:00
Ned Deily 970a87fc07 Closes #18627: merge from 3.3 2013-08-01 22:13:30 -07:00
Ned Deily bd143c3760 Issue #18627: Fix typo noticed by Vajrasky Kok. 2013-08-01 22:12:29 -07:00
Ned Deily ffb32893a3 Issue #17557: merge from 3.3 2013-08-01 21:37:17 -07:00
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.
2013-08-01 21:21:15 -07:00
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.)
2013-08-01 19:34:46 -07:00
Larry Hastings 4dbc95e258 Issue #17899: Fix rare file descriptor leak in os.listdir(). 2013-08-01 18:18:56 -07:00
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.
2013-08-02 01:48:10 +02:00
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").
2013-08-02 00:47:47 +02:00
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
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]
2013-08-01 00:08:16 +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
Christian Heimes 4fec4314cf Issue #18599: Fix name attribute of _sha1.sha1() object. It now returns
'SHA1' instead of 'SHA'.
2013-07-30 15:32:57 +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
Victor Stinner 36577e4e8c Issue #15893: frozenmain.c now handles PyMem_Malloc() failure 2013-07-27 01:04:56 +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 6ca8a05f10 Issue #18561: Skip name in ctypes' _build_callargs() if name is NULL.
CID 486199
2013-07-26 23:04:29 +02:00
Christian Heimes f446d21708 Issue #18559: Fix NULL pointer dereference error in _pickle module 2013-07-26 22:45:47 +02:00
Christian Heimes 9ee5c37c8f Issue #18559: Fix NULL pointer dereference error in _pickle module 2013-07-26 22:45:00 +02:00