Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
966321e2
Commit
966321e2
authored
Sep 11, 2016
by
Yury Selivanov
Browse files
Options
Browse Files
Download
Plain Diff
Merge 3.5 (asyncio)
parents
0b51fd43
a05a6ef1
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
45 additions
and
0 deletions
+45
-0
Lib/asyncio/base_subprocess.py
Lib/asyncio/base_subprocess.py
+6
-0
Lib/asyncio/proactor_events.py
Lib/asyncio/proactor_events.py
+6
-0
Lib/asyncio/selector_events.py
Lib/asyncio/selector_events.py
+6
-0
Lib/asyncio/sslproto.py
Lib/asyncio/sslproto.py
+6
-0
Lib/asyncio/transports.py
Lib/asyncio/transports.py
+8
-0
Lib/asyncio/unix_events.py
Lib/asyncio/unix_events.py
+12
-0
Lib/test/test_asyncio/test_sslproto.py
Lib/test/test_asyncio/test_sslproto.py
+1
-0
No files found.
Lib/asyncio/base_subprocess.py
View file @
966321e2
...
...
@@ -87,6 +87,12 @@ class BaseSubprocessTransport(transports.SubprocessTransport):
def
_start
(
self
,
args
,
shell
,
stdin
,
stdout
,
stderr
,
bufsize
,
**
kwargs
):
raise
NotImplementedError
def
set_protocol
(
self
,
protocol
):
self
.
_protocol
=
protocol
def
get_protocol
(
self
):
return
self
.
_protocol
def
is_closing
(
self
):
return
self
.
_closed
...
...
Lib/asyncio/proactor_events.py
View file @
966321e2
...
...
@@ -66,6 +66,12 @@ class _ProactorBasePipeTransport(transports._FlowControlMixin,
def
_set_extra
(
self
,
sock
):
self
.
_extra
[
'pipe'
]
=
sock
def
set_protocol
(
self
,
protocol
):
self
.
_protocol
=
protocol
def
get_protocol
(
self
):
return
self
.
_protocol
def
is_closing
(
self
):
return
self
.
_closing
...
...
Lib/asyncio/selector_events.py
View file @
966321e2
...
...
@@ -560,6 +560,12 @@ class _SelectorTransport(transports._FlowControlMixin,
def
abort
(
self
):
self
.
_force_close
(
None
)
def
set_protocol
(
self
,
protocol
):
self
.
_protocol
=
protocol
def
get_protocol
(
self
):
return
self
.
_protocol
def
is_closing
(
self
):
return
self
.
_closing
...
...
Lib/asyncio/sslproto.py
View file @
966321e2
...
...
@@ -305,6 +305,12 @@ class _SSLProtocolTransport(transports._FlowControlMixin,
"""Get optional transport information."""
return
self
.
_ssl_protocol
.
_get_extra_info
(
name
,
default
)
def
set_protocol
(
self
,
protocol
):
self
.
_app_protocol
=
protocol
def
get_protocol
(
self
):
return
self
.
_app_protocol
def
is_closing
(
self
):
return
self
.
_closed
...
...
Lib/asyncio/transports.py
View file @
966321e2
...
...
@@ -33,6 +33,14 @@ class BaseTransport:
"""
raise
NotImplementedError
def
set_protocol
(
self
,
protocol
):
"""Set a new protocol."""
raise
NotImplementedError
def
get_protocol
(
self
):
"""Return the current protocol."""
raise
NotImplementedError
class
ReadTransport
(
BaseTransport
):
"""Interface for read-only transports."""
...
...
Lib/asyncio/unix_events.py
View file @
966321e2
...
...
@@ -374,6 +374,12 @@ class _UnixReadPipeTransport(transports.ReadTransport):
def
resume_reading
(
self
):
self
.
_loop
.
add_reader
(
self
.
_fileno
,
self
.
_read_ready
)
def
set_protocol
(
self
,
protocol
):
self
.
_protocol
=
protocol
def
get_protocol
(
self
):
return
self
.
_protocol
def
is_closing
(
self
):
return
self
.
_closing
...
...
@@ -571,6 +577,12 @@ class _UnixWritePipeTransport(transports._FlowControlMixin,
self
.
_loop
.
remove_reader
(
self
.
_fileno
)
self
.
_loop
.
call_soon
(
self
.
_call_connection_lost
,
None
)
def
set_protocol
(
self
,
protocol
):
self
.
_protocol
=
protocol
def
get_protocol
(
self
):
return
self
.
_protocol
def
is_closing
(
self
):
return
self
.
_closing
...
...
Lib/test/test_asyncio/test_sslproto.py
View file @
966321e2
...
...
@@ -25,6 +25,7 @@ class SslProtoHandshakeTests(test_utils.TestCase):
sslcontext
=
test_utils
.
dummy_ssl_context
()
app_proto
=
asyncio
.
Protocol
()
proto
=
sslproto
.
SSLProtocol
(
self
.
loop
,
app_proto
,
sslcontext
,
waiter
)
self
.
assertIs
(
proto
.
_app_transport
.
get_protocol
(),
app_proto
)
self
.
addCleanup
(
proto
.
_app_transport
.
close
)
return
proto
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment