Commit Graph

88015 Commits

Author SHA1 Message Date
Victor Stinner c84d167733 Merge 3.4 (asyncio) 2015-01-29 02:15:35 +01:00
Victor Stinner 7b5a900e88 asyncio: BaseSubprocessTransport._kill_wait() now also call close()
close() closes pipes, which is not None yet by _kill_wait().
2015-01-29 02:14:30 +01:00
Gregory P. Smith bd4976bbd3 Always #define _PyLong_FromDev as we always need it to compile rather than
only defining it when HAVE_MKNOD && HAVE_MAKEDEV are true.

This "oops" issue reported by John E. Malmberg on core-mentorship.
(what kinds of systems don't HAVE_MKNOD && HAVE_MAKEDEV?)
2015-01-28 16:08:07 -08:00
Gregory P. Smith 702dada2c5 Always #define _PyLong_FromDev as we always need it to compile rather than
only defining it when HAVE_MKNOD && HAVE_MAKEDEV are true.

This "oops" issue reported by John E. Malmberg on core-mentorship.
(what kinds of systems don't HAVE_MKNOD && HAVE_MAKEDEV?)
2015-01-28 16:07:52 -08:00
Victor Stinner bea0a28439 Merge 3.4 (asyncio) 2015-01-29 00:55:46 +01:00
Victor Stinner fa73779b0a asyncio: Fix _SelectorSocketTransport constructor
Only start reading when connection_made() has been called:
protocol.data_received() must not be called before protocol.connection_made().
2015-01-29 00:36:51 +01:00
Victor Stinner f07801bb17 asyncio: SSL transports now clear their reference to the waiter
* Rephrase also the comment explaining why the waiter is not awaken immediatly.
* SSLProtocol.eof_received() doesn't instanciate ConnectionResetError exception
  directly, it will be done by Future.set_exception(). The exception is not
  used if the waiter was cancelled or if there is no waiter.
2015-01-29 00:36:35 +01:00
Victor Stinner b507cbaac5 asyncio: Fix SSLProtocol.eof_received()
Wake-up the waiter if it is not done yet.
2015-01-29 00:35:56 +01:00
Donald Stufft 6b9e2009fa Merge 3.4 into default - Upgrade setuptools to 12.0.5 and pip to 6.0.7 2015-01-28 17:57:05 -05:00
Donald Stufft a89f5f0492 Update setuptools to 12.0.5 and pip to 6.0.7 2015-01-28 17:56:15 -05:00
Benjamin Peterson c54de47759 ifdef our way to compatibility with old openssl (closes #23335) 2015-01-28 12:06:39 -05:00
Serhiy Storchaka aaef05f003 Fixed memory leak in marshal. 2015-01-28 17:11:12 +02:00
Serhiy Storchaka 000daaee57 Fixed memory leak in marshal. 2015-01-28 17:10:48 +02:00
Serhiy Storchaka 66acbb28ee Issue #22079: PyType_Ready() now checks that statically allocated type has
no dynamically allocated bases.
2015-01-28 11:06:04 +02:00
Serhiy Storchaka e09bcc874a Issue #22079: PyType_Ready() now checks that statically allocated type has
no dynamically allocated bases.
2015-01-28 11:03:33 +02:00
Vinay Sajip 85ad88dbc6 Merged documentation update from 3.4. 2015-01-28 07:33:14 +00:00
Vinay Sajip db07164053 Added a logging cookbook entry on customized exception formatting. 2015-01-28 07:32:38 +00:00
Victor Stinner bf9765186d Merge 3.4 (asyncio) 2015-01-28 00:30:51 +01:00
Victor Stinner ff018e406c asyncio: sync with Tulip
* Remove unused SSLProtocol._closing attribute
* test_sslproto: skip test if ssl module is missing
* Python issue #23208: Don't use the traceback of the current handle if we
  already know the traceback of the source. The handle may be more revelant,
  but having 3 tracebacks (handle, source, exception) becomes more difficult to
  read. The handle may be preferred later but it requires more work to make
  this choice.
2015-01-28 00:30:40 +01:00
Serhiy Storchaka 4dbc305002 Issue #23055: Fixed a buffer overflow in PyUnicode_FromFormatV. Analysis
and fix by Guido Vranken.
2015-01-27 22:18:46 +02:00
Benjamin Peterson 07f0515667 disable ALPN on LibreSSL, which has a large version number, but not ALPN support (closes #23329) 2015-01-27 11:10:18 -05:00
Raymond Hettinger f8d1a31e70 Revert unintended part of the commit (the key==dummy test wasn't supposed to change). 2015-01-26 22:06:43 -08:00
Raymond Hettinger a5ebbf6295 Remove unneeded dummy test from the set search loop (when the hashes match we know the key is not a dummy). 2015-01-26 21:54:35 -08:00
Raymond Hettinger 3037e84ad1 Issue #23269: Tighten search_loop in set_insert_clean()
Instead of masking and shifting every loopup, move the wrap-around
test outside of the inner-loop.
2015-01-26 21:33:48 -08:00
Berker Peksag 618e315f93 Add whatsnew entry for issue #5309. 2015-01-27 02:59:09 +02:00
Berker Peksag b820d0defc Issue #23286: Fix typo in the tutorial.
Patch by Mayank Tripathi.
2015-01-27 02:52:40 +02:00
Berker Peksag b68c420d8a Issue #23286: Fix typo in the tutorial.
Patch by Mayank Tripathi.
2015-01-27 02:52:14 +02:00
Victor Stinner f2be23d329 Issue #22286, #23321: Fix failing test on Windows code page 932
There was a bug which was fixed. The unit test was also wrong.
2015-01-26 23:26:11 +01:00
Victor Stinner 3bf8684c5e Merge 3.4 (asyncio) 2015-01-26 22:43:52 +01:00
Victor Stinner 498b1f62db asyncio, _overlapped.ConnectPipe(): release the GIL 2015-01-26 22:43:39 +01:00
Victor Stinner c27a8afcb0 Merge 3.4 (asyncio) 2015-01-26 22:31:03 +01:00
Victor Stinner 41063d2a59 asyncio, Tulip issue 204: Fix IocpProactor.recv()
If ReadFile() fails with ERROR_BROKEN_PIPE, the operation is not pending: don't
register the overlapped.

I don't know if WSARecv() can fail with ERROR_BROKEN_PIPE. Since
Overlapped.WSARecv() already handled ERROR_BROKEN_PIPE, let me guess that it
has the same behaviour than ReadFile().
2015-01-26 22:30:49 +01:00
Victor Stinner 24dfa3c1d6 Issue #23095, asyncio: Fix _WaitHandleFuture.cancel()
If UnregisterWaitEx() fais with ERROR_IO_PENDING, it doesn't mean that the wait
is unregistered yet. We still have to wait until the wait is cancelled.
2015-01-26 22:30:28 +01:00
Victor Stinner 5474d0ba19 Issue #20284: Fix a compilation warning on Windows
Explicitly cast the long to char.
2015-01-26 16:43:36 +01:00
Victor Stinner 29dacf2e97 Issue #15859: PyUnicode_EncodeFSDefault(), PyUnicode_EncodeMBCS() and
PyUnicode_EncodeCodePage() now raise an exception if the object is not an
Unicode object. For PyUnicode_EncodeFSDefault(), it was already the case on
platforms other than Windows. Patch written by Campbell Barton.
2015-01-26 16:41:32 +01:00
Benjamin Peterson a8efc9601d ensure ilen is initialized when it is assigned to len 2015-01-26 09:23:41 -05:00
Victor Stinner d7770d9bec Merge 3.4 (asyncio) 2015-01-26 15:04:15 +01:00
Victor Stinner e0fd157ba0 Issue #23293, asyncio: Rewrite IocpProactor.connect_pipe() as a coroutine
Use a coroutine with asyncio.sleep() instead of call_later() to ensure that the
schedule call is cancelled.

Add also a unit test cancelling connect_pipe().
2015-01-26 15:04:03 +01:00
Victor Stinner 2a3f38fd29 asyncio: PipeHandle.fileno() now raises an exception if the pipe is closed 2015-01-26 15:03:44 +01:00
Victor Stinner a19b7b3fca asyncio: Fix ProactorEventLoop.start_serving_pipe()
If a client connected before the server was closed: drop the client (close the
pipe) and exit.
2015-01-26 15:03:20 +01:00
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 b67c516d8b Null merge 2015-01-26 13:47:52 +02:00
Serhiy Storchaka b76bcc4ffc Issue #14099: Backout changeset e5bb3044402b (except adapted tests). 2015-01-26 13:45:39 +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 4e5d9eac2c Null merge 2015-01-26 12:14:37 +02:00
Serhiy Storchaka 6e1ab40f92 Merge heads 2015-01-26 12:13:09 +02:00
Serhiy Storchaka b6c0c5ba5f Merge heads 2015-01-26 12:12:31 +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