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
Add text to Mac/README to warn about non-universal libraries when
building a universal Python. Based on issue7679.
........
r77585 | ronald.oussoren | 2010-01-17 10:25:57 -0600 (Sun, 17 Jan 2010) | 12 lines
- Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
- Issue #7714: Use ``gcc -dumpversion`` to detect the version of GCC on
MacOSX.
- Make configure look for util.h as well as libutil.h. The former
is the header file that on OSX contains the defition of openpty.
(Needed to compile for OSX 10.4 on OSX 10.6)
- Use the correct definition of CC to compile the pythonw executable
........
r77587 | ronald.oussoren | 2010-01-17 13:27:57 -0600 (Sun, 17 Jan 2010) | 8 lines
This patch ensures that the configure-script mentions checking for --enable-universalsdk
and that it doesn't default to the 10.4u SDK when that SDK does not exist.
(This affects OSX)
This patch should fix most of issue 4834, although I haven't gotten enough
information from the user to be sure.
........
r77588 | ronald.oussoren | 2010-01-17 13:32:00 -0600 (Sun, 17 Jan 2010) | 2 lines
Explicitly use /usr/bin/arch on OSX, fixes issue 7715
........
Merged revisions 77484,77487,77561,77570,77593,77603,77608,77667,77702-77703,77739,77858,77887,77889 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
Update PyEval_EvalFrame to PyEval_EvalFrameEx. This looks to have been done
partially before. Also add a comment describing how this might have to work
with different versions of the interpreter.
........
r77487 | ezio.melotti | 2010-01-14 05:34:10 -0600 (Thu, 14 Jan 2010) | 1 line
Fixed typo
........
r77561 | georg.brandl | 2010-01-17 02:42:30 -0600 (Sun, 17 Jan 2010) | 1 line
#7699: improve datetime docs: straightforward linking to strftime/strptime section, mark classmethods as such.
........
r77570 | georg.brandl | 2010-01-17 06:14:42 -0600 (Sun, 17 Jan 2010) | 1 line
Add note about usage of STRINGLIB_EMPTY.
........
r77593 | georg.brandl | 2010-01-17 17:33:53 -0600 (Sun, 17 Jan 2010) | 1 line
Fix internal reference.
........
r77603 | benjamin.peterson | 2010-01-18 17:07:56 -0600 (Mon, 18 Jan 2010) | 8 lines
data descriptors do not override the class dictionary if __get__ is not defined
Adjust documentation and add a test to verify this behavior.
See http://mail.python.org/pipermail/python-dev/2010-January/095637.html for
discussion.
........
r77608 | gregory.p.smith | 2010-01-19 02:19:03 -0600 (Tue, 19 Jan 2010) | 6 lines
Do not compile stubs for the sha2 series hashes in the openssl hashlib
module when the openssl version is too old to support them. That
leads both compiled code bloat and to unittests attempting to test
implementations that don't exist for comparison purposes on such
platforms.
........
r77667 | mark.dickinson | 2010-01-21 12:32:27 -0600 (Thu, 21 Jan 2010) | 1 line
Add two more test_strtod test values.
........
r77702 | georg.brandl | 2010-01-23 02:43:31 -0600 (Sat, 23 Jan 2010) | 1 line
#7762: fix refcount annotation of PyUnicode_Tailmatch().
........
r77703 | georg.brandl | 2010-01-23 02:47:54 -0600 (Sat, 23 Jan 2010) | 1 line
#7725: fix referencing issue.
........
r77739 | benjamin.peterson | 2010-01-24 21:52:52 -0600 (Sun, 24 Jan 2010) | 1 line
mention from_float() in error message
........
r77858 | georg.brandl | 2010-01-30 11:57:48 -0600 (Sat, 30 Jan 2010) | 1 line
#7802: fix invalid example (heh).
........
r77887 | georg.brandl | 2010-01-31 12:51:49 -0600 (Sun, 31 Jan 2010) | 5 lines
Fix-up ftplib documentation:
move exception descriptions to toplevel, not inside a class
remove attribution in "versionadded"
spell and grammar check docstring of FTP_TLS
........
r77889 | michael.foord | 2010-01-31 13:59:26 -0600 (Sun, 31 Jan 2010) | 1 line
Minor modification to unittest documentation.
........
Update the version # of Python-ast.c based on the backport of set literals from
r77400.
........
r77420 | benjamin.peterson | 2010-01-10 14:42:03 -0600 (Sun, 10 Jan 2010) | 1 line
fix test_popen when the path to python has spaces #7671
........
r77423 | alexandre.vassalotti | 2010-01-11 16:46:43 -0600 (Mon, 11 Jan 2010) | 2 lines
Update version information for AST changes in r77422.
........
r77426 | alexandre.vassalotti | 2010-01-11 17:13:49 -0600 (Mon, 11 Jan 2010) | 2 lines
Add missing NEWS entry for r77422.
........
r77486 | benjamin.peterson | 2010-01-13 20:40:10 -0600 (Wed, 13 Jan 2010) | 1 line
use more robust quoting
........
r77511 | benjamin.peterson | 2010-01-14 20:26:07 -0600 (Thu, 14 Jan 2010) | 1 line
try to fix for windows
........
r77513 | vinay.sajip | 2010-01-15 17:27:05 -0600 (Fri, 15 Jan 2010) | 1 line
Fixed issue-number mistake in NEWS update.
........
r77515 | sean.reifschneider | 2010-01-15 22:27:58 -0600 (Fri, 15 Jan 2010) | 1 line
issue5063: Fixes for building RPM on CentOS plus misc .spec file enhancements.
........
r77544 | ezio.melotti | 2010-01-16 12:38:01 -0600 (Sat, 16 Jan 2010) | 1 line
typo: use one instead instead of two
........
r77733 | ezio.melotti | 2010-01-24 15:47:59 -0600 (Sun, 24 Jan 2010) | 1 line
#7269: fix failures in test_bsddb3. Patch by Florent Xicluna.
........
r77755 | ezio.melotti | 2010-01-26 09:57:21 -0600 (Tue, 26 Jan 2010) | 1 line
#7092: fix DeprecationWarnings for json when the tests are run with -3 -Wd.
........
r77841 | ezio.melotti | 2010-01-30 01:22:54 -0600 (Sat, 30 Jan 2010) | 1 line
#7092: silence py3k warnings for deprecated modules
........
r77871 | ezio.melotti | 2010-01-31 05:46:54 -0600 (Sun, 31 Jan 2010) | 1 line
#7092: silence more -3 and -Wd warnings
........
r77885 | benjamin.peterson | 2010-01-31 12:02:35 -0600 (Sun, 31 Jan 2010) | 1 line
fix windows buildbot
........
r77910 | ezio.melotti | 2010-02-02 02:37:35 -0600 (Tue, 02 Feb 2010) | 1 line
#7092: silence py3k warnings for bsddb. Patch by Florent Xicluna.
........
r77911 | ezio.melotti | 2010-02-02 09:12:42 -0600 (Tue, 02 Feb 2010) | 1 line
Silence a couple of -3 warnings
........
r77912 | ezio.melotti | 2010-02-02 09:57:45 -0600 (Tue, 02 Feb 2010) | 1 line
Fix idioms and a couple of py3k warnings. Patch by Florent Xicluna.
........
r77913 | ezio.melotti | 2010-02-02 11:34:37 -0600 (Tue, 02 Feb 2010) | 1 line
#7092: Silence py3k warnings in test_exceptions and test_pep352. Patch by Florent Xicluna.
........