Commit Graph

21268 Commits

Author SHA1 Message Date
Richard Oudkerk 3730a17a58 Issue #14059: Implement multiprocessing.Barrier 2012-06-15 18:26:07 +01:00
Nick Coghlan 807770ec1b Issue #15061: Don't oversell the capabilities of the new non-shortcircuiting comparison function in hmac 2012-06-15 21:14:08 +10:00
Eli Bendersky 307693a8bb Skip XincludeTest entirely instead of just ignoring failures, because it may segfault, depending on the order of running tests 2012-06-15 09:40:44 +03:00
Eli Bendersky 27cbb19ae5 Removed _SimpleElementPath and its flaky test. The test monkey-patches the module, which causes other failures and fails itself depending on the order tests are run. 2012-06-15 09:03:19 +03:00
Eli Bendersky 175fada429 mark problematic test as expected failure - investigating 2012-06-15 08:37:08 +03:00
Eli Bendersky 64d11e60f2 Replace the iter/itertext methods of Element in _elementtree with true C implementations, instead of the bootstrapped Python code. In addition to being cleaner (removing the last remains of the bootstrapping code in _elementtree), this gives a 10x performance boost for iter() on large documents.
Also reorganized the tests a bit to be more robust.
2012-06-15 07:42:50 +03:00
Richard Oudkerk 73d9a292ae Issue #13841: Make child processes exit using sys.exit() on Windows 2012-06-14 15:30:10 +01:00
Martin v. Löwis 474eb23b7f merge 3.2 2012-06-14 15:37:53 +02:00
Martin v. Löwis 993fe3f035 Issue #14937: Fix typo. Patch by Roger Serwy. 2012-06-14 15:37:21 +02:00
Alexander Belopolsky c142bba2a7 Issue #1667546: On platforms supporting tm_zone and tm_gmtoff fields
in struct tm, time.struct_time objects returned by time.gmtime(),
time.localtime() and time.strptime() functions now have tm_zone and
tm_gmtoff attributes.  Original patch by Paul Boddie.
2012-06-13 22:15:26 -04:00
Victor Stinner 6222d76952 Fix test_time for adjusted/adjustable changes 2012-06-12 23:04:11 +02:00
Victor Stinner 2b89fdf7eb PEP 418: Rename adjusted attribute to adjustable in time.get_clock_info() result
Fix also its value on Windows and Linux according to its documentation:
"adjustable" indicates if the clock *can be* adjusted, not if it is or was
adjusted.

