Commit Graph

10184 Commits

Author SHA1 Message Date
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
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 7ded1f0f69 Implemented PEP 405 (Python virtual environments). 2012-05-26 03:45:29 +01: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
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 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 876ecad9f5 Issue #14814: improve docstrings and arguments value handling, as per Terry J. Reedy's comments 2012-05-23 22:26:55 +02: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
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 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
Nick Coghlan 7fc570a51e Close #14588: added a PEP 3115 compliant dynamic type creation mechanism 2012-05-20 02:34:13 +10:00
Ezio Melotti ed1183db8b #14072: merge with 3.2. 2012-05-19 17:16:22 +03:00
Ezio Melotti 6709b7d5d1 #14072: Fix parsing of tel URIs in urlparse by making the check for ports stricter. 2012-05-19 17:15:19 +03:00
Hynek Schlawack d527259f14 #13152: Allow to specify a custom tabsize for expanding tabs in textwrap
Patch by John Feuerstein.
2012-05-19 13:33:11 +02:00
Senthil Kumaran d34b57a9a2 merge - Fix Issue14721: Send Content-length: 0 for empty body () in the http.client requests 2012-05-19 16:58:45 +08:00
Senthil Kumaran 5fa4a89601 Fix Issue14721: Send Content-length: 0 for empty body () in the http.client requests 2012-05-19 16:58:09 +08:00
Senthil Kumaran 15e848b076 Issue9374 - Generic parsing of query and fragment portion of urls for any scheme 2012-05-19 08:12:46 +08:00
Senthil Kumaran 1be320ebdd Issue9374 - Generic parsing of query and fragment portion of urls for any scheme 2012-05-19 08:12:00 +08:00
Petri Lehtinen 43ae3ceab8 #14798: pyclbr now raises ImportError instead of KeyError for missing packages 2012-05-18 21:59:49 +03:00
Petri Lehtinen 8d88604682 #14798: pyclbr now raises ImportError instead of KeyError for missing packages 2012-05-18 21:56:36 +03:00
Antoine Pitrou ebdcd859e5 Move private function _args_from_interpreter_flags() to subprocess.py, so
that it can be imported when threads are disabled.
(followup to issue #12098)
2012-05-18 18:33:07 +02:00
Richard Oudkerk 77c84f2def #12098: Make multiprocessing's child processes inherit sys.flags on Windows
Initial patch by Sergey Mezentsev.
2012-05-18 14:28:02 +01:00
Antoine Pitrou 314a16b0ec Make the test completely clean up after itself. 2012-05-17 21:02:54 +02:00
Antoine Pitrou ea3eb88bca Issue #9260: A finer-grained import lock.
Most of the import sequence now uses per-module locks rather than the
global import lock, eliminating well-known issues with threads and imports.
2012-05-17 18:55:59 +02:00
Antoine Pitrou de9ac6c2e5 Issue #14780: urllib.request.urlopen() now has a `cadefault` argument to use the default certificate store.
Initial patch by James Oakley.
2012-05-16 21:40:01 +02:00
Stefan Krah 5d953184a6 Issue #14779: Get sizeof(void *) directly rather than relying on sysconfig. 2012-05-16 20:41:56 +02:00
Antoine Pitrou 019ff19c39 Issue #14693: Under non-Windows platforms, hashlib's fallback modules are always compiled, even if OpenSSL is present at build time. 2012-05-16 16:41:26 +02:00
Giampaolo Rodola' 26fd8feb5e merge heads 2012-05-16 16:03:07 +02:00
Giampaolo Rodola' e126678216 #14807: fix BB failures on Windows - avoid to to rely too many details of the mode string. 2012-05-16 16:01:59 +02:00
Antoine Pitrou 7ca29507f6 Forward port additional tests from 2.7 (issue #14829). 2012-05-16 15:06:00 +02:00
Antoine Pitrou fb5b954ee0 Forward port additional tests from 2.7 (issue #14829). 2012-05-16 15:01:40 +02:00
Eric V. Smith 5cdc6308b6 Cleanup so subsequent tests won't fail. Needs to be moved into a support routine (see 14715). 2012-05-16 04:48:04 -04:00
Eric V. Smith 313fbe2106 Merge from 3.2. 2012-05-16 04:49:22 -04:00
Eric V. Smith c8e106babb Merge from 3.2. 2012-05-15 20:46:06 -04:00
Eric V. Smith a790c9b6d6 Issue #14817: Add rudimentary tests for pkgutil.extend_path. 2012-05-15 20:44:06 -04:00
Giampaolo Rodola' 12ea86adce merge heads 2012-05-15 22:21:01 +02:00
Giampaolo Rodola' b28df76ee2 #14807: fix bb failure due to symlink test relying on hard-coded permissions 2012-05-15 22:20:10 +02:00
Hynek Schlawack 39bf90d319 Add two more sorts to test_os.WalkTests I've missed before 2012-05-15 18:40:17 +02:00