Ronald Oussoren [Sat, 6 Jul 2013 08:23:59 +0000 (10:23 +0200)]
Issue #17860: explicitly mention that std* streams are opened in binary mode by default.
The documentation does mention that the streams are opened in text mode
when univeral_newlines is true, but not that that they are opened in
binary mode when that argument is false and that seems to confuse at
least some users.
Victor Stinner [Wed, 3 Jul 2013 20:29:42 +0000 (22:29 +0200)]
test_faulthandler: skip test_read_null() on AIX
AIX maps the first page of memory at address zero as valid, read-only. Reading
NULL is not a fault on AIX. This is utilized by IBM compiler optimizations.
One speculatively can indirect through a pointer which may be null without
first testing if null and defer the test before using the value.
Victor Stinner [Mon, 1 Jul 2013 22:14:56 +0000 (00:14 +0200)]
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.
Issue #18328: Reorder ops in PyThreadState_Delete*() functions. Now the
tstate is first removed from TLS and then deallocated.
CID 1019639 (#1 of 1): Use after free (USE_AFTER_FREE)
use_after_free: Using freed pointer tstate.
Terry Jan Reedy [Sun, 30 Jun 2013 20:52:19 +0000 (16:52 -0400)]
Issue 18189: remove unused methods in idlelib.Delegator.Delegator.
Idle code already uses x.delegate instead of x.getdelegate().
The printed report must have been for testing.
Terry Jan Reedy [Sat, 29 Jun 2013 03:50:12 +0000 (23:50 -0400)]
Issue *18081, #18242: Change Idle warnings capture in PyShell and run to stop
replacing warnings.formatwarnings and to reverse replacement of
warnings.showwarnings when import is complete and when main function exits.
Add test_warning.py. Vinay Sajip provided capture_warnings function.
Terry Jan Reedy [Fri, 28 Jun 2013 22:59:28 +0000 (18:59 -0400)]
Issue #18315: Improve fileinput docs by adding 'bufsize' where missing and
replacing redundant signature in input() docstring with one-line summary.
Original patch by Terrel Shumway.
R David Murray [Thu, 27 Jun 2013 22:37:00 +0000 (18:37 -0400)]
#14360: make encoders.encode_quopri work.
There were no tests for the encoders module. encode_base64 worked
because it is the default and so got tested implicitly elsewhere, and
we use encode_7or8bit internally, so that worked, too. I previously
fixed encode_noop, so this fix means that everythign in the encoders
module now works, hopefully correctly. Also added an explicit test
for encode_base64.
Victor Stinner [Mon, 24 Jun 2013 22:42:31 +0000 (00:42 +0200)]
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.
Victor Stinner [Sun, 23 Jun 2013 13:08:23 +0000 (15:08 +0200)]
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.
Terry Jan Reedy [Sat, 22 Jun 2013 22:26:51 +0000 (18:26 -0400)]
#18151, part 2: Silence debug build resource warning for each file opened by
'Find in files' by replacing 'open with implicit close' by 'with open' in
GrepDialog method grep_it. Streamline code with enumerate(), direct file
iteration, and output tweak. Add test for this method, including output format.
Serhiy Storchaka [Mon, 17 Jun 2013 12:38:50 +0000 (15:38 +0300)]
Issue #18223: Refactor test_tarfile.
* Use mixins for generating tests for different compression types.
* Make test_tarfile discoverable.
* Use more special tests (i.e. assertEqual, assertIs) instead of assertTrue.
* Add explicit test skips instead of reporting skipped tests as passed.
* Wrap long lines.
* Correct a comment for test_hardlink_extraction1.
* Add support.requires_gzip.
Gregory P. Smith [Sun, 16 Jun 2013 01:04:26 +0000 (18:04 -0700)]
Prevent a possible double close of parent pipe fds when the subprocess
exec runs into an error. Prevent a regular multi-close of the /dev/null
fd when any of stdin, stdout and stderr was set to DEVNULL.