Commit Graph

36960 Commits

Author SHA1 Message Date
Serhiy Storchaka 022f20376a Issue #17530: pprint now wraps long bytes objects and bytearrays. 2015-03-24 19:22:37 +02:00
Serhiy Storchaka 8e2aa88a40 Issue #23741: Slightly refactor the pprint module to make it a little more
extesible.  No public API is added.
2015-03-24 18:45:23 +02:00
Serhiy Storchaka 72bd327db0 Issue #22687: Fixed some corner cases in breaking words in tetxtwrap.
Got rid of quadratic complexity in breaking long words.
2015-03-24 18:32:27 +02:00
Serhiy Storchaka 32af7549a7 Issue #20289: The copy module now uses pickle protocol 4 (PEP 3154) and
supports copying of instances of classes whose __new__ method takes
keyword-only arguments.
2015-03-24 18:06:42 +02:00
Victor Stinner 944fbcc478 Issue #23571: Enhance _Py_CheckFunctionResult()
Too bad, sometimes Py_FatalError() is unable to write the exception into
sys.stderr (on "AMD64 OpenIndiana 3.x" buildbot, the buildbot was probably out
of memory).

Call Py_FatalError() with a different message for the two cases (result+error,
or no result and no error).
2015-03-24 16:28:52 +01:00
Victor Stinner 381a9bce97 Issue #23571: Update test_capi 2015-03-24 14:01:32 +01:00
Serhiy Storchaka bca63b362d Issue #23688: Added support of arbitrary bytes-like objects and avoided
unnecessary copying of memoryview in gzip.GzipFile.write().
Original patch by Wolfgang Maier.
2015-03-23 14:59:48 +02:00
Serhiy Storchaka 77d899726f Issue #23252: Added support for writing ZIP files to unseekable streams. 2015-03-23 01:09:35 +02:00
R David Murray 94a6448956 Merge: #23647: Increase imaplib's MAXLINE to accommodate modern mailbox sizes. 2015-03-22 16:18:59 -04:00
R David Murray 0a0d20edfb Merge: #23539: Set Content-Length to 0 for PUT, POST, and PATCH if body is None. 2015-03-22 15:19:01 -04:00
R David Murray 5d06c74f41 Merge: #23700: fix/improve comment 2015-03-22 12:34:50 -04:00
Paul Moore a4d4dd3a9d #23657 Don't explicitly do an isinstance check for str in zipapp
As a result, explicitly support pathlib.Path objects as arguments.
Also added tests for the CLI interface.
2015-03-22 15:32:36 +00:00
Ned Deily 2f7bf23925 Issue #22289: merge from 3.4 2015-03-22 01:19:10 -07:00
Victor Stinner 4f0efb0522 Issue #23571: Fix test_capi 2015-03-21 17:24:50 +01:00
Victor Stinner efde146b0c Issue #23571: _Py_CheckFunctionResult() now gives the name of the function
which returned an invalid result (result+error or no result without error) in
the exception message.

Add also unit test to check that the exception contains the name of the
function.

Special case: the final _PyEval_EvalFrameEx() check doesn't mention the
function since it didn't execute a single function but a whole frame.
2015-03-21 15:04:43 +01:00
Raymond Hettinger 32ea16577d Issue 23704: Add index(), copy(), and insert() to deques. Register deques as a MutableSequence. 2015-03-21 01:37:37 -07:00
Serhiy Storchaka 0a9e2721fa Issue #22351: The nntplib.NNTP constructor no longer leaves the connection
and socket open until the garbage collector cleans them up.  Patch by
Martin Panter.
2015-03-21 09:41:19 +02:00
Raymond Hettinger 39dadf7abf Issue 23705: Improve the performance of __contains__ checks for deques. 2015-03-20 16:38:56 -07:00
Serhiy Storchaka 1dd49824df Issue #23681: The -b option now affects comparisons of bytes with int. 2015-03-20 16:54:57 +02:00
Serhiy Storchaka ee4c0b9dcf Issue #23681: Fixed Python 2 to 3 poring bugs.
Indexing bytes retiurns an integer, not bytes.
2015-03-20 16:48:02 +02:00
Serhiy Storchaka 74a49ac3f5 Issue #23681: Fixed Python 2 to 3 poring bugs.
Indexing bytes retiurns an integer, not bytes.
2015-03-20 16:46:19 +02:00
Serhiy Storchaka 000391b7de Issue #23700: NamedTemporaryFile iterator closed underlied file object in
some circunstances while NamedTemporaryFile object was living.  This causes
failing test_csv.  Changed the implementation of NamedTemporaryFile.__iter__
to make tests passed.
2015-03-20 16:12:43 +02:00
Serhiy Storchaka d83b7c2df4 Issue #23700: NamedTemporaryFile iterator closed underlied file object in
some circunstances while NamedTemporaryFile object was living.  This causes
failing test_csv.  Changed the implementation of NamedTemporaryFile.__iter__
to make tests passed.
2015-03-20 16:11:20 +02:00
Victor Stinner 268225f154 Issue #23715: Fix test_script_helper 2015-03-20 14:02:33 +01:00
Victor Stinner 57d516bd6b Issue #23696: Remove test on ZipImportError.__context__ because the context is
None on Windows.

When the file is not readable, the error occurs at open on UNIX. On Windows,
the error only occurs at the first operation on the open file. It would require
to many changes to set __context__ to an OSError for all file operations, for a
little benefit (__context__ is almost never used).
2015-03-20 13:48:36 +01:00
Victor Stinner 03129230c9 Issue #23715: Fix test_eintr, skip tests on signal.sigwaitinfo() and
signal.sigtimedwait() if functions are missing
2015-03-20 13:42:52 +01:00
Victor Stinner 1335ca5053 Issue #23715: Enhance test.script_helper to investigate test_eintr failure
If Python failed, show also stdout in the assertion error.
2015-03-20 13:38:08 +01:00
Victor Stinner a453cd8d85 Issue #23715: signal.sigwaitinfo() and signal.sigtimedwait() are now retried
when interrupted by a signal not in the *sigset* parameter, if the signal
handler does not raise an exception. signal.sigtimedwait() recomputes the
timeout with a monotonic clock when it is retried.