In most cases, it is not possible to indicate if a clock is or was adjusted.
2012-06-12 22:46:37 +02:00
Richard Oudkerk f0604fddc3 Issue #3518: Remove references to non-existent BaseManager.from_address()
method
2012-06-11 17:56:08 +01:00
Brett Cannon 7b383c431a Make a test easier to read. 2012-06-11 11:02:36 -04:00
Nick Coghlan 4fae8cdaea Close #13857: Added textwrap.indent() function (initial patch by Ezra
Berch)
2012-06-11 23:07:51 +10:00
Brian Quinlan a26ad5a0a1 #15015: Fix accessing an non-existing attribute. 2012-06-11 12:59:07 +10:00
Michael Foord f7c4158057 Adding patch.stopall method to unittest.mock 2012-06-10 20:36:32 +01:00
Raymond Hettinger 1c2018c311 Small cleanup and optimization 2012-06-09 22:51:39 -07:00
Raymond Hettinger 80ed4d4774 Minor reformatting (wrap fat lines, etc.) and create an __main__ file 2012-06-09 18:46:45 -07:00
Michael Foord 75963643b1 Fix exception when calling reset_mock on a mock created with autospec 2012-06-09 17:31:59 +01:00
R David Murray 6e50b699ac Now that Defects are Exception subclasses, call super.
The behavior of MessageDefect is legacy behavior.  The chances anyone is
actually using the undocumented 'line' attribute is low, but it costs
little to retain backward compatibility.  Although one of the costs is
having to restore normal exception behavior in HeaderDefect.  On the
other hand, I'll probably add some specialized behavior there later.
2012-06-08 22:45:46 -04:00
Alexander Belopolsky f6f56183ee Relax datetime.timestamp() test around DST change 2012-06-08 13:00:27 -04:00
Alexander Belopolsky 0c687e5e88 Relax datetime.timestamp() test around DST change 2012-06-08 12:58:31 -04:00
Alexander Belopolsky a4415141da Issue #2736: Added datetime.timestamp() method. 2012-06-08 12:33:09 -04:00
Hynek Schlawack ed36b2e55b #14814: Remove redundant code from ipaddress.IPv6Network
The strict checks and netmask computing don't make sense if constructed with
a ALL_ONES mask based on addresses. Also fix a bug due to mis-indentation of
a return statement in the same code block.
2012-06-08 15:21:21 +02:00
Terry Jan Reedy 571ee57695 Merge from 3.2, #12510 2012-06-07 20:04:17 -04:00
Terry Jan Reedy 2a2ce4f673 Issue #12510: Revise and triple # of calltip tests, with an eye to unittest
use. Make the get_entity 'method' a module function as it did not use 'self'.
Delete buggy _find_constructor function that is not needed, at least in 3.x.
Revise get_argspec so all tests pass.  Add and fix NEWS entries.
2012-06-07 19:41:04 -04:00
Richard Oudkerk 58ba47f97b Merge fixes for #13854 and #12157. 2012-06-07 20:38:11 +01:00
Alexander Belopolsky 74482201b8 Issue #11823: disassembly now shows argument counts on calls with keyword args 2012-06-07 14:28:14 -04:00
Richard Oudkerk 29471de459 Issue #13854: Properly handle non-integer, non-string arg to SystemExit
Previously multiprocessing only expected int or str.  It also wrongly
used an exit code of 1 when the argument was a string instead of zero.
2012-06-06 19:04:57 +01:00
Richard Oudkerk e41682b994 Issue #12157: pool.map() does not handle empty iterable correctly
Initial patch by mouad
2012-06-06 19:04:57 +01:00
Richard Oudkerk 9844993cde Add test for multiprocessing.Conditon.wait() and changset 3baeb5e13dd2 2012-06-05 13:15:29 +01:00
Victor Stinner f86a5e8a93 Close #11022: TextIOWrapper doesn't call locale.setlocale() anymore
open() and io.TextIOWrapper are now calling locale.getpreferredencoding(False)
instead of locale.getpreferredencoding() in text mode if the encoding is not
specified. Don't change temporary the locale encoding using locale.setlocale(),
use the current locale encoding instead of the user preferred encoding.

