Commit Graph

20984 Commits

Author SHA1 Message Date
Terry Jan Reedy f1ee7886f3 Merge with 3.2 #10635 whitespace 2012-05-26 20:44:45 -04:00
Terry Jan Reedy 3fde191f39 #10365 Trim trailing whitespace 2012-05-26 20:43:17 -04:00
Terry Jan Reedy 935d5eb43f Merge with 3.2
Issue #10365: File open dialog now works instead of crashing
even when parent window is closed. Patch by Roger Serwy.
2012-05-26 20:29:25 -04:00
Terry Jan Reedy cd6b8c67ce Issue #10365: File open dialog now works instead of crashing
even when parent window is closed. Patch by Roger Serwy.
2012-05-26 20:23:45 -04:00
Richard Oudkerk 26cdf1fe5b Make multiprocessing's shared memory use memoryview instead of raw pointer 2012-05-26 22:09:59 +01:00
Terry Jan Reedy 1a0df94db3 Merge Issue #14876: Use user-selected font for highlight configuration.
Patch by Roger Serwy.
2012-05-26 16:50:30 -04:00
Terry Jan Reedy 809309a482 Issue #14876: Use user-selected font for highlight configuration.
Patch by Roger Serwy.
2012-05-26 16:31:00 -04:00
Vinay Sajip ee2bbed925 Merged upstream changes. 2012-05-26 20:39:27 +01:00
Vinay Sajip 42211426eb Addressed some buildbot errors and comments on the checkin by Antoine on python-dev. 2012-05-26 20:36:12 +01:00
R David Murray d1a30c939c #8739: upgrade smtpd to RFC 5321 and 1870.
smtpd now handles EHLO and has infrastructure for extended smtp command mode.
The SIZE extension is also implemented.  In order to support parameters on
MAIL FROM, the RFC 5322 parser from the email package is used to parse the
address "token".

Logging subclasses things and overrides __init__, so it was necessary to
update those __init__ functions in the logging tests to make the logging tests
pass.

The original suggestion and patch were by Alberto Trevino.  Juhana Jauhiainen
added the --size argument and SIZE parameter support.  Michele Orrù improved
the patch and added more tests.  Dan Boswell conditionalized various bits of
code on whether or not we are in HELO or EHLO mode, as well as some other
improvements and tests.  I finalized the patch and added the address parsing.
2012-05-26 14:33:59 -04:00
R David Murray 032eed3c4a Recognize '<>' as a special case of an angle-addr in header_value_parser.
Although '<>' is invalid according to RFC 5322, SMTP uses it for various
things, and it sometimes ends up in email headers.  This patch changes
get_angle_addr to recognize it and just register a Defect instead of raising a
parsing error.
2012-05-26 14:31:12 -04:00
Brett Cannon d785cb3955 Remove some redundant decorators. 2012-05-26 14:28:21 -04:00
Nick Coghlan 2c58910d3d Issue #14814: Clean out an obsolete property and method from ipaddress Network objects 2012-05-27 01:03:25 +10:00
Nick Coghlan aff73f91cc Issue #14814: Cleanup ipaddress header comments 2012-05-27 00:57:25 +10:00
Nick Coghlan 51c3067551 Issue #14814: In the spirit of TOOWTDI, ditch the redundant version parameter to the factory functions by using the appropriate direct class references instead 2012-05-27 00:25:58 +10:00
Hynek Schlawack 072b1e1485 #14814: Some PEP8 adjustments and dead code weeding 2012-05-26 12:04:56 +02:00
R David Murray d2d521eafd #665194: Add a localtime function to email.utils.
Without this function people would be tempted to use the other date functions
in email.utils to compute an aware localtime, and those functions are not as
good for that purpose as this code.  The code is Alexander Belopolsy's from
his proposed patch for issue 9527, with a fix (and additional tests) by Brian
K. Jones.
2012-05-25 23:22:59 -04:00
R David Murray dcaf2ece6c #12586: Fix a small oversight in the new email policy header setting code.
This is a danger of focusing on unit tests: sometimes you forget
to do the integration tests.
2012-05-25 22:53:12 -04:00
Vinay Sajip b5267631cb Merged upstream changes. 2012-05-26 03:48:27 +01:00
Vinay Sajip 7ded1f0f69 Implemented PEP 405 (Python virtual environments). 2012-05-26 03:45:29 +01:00
Senthil Kumaran 4322c178b9 Issue #14920: Fix the help(urllib.parse) failure on locale C terminals. Just have ascii in help msg 2012-05-26 09:55:28 +08:00
Senthil Kumaran ffa4b2c037 Issue #14920: Fix the help(urllib.parse) failure on locale C terminals. Just have ascii in help msg 2012-05-26 09:53:32 +08:00
R David Murray 0b6f6c82b5 #12586: add provisional email policy with new header parsing and folding.
When the new policies are used (and only when the new policies are explicitly
used) headers turn into objects that have attributes based on their parsed
values, and can be set using objects that encapsulate the values, as well as
set directly from unicode strings.  The folding algorithm then takes care of
encoding unicode where needed, and folding according to the highest level
syntactic objects.

