Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../lib64/python3..../asyncio
File: events.py
"""Event loop and event loop policy."""
[0] Fix | Delete
[1] Fix | Delete
__all__ = ['AbstractEventLoopPolicy',
[2] Fix | Delete
'AbstractEventLoop', 'AbstractServer',
[3] Fix | Delete
'Handle', 'TimerHandle',
[4] Fix | Delete
'get_event_loop_policy', 'set_event_loop_policy',
[5] Fix | Delete
'get_event_loop', 'set_event_loop', 'new_event_loop',
[6] Fix | Delete
'get_child_watcher', 'set_child_watcher',
[7] Fix | Delete
'_set_running_loop', '_get_running_loop',
[8] Fix | Delete
]
[9] Fix | Delete
[10] Fix | Delete
import functools
[11] Fix | Delete
import inspect
[12] Fix | Delete
import os
[13] Fix | Delete
import reprlib
[14] Fix | Delete
import socket
[15] Fix | Delete
import subprocess
[16] Fix | Delete
import sys
[17] Fix | Delete
import threading
[18] Fix | Delete
import traceback
[19] Fix | Delete
[20] Fix | Delete
from . import compat
[21] Fix | Delete
from . import constants
[22] Fix | Delete
[23] Fix | Delete
[24] Fix | Delete
def _get_function_source(func):
[25] Fix | Delete
if compat.PY34:
[26] Fix | Delete
func = inspect.unwrap(func)
[27] Fix | Delete
elif hasattr(func, '__wrapped__'):
[28] Fix | Delete
func = func.__wrapped__
[29] Fix | Delete
if inspect.isfunction(func):
[30] Fix | Delete
code = func.__code__
[31] Fix | Delete
return (code.co_filename, code.co_firstlineno)
[32] Fix | Delete
if isinstance(func, functools.partial):
[33] Fix | Delete
return _get_function_source(func.func)
[34] Fix | Delete
if compat.PY34 and isinstance(func, functools.partialmethod):
[35] Fix | Delete
return _get_function_source(func.func)
[36] Fix | Delete
return None
[37] Fix | Delete
[38] Fix | Delete
[39] Fix | Delete
def _format_args_and_kwargs(args, kwargs):
[40] Fix | Delete
"""Format function arguments and keyword arguments.
[41] Fix | Delete
[42] Fix | Delete
Special case for a single parameter: ('hello',) is formatted as ('hello').
[43] Fix | Delete
"""
[44] Fix | Delete
# use reprlib to limit the length of the output
[45] Fix | Delete
items = []
[46] Fix | Delete
if args:
[47] Fix | Delete
items.extend(reprlib.repr(arg) for arg in args)
[48] Fix | Delete
if kwargs:
[49] Fix | Delete
items.extend('{}={}'.format(k, reprlib.repr(v))
[50] Fix | Delete
for k, v in kwargs.items())
[51] Fix | Delete
return '(' + ', '.join(items) + ')'
[52] Fix | Delete
[53] Fix | Delete
[54] Fix | Delete
def _format_callback(func, args, kwargs, suffix=''):
[55] Fix | Delete
if isinstance(func, functools.partial):
[56] Fix | Delete
suffix = _format_args_and_kwargs(args, kwargs) + suffix
[57] Fix | Delete
return _format_callback(func.func, func.args, func.keywords, suffix)
[58] Fix | Delete
[59] Fix | Delete
if hasattr(func, '__qualname__') and func.__qualname__:
[60] Fix | Delete
func_repr = func.__qualname__
[61] Fix | Delete
elif hasattr(func, '__name__') and func.__name__:
[62] Fix | Delete
func_repr = func.__name__
[63] Fix | Delete
else:
[64] Fix | Delete
func_repr = repr(func)
[65] Fix | Delete
[66] Fix | Delete
func_repr += _format_args_and_kwargs(args, kwargs)
[67] Fix | Delete
if suffix:
[68] Fix | Delete
func_repr += suffix
[69] Fix | Delete
return func_repr
[70] Fix | Delete
[71] Fix | Delete
def _format_callback_source(func, args):
[72] Fix | Delete
func_repr = _format_callback(func, args, None)
[73] Fix | Delete
source = _get_function_source(func)
[74] Fix | Delete
if source:
[75] Fix | Delete
func_repr += ' at %s:%s' % source
[76] Fix | Delete
return func_repr
[77] Fix | Delete
[78] Fix | Delete
[79] Fix | Delete
def extract_stack(f=None, limit=None):
[80] Fix | Delete
"""Replacement for traceback.extract_stack() that only does the
[81] Fix | Delete
necessary work for asyncio debug mode.
[82] Fix | Delete
"""
[83] Fix | Delete
if f is None:
[84] Fix | Delete
f = sys._getframe().f_back
[85] Fix | Delete
if limit is None:
[86] Fix | Delete
# Limit the amount of work to a reasonable amount, as extract_stack()
[87] Fix | Delete
# can be called for each coroutine and future in debug mode.
[88] Fix | Delete
limit = constants.DEBUG_STACK_DEPTH
[89] Fix | Delete
stack = traceback.StackSummary.extract(traceback.walk_stack(f),
[90] Fix | Delete
limit=limit,
[91] Fix | Delete
lookup_lines=False)
[92] Fix | Delete
stack.reverse()
[93] Fix | Delete
return stack
[94] Fix | Delete
[95] Fix | Delete
[96] Fix | Delete
class Handle:
[97] Fix | Delete
"""Object returned by callback registration methods."""
[98] Fix | Delete
[99] Fix | Delete
__slots__ = ('_callback', '_args', '_cancelled', '_loop',
[100] Fix | Delete
'_source_traceback', '_repr', '__weakref__')
[101] Fix | Delete
[102] Fix | Delete
def __init__(self, callback, args, loop):
[103] Fix | Delete
self._loop = loop
[104] Fix | Delete
self._callback = callback
[105] Fix | Delete
self._args = args
[106] Fix | Delete
self._cancelled = False
[107] Fix | Delete
self._repr = None
[108] Fix | Delete
if self._loop.get_debug():
[109] Fix | Delete
self._source_traceback = extract_stack(sys._getframe(1))
[110] Fix | Delete
else:
[111] Fix | Delete
self._source_traceback = None
[112] Fix | Delete
[113] Fix | Delete
def _repr_info(self):
[114] Fix | Delete
info = [self.__class__.__name__]
[115] Fix | Delete
if self._cancelled:
[116] Fix | Delete
info.append('cancelled')
[117] Fix | Delete
if self._callback is not None:
[118] Fix | Delete
info.append(_format_callback_source(self._callback, self._args))
[119] Fix | Delete
if self._source_traceback:
[120] Fix | Delete
frame = self._source_traceback[-1]
[121] Fix | Delete
info.append('created at %s:%s' % (frame[0], frame[1]))
[122] Fix | Delete
return info
[123] Fix | Delete
[124] Fix | Delete
def __repr__(self):
[125] Fix | Delete
if self._repr is not None:
[126] Fix | Delete
return self._repr
[127] Fix | Delete
info = self._repr_info()
[128] Fix | Delete
return '<%s>' % ' '.join(info)
[129] Fix | Delete
[130] Fix | Delete
def cancel(self):
[131] Fix | Delete
if not self._cancelled:
[132] Fix | Delete
self._cancelled = True
[133] Fix | Delete
if self._loop.get_debug():
[134] Fix | Delete
# Keep a representation in debug mode to keep callback and
[135] Fix | Delete
# parameters. For example, to log the warning
[136] Fix | Delete
# "Executing <Handle...> took 2.5 second"
[137] Fix | Delete
self._repr = repr(self)
[138] Fix | Delete
self._callback = None
[139] Fix | Delete
self._args = None
[140] Fix | Delete
[141] Fix | Delete
def _run(self):
[142] Fix | Delete
try:
[143] Fix | Delete
self._callback(*self._args)
[144] Fix | Delete
except Exception as exc:
[145] Fix | Delete
cb = _format_callback_source(self._callback, self._args)
[146] Fix | Delete
msg = 'Exception in callback {}'.format(cb)
[147] Fix | Delete
context = {
[148] Fix | Delete
'message': msg,
[149] Fix | Delete
'exception': exc,
[150] Fix | Delete
'handle': self,
[151] Fix | Delete
}
[152] Fix | Delete
if self._source_traceback:
[153] Fix | Delete
context['source_traceback'] = self._source_traceback
[154] Fix | Delete
self._loop.call_exception_handler(context)
[155] Fix | Delete
self = None # Needed to break cycles when an exception occurs.
[156] Fix | Delete
[157] Fix | Delete
[158] Fix | Delete
class TimerHandle(Handle):
[159] Fix | Delete
"""Object returned by timed callback registration methods."""
[160] Fix | Delete
[161] Fix | Delete
__slots__ = ['_scheduled', '_when']
[162] Fix | Delete
[163] Fix | Delete
def __init__(self, when, callback, args, loop):
[164] Fix | Delete
assert when is not None
[165] Fix | Delete
super().__init__(callback, args, loop)
[166] Fix | Delete
if self._source_traceback:
[167] Fix | Delete
del self._source_traceback[-1]
[168] Fix | Delete
self._when = when
[169] Fix | Delete
self._scheduled = False
[170] Fix | Delete
[171] Fix | Delete
def _repr_info(self):
[172] Fix | Delete
info = super()._repr_info()
[173] Fix | Delete
pos = 2 if self._cancelled else 1
[174] Fix | Delete
info.insert(pos, 'when=%s' % self._when)
[175] Fix | Delete
return info
[176] Fix | Delete
[177] Fix | Delete
def __hash__(self):
[178] Fix | Delete
return hash(self._when)
[179] Fix | Delete
[180] Fix | Delete
def __lt__(self, other):
[181] Fix | Delete
return self._when < other._when
[182] Fix | Delete
[183] Fix | Delete
def __le__(self, other):
[184] Fix | Delete
if self._when < other._when:
[185] Fix | Delete
return True
[186] Fix | Delete
return self.__eq__(other)
[187] Fix | Delete
[188] Fix | Delete
def __gt__(self, other):
[189] Fix | Delete
return self._when > other._when
[190] Fix | Delete
[191] Fix | Delete
def __ge__(self, other):
[192] Fix | Delete
if self._when > other._when:
[193] Fix | Delete
return True
[194] Fix | Delete
return self.__eq__(other)
[195] Fix | Delete
[196] Fix | Delete
def __eq__(self, other):
[197] Fix | Delete
if isinstance(other, TimerHandle):
[198] Fix | Delete
return (self._when == other._when and
[199] Fix | Delete
self._callback == other._callback and
[200] Fix | Delete
self._args == other._args and
[201] Fix | Delete
self._cancelled == other._cancelled)
[202] Fix | Delete
return NotImplemented
[203] Fix | Delete
[204] Fix | Delete
def __ne__(self, other):
[205] Fix | Delete
equal = self.__eq__(other)
[206] Fix | Delete
return NotImplemented if equal is NotImplemented else not equal
[207] Fix | Delete
[208] Fix | Delete
def cancel(self):
[209] Fix | Delete
if not self._cancelled:
[210] Fix | Delete
self._loop._timer_handle_cancelled(self)
[211] Fix | Delete
super().cancel()
[212] Fix | Delete
[213] Fix | Delete
[214] Fix | Delete
class AbstractServer:
[215] Fix | Delete
"""Abstract server returned by create_server()."""
[216] Fix | Delete
[217] Fix | Delete
def close(self):
[218] Fix | Delete
"""Stop serving. This leaves existing connections open."""
[219] Fix | Delete
return NotImplemented
[220] Fix | Delete
[221] Fix | Delete
def wait_closed(self):
[222] Fix | Delete
"""Coroutine to wait until service is closed."""
[223] Fix | Delete
return NotImplemented
[224] Fix | Delete
[225] Fix | Delete
[226] Fix | Delete
class AbstractEventLoop:
[227] Fix | Delete
"""Abstract event loop."""
[228] Fix | Delete
[229] Fix | Delete
# Running and stopping the event loop.
[230] Fix | Delete
[231] Fix | Delete
def run_forever(self):
[232] Fix | Delete
"""Run the event loop until stop() is called."""
[233] Fix | Delete
raise NotImplementedError
[234] Fix | Delete
[235] Fix | Delete
def run_until_complete(self, future):
[236] Fix | Delete
"""Run the event loop until a Future is done.
[237] Fix | Delete
[238] Fix | Delete
Return the Future's result, or raise its exception.
[239] Fix | Delete
"""
[240] Fix | Delete
raise NotImplementedError
[241] Fix | Delete
[242] Fix | Delete
def stop(self):
[243] Fix | Delete
"""Stop the event loop as soon as reasonable.
[244] Fix | Delete
[245] Fix | Delete
Exactly how soon that is may depend on the implementation, but
[246] Fix | Delete
no more I/O callbacks should be scheduled.
[247] Fix | Delete
"""
[248] Fix | Delete
raise NotImplementedError
[249] Fix | Delete
[250] Fix | Delete
def is_running(self):
[251] Fix | Delete
"""Return whether the event loop is currently running."""
[252] Fix | Delete
raise NotImplementedError
[253] Fix | Delete
[254] Fix | Delete
def is_closed(self):
[255] Fix | Delete
"""Returns True if the event loop was closed."""
[256] Fix | Delete
raise NotImplementedError
[257] Fix | Delete
[258] Fix | Delete
def close(self):
[259] Fix | Delete
"""Close the loop.
[260] Fix | Delete
[261] Fix | Delete
The loop should not be running.
[262] Fix | Delete
[263] Fix | Delete
This is idempotent and irreversible.
[264] Fix | Delete
[265] Fix | Delete
No other methods should be called after this one.
[266] Fix | Delete
"""
[267] Fix | Delete
raise NotImplementedError
[268] Fix | Delete
[269] Fix | Delete
def shutdown_asyncgens(self):
[270] Fix | Delete
"""Shutdown all active asynchronous generators."""
[271] Fix | Delete
raise NotImplementedError
[272] Fix | Delete
[273] Fix | Delete
# Methods scheduling callbacks. All these return Handles.
[274] Fix | Delete
[275] Fix | Delete
def _timer_handle_cancelled(self, handle):
[276] Fix | Delete
"""Notification that a TimerHandle has been cancelled."""
[277] Fix | Delete
raise NotImplementedError
[278] Fix | Delete
[279] Fix | Delete
def call_soon(self, callback, *args):
[280] Fix | Delete
return self.call_later(0, callback, *args)
[281] Fix | Delete
[282] Fix | Delete
def call_later(self, delay, callback, *args):
[283] Fix | Delete
raise NotImplementedError
[284] Fix | Delete
[285] Fix | Delete
def call_at(self, when, callback, *args):
[286] Fix | Delete
raise NotImplementedError
[287] Fix | Delete
[288] Fix | Delete
def time(self):
[289] Fix | Delete
raise NotImplementedError
[290] Fix | Delete
[291] Fix | Delete
def create_future(self):
[292] Fix | Delete
raise NotImplementedError
[293] Fix | Delete
[294] Fix | Delete
# Method scheduling a coroutine object: create a task.
[295] Fix | Delete
[296] Fix | Delete
def create_task(self, coro):
[297] Fix | Delete
raise NotImplementedError
[298] Fix | Delete
[299] Fix | Delete
# Methods for interacting with threads.
[300] Fix | Delete
[301] Fix | Delete
def call_soon_threadsafe(self, callback, *args):
[302] Fix | Delete
raise NotImplementedError
[303] Fix | Delete
[304] Fix | Delete
def run_in_executor(self, executor, func, *args):
[305] Fix | Delete
raise NotImplementedError
[306] Fix | Delete
[307] Fix | Delete
def set_default_executor(self, executor):
[308] Fix | Delete
raise NotImplementedError
[309] Fix | Delete
[310] Fix | Delete
# Network I/O methods returning Futures.
[311] Fix | Delete
[312] Fix | Delete
def getaddrinfo(self, host, port, *, family=0, type=0, proto=0, flags=0):
[313] Fix | Delete
raise NotImplementedError
[314] Fix | Delete
[315] Fix | Delete
def getnameinfo(self, sockaddr, flags=0):
[316] Fix | Delete
raise NotImplementedError
[317] Fix | Delete
[318] Fix | Delete
def create_connection(self, protocol_factory, host=None, port=None, *,
[319] Fix | Delete
ssl=None, family=0, proto=0, flags=0, sock=None,
[320] Fix | Delete
local_addr=None, server_hostname=None):
[321] Fix | Delete
raise NotImplementedError
[322] Fix | Delete
[323] Fix | Delete
def create_server(self, protocol_factory, host=None, port=None, *,
[324] Fix | Delete
family=socket.AF_UNSPEC, flags=socket.AI_PASSIVE,
[325] Fix | Delete
sock=None, backlog=100, ssl=None, reuse_address=None,
[326] Fix | Delete
reuse_port=None):
[327] Fix | Delete
"""A coroutine which creates a TCP server bound to host and port.
[328] Fix | Delete
[329] Fix | Delete
The return value is a Server object which can be used to stop
[330] Fix | Delete
the service.
[331] Fix | Delete
[332] Fix | Delete
If host is an empty string or None all interfaces are assumed
[333] Fix | Delete
and a list of multiple sockets will be returned (most likely
[334] Fix | Delete
one for IPv4 and another one for IPv6). The host parameter can also be a
[335] Fix | Delete
sequence (e.g. list) of hosts to bind to.
[336] Fix | Delete
[337] Fix | Delete
family can be set to either AF_INET or AF_INET6 to force the
[338] Fix | Delete
socket to use IPv4 or IPv6. If not set it will be determined
[339] Fix | Delete
from host (defaults to AF_UNSPEC).
[340] Fix | Delete
[341] Fix | Delete
flags is a bitmask for getaddrinfo().
[342] Fix | Delete
[343] Fix | Delete
sock can optionally be specified in order to use a preexisting
[344] Fix | Delete
socket object.
[345] Fix | Delete
[346] Fix | Delete
backlog is the maximum number of queued connections passed to
[347] Fix | Delete
listen() (defaults to 100).
[348] Fix | Delete
[349] Fix | Delete
ssl can be set to an SSLContext to enable SSL over the
[350] Fix | Delete
accepted connections.
[351] Fix | Delete
[352] Fix | Delete
reuse_address tells the kernel to reuse a local socket in
[353] Fix | Delete
TIME_WAIT state, without waiting for its natural timeout to
[354] Fix | Delete
expire. If not specified will automatically be set to True on
[355] Fix | Delete
UNIX.
[356] Fix | Delete
[357] Fix | Delete
reuse_port tells the kernel to allow this endpoint to be bound to
[358] Fix | Delete
the same port as other existing endpoints are bound to, so long as
[359] Fix | Delete
they all set this flag when being created. This option is not
[360] Fix | Delete
supported on Windows.
[361] Fix | Delete
"""
[362] Fix | Delete
raise NotImplementedError
[363] Fix | Delete
[364] Fix | Delete
def create_unix_connection(self, protocol_factory, path, *,
[365] Fix | Delete
ssl=None, sock=None,
[366] Fix | Delete
server_hostname=None):
[367] Fix | Delete
raise NotImplementedError
[368] Fix | Delete
[369] Fix | Delete
def create_unix_server(self, protocol_factory, path, *,
[370] Fix | Delete
sock=None, backlog=100, ssl=None):
[371] Fix | Delete
"""A coroutine which creates a UNIX Domain Socket server.
[372] Fix | Delete
[373] Fix | Delete
The return value is a Server object, which can be used to stop
[374] Fix | Delete
the service.
[375] Fix | Delete
[376] Fix | Delete
path is a str, representing a file systsem path to bind the
[377] Fix | Delete
server socket to.
[378] Fix | Delete
[379] Fix | Delete
sock can optionally be specified in order to use a preexisting
[380] Fix | Delete
socket object.
[381] Fix | Delete
[382] Fix | Delete
backlog is the maximum number of queued connections passed to
[383] Fix | Delete
listen() (defaults to 100).
[384] Fix | Delete
[385] Fix | Delete
ssl can be set to an SSLContext to enable SSL over the
[386] Fix | Delete
accepted connections.
[387] Fix | Delete
"""
[388] Fix | Delete
raise NotImplementedError
[389] Fix | Delete
[390] Fix | Delete
def create_datagram_endpoint(self, protocol_factory,
[391] Fix | Delete
local_addr=None, remote_addr=None, *,
[392] Fix | Delete
family=0, proto=0, flags=0,
[393] Fix | Delete
reuse_address=None, reuse_port=None,
[394] Fix | Delete
allow_broadcast=None, sock=None):
[395] Fix | Delete
"""A coroutine which creates a datagram endpoint.
[396] Fix | Delete
[397] Fix | Delete
This method will try to establish the endpoint in the background.
[398] Fix | Delete
When successful, the coroutine returns a (transport, protocol) pair.
[399] Fix | Delete
[400] Fix | Delete
protocol_factory must be a callable returning a protocol instance.
[401] Fix | Delete
[402] Fix | Delete
socket family AF_INET or socket.AF_INET6 depending on host (or
[403] Fix | Delete
family if specified), socket type SOCK_DGRAM.
[404] Fix | Delete
[405] Fix | Delete
reuse_address tells the kernel to reuse a local socket in
[406] Fix | Delete
TIME_WAIT state, without waiting for its natural timeout to
[407] Fix | Delete
expire. If not specified it will automatically be set to True on
[408] Fix | Delete
UNIX.
[409] Fix | Delete
[410] Fix | Delete
reuse_port tells the kernel to allow this endpoint to be bound to
[411] Fix | Delete
the same port as other existing endpoints are bound to, so long as
[412] Fix | Delete
they all set this flag when being created. This option is not
[413] Fix | Delete
supported on Windows and some UNIX's. If the
[414] Fix | Delete
:py:data:`~socket.SO_REUSEPORT` constant is not defined then this
[415] Fix | Delete
capability is unsupported.
[416] Fix | Delete
[417] Fix | Delete
allow_broadcast tells the kernel to allow this endpoint to send
[418] Fix | Delete
messages to the broadcast address.
[419] Fix | Delete
[420] Fix | Delete
sock can optionally be specified in order to use a preexisting
[421] Fix | Delete
socket object.
[422] Fix | Delete
"""
[423] Fix | Delete
raise NotImplementedError
[424] Fix | Delete
[425] Fix | Delete
# Pipes and subprocesses.
[426] Fix | Delete
[427] Fix | Delete
def connect_read_pipe(self, protocol_factory, pipe):
[428] Fix | Delete
"""Register read pipe in event loop. Set the pipe to non-blocking mode.
[429] Fix | Delete
[430] Fix | Delete
protocol_factory should instantiate object with Protocol interface.
[431] Fix | Delete
pipe is a file-like object.
[432] Fix | Delete
Return pair (transport, protocol), where transport supports the
[433] Fix | Delete
ReadTransport interface."""
[434] Fix | Delete
# The reason to accept file-like object instead of just file descriptor
[435] Fix | Delete
# is: we need to own pipe and close it at transport finishing
[436] Fix | Delete
# Can got complicated errors if pass f.fileno(),
[437] Fix | Delete
# close fd in pipe transport then close f and vise versa.
[438] Fix | Delete
raise NotImplementedError
[439] Fix | Delete
[440] Fix | Delete
def connect_write_pipe(self, protocol_factory, pipe):
[441] Fix | Delete
"""Register write pipe in event loop.
[442] Fix | Delete
[443] Fix | Delete
protocol_factory should instantiate object with BaseProtocol interface.
[444] Fix | Delete
Pipe is file-like object already switched to nonblocking.
[445] Fix | Delete
Return pair (transport, protocol), where transport support
[446] Fix | Delete
WriteTransport interface."""
[447] Fix | Delete
# The reason to accept file-like object instead of just file descriptor
[448] Fix | Delete
# is: we need to own pipe and close it at transport finishing
[449] Fix | Delete
# Can got complicated errors if pass f.fileno(),
[450] Fix | Delete
# close fd in pipe transport then close f and vise versa.
[451] Fix | Delete
raise NotImplementedError
[452] Fix | Delete
[453] Fix | Delete
def subprocess_shell(self, protocol_factory, cmd, *, stdin=subprocess.PIPE,
[454] Fix | Delete
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
[455] Fix | Delete
**kwargs):
[456] Fix | Delete
raise NotImplementedError
[457] Fix | Delete
[458] Fix | Delete
def subprocess_exec(self, protocol_factory, *args, stdin=subprocess.PIPE,
[459] Fix | Delete
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
[460] Fix | Delete
**kwargs):
[461] Fix | Delete
raise NotImplementedError
[462] Fix | Delete
[463] Fix | Delete
# Ready-based callback registration methods.
[464] Fix | Delete
# The add_*() methods return None.
[465] Fix | Delete
# The remove_*() methods return True if something was removed,
[466] Fix | Delete
# False if there was nothing to delete.
[467] Fix | Delete
[468] Fix | Delete
def add_reader(self, fd, callback, *args):
[469] Fix | Delete
raise NotImplementedError
[470] Fix | Delete
[471] Fix | Delete
def remove_reader(self, fd):
[472] Fix | Delete
raise NotImplementedError
[473] Fix | Delete
[474] Fix | Delete
def add_writer(self, fd, callback, *args):
[475] Fix | Delete
raise NotImplementedError
[476] Fix | Delete
[477] Fix | Delete
def remove_writer(self, fd):
[478] Fix | Delete
raise NotImplementedError
[479] Fix | Delete
[480] Fix | Delete
# Completion based I/O methods returning Futures.
[481] Fix | Delete
[482] Fix | Delete
def sock_recv(self, sock, nbytes):
[483] Fix | Delete
raise NotImplementedError
[484] Fix | Delete
[485] Fix | Delete
def sock_sendall(self, sock, data):
[486] Fix | Delete
raise NotImplementedError
[487] Fix | Delete
[488] Fix | Delete
def sock_connect(self, sock, address):
[489] Fix | Delete
raise NotImplementedError
[490] Fix | Delete
[491] Fix | Delete
def sock_accept(self, sock):
[492] Fix | Delete
raise NotImplementedError
[493] Fix | Delete
[494] Fix | Delete
# Signal handling.
[495] Fix | Delete
[496] Fix | Delete
def add_signal_handler(self, sig, callback, *args):
[497] Fix | Delete
raise NotImplementedError
[498] Fix | Delete
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function