Explain also in open() documentation that locale.getpreferredencoding(False) is
called if the encoding is not specified.
2012-06-05 13:43:22 +02:00
Hynek Schlawack 91c5a34613 #14814: ipaddress: refactor dup code, minor janitoring, bump coverage
- remove duplicate netmask/hostmask code
- make two ifs more pythonic
- remove packed property for networks
- some minor pep8 stuff
- Test coverage is now at 97%, the rest are mostly unreachable safeguards.
2012-06-05 11:55:58 +02:00
Victor Stinner 034d0aa217 Issue #14711: os.stat_float_times() has been deprecated. 2012-06-05 01:22:15 +02:00
Nadeem Vawda e860404eb7 Add a function lzma.open(), to match gzip.open() and bz2.open(). 2012-06-04 23:38:12 +02:00
Nadeem Vawda 6cbb20cdf6 Allow LZMAFile to accept modes with a "b" suffix. 2012-06-04 23:36:24 +02:00
Nadeem Vawda 33c34da574 Simplify usage of LZMAFile's fileobj support, like with BZ2File. 2012-06-04 23:34:07 +02:00
Nadeem Vawda af518c198e Add a function bz2.open(), to match gzip.open(). 2012-06-04 23:32:38 +02:00
Nadeem Vawda 50cb936bd0 Clarify acceptable values for BZ2File.__init__'s mode argument. 2012-06-04 23:31:22 +02:00
Nadeem Vawda aebcdba829 Make BZ2File's fileobj support easier to use.
The fileobj argument was added during the 3.3 development cycle, so this change
does not break backward compatibility with 3.2.
2012-06-04 23:31:20 +02:00
Nadeem Vawda 68721019ef Add fileobj support to gzip.open(). 2012-06-04 23:21:38 +02:00
R David Murray 05cab75d59 #8739: fix omission of DEBUGSTREAM reset in new test in test_smtpd.
This clears up an error in detected by refleak mode that showed up when
test_smtplib was run after test_smtpd in the same refleak run.
2012-06-04 15:55:51 -04:00
Richard Oudkerk bd7b5dd816 Prevent handle leak if CreateProcess() fails in multiprocessing 2012-06-04 18:59:10 +01:00
Richard Oudkerk 86eb7e97ae Fix potential NameError in multiprocessing.Condition.wait() 2012-06-04 18:59:07 +01:00
Richard Oudkerk ad06444d6c Make Finalize reserve a reference to os.getpid in case called at shutdown 2012-06-04 18:58:59 +01:00
Hynek Schlawack 454a74df23 #14814: Remove dead code from ipaddress
_BaseNetwork contained (faulty) methods for creating string representations.
I've fixed them and put them to use by eliminating identical overrides.
2012-06-04 18:14:02 +02:00
Barry Warsaw efce00c537 Whitespace normalization 2012-06-04 12:02:42 -04:00
Barry Warsaw 028b37c941 PEP 421 requires that .name be lower case. 2012-06-04 12:01:56 -04:00
Barry Warsaw c58c392da7 Trunk merge. 2012-06-04 09:41:48 -04:00
Hynek Schlawack bcd304480f #14814: Use correct comparison for IP addresses
ipaddress._BaseV4.is_unspecified() compared IP addresses using "in" which
fails.
2012-06-04 14:19:39 +02:00
Raymond Hettinger 0c9050c25d Separate key creation logic from the sequence class that memoizes its hash value. 2012-06-04 00:21:14 -07:00
Gregory P. Smith 2d7d56abf8 Revert the modification of e.strerror in 3.2 as that kind of change could
break someone's over specified test that depends on the exact error message.
2012-06-03 14:39:26 -07:00
Gregory P. Smith f0a9a9b502 Fixes Issue #14992: os.makedirs(path, exist_ok=True) would raise an OSError
when the path existed and had the S_ISGID mode bit set when it was
not explicitly asked for.  This is no longer an exception as mkdir
cannot control if the OS sets that bit for it or not.
2012-06-03 14:35:09 -07:00
Gregory P. Smith a81c856436 Fixes Issue #14992: os.makedirs(path, exist_ok=True) would raise an OSError
when the path existed and had the S_ISGID mode bit set when it was not
explicitly asked for.  This is no longer an exception as mkdir cannot control
if the OS sets that bit for it or not.
2012-06-03 14:30:44 -07:00
Barry Warsaw 409da157d7 Eric Snow's implementation of PEP 421.
Issue 14673: Add sys.implementation
2012-06-03 16:18:47 -04:00
R David Murray 82ffabdfa4 #2658: Add test for issue fixed by fix for #1079. 2012-06-03 12:27:07 -04:00
Martin v. Löwis f20940792d merge 3.2 2012-06-03 12:33:23 +02:00
Martin v. Löwis 9f44a66abc PEP 3131: support non-ASCII characters in auto-completion of identifiers. 2012-06-03 12:32:42 +02:00
Martin v. Löwis 97aa21b46a Do not try to insert control characters. 2012-06-03 12:26:09 +02:00
Martin v. Löwis 428d161b57 Drop unused constant. 2012-06-03 12:03:29 +02:00
Martin v. Löwis 156989aa79 Merge 3.2: issue #14937. 2012-06-03 12:00:48 +02:00
Martin v. Löwis 862d13a30f Issue #14937: Perform auto-completion of filenames in strings even for non-ASCII filenames. 2012-06-03 11:55:32 +02:00
Senthil Kumaran fe4dfd2b65 merge heads 2012-06-03 16:16:39 +08:00
Senthil Kumaran 1251fafcc5 Issue 14989: http.server --cgi option can enable the CGI http server. 2012-06-03 16:15:54 +08:00
Terry Jan Reedy a317eef897 Merge with 3.2 #12510 2012-06-03 01:06:38 -04:00
Terry Jan Reedy e606e238ab Issue 12510: Expand 2 bare excepts. Improve comments. Change deceptive name
'name' to 'expression' as the latter is what the string actually represents.
The bug in this issue was only catching NameError and AttributeError when
evaluating an expression that was not necessarily a name.
2012-06-03 00:27:54 -04:00
Brett Cannon 2b88fcf693 Issue #14987: Add a missing import statement 2012-06-02 22:28:42 -04:00
Terry Jan Reedy 361baaddcf Merge with 3.2 #10365 2012-06-02 20:24:21 -04:00
Terry Jan Reedy a948c79ad4 Issue 10365: Add and replace comments; condense defaulted attribute access.
Code patch by Roger Serwy.
2012-06-02 20:22:58 -04:00
R David Murray 07ea53cb21 #1079: Fix parsing of encoded words.
This is a behavior change: before this leading and trailing spaces were
stripped from ASCII parts, now they are preserved.  Without this fix we didn't
parse the examples in the RFC correctly, so I think breaking backward
compatibility here is justified.

