Nick Coghlan [Sun, 8 Sep 2013 01:40:34 +0000 (11:40 +1000)]
Close #18952: correctly download test support data
When test.support was converted to a package, it started silently
skipping the tests which needed to download support data to run.
This change refactors the affected code, and also tidies up
test.support.findfile to remove the unused *here* parameter, document
the *subdir* parameter and rename the *filename* parameter to avoid
shadowing the file builtin and be consistent with the documentation.
The unexpected skips were noticed and reported by Zachary Ware
Eli Bendersky [Fri, 6 Sep 2013 13:11:19 +0000 (06:11 -0700)]
Issue #18849: Fixed a Windows-specific tempfile bug where collision with an
existing directory caused mkstemp and related APIs to fail instead of
retrying. Report and fix by Vlad Shcherbina.
Tim Peters [Fri, 6 Sep 2013 03:57:04 +0000 (22:57 -0500)]
Issue #18942: sys._debugmallocstats() output was damaged on Windows.
_PyDebugAllocatorStats() called PyOS_snprintf() with a %zd format
code, but MS doesn't support that code. Interpolated
PY_FORMAT_SIZE_T in place of the "z".
Issue #16826: Don't check for PYTHONCASEOK when using -E.
This commit fixes a regression that sneaked into Python 3.3 where importlib
was not respecting -E when checking for the PYTHONCASEOK environment variable.
Terry Jan Reedy [Sun, 1 Sep 2013 23:03:41 +0000 (19:03 -0400)]
Remove obsolete .hgeol entry pointing to file moved elsewhere.
This kine was already replaced by
Lib/test/test_email/data/msg_26.txt = BIN
which is just below the last line in the patch context.
Terry Jan Reedy [Sat, 31 Aug 2013 20:27:16 +0000 (16:27 -0400)]
Issue #18489: Add complete, gui-free tests for idlelib.SearchEngine.
Patch import and initialization in SearchEngine to make testing easier.
Improve docstrings, especially to clarify the double role of 'ok' parameters.
Original patch by Phil Webster.
Gregory P. Smith [Thu, 29 Aug 2013 20:35:27 +0000 (13:35 -0700)]
Fixes issue #15507: test_subprocess's test_send_signal could fail if the test
runner were run in an environment where the process inherited an ignore
setting for SIGINT. Restore the SIGINT handler to the desired
KeyboardInterrupt raising one during that test.
Eli Bendersky [Sun, 25 Aug 2013 22:27:36 +0000 (15:27 -0700)]
Update XMLParser.close documentation and fix formatting.
Using ``method`` markup because the method is on a callback object, not an
explicitly documented method. :meth: markup creates links within the current
class which is incorrect.
R David Murray [Sun, 25 Aug 2013 15:09:02 +0000 (11:09 -0400)]
#16611: BaseCookie now parses 'secure' and 'httponly' flags.
Previously it generated them if they were given a value, but completely
ignored them if they were present in the string passed in to be parsed. Now
if the flag appears on a cookie, the corresponding Morsel key will reference a
True value. Other pre-existing behavior is retained in this maintenance
patch: if the source contains something like 'secure=foo', morsel['secure']
will return 'foo'. Since such a value doesn't round trip and never did (and
would be a surprising occurrence) a subsequent non-bug-fix patch may change
this behavior.
Inspired by a patch from Julien Phalip, who reviewed this one.
Brett Cannon [Fri, 23 Aug 2013 14:58:49 +0000 (10:58 -0400)]
Emphasize that people should not override __import__.
With importlib getting used more and more, changing __import__ will
not work as well as people used to hope as it will potentially bypass
importers, etc. It also will not work with importlib.import_module()
as it uses "importlib.__import__" (i.e. importlib's implementation of
import) directly and not builtins.__import__.
Christian Heimes [Thu, 22 Aug 2013 11:19:48 +0000 (13:19 +0200)]
Issue #18747: Use a parent atfork handler instead of a child atfork handler.
fork() is suppose to be async-signal safe but the handler calls unsafe functions. A parent handler mitigates the issue.
R David Murray [Thu, 22 Aug 2013 01:10:31 +0000 (21:10 -0400)]
#18324: set_payload now correctly handles binary input.
This also backs out the previous fixes for for #14360, #1717, and #16564.
Those bugs were actually caused by the fact that set_payload didn't decode to
str, thus rendering the model inconsistent. This fix does mean the data
processed by the encoder functions goes through an extra encode/decode cycle,
but it means the model is always consistent. Future API updates will provide
a better way to encode payloads, which will bypass this minor de-optimization.
Antoine Pitrou [Wed, 21 Aug 2013 22:39:46 +0000 (00:39 +0200)]
Issue #18792: Use "127.0.0.1" or "::1" instead of "localhost" as much as possible, since "localhost" goes through a DNS lookup under recent Windows versions.
Christian Heimes [Wed, 21 Aug 2013 11:26:05 +0000 (13:26 +0200)]
Issue #18747: Re-seed OpenSSL's pseudo-random number generator after fork.
A pthread_atfork() child handler is used to seeded the PRNG with pid, time
and some stack data.
Serhiy Storchaka [Mon, 19 Aug 2013 19:59:31 +0000 (22:59 +0300)]
Issue #18647: A regular expression in the doctest module rewritten so that
determined minimal width of repeated subexpression is >0 (an empty line was
not matched in any case).
Christian Heimes [Fri, 16 Aug 2013 22:54:47 +0000 (00:54 +0200)]
Issue #18709: Fix CVE-2013-4238. The SSL module now handles NULL bytes
inside subjectAltName correctly. Formerly the module has used OpenSSL's
GENERAL_NAME_print() function to get the string represention of ASN.1
strings for rfc822Name (email), dNSName (DNS) and
uniformResourceIdentifier (URI).
Terry Jan Reedy [Thu, 15 Aug 2013 20:19:13 +0000 (16:19 -0400)]
Issue #18732: Remove unused* parameter output_sep from IdleHistory.History
and paired splits and joins that do nothing when output_sep is its default \n.
*It in unused in that the class in only instantiated once, with the default.
Make a few other changes in .fetch and its test.