Remove test_signal.test_sigwaitinfo_interrupted() because sigwaitinfo() doesn't
raise InterruptedError anymore if it is interrupted by a signal not in its
sigset parameter.
2015-03-20 12:54:28 +01:00
Victor Stinner fbd6f9ed12 Issue #23696: Chain ZipImportError to the OSError 2015-03-20 10:52:25 +01:00
Serhiy Storchaka 8490f5acfe Issue #23001: Few functions in modules mmap, ossaudiodev, socket, ssl, and
codecs, that accepted only read-only bytes-like object now accept writable
bytes-like object too.
2015-03-20 09:00:36 +02:00
Victor Stinner 9a8089b32a Issue #23646: Enhance precision of time.sleep() and socket timeout when
interrupted by a signal

Add a new _PyTime_AddDouble() function and remove _PyTime_ADD_SECONDS() macro.
The _PyTime_ADD_SECONDS only supported an integer number of seconds, the
_PyTime_AddDouble() has subsecond resolution.
2015-03-20 01:42:20 +01:00
Antoine Pitrou 31084ba528 Issue #23632: Memoryviews now allow tuple indexing (including for multi-dimensional memoryviews). 2015-03-19 23:29:36 +01:00
Victor Stinner 9eb57c5fa5 Issue #22181: The availability of the getrandom() is now checked in configure,
and stored in pyconfig.h as the new HAVE_GETRANDOM_SYSCALL define.

Fix os.urandom() tests using file descriptors if os.urandom() uses getrandom().
2015-03-19 22:21:49 +01:00
Victor Stinner 79d68f929d Issue #23646: If time.sleep() is interrupted by a signal, the sleep is now
retried with the recomputed delay, except if the signal handler raises an
exception (PEP 475).

Modify also test_signal to use a monotonic clock instead of the system clock.
2015-03-19 21:54:09 +01:00
Serhiy Storchaka fc7344a792 Issue #23136: _strptime now uniformly handles all days in week 0, including
Jan 30 of previous year.  Based on patch by Jim Carroll.
2015-03-19 19:14:15 +02:00
Serhiy Storchaka 423feea01e Issue #23136: _strptime now uniformly handles all days in week 0, including
Jan 30 of previous year.  Based on patch by Jim Carroll.
2015-03-19 19:13:37 +02:00
Serhiy Storchaka 4f418d3671 Issue #23700: Iterator of NamedTemporaryFile now keeps a reference to
NamedTemporaryFile instance.  Patch by Bohuslav Kabrda.
2015-03-19 15:24:27 +02:00
Serhiy Storchaka 56cefa69ee Issue #23700: Iterator of NamedTemporaryFile now keeps a reference to
NamedTemporaryFile instance.  Patch by Bohuslav Kabrda.
2015-03-19 15:23:15 +02:00
Benjamin Peterson 41ce610d4c merge 3.4 2015-03-18 21:36:23 -05:00
Benjamin Peterson 86fdbf3152 wrap properly 2015-03-18 21:35:38 -05:00
Ethan Furman 482fe0477e issue23673
add private method to enum to support replacing global constants with Enum members:
- search for candidate constants via supplied filter
- create new enum class and members
- insert enum class and replace constants with members via supplied module name
- replace __reduce_ex__ with function that returns member name, so previous Python versions can unpickle
modify IntEnum classes to use new method
2015-03-18 18:19:30 -07:00
Ethan Furman 24e837f231 issue23673
add private method to enum to support replacing global constants with Enum members:
- search for candidate constants via supplied filter
- create new enum class and members
- insert enum class and replace constants with members via supplied module name
- replace __reduce_ex__ with function that returns member name, so previous Python versions can unpickle
modify IntEnum classes to use new method
2015-03-18 17:27:57 -07:00
Antoine Pitrou 8eef6a9ad0 Issue #22903: The fake test case created by unittest.loader when it fails importing a test module is now picklable. 2015-03-19 00:01:37 +01:00
Antoine Pitrou d833779cea Issue #22903: The fake test case created by unittest.loader when it fails importing a test module is now picklable. 2015-03-18 23:56:46 +01:00
Antoine Pitrou 52a05ab524 Issue #23353: improve exceptions tests for generators 2015-03-18 22:23:40 +01:00
Antoine Pitrou c4c19b3938 Issue #23353: improve exceptions tests for generators 2015-03-18 22:22:46 +01:00
Serhiy Storchaka 6c32585f67 Restored backward compatibility of pickling http.cookies.Morsel. It was
broken after converting instance attributes to properies in issue #2211.
2015-03-18 18:03:40 +02:00
Victor Stinner 072248ec63 Merge 3.4 (linecache doc) 2015-03-18 14:19:19 +01:00
Victor Stinner 376658fa13 Issue #11726: Fix linecache example in the doc
Use a Python source file (linecache.__file__) instead of /etc/passwd.

Modify also linecache docstrings to clarify the linecache is written to cache
Python source files, not any text files.
2015-03-18 14:16:50 +01:00
Victor Stinner 50931f41d0 Merge 3.4 (asyncio) 2015-03-18 11:37:54 +01:00
Victor Stinner d6dc7bdaf9 Issue #23456: Add missing @coroutine decorators in asyncio 2015-03-18 11:37:42 +01:00
Victor Stinner 7fea974baf Issue #23605: Fix os.walk(topdown=True), don't cache entry.is_symlink() because
the caller can replace the directory with a different file kind.

