Commit graph

36395 commits

Author SHA1 Message Date
Serhiy Storchaka
a14f7d239f Issue #14099: Restored support of writing ZIP files to tellable but
non-seekable streams.
2015-01-26 14:01:27 +02:00
Serhiy Storchaka
f15e524026 Issue #14099: Writing to ZipFile and reading multiple ZipExtFiles is
threadsafe now.
2015-01-26 13:53:38 +02:00
Serhiy Storchaka
47efb4a5dc Issue #19361: JSON decoder now raises JSONDecodeError instead of ValueError. 2015-01-26 13:16:30 +02:00
Serhiy Storchaka
6e1ab40f92 Merge heads 2015-01-26 12:13:09 +02:00
Serhiy Storchaka
c959b0cd30 Issue #18518: timeit now rejects statements which can't be compiled outside
a function or a loop (e.g. "return" or "break").
2015-01-26 12:09:59 +02:00
Serhiy Storchaka
2bef58577f Issue #18518: timeit now rejects statements which can't be compiled outside
a function or a loop (e.g. "return" or "break").
2015-01-26 12:09:17 +02:00
Victor Stinner
1ea6d400e8 Merge 3.4 (asyncio) 2015-01-26 11:05:34 +01:00
Victor Stinner
9b524d59b0 Issue #23208, asyncio: Add BaseEventLoop._current_handle
In debug mode, BaseEventLoop._run_once() now sets the
BaseEventLoop._current_handle attribute to the handle currently executed.
In release mode or when no handle is executed, the attribute is None.

