Commit Graph

21105 Commits

Author SHA1 Message Date
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
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