With this patch only date and time headers are parsed as anything other than
unstructured, but that is all the helper methods in the existing API handle.
I do plan to add more parsers, and complete the set specified in the RFC
before the package becomes stable.
2012-05-25 18:42:14 -04:00
R David Murray c27e52265b #14731: refactor email policy framework.
This patch primarily does two things: (1) it adds some internal-interface
methods to Policy that allow for Policy to control the parsing and folding of
headers in such a way that we can construct a backward compatibility policy
that is 100% compatible with the 3.2 API, while allowing a new policy to
implement the email6 API.  (2) it adds that backward compatibility policy and
refactors the test suite so that the only differences between the 3.2
test_email.py file and the 3.3 test_email.py file is some small changes in
test framework and the addition of tests for bugs fixed that apply to the 3.2
API.

There are some additional teaks, such as moving just the code needed for the
compatibility policy into _policybase, so that the library code can import
only _policybase.  That way the new code that will be added for email6
will only get imported when a non-compatibility policy is imported.
2012-05-25 15:01:48 -04:00
Eric V. Smith f879e32cc5 Added test for namespace package dynamic path updates. 2012-05-25 11:25:27 -04:00
Richard Oudkerk 739ae5692e Issue #14548: Make multiprocessing finalizers check pid before running
This protects from possibilty of gc running just after fork.
2012-05-25 13:54:53 +01:00
Richard Oudkerk 692130a231 Issue #12091: simplify ApplyResult and MapResult with threading.Event
Patch by Charles-François Natali
2012-05-25 13:26:53 +01:00
Richard Oudkerk be39cfc9dc Merge 2012-05-25 13:04:20 +01:00
Richard Oudkerk 54454e7dc2 Issue #14881: Allow normal non-main thread to spawn a dummy process
Fix suggested by Itay Brandes
2012-05-25 12:57:58 +01:00
Hynek Schlawack 9866d96e48 #4841: Fix FileIO constructor to honor closefd when called repeatedly
Patch by Victor Stinner.
2012-05-25 10:27:43 +02:00
Hynek Schlawack 2cc7156515 #4841: Fix FileIO constructor to honor closefd when called repeatedly
Patch by Victor Stinner.
2012-05-25 10:05:53 +02:00
Eric V. Smith 283d0ba45d Whitespace cleanup. 2012-05-24 20:22:10 -04:00
Eric V. Smith 984b11f88f issue 14660: Implement PEP 420, namespace packages. 2012-05-24 20:21:04 -04:00
Senthil Kumaran 4715ca5600 Issue #14036: return None when port in urlparse cross 65535 2012-05-24 21:57:38 +08:00
Senthil Kumaran 2fc5a50809 Issue #14036: return None when port in urlparse cross 65535 2012-05-24 21:56:17 +08:00
Sandro Tosi b95c63413d Issue #14814: minor improvements as suggested by Hynek Schlawack 2012-05-23 23:17:22 +02:00
Sandro Tosi 876ecad9f5 Issue #14814: improve docstrings and arguments value handling, as per Terry J. Reedy's comments 2012-05-23 22:26:55 +02:00
Petri Lehtinen 3bc37f2360 #14862: Add missing names to os.__all__ 2012-05-23 21:36:28 +03:00
Hynek Schlawack e02ba1031f #14885: Make support.skip_unless_xattr check also tempfile
There is a rare edge case where the filesystem used by the tempfile functions
(usually /tmp) doesn't support xattrs while the one used by TESTFN (the current
directory, so likely to be below /home) does. This causes the xattr related
test_shutil tests fail. skip_unless_xattr now checks both.

I have also added skip_unless_xattr to __all__ where it has been missing.
2012-05-23 11:22:44 +02:00
Ezio Melotti 4226543490 #14875: merge with 3.2. 2012-05-21 17:53:42 -06:00
Ezio Melotti 898d51da4d #14875: Use float('inf') instead of float('1e66666') in the json module. 2012-05-21 17:49:06 -06:00
Nick Coghlan 1d5ccdb24d Close #14136 by cleaning up the PEP 409 command line test (patch by Ethan Furman) 2012-05-21 23:03:30 +10:00
Nick Coghlan 3267a30de1 Close #13585: add contextlib.ExitStack to replace the ill-fated contextlib.nested API 2012-05-21 22:54:43 +10:00
Nick Coghlan dc9b2555a8 Issue #14814: addition of the ipaddress module (stage 1 - code and tests) 2012-05-20 21:01:57 +10:00
Senthil Kumaran 185f401308 merge - Fix for issue14426 - buildbots here I come 2012-05-20 16:58:59 +08:00
Senthil Kumaran aeeba2629a Fix for issue14426 - buildbots here I come 2012-05-20 16:58:30 +08:00
Raymond Hettinger 010ce3283a Minor change to default lru size. Set default to a power of two. 2012-05-19 21:20:48 -07:00
Senthil Kumaran 0b943a18ef Issue #14426: Correct the Date format in Expires attribute of Set-Cookie. Patch by Federico Reghenzani and Müte Invert 2012-05-20 12:06:51 +08:00
Senthil Kumaran 00c2ec282e Issue #14426: Correct the Date format in Expires attribute of Set-Cookie. Patch by Federico Reghenzani and Müte Invert 2012-05-20 12:05:16 +08:00
Eli Bendersky b20df95827 Issue #14849: setup Element data members to be assignable in subclasses 2012-05-20 06:33:29 +03:00