The bottom-up way, os.walk(topdown=False), still uses entry.is_symlink(), and
so can be faster than Python 3.4.
2015-03-18 11:29:47 +01:00
Serhiy Storchaka 9c1a9b2657 Issue #2211: Updated the implementation of the http.cookies.Morsel class.
Setting attributes key, value and coded_value directly now is deprecated.
update() and setdefault() now transform and check keys.  Comparing for
equality now takes into account attributes key, value and coded_value.
copy() now returns a Morsel, not a dict.  repr() now contains all attributes.
Optimized checking keys and quoting values.  Added new tests.
Original patch by Demian Brecht.
2015-03-18 10:59:57 +02:00
Vinay Sajip 3505bd82a9 Issue #23207: merged fix from 3.4. 2015-03-18 08:49:57 +00:00
Vinay Sajip d55436ace3 Issue #23207: Improved kwarg validation. 2015-03-18 08:47:58 +00:00
Robert Collins 302dbc6792 Issue #18983: Allow selection of output units in timeit.
This allows manual selection of a specific unit such as usecs rather than the
use of a heuristic. This is intended to aid machine processing of timeit
output.

Patch by Serhiy Storchaka.
2015-03-18 09:54:50 +13:00
Ned Deily ab6b9f8a5b Issue #22585: make URandomFDTests test case actually run 2015-03-17 04:30:08 -07:00
Victor Stinner 0c2fd89777 Revert changeset d927047b1d8eb87738676980a24930d053ba2150
Sorry, it was a mistake, the patch is still under review: issue #23646.
2015-03-17 10:49:17 +01:00
Victor Stinner 9c182a1e25 Issue #23680: Reduce risk of race condition in check_interrupted_write() of
test_io. Allocate the large data before scheduling an alarm in 1 second.

On very slow computer, the alarm rings sometimes during the memory allocation.
2015-03-16 18:03:06 +01:00
Victor Stinner 6d3c09f284 Issue #23680: Reduce risk of race condition in check_interrupted_write_retry()
of test_io. Allocate the large data before scheduling an alarm in 1 second.

