Issue 7970: When email.Parser.Parser parses a MIME message of type
message/rfc822 it turns it into an object whose body consists of
a list containing a single Message object. HeaderParser, on the
other hand, just copies the body as a string. Generator.flatten
has a special handler for the message mime type that expected the
body to be the one item list. This fails if the message was parsed
by HeaderParser. So we now check to see if the body is a string
first, and if so just we just emit it.
........
Issue #7633: Context method in the decimal module (with the exception
of the 'canonical' and 'is_canonical' methods) now consistently accept
integer arguments wherever a Decimal instance is accepted. Thanks
Juan José Conti for the patch.
........
r78218 | mark.dickinson | 2010-02-18 14:45:33 +0000 (Thu, 18 Feb 2010) | 1 line
Doctest fixes for decimal.py: add an integer-argument doctest for logical_invert; don't use integer literals with a leading zero.
........
Ezio Melotti [Thu, 18 Feb 2010 09:37:05 +0000 (09:37 +0000)]
Merged revisions 78136 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78136 | ezio.melotti | 2010-02-10 23:40:33 +0200 (Wed, 10 Feb 2010) | 1 line
#7712: add a temp_cwd context manager to test_support and use it in regrtest to run all the tests in a temporary directory, saving the original CWD in test_support.SAVEDCWD. Thanks to Florent Xicluna who helped with the patch.
........
Mark Dickinson [Sun, 14 Feb 2010 12:53:32 +0000 (12:53 +0000)]
Merged revisions 78183-78184 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78183 | mark.dickinson | 2010-02-14 12:16:43 +0000 (Sun, 14 Feb 2010) | 1 line
Silence some 'comparison between signed and unsigned' compiler warnings.
........
r78184 | mark.dickinson | 2010-02-14 12:31:26 +0000 (Sun, 14 Feb 2010) | 1 line
Silence more compiler warnings; fix an instance of potential undefined behaviour from signed overflow.
........
Mark Dickinson [Sat, 13 Feb 2010 18:34:53 +0000 (18:34 +0000)]
Issue #7924: Fix an intermittent 'XXX undetected error' crash in
test_capi, due to test_capsule failing to clear an exception. Many
thanks to Florent Xicluna for the diagnosis and fix.
Ronald Oussoren [Thu, 11 Feb 2010 13:23:08 +0000 (13:23 +0000)]
Fix for issue #7715: explicitly use the system arch instead of whatever is
on the user's path. This is needed because GNU arch is not necessarily
compatible with Apple's version.
Issue 5754: tweak shelve doc wording to make it clearer that even when
writeback=True values are written to the backing store when assigned to
the shelf. Add test to confirm that this happens. Doc patch and added
test by Robert Lehmann. I also fixed the cross references to the sync
and close methods.
........
r78142 | r.david.murray | 2010-02-10 20:56:42 -0500 (Wed, 10 Feb 2010) | 3 lines
Improve issue 7835 fix per MAL to handle the case that the
module dictionary has also been cleared.
........
Issue 7835: Shelve's __del__ method calls its close method, and its
close method refers to an identifier in the global module namespace.
This means that when __del__ is called during interpreter shutdown (if,
for example, the calling program still has a pointer to the shelf),
sometimes that global identifier would wind up being None, causing
mysterious 'ignored' exceptions. This patch checks for the possible None
value first before using the global, thus avoiding the error messages.
........
Issue #2746: Don't escape ampersands and angle brackets ("&", "<", ">")
in XML processing instructions and comments. These raw characters are
allowed by the XML specification, and are necessary when outputting e.g.
PHP code in a processing instruction. Patch by Neil Muller.
........
Antoine Pitrou [Tue, 9 Feb 2010 16:51:16 +0000 (16:51 +0000)]
Issue #6233: ElementTree failed converting unicode characters to XML
entities when they could't be represented in the requested output
encoding. Patch by Jerry Chen.
Ezio Melotti [Mon, 8 Feb 2010 21:57:48 +0000 (21:57 +0000)]
Merged revisions 78091,78094,78109 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78091 | georg.brandl | 2010-02-07 19:02:22 +0200 (Sun, 07 Feb 2010) | 1 line
Rename "exc_value" attribute on assertRaises context manager to "exception".
........
r78094 | michael.foord | 2010-02-07 20:44:12 +0200 (Sun, 07 Feb 2010) | 1 line
assertRaises as context manager now allows you to access exception as documented
........
r78109 | ezio.melotti | 2010-02-08 23:52:08 +0200 (Mon, 08 Feb 2010) | 1 line
Mark Dickinson [Sun, 7 Feb 2010 13:15:37 +0000 (13:15 +0000)]
Merged revisions 78082,78086 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78082 | mark.dickinson | 2010-02-07 13:01:56 +0000 (Sun, 07 Feb 2010) | 1 line
Add missing global declarations for 'overflowok'; remove 'overflowrequired', which is no longer needed.
........
r78086 | mark.dickinson | 2010-02-07 13:09:52 +0000 (Sun, 07 Feb 2010) | 1 line
Actually raise on failure, instead of doing nothing.
........
Ronald Oussoren [Sun, 7 Feb 2010 11:46:38 +0000 (11:46 +0000)]
Mention a configure warning that almost certainly indicates that
configure is picking up a library that doesn't contain all architectures
required for a universal build on OSX.
issue #7728: test_timeout was using a hardcoded port, which was
causing buildbot failures. Changed to use test_support.bind_port.
Patch by Florent Xicluna.
........
Issue #5677: Explicitly forbid write operations on read-only file objects,
and read operations on write-only file objects. On Windows, the system C
library would return a bogus result; on Solaris, it was possible to crash
the interpreter. Patch by Stefan Krah.
........
normalize exceptions passed to the __exit__ method #7853
In Python 2.x, exceptions in finally blocks are not normalized. Since with
statements are implemented using finally blocks, ceval.c had to be tweaked to
distinguish between with finally blocks and normal ones.
A test for the finalization of generators containing with statements was also
added.
........
Issue #4772: Raise a ValueError when an unknown Bluetooth protocol is
specified, rather than fall through to AF_PACKET (in the `socket` module).
Also, raise ValueError rather than TypeError when an unknown TIPC address
type is specified. Patch by Brian Curtin.
........
Explicitly mention the default value for formatdate's usegmt parameter.
........
r77959 | nick.coghlan | 2010-02-04 07:43:58 -0500 (Thu, 04 Feb 2010) | 1 line
Issue 6760: Clarify args handling for subprocess.Popen. Patch by Chris Rebert
........
r77960 | r.david.murray | 2010-02-04 11:33:31 -0500 (Thu, 04 Feb 2010) | 2 lines
Add Chris Rebert to ACKS for issue 6760 Popen doc improvements.
........
Brett Cannon [Wed, 3 Feb 2010 22:16:11 +0000 (22:16 +0000)]
Merged revisions 77956-77957 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r77956 | brett.cannon | 2010-02-03 14:11:54 -0800 (Wed, 03 Feb 2010) | 1 line
Update a docstring to suggest using importlib.import_module instead of calling __import__ directly.
........
r77957 | brett.cannon | 2010-02-03 14:13:44 -0800 (Wed, 03 Feb 2010) | 1 line
Fix a typo in a docstring introduced in r77956.
........
Merged revisions 77712,77740-77741,77756,77886,77902,77936 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r77712 | tarek.ziade | 2010-01-23 11:52:57 -0600 (Sat, 23 Jan 2010) | 1 line
fixed the 64bits tests for get_platform() - mac osx
........
r77740 | benjamin.peterson | 2010-01-24 21:58:21 -0600 (Sun, 24 Jan 2010) | 1 line
compare types with is not ==
........
r77741 | facundo.batista | 2010-01-25 00:15:01 -0600 (Mon, 25 Jan 2010) | 3 lines
Added a note about Event.is_set() syntax being new to 2.6
........
r77756 | tarek.ziade | 2010-01-26 11:20:37 -0600 (Tue, 26 Jan 2010) | 1 line
fixed bdist_msi imports and added a test module for distutils.command.bdist_msi
........
r77886 | benjamin.peterson | 2010-01-31 12:09:34 -0600 (Sun, 31 Jan 2010) | 1 line
move distutils.rst to different toc
........
r77902 | andrew.kuchling | 2010-01-31 20:04:26 -0600 (Sun, 31 Jan 2010) | 1 line
Add various items
........
r77936 | andrew.kuchling | 2010-02-02 20:19:14 -0600 (Tue, 02 Feb 2010) | 1 line