The Wayback Machine - https://web.archive.org/web/20200905043646/https://github.com/python/asyncio/pull/500
Skip to content
This repository has been archived by the owner. It is now read-only.

Python #500

Open
wants to merge 1,529 commits into
base: redirect
from
Open

Python #500

wants to merge 1,529 commits into from

Conversation

@itsmekarthikreddy
Copy link

itsmekarthikreddy commented Sep 7, 2017

No description provided.

vstinner added 30 commits Jan 13, 2015
- Add a new _wakeup_waiter() method
- Replace _create_waiter() method with a _wait_for_data() coroutine function
- Use the value None instead of True or False to wake up the waiter
subprocess, kill the subprocess (close pipes, kill and read the return status).
Log an error in such case.
…o handle

cancelled waiter.

Add unit test cancelling subprocess methods.
… cancelled

before setting its exception.

Add unit tests for this case.
…heck if

the waiter is cancelled before setting its exception.
Create the protocol on a separated line for readability and ease debugging.
Ignore pipes for which the protocol is not set yet (still equal to None).
Add "closed" or "closing" state in the __repr__() method of
_UnixReadPipeTransport and _UnixWritePipeTransport classes.
Set the _returncode attribute, so close() doesn't try to terminate the process.
Close the transport if the creation of the transport (if the waiter) gets an
exception.
Skip SSL tests on the ProactorEventLoop if ssl.MemoryIO is missing
StreamWriter now raises an exception if it is closed: write(), writelines(),
write_eof(), can_write_eof(), get_extra_info(), drain().
Don't call immediatly self._process_write_backlog() but schedule the call using
call_soon(). _on_handshake_complete() can be called indirectly from
_process_write_backlog(), and _process_write_backlog() is not reentrant.
transport at subprocess exit.

Clear also its reference to the transport.
Do nothing if the transport is already closed. Before it was not possible to
close the transport twice.
Check if the _sock attribute is None to check if the transport is closed.
Set the _read_fut attribute to None after cancelling it.

This change should fix a race condition with
_ProactorWritePipeTransport._pipe_closed().
* Use test_utils.run_briefly() to execute pending calls to really close
  transports
* sslproto: mock also _SSLPipe.shutdown(), it's need to close the transport
* pipe test: the test doesn't close explicitly the PipeHandle, so ignore
  the warning instead
* test_popen: use the context manager ("with p:") to explicitly close pipes
StreamWriter: close() now clears the reference to the transport

StreamWriter now raises an exception if it is closed: write(), writelines(),
write_eof(), can_write_eof(), get_extra_info(), drain().
Override the connect_read_pipe() method of the loop to mock immediatly
pause_reading() and resume_reading() methods.

The test failed randomly on FreeBSD 9 buildbot and on Windows using trollius.
@sbourdeauducq

This comment has been minimized.

Copy link

sbourdeauducq commented on asyncio/windows_utils.py in 4945c1a Feb 24, 2016

operation

This comment has been minimized.

Copy link

sbourdeauducq replied Feb 24, 2016

Also, it seems to me this PipeHandle be used for other things (e.g. serial ports) and I suggest renaming it.

@sbourdeauducq

This comment has been minimized.

Copy link

sbourdeauducq commented on asyncio/proactor_events.py in 684f3be Mar 5, 2016

Why? Pipes should be supported by IOCP. Can't ReOpenFile put an anonymous pipe into overlapped mode?

Adam Chainz and others added 21 commits Jun 2, 2016
…rojects

As per [their blog post of the 27th April](https://blog.readthedocs.com/securing-subdomains/) ‘Securing subdomains’:

> Starting today, Read the Docs will start hosting projects from subdomains on the domain readthedocs.io, instead of on readthedocs.org. This change addresses some security concerns around site cookies while hosting user generated data on the same domain as our dashboard.

Test Plan: Manually visited all the links I’ve modified.
From(proc.wait()) instead of form proc.wait()
Convert readthedocs link for their .org -> .io migration for hosted projects
Be explicit about supporting only Python 2.7
Drop testing on appveyor because the needed dependencies no longer exist.
Incorporate jamadden#15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

You can’t perform that action at this time.