Commit Graph

55447 Commits

Author SHA1 Message Date
R David Murray 79cf3bad1b #11785: fix the :mod: references in email package submodule titles.
Also adds the TOC entry for headerregistry.
2012-05-27 17:10:36 -04:00
R David Murray ea9766897b Make headerregistry fully part of the provisional api.
When I made the checkin of the provisional email policy, I knew that
Address and Group needed to be made accessible from somewhere.  The more
I looked at it, though, the more it became clear that since this is a
provisional API anyway, there's no good reason to hide headerregistry as
a private API.  It was designed to ultimately be part of the public API,
and so it should be part of the provisional API.

This patch fully documents the headerregistry API, and deletes the
abbreviated version of those docs I had added to the provisional policy
docs.
2012-05-27 15:03:38 -04:00
Vinay Sajip 393da3240a Changed executable name computation in test_venv to allow for debug executables. 2012-05-27 19:05:36 +01:00
Vinay Sajip b3b49cd1d2 Refined venv tests. 2012-05-27 18:39:22 +01:00
R David Murray 36432ea783 Add '__all__' to _encoded_words and mark QByteMap as private. 2012-05-27 12:39:54 -04:00
Vinay Sajip 7e203498d1 Fixed _sys_home computation and added diagnostics for Windows buildbot failures. 2012-05-27 17:30:09 +01:00
Nick Coghlan 0b43bcf528 Close #14857: fix regression in references to PEP 3135 implicit __class__ closure variable. Reopens issue #12370, but also updates unittest.mock to workaround that issue 2012-05-27 18:17:07 +10:00
Nick Coghlan 5c6eba3a93 Tweak importlib._bootstrap to avoid zero-argument super so I can work on issue #14857 without breaking imports 2012-05-27 17:49:58 +10:00
Georg Brandl 38e0e1ec85 Fix markup. 2012-05-27 09:31:10 +02:00
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 53c920052b Issue #14814: Add a basic ipaddress tutorial (thanks to Sandro Tosi for the initial conversion from Peter Moody's wiki version) 2012-05-27 01:53:33 +10: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
Georg Brandl 039b01d015 Add missing versionadded. 2012-05-26 09:11:22 +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
R David Murray 94a6426093 Add news entries for #14731 and #12586. 2012-05-25 22:33:36 -04:00
R David Murray cb448cf108 #12586: Expand What's New email entry with provisional policy features. 2012-05-25 22:25:56 -04:00
Vinay Sajip f2bdc3690a Updated .hgeol for additional binaries. 2012-05-26 03:25:23 +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 0fa2edd08f #14731: add preliminary What's New entry for policy framework. 2012-05-25 17:59:56 -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
Benjamin Peterson 9242c1378f capitialize utime statuses 2012-05-25 10:26:47 -07:00
Benjamin Peterson 46c214d893 capitialize enum members 2012-05-25 10:22:29 -07:00
Nick Coghlan b47b53941a Placeholder in What's New for the major packaging infrastructure changes 2012-05-26 01:31:25 +10: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
Benjamin Peterson 18eac4a1d6 use PyDict_Contains 2012-05-25 00:24:42 -07:00