Patch by Ralf Schlatterbeck.
2012-06-02 17:56:49 -04:00
Sandro Tosi e1b22edd23 Issue #14926: merge with 3.2 2012-06-02 19:40:20 +02:00
Sandro Tosi 29d09aa4dd Issue #14926: fix docstring highlight 2012-06-02 19:40:02 +02:00
Sandro Tosi b4386d36f1 Issue #14814: minor spelling fixes 2012-06-02 17:14:22 +02:00
Victor Stinner 0dec1bfef9 Fix sporadic failure of test_time.test_process_time() on Windows
Use a threshold of 20 ms instead of 10 ms.
2012-06-01 22:45:23 +02:00
Hynek Schlawack 35db513187 #14814: Fix errror message creation in ipaddress.collapse_addresses 2012-06-01 20:12:17 +02:00
Nick Coghlan 77452fc121 Close #14969: Improve the handling of exception chaining in contextlib.ExitStack 2012-06-01 22:48:32 +10:00
Hynek Schlawack c4b78a3e15 #14814: Remove 2.x's new-style classes syntax from ipaddress 2012-06-01 11:48:32 +02:00
Eli Bendersky 2b6b73e7e1 Issue #14007: implement doctype() method calling in XMLParser of _elementtree.
Includes exposing a doctype handler from expat through pyexpat.
2012-06-01 11:32:34 +03:00
Eli Bendersky 52467b167e Issue #14007: make XMLParser a real subclassable type exported from _elementtree. +cleanups 2012-06-01 07:13:08 +03:00
Hynek Schlawack 7e0229e90d #14814: Remove stale __hex__ method from ipaddress
Obsolete 2.x method.
2012-06-01 00:20:13 +02:00
R David Murray 1be413e366 Don't use metaclasses when class decorators can do the job.
Thanks to Nick Coghlan for pointing out that I'd forgotten about class
decorators.
2012-05-31 18:00:45 -04:00
Ned Deily d3487be876 Issue #14962: merge 2012-05-31 09:58:08 -07:00
Ned Deily 8b2a56b89d Issue #14962: Update text coloring in IDLE shell window after changing
options.  Patch by Roger Serwy.
2012-05-31 09:17:29 -07:00
Nick Coghlan a5bd2a18ce Close #14963: Use an iterative algorithm in contextlib.ExitStack.__exit__ (Patch by Alon Horev) 2012-06-01 00:00:38 +10:00
Nick Coghlan c73e8c2830 Issue #14963: Added test cases for contextlib.ExitStack exception handling behaviour (Initial patch by Alon Horev) 2012-05-31 23:49:26 +10:00
Vinay Sajip d70be9ba1f Added test skip under Windows, as not applicable there. 2012-05-31 12:37:04 +01:00
R David Murray 56517e5cb9 Make parameterized tests in email less hackish.
Or perhaps more hackish, depending on your perspective.  But at least this
way it is now possible to run the individual tests using the unittest CLI.
2012-05-30 21:53:40 -04:00
Georg Brandl 01d7058d6a Merge heads. 2012-05-30 22:04:57 +02:00
Georg Brandl f0397b9953 Bump version to 3.3.0a4. 2012-05-30 22:04:31 +02:00
Georg Brandl 3539afd5c9 Update pydoc topics and fix new suspicious markup. 2012-05-30 22:03:20 +02:00
Eli Bendersky 48d358ba86 Issue #14007: implemented the 'element_factory' feature of TreeBuilder in
_elementtree, with a test.
2012-05-30 17:57:50 +03:00
R David Murray bb75678003 #14796: fix failure of new calendar test on windows. 2012-05-30 08:10:54 -04:00
Victor Stinner 949d8c986e Close #14690: Use monotonic clock instead of system clock in the sched,
subprocess and trace modules.
2012-05-30 13:30:32 +02:00
Ned Deily 5e92a1ef5a Issue #14958: Change IDLE systax highlighting to recognize all string and
byte literals supported in Python 3.3.
2012-05-29 22:55:43 -07:00
Vinay Sajip 5e86eed33e Reapplied skip logic for test on Windows, which appears to have been lost during a merge. 2012-05-29 22:48:10 +01:00
Vinay Sajip c1f0b53875 Updated test to reflect renamed file. 2012-05-29 22:29:50 +01:00
Ned Deily 01d63a6e06 Issue #10997: merge from 3.2 2012-05-29 10:51:38 -07:00
Ned Deily 3aee9416a0 Issue #10997: Prevent a duplicate entry in IDLE's "Recent Files" menu. 2012-05-29 10:43:36 -07:00
R David Murray d0c8695617 #14796: improve calendar test coverage.
Patch by Oleg Plakhotnyuk.
2012-05-29 12:55:05 -04:00
R David Murray 026ba312d4 #10839: add new test file that was omitted from checkin 2012-05-29 12:31:11 -04:00
R David Murray abfc37491c #10839: raise an error on add of duplicate unique headers in new email policies
This feature was supposed to be part of the initial email6 checkin, but it got
lost in my big refactoring.

