Mark Dickinson [Sat, 3 Aug 2013 11:08:22 +0000 (12:08 +0100)]
Minor consistency fixes for some longobject.c exception messages:
- replace 'long int' / 'long' by 'int'
- fix capitalization of "Python" in PyLong_AsUnsignedLong
- "is too large" -> "too large", for consistency with other messages.
Victor Stinner [Thu, 1 Aug 2013 22:47:47 +0000 (00:47 +0200)]
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").
Ned Deily [Thu, 1 Aug 2013 22:39:47 +0000 (15:39 -0700)]
Fix OS X installer build script to handle the pretty-printed _sysconfigdata.py
when removing references to temporary build files. This is not an elegant
solution but it does isolate changes to just build-installer.py.
Antoine Pitrou [Thu, 1 Aug 2013 22:08:51 +0000 (00:08 +0200)]
Fix the RLIMIT_CORE resource lowering logic in test_subprocess.
We must only lower the soft limit, since lowering the hard limit makes it impossible to raise it back at the end.
(this could prevent core dumps from being generated when the test suite crashes)
R David Murray [Thu, 1 Aug 2013 00:48:26 +0000 (20:48 -0400)]
#17616: Improve context manager tests, fix bugs in close method and mode docs.
'mode' docs fix: the file must always be opened in binary in Python3.
Bug in Wave_write.close: when the close method calls the check that the header
exists and it raises an error, the _file attribute never gets set to None, so
the next close tries to close the file again and we get an ignored traceback
in the __del__ method. The fix is to set _file to None in a finally clause.
This represents a behavior change...in theory a program could be checking for
the error on close and then doing a recovery action on the still open file and
closing it again. But this change will only go into 3.4, so I think that
behavior change is acceptable given that it would be pretty weird and unlikely
logic to begin with.
Christian Heimes [Wed, 31 Jul 2013 22:12:06 +0000 (00:12 +0200)]
Initialize utime with 0. It fixes a couple of compiler warnung:
warning: 'utime.mtime_ns' may be used uninitialized in this function [-Wmaybe-uninitialized]
Christian Heimes [Wed, 31 Jul 2013 22:08:16 +0000 (00:08 +0200)]
Initialize utime with 0. It fixes a couple of compiler warnung:
warning: 'utime.mtime_ns' may be used uninitialized in this function [-Wmaybe-uninitialized]
Antoine Pitrou [Wed, 31 Jul 2013 19:52:53 +0000 (21:52 +0200)]
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.
Christian Heimes [Tue, 30 Jul 2013 22:55:18 +0000 (00:55 +0200)]
Issue #18481: Add C coverage reporting with gcov and lcov. A new make target
"coverage-report" creates an instrumented Python build, runs unit tests
and creates a HTML. The report can be updated with "make coverage-lcov".
R David Murray [Tue, 30 Jul 2013 18:42:40 +0000 (14:42 -0400)]
#18584: s/testcleanup/testsetup/ until we switch to Sphinx 1.1.
testcleanup directive is new as of 1.1, and we are currently running
1.0.7. But using testsetup works just as well, and avoids the
unknown directive error when building the docs.
R David Murray [Mon, 29 Jul 2013 19:49:58 +0000 (15:49 -0400)]
#18584: make doctest examples in email documentation pass.
With the exception of the 'as_string' call in the policy docs.
That one is a separate issue.
Note that when building the docs sphinx is complaining about
.. testcleanup:: being an invalid directive. I don't know
why this is, as I'm following the sphinx docs...but fortunately
the action is to omit the text in the body, so the generated
documentation is correct.