On very slow computer, the alarm rings sometimes during the memory allocation.
2015-03-16 17:57:49 +01:00
Serhiy Storchaka b8a78d3d85 Use non-zero and non-last positions in error handler tests. 2015-03-16 08:31:38 +02:00
Serhiy Storchaka 05d54730da Use non-zero and non-last positions in error handler tests. 2015-03-16 08:29:47 +02:00
Robert Collins bbb8ade904 Issue #23631: Fix traceback.format_list when a traceback has been mutated. 2015-03-16 15:27:16 +13:00
Serhiy Storchaka 93f4d4c1d6 Increased coverage of standard codec error handlers. 2015-03-15 23:43:34 +02:00
Serhiy Storchaka 98d156b2b2 Increased coverage of standard codec error handlers. 2015-03-15 23:41:37 +02:00
Berker Peksag 7aaa85932c Issue #23568: Add rdivmod support to MagicMock() objects.
Patch by Håkan Lövdahl.
2015-03-15 01:57:38 +02:00
Berker Peksag a785dece57 Issue #23568: Add rdivmod support to MagicMock() objects.
Patch by Håkan Lövdahl.
2015-03-15 01:51:56 +02:00
Berker Peksag 102029dfd6 Issue #2052: Add charset parameter to HtmlDiff.make_file(). 2015-03-15 01:18:47 +02:00
Steve Dower a2a9df9240 Issue #23606: Temporarily suppress test for CRT name. 2015-03-14 11:48:44 -07:00
Brett Cannon 469d0fbdd3 Add some periods to the ends of a couple comments 2015-03-13 11:13:20 -04:00
Brett Cannon cc4dfc1b75 Issue #23491: Implement PEP 441: Improving Python Zip Application Support
Thanks to Paul Moore for the PEP and implementation.
2015-03-13 10:40:49 -04:00
Victor Stinner ff2a661ef0 Issue #23566: Skip "fd" tests of test_faulthandler on Windows
subprocess doesn't support pass_fds on Windows.
2015-03-13 11:01:30 +01:00
Serhiy Storchaka 577fc4e87f Issue #23138: Fixed parsing cookies with absent keys or values in cookiejar.
Patch by Demian Brecht.
2015-03-13 09:05:01 +02:00
Serhiy Storchaka 79fbeee237 Issue #23051: multiprocessing.Pool methods imap() and imap_unordered() now
handle exceptions raised by an iterator.  Patch by Alon Diamant and Davin
Potts.
2015-03-13 08:25:26 +02:00
Serhiy Storchaka a60c2fe480 Issue #23641: Cleaned out legacy dunder names from tests and docs.
Fixed 2 to 3 porting bug in pynche.ColorDB.
2015-03-12 21:56:08 +02:00
Berker Peksag 18987a11ce Issue #20617: Remove unused import in test_ssl.
Patch by Mark Lawrence.
2015-03-12 18:50:49 +02:00
Victor Stinner 945c82eea3 test 2015-03-12 16:19:01 +01:00
Serhiy Storchaka f7cc3fccad Issue #23138: Fixed parsing cookies with absent keys or values in cookiejar.
Patch by Demian Brecht.
2015-03-13 09:09:35 +02:00
Serhiy Storchaka 63623ac252 Issue #23051: multiprocessing.Pool methods imap() and imap_unordered() now
handle exceptions raised by an iterator.  Patch by Alon Diamant and Davin
Potts.
2015-03-13 08:30:33 +02:00
Serhiy Storchaka c2ccce791c Issue #23641: Cleaned out legacy dunder names from tests and docs.
Fixed 2 to 3 porting bug in pynche.ColorDB.
Added few tests for __truediv__, __floordiv__ and __matmul__.
2015-03-12 22:01:30 +02:00
Berker Peksag 9bd8af788d Issue #23581: Add matmul support to MagicMock.
Patch by Håkan Lövdahl.
2015-03-12 20:42:48 +02:00
Berker Peksag 4a0e14730b Issue #20617: Remove unused import in test_ssl.
Patch by Mark Lawrence.
2015-03-12 18:51:16 +02:00
Victor Stinner 95bb714ff7 Issue #23566: enable(), register(), dump_traceback() and dump_traceback_later()
functions of faulthandler now accept file descriptors. Patch by Wei Wu.
2015-03-12 15:32:03 +01:00
Victor Stinner ebaa81f3b1 Merge 3.4 (test_os) 2015-03-12 10:32:20 +01:00
Victor Stinner 0561c53d78 Issue #23605: Refactor os.walk() tests to also run them on os.fwalk() 2015-03-12 10:28:24 +01:00
Serhiy Storchaka b669bfc2be Issue #22928: Disabled HTTP header injections in http.client.
Original patch by Demian Brecht.
2015-03-12 11:15:15 +02:00
Serhiy Storchaka a112a8ae47 Issue #22928: Disabled HTTP header injections in http.client.
Original patch by Demian Brecht.
2015-03-12 11:13:36 +02:00
Victor Stinner 411bf641d3 Issue #23605: os.walk() doesn't need to call entry.is_symlink() if followlinks
is True
2015-03-12 09:12:48 +01:00
Serhiy Storchaka 91427733ea Issue #23192: Fixed generator lambdas. Patch by Bruno Cauet. 2015-03-11 18:22:29 +02:00
Serhiy Storchaka c775ad615a Issue #23192: Fixed generator lambdas. Patch by Bruno Cauet. 2015-03-11 18:20:35 +02:00
Ethan Furman 354ecf1ef2 Close issue23486: performance boost for enum member lookup 2015-03-11 08:43:12 -07:00
Serhiy Storchaka ca8b64461d Issue #23615: Modules bz2, tarfile and tokenize now can be reloaded with
imp.reload().  Patch by Thomas Kluyver.
2015-03-11 17:31:33 +02:00
Serhiy Storchaka cf4a2f29ad Issue #23615: Modules bz2, tarfile and tokenize now can be reloaded with
imp.reload().  Patch by Thomas Kluyver.
2015-03-11 17:18:03 +02:00
Ethan Furman 62e977f1b6 Close issue23467: add %r compatibility to bytes and bytearray 2015-03-11 08:17:00 -07:00
Antoine Pitrou 63afdaa110 Issue #23629: Fix the default __sizeof__ implementation for variable-sized objects. 2015-03-10 22:35:24 +01:00
Antoine Pitrou a654510150 Issue #23629: Fix the default __sizeof__ implementation for variable-sized objects. 2015-03-10 22:32:00 +01:00
Steve Dower 12541dc22e Issue #22028: Ensure mimetypes will not open registry keys with embedded nulls 2015-03-10 13:20:21 -07:00
Steve Dower ebb8c2d528 Issue #22028: Ensure mimetypes will not open registry keys with embedded nulls 2015-03-10 13:17:21 -07:00
Steve Dower 959ee7c200 Issue #23606: Disable ctypes.util.find_library("c") on Windows so tests are skipped while we figure out how best to approach the CRT change 2015-03-10 09:56:38 -07:00
Victor Stinner e3e56fea2a Merge 3.4 (asyncio) 2015-03-10 16:32:50 +01:00
Victor Stinner 7a82afee70 asyncio: Fix repr(BaseSubprocessTransport) if it didn't start yet
Replace "running" with "not started" and don't show the pid if the subprocess
didn't start yet.
2015-03-10 16:32:29 +01:00
Victor Stinner 524a5ba111 Issue #23605: os.walk() now calls os.scandir() instead of os.listdir().
The usage of os.scandir() reduces the number of calls to os.stat().
Initial patch written by Ben Hoyt.
2015-03-10 13:20:34 +01:00
Benjamin Peterson 5d2d63ed7d merge 3.4 2015-03-09 10:37:59 -04:00
Benjamin Peterson 101447b3fe fix up import style 2015-03-09 10:37:50 -04:00
Larry Hastings 551719be4a Merge. 2015-03-09 02:40:13 -07:00
Antoine Pitrou 5bd7bf5bab Issue #22980: Under Linux, C extensions now include bitness in the file name,
to make it easy to test 32-bit and 64-bit builds in the same working tree.
2015-03-08 20:43:10 +01:00
Larry Hastings 6003ac5267 Release bump for 3.5.0a2. 2015-03-08 00:24:34 -08:00
Serhiy Storchaka cfb5b87860 Issue #21619: Cleaned up test_broken_pipe_cleanup.
Patch by Martin Panter.
2015-03-08 09:17:28 +02:00
Serhiy Storchaka f87afb0381 Issue #21619: Cleaned up test_broken_pipe_cleanup.
Patch by Martin Panter.
2015-03-08 09:16:40 +02:00
Steve Dower d5a0be6fc0 Suppress assert dialogs in test_os 2015-03-07 21:25:54 -08:00
Steve Dower 79938f22ef Suppress assert dialogs in test_cmd_line. 2015-03-07 20:32:16 -08:00
Victor Stinner 6036e4431d Issue #22524: New os.scandir() function, part of the PEP 471: "os.scandir()
function -- a better and faster directory iterator". Patch written by Ben
Hoyt.
2015-03-08 01:58:04 +01:00
Antoine Pitrou adb351fcea Issue #20876: correctly close temporary file in test.support.fs_is_case_insensitive() 2015-03-08 00:18:29 +01:00
Antoine Pitrou e3207fe86b Issue #20876: correctly close temporary file in test.support.fs_is_case_insensitive() 2015-03-08 00:15:05 +01:00
Serhiy Storchaka 88f64f392c Issue #23103: Reduced the memory consumption of IPv4Address and IPv6Address. 2015-03-07 20:08:34 +02:00
Serhiy Storchaka c0a23e6320 Issue #21793: BaseHTTPRequestHandler again logs response code as numeric,
not as stringified enum.  Patch by Demian Brecht.
2015-03-07 11:51:37 +02:00
Serhiy Storchaka eef20de744 Issue #22853: Added regression test for using multiprocessing.Queue at import
time.  Patch by Davin Potts.
2015-03-06 23:33:51 +02:00
Serhiy Storchaka f8904e99c7 Issue #22853: Added regression test for using multiprocessing.Queue at import
time.  Patch by Davin Potts.
2015-03-06 23:32:54 +02:00
Benjamin Peterson f01c782960 merge 3.4 2015-03-06 09:10:45 -05:00
Benjamin Peterson c19ed37579 remove redundant test 2015-03-06 09:10:26 -05:00
Benjamin Peterson abda8ddd3e merge 3.4 (#23590) 2015-03-06 09:09:46 -05:00
Benjamin Peterson a915723dc7 fix potential refleak in PyFloat_AsDouble (closes #23590) 2015-03-06 09:08:44 -05:00
Robert Collins f0c819acd0 Issue #22936: Allow showing local variables in unittest errors. 2015-03-06 13:46:35 +13:00
Robert Collins 7e28df94ec unittest: Trivial typo fix. 2015-03-06 11:35:29 +13:00
Robert Collins d7c7e0ef69 Issue #22936: Make it possible to show local variables in tracebacks. 2015-03-05 20:28:52 +13:00
Benjamin Peterson 3e2500d6db merge 3.4 2015-03-04 23:20:23 -05:00
Benjamin Peterson 7bcf9a5588 use _import_symbols to import VERIFY_* constants 2015-03-04 23:18:57 -05:00
Benjamin Peterson c3d9c5ca0a adjust test_crl_check for trusted first being default 2015-03-04 23:18:48 -05:00
Benjamin Peterson de8eca4638 merge 3.4 2015-03-04 22:50:25 -05:00
Benjamin Peterson 990fcaac3c expose X509_V_FLAG_TRUSTED_FIRST 2015-03-04 22:49:41 -05:00
Robert Collins 2f0441f03f Remaining fallout from 17911
The code module was using a private function from traceback in order to skip a
frame - used the direct interface to do that instead,

The decimal module suffered minor fallout from formatting changes ('None' as a
value is now not printed by traceback, the same as None was not before).

The cgitb module was passing a bogus exception type (type.__name__) into
format_exception, which uncovered that format_exception and print_exception had
been ignoring the etype for some time, so the compatibility thunk to the new
code now does the same thing.
2015-03-05 15:45:01 +13:00
Victor Stinner 3737e600f4 Merge 3.4 (test_subprocess) 2015-03-05 02:40:17 +01:00
Victor Stinner 20f4bd4a04 Issue #21619: Try to fix test_broken_pipe_cleanup() 2015-03-05 02:38:41 +01:00
Robert Collins 07ff16733e Fix brownbag in issue 17911 commit 2015-03-05 12:26:00 +13:00
Robert Collins 6bc2c1e7eb Issue #17911: traceback module overhaul
Provide a way to seed the linecache for a PEP-302 module without actually
loading the code.

Provide a new object API for traceback, including the ability to not lookup
lines at all until the traceback is actually rendered, without any trace of the
original objects being kept alive.
2015-03-05 12:07:57 +13:00
Serhiy Storchaka 35e5b72740 Issue #23504: Added an __all__ to the types module. 2015-03-04 09:44:24 +02:00
Serhiy Storchaka 7beb4f96dc Issue #23504: Added an __all__ to the types module. 2015-03-04 09:43:27 +02:00
Serhiy Storchaka 44eceb6e2a Issue #23563: Optimized utility functions in urllib.parse. 2015-03-03 20:21:35 +02:00
Ethan Furman 738f805074 issue19075: add visual sorting algorithms to turtledemo; original code from Jason Yeo 2015-03-02 12:29:58 -08:00
Steve Dower 4e02f8f4ae Issue #18382: Zero-length messages are consumed by ReadFile on Windows 8 and later 2015-03-02 08:06:30 -08:00
Steve Dower 3f9e381030 Issue #18382: Zero-length messages are consumed by ReadFile on Windows 8 and later 2015-03-02 08:05:27 -08:00
Serhiy Storchaka 5e0fd95e3b Added more tests for urllib.parse utility functions.
These functions are not documented but used in third-party code.
2015-03-02 16:33:08 +02:00
Serhiy Storchaka 9270be7662 Added more tests for urllib.parse utility functions.
These functions are not documented but used in third-party code.
2015-03-02 16:32:29 +02:00
Berker Peksag a401257411 Issue #23527: Update Gmail port number for STARTTLS to 587.
Patch by Alex Shkop.
2015-03-02 07:41:00 +02:00
Berker Peksag ed0392ae06 Issue #23527: Update Gmail port number for STARTTLS to 587.
Patch by Alex Shkop.
2015-03-02 07:40:36 +02:00
Berker Peksag ccac023d65 Issue #23477: Improve test coverage of wsgiref.simple_server.
The test checks that the environ argument contains correct headers,
querystring and path information.

Patch by Alex Shkop.
2015-03-02 06:54:27 +02:00
Berker Peksag 659f631a5e Issue #23477: Improve test coverage of wsgiref.simple_server.
The test checks that the environ argument contains correct headers,
querystring and path information.

Patch by Alex Shkop.
2015-03-02 06:53:33 +02:00
Berker Peksag fc080fcc7c Issue #23387: Skip test_issue16464 if it raises an 5xx error.
Also, remove support.run_doctest() since there is no doctests in
test_urllib2 and urllib.request.
2015-03-02 06:01:37 +02:00
Berker Peksag bcdfc6a1fa Issue #23387: Skip test_issue16464 if it raises an 5xx error.
Also, remove support.run_doctest() since there is no doctests in
test_urllib2 and urllib.request.
2015-03-02 06:01:01 +02:00
Alexander Belopolsky e49af34151 Issue #7830: Flatten nested functools.partial. 2015-03-01 15:08:17 -05:00
Alexander Belopolsky e2e178e081 Closes issue #22791: Improved datetime from timestamp methods documentation.
Original patch by Akira Li.
2015-03-01 14:52:07 -05:00
Serhiy Storchaka 3de4aae1d0 Fixed pydoc tests when run with -OO. 2015-03-01 15:32:17 +02:00
Serhiy Storchaka 4c094e5fd5 Fixed pydoc tests when run with -OO. 2015-03-01 15:31:36 +02:00
Serhiy Storchaka 1c205518a3 Issue #19980: Improved help() for non-recognized strings. help('') now
shows the help on str.  help('help') now shows the help on help().
Original patch by Mark Lawrence.
2015-03-01 00:42:54 +02:00
Alexander Belopolsky 184291aeb7 Fixes #23521: Corrected pure python implementation of timedelta division.
* Eliminated OverflowError from timedelta * float for some floats;
 * Corrected rounding in timedlta true division.
2015-02-28 10:44:47 -05:00
Alexander Belopolsky 24d3deefcf Fixes #23521: Corrected pure python implementation of timedelta division.
* Eliminated OverflowError from timedelta * float for some floats;
 * Corrected rounding in timedlta true division.
2015-02-28 10:41:57 -05:00
Serhiy Storchaka 6ab0ec9352 Fixed a test for issue #21619 on Windows.
On Windows an OSError with errno=EINVAL is raised.
2015-02-28 13:28:19 +02:00
Serhiy Storchaka cf265fd02a Fixed a test for issue #21619 on Windows.
On Windows an OSError with errno=EINVAL is raised.
2015-02-28 13:27:54 +02:00
Serhiy Storchaka 86ba765705 Issue #21619: Popen objects no longer leave a zombie after exit in the with
statement if the pipe was broken.  Patch by Martin Panter.
2015-02-28 12:45:00 +02:00
Serhiy Storchaka ab900c21fc Issue #21619: Popen objects no longer leave a zombie after exit in the with
statement if the pipe was broken.  Patch by Martin Panter.
2015-02-28 12:43:08 +02:00
Brett Cannon 8004e8577c Issue #22834: Drop a redundant comment and use errno instead of an
integer.

Thanks to Serhiy Storchaka and Martin Panter for the suggestions.
2015-02-27 12:13:35 -05:00
Victor Stinner e2bda9ad68 Merge 3.4 (asyncio) 2015-02-27 17:49:19 +01:00
Victor Stinner ce8c7682d6 Issue #23537: Remove 2 unused private methods of asyncio.BaseSubprocessTransport
Methods only raise NotImplementedError and are never used.
2015-02-27 17:49:09 +01:00
Victor Stinner 69899e6f3f Merge 3.4 (httplib) 2015-02-27 17:47:40 +01:00
Victor Stinner b389b48265 Issue #23526: Fix ResourceWarning in test_httplib. Patch written by Alex Shkop. 2015-02-27 17:47:23 +01:00
Raymond Hettinger daf57f25e5 Bump the blocksize up from 62 to 64 to speed up the modulo calculation.
Remove the old comment suggesting that it was desireable to have
blocksize+2 as a multiple of the cache line length.  That would
have made sense only if the block structure start point was always
aligned to a cache line boundary.  However, the memory allocations
are 16 byte aligned, so we don't really have control over whether
the struct spills across cache line boundaries.
2015-02-26 23:21:29 -08:00
Larry Hastings 8c3ec536e9 Merge 3.4.3 release engineering changes back into 3.4. 2015-02-26 05:58:48 -08:00
Antoine Pitrou e71258a0e6 Issue #15955: Add an option to limit the output size in bz2.decompress().
Patch by Nikolaus Rath.
2015-02-26 13:08:07 +01:00
Benjamin Peterson 4fa49727d7 merge 3.4 2015-02-25 16:47:20 -05:00
Benjamin Peterson ed135f46ec remove unused import 2015-02-25 16:47:14 -05:00
Steve Dower c55a316cff Issue 23314: SuppressCrashReports now disables CRT assertions
SuppressCrashReports should be used in test subprocesses that test invalid conditions.
2015-02-23 07:56:13 -08:00
Larry Hastings fc8eda5ad8 Release bump for 3.4.3 final. 2015-02-22 23:55:39 -08:00
Larry Hastings e1642419b1 Doc updates for 3.4.3 final. 2015-02-22 23:54:38 -08:00
Serhiy Storchaka 0f88891809 Broke reference loops in tests added in issue #5700. 2015-02-23 00:31:33 +02:00
Serhiy Storchaka c26a1a490f Broke reference loops in tests added in issue #5700. 2015-02-23 00:28:38 +02:00
Serhiy Storchaka 4f38e483c2 Issue #6639: Module-level turtle functions no longer raise TclError after
closing the window.
2015-02-22 17:26:35 +02:00
Serhiy Storchaka 80a1803193 Issue #6639: Module-level turtle functions no longer raise TclError after
closing the window.
2015-02-22 17:25:33 +02:00
Serhiy Storchaka a3369a524c Issues #814253, #9179: Warnings now are raised when group references and
conditional group references are used in lookbehind assertions in regular
expressions.
2015-02-21 12:08:52 +02:00
Serhiy Storchaka 4eea62fd2e Issues #814253, #9179: Group references and conditional group references now
work in lookbehind assertions in regular expressions.
2015-02-21 10:07:35 +02:00
Serhiy Storchaka df80706f14 Issue #23215: Multibyte codecs with custom error handlers that ignores errors
consumed too much memory and raised SystemError or MemoryError.
Original patch by Aleksi Torhamo.
2015-02-21 01:21:08 +02:00
Serhiy Storchaka a1543cdcd6 Issue #23215: Multibyte codecs with custom error handlers that ignores errors
consumed too much memory and raised SystemError or MemoryError.
Original patch by Aleksi Torhamo.
2015-02-21 01:19:58 +02:00
Serhiy Storchaka 254dd59068 Issue #5700: io.FileIO() called flush() after closing the file.
flush() was not called in close() if closefd=False.
2015-02-21 00:35:53 +02:00
Serhiy Storchaka a3712a9a6c Issue #5700: io.FileIO() called flush() after closing the file.
flush() was not called in close() if closefd=False.
2015-02-21 00:35:09 +02:00
Serhiy Storchaka 7065f376e0 Issue #23374: Fixed pydoc failure with non-ASCII files when stdout encoding
differs from file system encoding (e.g. on Mac OS).
2015-02-20 23:47:09 +02:00
Serhiy Storchaka 5e3d7a401d Issue #23374: Fixed pydoc failure with non-ASCII files when stdout encoding
differs from file system encoding (e.g. on Mac OS).
2015-02-20 23:46:06 +02:00
Brett Cannon 16cd19c8a2 Issue #22834: Fix a failing test under Solaris due to the platform not
allowing the deletion of the cwd.

Thanks to Martin Panter for the initial fix.
2015-02-20 09:48:18 -05:00
Berker Peksag abbf0f40bb Issue #23442: Rename two member names to stay backward compatible
with the constants in http.client.

Initial patch by Demian Brecht.
2015-02-20 14:57:31 +02:00
Berker Peksag 8e28679417 Issue #23439: Add missing entries to http.client.__all__.
Also, document the LineTooLong exception since it can be raised by
the members of public API (e.g. http.client.HTTPResponse).

Patch by Martin Panter.
2015-02-20 09:45:05 +02:00
Berker Peksag babc688180 Issue #23439: Add missing entries to http.client.__all__.
Also, document the LineTooLong exception since it can be raised by
the members of public API (e.g. http.client.HTTPResponse).

Patch by Martin Panter.
2015-02-20 09:39:38 +02:00
Benjamin Peterson 869311dd97 merge 3.4 (#23481) 2015-02-19 17:58:19 -05:00
Benjamin Peterson 500af332f4 remove rc4 from the default client ciphers (closes #23481) 2015-02-19 17:57:08 -05:00
Serhiy Storchaka 8aba316fea Issue #23474: Enhanced locale testing. 2015-02-18 08:05:05 +02:00
Serhiy Storchaka 095458596d Issue #23474: Enhanced locale testing. 2015-02-18 08:04:37 +02:00
Benjamin Peterson 1130c7f693 merge 3.4 (#23410) 2015-02-17 21:13:30 -05:00
Benjamin Peterson 70e2847347 document the requestline and close_connection attributes, use real booleans, and add tests (closes #23410)
Patch by Martin Panter.
2015-02-17 21:11:10 -05:00
Victor Stinner a634433a00 Merge 3.4 (asyncio) 2015-02-17 23:36:19 +01:00
Victor Stinner e7a2f64435 asyncio: Fix warning in test_close_kill_running()
Read process exit status to avoid the "Caught subprocess termination from
unknown pid" message.
2015-02-17 23:36:02 +01:00
Victor Stinner 7cbb78cd97 Merge 3.4 (asyncio) 2015-02-17 22:55:36 +01:00
Victor Stinner 4088ad9dce Issue #23475, asyncio: Fix test_close_kill_running()
Really kill the child process, don't mock completly the Popen.kill() method.

This change fix memory leaks and reference leaks.
2015-02-17 22:54:11 +01:00
Victor Stinner 4cb814c7e1 asyncio, Tulip issue 220: Merge JoinableQueue with Queue.
Merge JoinableQueue with Queue. To more closely match the standard Queue,
asyncio.Queue has "join" and "task_done". JoinableQueue is deleted.

Docstring for Queue.join shouldn't mention threads.

Restore JoinableQueue as a deprecated alias for Queue. To more closely match
the standard Queue, asyncio.Queue has "join" and "task_done".  JoinableQueue
remains as a deprecated alias for Queue to avoid needlessly breaking too much
code that depended on it.

Patch written by A. Jesse Jiryu Davis <jesse@mongodb.com>.
2015-02-17 22:53:28 +01:00
Victor Stinner 4e82fb99a0 asyncio: BaseSubprocessTransport: repr() mentions when the child process is
running
2015-02-17 22:50:33 +01:00
Serhiy Storchaka 483405bcca Issue #22883: Got rid of outdated references to PyInt and PyString in comments. 2015-02-17 10:14:30 +02:00
Benjamin Peterson 77c041ba64 merge 3.4 (#21548) 2015-02-16 19:45:42 -05:00
Benjamin Peterson 54237f9fea fix pydoc.apropos and pydoc.synopsis on modules with empty docstrings (#21548)
Patch by Yuyang Guo and Berker Peksag.
2015-02-16 19:45:01 -05:00
Serhiy Storchaka 43036a66c3 Fixed sizeof tests for ElementTree (issue #23450). 2015-02-16 23:58:46 +02:00
Serhiy Storchaka a9e00d13cd Issue #20069: Fixed test_os on Solaris: error message is platform depended. 2015-02-16 08:35:18 +02:00
Berker Peksag a9e2c8ecd6 Issue #17753: effective_ids unavailable on Windows. 2015-02-16 04:36:43 +02:00
Berker Peksag e1efc07a30 Issue #17753: effective_ids unavailable on Windows. 2015-02-16 04:36:18 +02:00
Serhiy Storchaka 23edd49e5b Issue #22885: Fixed arbitrary code execution vulnerability in the dbm.dumb
module.  Original patch by Claudiu Popa.
2015-02-16 00:32:41 +02:00
Serhiy Storchaka 74eb8b2d1a Issue #22885: Fixed arbitrary code execution vulnerability in the dbm.dumb
module.  Original patch by Claudiu Popa.
2015-02-16 00:30:43 +02:00
Antoine Pitrou c481bfb3f6 Issue #23239: ssl.match_hostname() now supports matching of IP addresses. 2015-02-15 18:12:20 +01:00
Antoine Pitrou 2d07b85585 Issue #23146: Fix mishandling of absolute Windows paths with forward slashes in pathlib.
Detected and fixed by Serhiy.
2015-02-15 18:06:54 +01:00
Antoine Pitrou 57fffd6f99 Issue #23146: Fix mishandling of absolute Windows paths with forward slashes in pathlib.
Detected and fixed by Serhiy.
2015-02-15 18:03:59 +01:00
Serhiy Storchaka 90caf017ee Issue #19681: Test the repr of partial with more than one keyword argument. 2015-02-15 16:22:11 +02:00
Serhiy Storchaka 0aa74e10bb Issue #19681: Test the repr of partial with more than one keyword argument. 2015-02-15 16:20:47 +02:00
Serhiy Storchaka d362c21264 Use pickled data compatible with Python 2 for testing protocols 0-2. 2015-02-15 14:10:24 +02:00
Serhiy Storchaka fa310ee3a9 Use pickled data compatible with Python 2 for testing protocols 0-2. 2015-02-15 14:10:03 +02:00
Serhiy Storchaka 5fd174a78d Use os.devnull instead of hardcoded '/dev/null'. 2015-02-15 14:03:11 +02:00
Serhiy Storchaka 56abe39052 Merge heads 2015-02-15 14:02:15 +02:00
Serhiy Storchaka 85c3033670 Use os.devnull instead of hardcoded '/dev/null'. 2015-02-15 13:58:23 +02:00
Serhiy Storchaka 2307287c92 Issue #17753: Skip test_zipfile tests which require write access to test
and email.test.
2015-02-14 23:06:42 +02:00
Serhiy Storchaka db724fe994 Issue #17753: Skip test_zipfile tests which require write access to test
and email.test.
2015-02-14 23:04:35 +02:00
Serhiy Storchaka 86a35bcba9 Issue #22844: Fized test_gdb failure on Debian Wheezy for Z.
Patch by David Edelsohn.
2015-02-14 22:45:15 +02:00
Serhiy Storchaka 6b688d8162 Issue #22844: Fized test_gdb failure on Debian Wheezy for Z.
Patch by David Edelsohn.
2015-02-14 22:44:35 +02:00
Steve Dower 17be514d0a Closes #23437: Make user scripts directory versioned on Windows (patch by pmoore) 2015-02-14 09:50:59 -08:00
Serhiy Storchaka a750ce3325 Issue #19105: pprint now more efficiently uses free space at the right. 2015-02-14 10:55:19 +02:00
Berker Peksag 8089cd642f Issue #14910: Add allow_abbrev parameter to argparse.ArgumentParser.
Patch by Jonathan Paugh, Steven Bethard, paul j3 and Daniel Eriksson.
2015-02-14 01:39:17 +02:00
Berker Peksag 0fe6325acf Issue #21717: tarfile.open() now supports 'x' (exclusive creation) mode. 2015-02-13 21:02:12 +02:00
Berker Peksag 6767757589 Issue #23418: Add missing entries to http.server.__all__.
Patch by Martin Panter.
2015-02-13 20:48:41 +02:00
Berker Peksag 366c570d1f Issue #23418: Add missing entries to http.server.__all__.
Patch by Martin Panter.
2015-02-13 20:48:15 +02:00
Serhiy Storchaka 2eab85b7a2 Issue #21849: Ported from 2.7 tests for non-ASCII data. 2015-02-13 15:19:08 +02:00
Serhiy Storchaka a25c542c47 Issue #21849: Ported from 2.7 tests for non-ASCII data. 2015-02-13 15:13:33 +02:00
Victor Stinner 4163cc0d9f Merge 3.4 (asyncio) 2015-02-10 14:49:56 +01:00
Victor Stinner 8e36812e27 asyncio: BaseSubprocessTransport.close() doesn't try to kill the process if it
already finished
2015-02-10 14:49:32 +01:00
Serhiy Storchaka 4bdcfce512 Issue #23421: Fixed compression in tarfile CLI. Patch by wdv4758h. 2015-02-10 08:47:10 +02:00
Serhiy Storchaka 832dd5f0d6 Issue #23421: Fixed compression in tarfile CLI. Patch by wdv4758h. 2015-02-10 08:45:53 +02:00
Vinay Sajip 365701add9 Added respect_handler_level to QueueListener. 2015-02-09 19:49:00 +00:00
Larry Hastings b06f142f5f Release bump for 3.5.0a1. 2015-02-07 16:00:55 -08:00
Larry Hastings e5529063b2 Version bump for 3.4.3rc1. 2015-02-07 16:00:45 -08:00
Larry Hastings ead7aec74d Updated pydoc topics data for 3.5.0a1 release. 2015-02-07 15:55:34 -08:00
Larry Hastings af83f9e313 Updated pydoc topics data for 3.4.3rc1 release. 2015-02-07 15:55:23 -08:00
Charles-François Natali 26dd5edae8 Fix whitespace. 2015-02-07 13:29:15 +00:00
Charles-François Natali 6e6c59b508 Issue #23285: PEP 475 -- Retry system calls failing with EINTR. 2015-02-07 13:27:50 +00:00
Barry Warsaw 1670613d48 Issue #23399: pyvenv creates relative symlinks where possible. 2015-02-06 11:58:06 -05:00
Barry Warsaw 581c29f8fe Issue #23399: pyvenv creates relative symlinks where possible. 2015-02-06 11:23:58 -05:00
Berker Peksag bf5e9604cc Issue #20289: cgi.FieldStorage() now supports the context management protocol. 2015-02-06 10:21:37 +02:00
Serhiy Storchaka 6cfb61f163 Issue #23392: Added tests for marshal C API that works with FILE*. 2015-02-06 09:00:44 +02:00
Serhiy Storchaka b51813403f Issue #23392: Added tests for marshal C API that works with FILE*. 2015-02-06 08:58:56 +02:00
Serhiy Storchaka 313ee59e49 Issue #23881: Only use entry-values with gdb 7.4 in tests.
Fixes a regression in issue #22765.  Patch by Vinson Lee.
2015-02-06 08:35:54 +02:00
Serhiy Storchaka 17d337bc7a Issue #23881: Only use entry-values with gdb 7.4 in tests.
Fixes a regression in issue #22765.  Patch by Vinson Lee.
2015-02-06 08:35:20 +02:00