BaseEventLoop.default_exception_handler() displays the traceback of the current
handle if available.
2015-01-26 11:05:12 +01:00
Victor Stinner
3d2256f671 Issue #23293, asyncio: Cleanup IocpProactor.close()
The special case for connect_pipe() is not more needed. connect_pipe() doesn't
use overlapped operations anymore.
2015-01-26 11:02:59 +01:00
Victor Stinner
2596dd0894 asyncio: Close transports on error
Fix create_datagram_endpoint(), connect_read_pipe() and connect_write_pipe():
close the transport if the task is cancelled or on error.
2015-01-26 11:02:18 +01:00
Serhiy Storchaka
230586739c Issue #23094: Fixed readline with frames in Python implementation of pickle. 2015-01-26 10:37:44 +02:00
Serhiy Storchaka
21d7533c4c Issue #23094: Fixed readline with frames in Python implementation of pickle. 2015-01-26 10:37:01 +02:00
Serhiy Storchaka
0e992b352a Issue #7665: Fixed tests test_ntpath and test_urllib2 when ran in the
directory containing a backslash.
2015-01-26 10:26:29 +02:00
Serhiy Storchaka
5106d044ec Issue #7665: Fixed tests test_ntpath and test_urllib2 when ran in the
directory containing a backslash.
2015-01-26 10:26:14 +02:00
Serhiy Storchaka
ffd48c9e3d Issue #23268: Fixed bugs in the comparison of ipaddress classes. 2015-01-26 10:11:39 +02:00
Serhiy Storchaka
f186e128b6 Issue #23268: Fixed bugs in the comparison of ipaddress classes. 2015-01-26 10:11:16 +02:00
Serhiy Storchaka
34af5023fc Issue #21408: The default __ne__() now returns NotImplemented if __eq__()
returned NotImplemented.  Removed incorrect implementations of __ne__().
2015-01-26 10:04:15 +02:00
Serhiy Storchaka
f4b7a02e93 Issue #21408: The default __ne__() now returns NotImplemented if __eq__()
returned NotImplemented.  Removed incorrect implementations of __ne__().
2015-01-26 09:57:07 +02:00
Serhiy Storchaka
4e1942bcd8 Don't use deprecated assertEquals. 2015-01-26 09:28:11 +02:00
Benjamin Peterson
60a2f49c8c merge 3.4 (#19996) 2015-01-25 23:31:58 -05:00
Benjamin Peterson
155ceaa454 handle headers with no key (closes #19996)
Patch by Cory Benfield.
2015-01-25 23:30:30 -05:00
Raymond Hettinger
93035c44fd Issue #23119: Simplify setobject by inlining the special case for unicode equality testing. 2015-01-25 16:12:49 -08:00
Serhiy Storchaka
07985ef387 Issue #22286: The "backslashreplace" error handlers now works with
decoding and translating.
2015-01-25 22:56:57 +02:00
Senthil Kumaran
cc522bdd0c merge from 3.4
Increase http.client.HTTPConnection test coverage.

Added a new tunnel test to verify setting of _tunnel_host, _tunnel_port,
_tunnel_headers attributes on HTTPConnection object.
2015-01-24 19:26:18 -08:00
Senthil Kumaran
e6cc70123e Increase http.client.HTTPConnection test coverage.
Added a new tunnel test to verify setting of _tunnel_host, _tunnel_port,
_tunnel_headers attributes on HTTPConnection object.
2015-01-24 19:24:59 -08:00
Ethan Furman
b95b56150f Issue20284: Implement PEP461 2015-01-23 20:05:18 -08:00
Benjamin Peterson
8861502e07 prefer server alpn ordering over the client's 2015-01-23 17:30:26 -05:00
Benjamin Peterson
cca2732a82 add support for ALPN (closes #20188) 2015-01-23 16:35:37 -05:00
Vinay Sajip
ecb5de3d5e Closes #23207: logging.basicConfig() now does additional validation of its arguments. 2015-01-23 19:54:23 +00:00
Vinay Sajip
5abca7023c Issue #23207: logging.basicConfig() now does additional validation of its arguments. 2015-01-23 19:52:21 +00:00
Benjamin Peterson
9d8a3ad02a http.client: disable Nagle's algorithm (closes #23302)
Patch by Demian Brecht.
2015-01-23 11:02:57 -05:00
Gregory P. Smith
d775bcabe7 revert 7b833bd1f509. I misread the side effect that the code was triggering.
*any* kwarg supplied to _assert_python causes it to not append -E to the
command line flags so without='-E' does effectively work.
2015-01-22 22:56:06 -08:00
Gregory P. Smith
48e810069d revert 7b833bd1f509. I misread the side effect that the code was triggering.
*any* kwarg supplied to _assert_python causes it to not append -E to the
command line flags so without='-E' does effectively work.
2015-01-22 22:55:00 -08:00
Gregory P. Smith
d16478095c Remove the unimplemented but ignored without='-E' parameters being passed to
script_helper.assert_python_failure().  No such feature has ever existed,
thus it doesn't do what the comment claims.  (It does add a 'without'
variable to the environment of the child process but that was not intended)
2015-01-22 22:05:00 -08:00
Gregory P. Smith
566646133e Remove the unimplemented but ignored without='-E' parameters being passed to
script_helper.assert_python_failure().  No such feature has ever existed,
thus it doesn't do what the comment claims.  (It does add a 'without'
variable to the environment of the child process but that was not intended)
2015-01-22 22:04:16 -08:00
Gregory P. Smith
058fb7a884 Only pass -E to the child interpreter if our interpreter was running in that
mode.  Explicitly remove the PYTHONFAULTHANDLER environment variable before
launching a child interpreter when its presence would impact the test (the
reason -E was being used in the first place).

This enables running the test in an environment where other Python environment  variables must be set in order for things to run (such as using PYTHONHOME to
tell an embedded interpreter where it should think it lives).
2015-01-22 17:53:24 -08:00
Gregory P. Smith
fe7c5d6e4e Only pass -E to the child interpreter if our interpreter was running in that
mode.  Explicitly remove the PYTHONFAULTHANDLER environment variable before
launching a child interpreter when its presence would impact the test (the
reason -E was being used in the first place).

This enables running the test in an environment where other Python environment
variables must be set in order for things to run (such as using PYTHONHOME to
tell an embedded interpreter where it should think it lives).
2015-01-22 17:33:28 -08:00
Victor Stinner
5da0549154 Merge 3.4 (asyncio) 2015-01-22 23:50:34 +01:00
Victor Stinner
2b77c5467f asyncio, Tulip issue 204: Fix IocpProactor.accept_pipe()
Overlapped.ConnectNamedPipe() now returns a boolean: True if the pipe is
connected (if ConnectNamedPipe() failed with ERROR_PIPE_CONNECTED), False if
the connection is in progress.

This change removes multiple hacks in IocpProactor.
2015-01-22 23:50:03 +01:00
Gregory P. Smith
1d51ba6a6e Break up TestCommandLine.test_env_var into four distinct tests. 2015-01-22 14:38:26 -08:00
Gregory P. Smith
34cd2ae69f Break up TestCommandLine.test_env_var into four distinct tests. 2015-01-22 14:38:00 -08:00
Victor Stinner
58c85144db Merge 3.4 (asyncio) 2015-01-22 22:55:31 +01:00
Victor Stinner
7ffa2c5fdd Issue #23293, asyncio: Rewrite IocpProactor.connect_pipe()
Add _overlapped.ConnectPipe() which tries to connect to the pipe for
asynchronous I/O (overlapped): call CreateFile() in a loop until it doesn't
fail with ERROR_PIPE_BUSY. Use an increasing delay between 1 ms and 100 ms.

Remove Overlapped.WaitNamedPipeAndConnect() which is no more used.
2015-01-22 22:55:08 +01:00
Victor Stinner
752aba7f99 asyncio: IocpProactor.close() doesn't cancel anymore futures which are already
cancelled
2015-01-22 22:47:13 +01:00
Victor Stinner
f6228f02d7 Issue #23009: Add missing "import sys" in test_selectors 2015-01-22 09:35:23 +01:00
Victor Stinner
f07717c105 Merge 3.4 2015-01-22 09:09:24 +01:00
Victor Stinner
14d45c06eb Issue #23009: Skip test_selectors.test_empty_select() on Windows 2015-01-22 09:07:36 +01:00
Victor Stinner
5b511a0b1e Merge 3.4 (asyncio) 2015-01-22 00:18:11 +01:00
Victor Stinner
1ca9392c70 Issue #23095, asyncio: IocpProactor.close() must not cancel pending
_WaitCancelFuture futures
2015-01-22 00:17:54 +01:00
Victor Stinner
0c2e408833 asyncio: BaseEventLoop._create_connection_transport() catchs any exception, not
only Exception
2015-01-22 00:17:41 +01:00