In this patch I'm not providing an easy way to turn off the errors, but they
only happen when a header is added programmatically, and it is almost never
the right thing to do to allow the duplicate to be added.  An application that
needs to add duplicates of unique headers can create a policy subclass to
allow it.
2012-05-29 09:14:44 -04:00
Eli Bendersky 58d548dff1 Issue #14007: make TreeBuilder an actual type exposed from _elementtree, and subclassable. 2012-05-29 15:45:16 +03:00
Richard Oudkerk 87ea780e8e Use Python 3.x-style keyword only arg in Array()
Previously a Python 2.x compatible hack was used for
multiprocessing.sharedctypes.Array().  Also the documented
signature was wrong.
2012-05-29 12:01:47 +01:00
Richard Oudkerk 1074a9294b Remove __getslice__, __setslice__, __delslice__ methods from proxies
Proxy classes in multiprocessing do not need these methods in Python 3.x.
2012-05-29 12:01:45 +01:00
Vinay Sajip ecdc076695 Removed pysetup3.exe executable. 2012-05-29 11:12:43 +01:00
Hynek Schlawack 52209d3a1e #14835: Make plistlib output empty arrays & dicts like OS X
Patch by Sidney San Martín.
2012-05-29 12:04:54 +02:00
Eli Bendersky 737b173355 Issue 14814: Add namespaces keyword arg to find(*) methods in _elementtree.
Add attrib keyword to Element and SubElement in _elementtree.
Patch developed with Ezio Melotti.
2012-05-29 06:02:56 +03:00
R David Murray 6bed342b58 Refactor test_email/test_pickleable and add tests for date headers 2012-05-28 21:09:04 -04:00
R David Murray a7c9ddb59c Regularize test_email/test_headerregistry's references to policy. 2012-05-28 20:22:37 -04:00
R David Murray d41595b920 Refactor test_email/test_defect_handling. 2012-05-28 20:14:10 -04:00
Richard Oudkerk 3e0a1eb889 Issue #14930: Make memoryview objects weakrefable. 2012-05-28 21:35:09 +01:00
Meador Inge d102e04e4a Issue #9041: raised exception is misleading
An issue in ctypes.c_longdouble, ctypes.c_double, and ctypes.c_float that
caused an incorrect exception to be returned in the case of overflow has been
fixed.
2012-05-28 14:47:53 -05:00
Meador Inge 031e25b0f7 Issue #9041: raised exception is misleading
An issue in ctypes.c_longdouble, ctypes.c_double, and ctypes.c_float that
caused an incorrect exception to be returned in the case of overflow has been
fixed.
2012-05-28 14:21:16 -05:00
Vinay Sajip ef4c5010e4 Fixed typo. 2012-05-28 17:01:17 +01:00
Vinay Sajip 382a7c0180 Tweaked tests to use launcher executable name on OS X. 2012-05-28 16:34:47 +01:00
Vinay Sajip 4469746878 Added python3 symlink; removed Distribute-related code, docs and comments; changed Mac OS X computation to determine framework builds. 2012-05-28 16:33:01 +01:00
Nick Coghlan ab45e689be Merge from 3.2 2012-05-28 22:36:07 +10:00
Nick Coghlan 4b6045c30f Issue #14443: Tell rpmbuild to use the correct version of Python 2012-05-28 22:34:46 +10:00
Terry Jan Reedy c6aa93cf22 Merge 3.2 #14929 2012-05-27 23:06:14 -04:00
Terry Jan Reedy e1c5087802 Issue14929: Stop Idle 3.x from closing on Unicode decode errors when grepping.
Patch by Roger Serwy.
2012-05-27 22:56:49 -04:00
R David Murray 7ef3ff3f2e #12515: email now registers a defect if the MIME end boundary is missing.
This commit also restores the news item for 167256 that it looks like
Terry inadvertently deleted.  (Either that, or I don't understand
now merging works...which is equally possible.)
2012-05-27 22:20:42 -04:00
Terry Jan Reedy 48fd1fee38 Merge 3.2 closes #12510 2012-05-27 21:39:39 -04:00
Terry Jan Reedy c5301ef2df Issue12510: Attempting to get invalid tooltip no longer closes Idle.
Original patch by Roger Serwy.
2012-05-27 21:29:17 -04:00
R David Murray 80e0aee95b #1672568: email now registers defects for base64 payload format errors.
Which also means that it is now producing *something* for any base64
payload, which is what leads to the couple of older test changes in
test_email.  This is a slightly backward incompatible behavior change,
but the new behavior is so much more useful than the old (you can now
*reliably* detect errors, and any program that was detecting errors by
sniffing for a base64 return from get_payload(decode=True) and then doing
its own error-recovery decode will just get the error-recovery decode
right away).  So this seems to me to be worth the small risk inherent
in this behavior change.

This patch also refactors the defect tests into a separate test file,
since they are no longer just parser tests.
2012-05-27 21:23:34 -04:00
R David Murray adbdcdbd95 #14925: email now registers a defect for missing header/body separator.
This patch also deprecates the MalformedHeaderDefect.  My best guess is that
this defect was rendered obsolete by a refactoring of the parser, and the
corresponding defect for the new parser (which this patch introduces) was
overlooked.
2012-05-27 20:45:01 -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
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
Nick Coghlan 7fc570a51e Close #14588: added a PEP 3115 compliant dynamic type creation mechanism 2012-05-20 02:34:13 +10:00
Petri Lehtinen 7c5ba513b9 #14494: Document that absolute imports became default in 3.0 instead of 2.7. 2012-05-19 18:38:43 +03:00
Petri Lehtinen 079bfc962d #14494: Document that absolute imports became default in 3.0 instead of 2.7. 2012-05-19 18:36:33 +03: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 fa67aa0d72 Fix whitespace 2012-05-18 18:33:32 +02: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 62110c769f Merge 2012-05-17 21:04:49 +02:00
Antoine Pitrou 314a16b0ec Make the test completely clean up after itself. 2012-05-17 21:02:54 +02:00