Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
dec1a45f
Kaydet (Commit)
dec1a45f
authored
Şub 19, 2014
tarafından
Yury Selivanov
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
asyncio: Fix spelling and typos.
Thanks to Vajrasky Kok for discovering some of them.
üst
74d519fc
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
18 additions
and
19 deletions
+18
-19
events.py
Lib/asyncio/events.py
+3
-3
protocols.py
Lib/asyncio/protocols.py
+1
-1
selector_events.py
Lib/asyncio/selector_events.py
+1
-1
tasks.py
Lib/asyncio/tasks.py
+1
-1
test_utils.py
Lib/asyncio/test_utils.py
+2
-2
unix_events.py
Lib/asyncio/unix_events.py
+2
-2
windows_events.py
Lib/asyncio/windows_events.py
+1
-1
selectors.py
Lib/selectors.py
+1
-1
test_base_events.py
Lib/test/test_asyncio/test_base_events.py
+1
-1
test_events.py
Lib/test/test_asyncio/test_events.py
+0
-1
test_futures.py
Lib/test/test_asyncio/test_futures.py
+1
-1
test_streams.py
Lib/test/test_asyncio/test_streams.py
+1
-1
test_unix_events.py
Lib/test/test_asyncio/test_unix_events.py
+3
-3
No files found.
Lib/asyncio/events.py
Dosyayı görüntüle @
dec1a45f
...
...
@@ -235,7 +235,7 @@ class AbstractEventLoop:
sock
=
None
,
backlog
=
100
,
ssl
=
None
):
"""A coroutine which creates a UNIX Domain Socket server.
The return valu
d
is a Server object, which can be used to stop
The return valu
e
is a Server object, which can be used to stop
the service.
path is a str, representing a file systsem path to bind the
...
...
@@ -260,7 +260,7 @@ class AbstractEventLoop:
# Pipes and subprocesses.
def
connect_read_pipe
(
self
,
protocol_factory
,
pipe
):
"""Register read pipe in eventloop.
"""Register read pipe in event
loop.
protocol_factory should instantiate object with Protocol interface.
pipe is file-like object already switched to nonblocking.
...
...
@@ -273,7 +273,7 @@ class AbstractEventLoop:
raise
NotImplementedError
def
connect_write_pipe
(
self
,
protocol_factory
,
pipe
):
"""Register write pipe in eventloop.
"""Register write pipe in event
loop.
protocol_factory should instantiate object with BaseProtocol interface.
Pipe is file-like object already switched to nonblocking.
...
...
Lib/asyncio/protocols.py
Dosyayı görüntüle @
dec1a45f
...
...
@@ -114,7 +114,7 @@ class SubprocessProtocol(BaseProtocol):
def
pipe_data_received
(
self
,
fd
,
data
):
"""Called when the subprocess writes data into stdout/stderr pipe.
fd is int file d
a
scriptor.
fd is int file d
e
scriptor.
data is bytes object.
"""
...
...
Lib/asyncio/selector_events.py
Dosyayı görüntüle @
dec1a45f
...
...
@@ -213,7 +213,7 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop):
def
_sock_recv
(
self
,
fut
,
registered
,
sock
,
n
):
# _sock_recv() can add itself as an I/O callback if the operation can't
# be done immediatly. Don't use it directly, call sock_recv().
# be done immediat
e
ly. Don't use it directly, call sock_recv().
fd
=
sock
.
fileno
()
if
registered
:
# Remove the callback early. It should be rare that the
...
...
Lib/asyncio/tasks.py
Dosyayı görüntüle @
dec1a45f
...
...
@@ -181,7 +181,7 @@ class Task(futures.Future):
The frames are always ordered from oldest to newest.
The optional limit gives the maximum num
m
ber of frames to
The optional limit gives the maximum number of frames to
return; by default all available frames are returned. Its
meaning differs depending on whether a stack or a traceback is
returned: the newest frames of a stack are returned, but the
...
...
Lib/asyncio/test_utils.py
Dosyayı görüntüle @
dec1a45f
...
...
@@ -259,7 +259,7 @@ class TestLoop(base_events.BaseEventLoop):
when = yield ...
... = yield time_advance
Value retuned by yield is absolute time of next scheduled handler.
Value retu
r
ned by yield is absolute time of next scheduled handler.
Value passed to yield is time advance to move loop's time forward.
"""
...
...
@@ -369,7 +369,7 @@ class MockPattern(str):
"""A regex based str with a fuzzy __eq__.
Use this helper with 'mock.assert_called_with', or anywhere
where a regex
p
comparison between strings is needed.
where a regex comparison between strings is needed.
For instance:
mock_call.assert_called_with(MockPattern('spam.*ham'))
...
...
Lib/asyncio/unix_events.py
Dosyayı görüntüle @
dec1a45f
"""Selector eventloop for Unix with signal handling."""
"""Selector event
loop for Unix with signal handling."""
import
errno
import
fcntl
...
...
@@ -244,7 +244,7 @@ def _set_nonblocking(fd):
class
_UnixReadPipeTransport
(
transports
.
ReadTransport
):
max_size
=
256
*
1024
# max bytes we read in one eventloop iteration
max_size
=
256
*
1024
# max bytes we read in one event
loop iteration
def
__init__
(
self
,
loop
,
pipe
,
protocol
,
waiter
=
None
,
extra
=
None
):
super
()
.
__init__
(
extra
)
...
...
Lib/asyncio/windows_events.py
Dosyayı görüntüle @
dec1a45f
"""Selector and proactor eventloops for Windows."""
"""Selector and proactor event
loops for Windows."""
import
_winapi
import
errno
...
...
Lib/selectors.py
Dosyayı görüntüle @
dec1a45f
...
...
@@ -80,7 +80,7 @@ class BaseSelector(metaclass=ABCMeta):
A selector can use various implementations (select(), poll(), epoll()...)
depending on the platform. The default `Selector` class uses the most
performa
nt implementation on the current platform.
efficie
nt implementation on the current platform.
"""
@abstractmethod
...
...
Lib/test/test_asyncio/test_base_events.py
Dosyayı görüntüle @
dec1a45f
...
...
@@ -277,7 +277,7 @@ class BaseEventLoopTests(unittest.TestCase):
asyncio
.
SubprocessProtocol
,
*
args
,
bufsize
=
4096
)
def
test_subprocess_shell_invalid_args
(
self
):
# ex
e
pected a string, not an int or a list
# expected a string, not an int or a list
self
.
assertRaises
(
TypeError
,
self
.
loop
.
run_until_complete
,
self
.
loop
.
subprocess_shell
,
asyncio
.
SubprocessProtocol
,
123
)
...
...
Lib/test/test_asyncio/test_events.py
Dosyayı görüntüle @
dec1a45f
...
...
@@ -503,7 +503,6 @@ class EventLoopTestsMixin:
tr
,
pr
=
self
.
loop
.
run_until_complete
(
connection_fut
)
self
.
assertIsInstance
(
tr
,
asyncio
.
Transport
)
self
.
assertIsInstance
(
pr
,
asyncio
.
Protocol
)
self
.
assertIsNotNone
(
tr
.
get_extra_info
(
'sockname'
))
self
.
loop
.
run_until_complete
(
pr
.
done
)
self
.
assertGreater
(
pr
.
nbytes
,
0
)
tr
.
close
()
...
...
Lib/test/test_asyncio/test_futures.py
Dosyayı görüntüle @
dec1a45f
...
...
@@ -38,7 +38,7 @@ class FutureTests(unittest.TestCase):
asyncio
.
set_event_loop
(
None
)
def
test_constructor_positional
(
self
):
# Make sure Future does't accept a positional argument
# Make sure Future does
n
't accept a positional argument
self
.
assertRaises
(
TypeError
,
asyncio
.
Future
,
42
)
def
test_cancel
(
self
):
...
...
Lib/test/test_asyncio/test_streams.py
Dosyayı görüntüle @
dec1a45f
...
...
@@ -239,7 +239,7 @@ class StreamReaderTests(unittest.TestCase):
# No b'\n' at the end. The 'limit' is set to 3. So before
# waiting for the new data in buffer, 'readline' will consume
# the entire buffer, and since the length of the consumed data
# is more than 3, it will raise a Valu
d
Error. The buffer is
# is more than 3, it will raise a Valu
e
Error. The buffer is
# expected to be empty now.
self
.
assertEqual
(
b
''
,
stream
.
_buffer
)
...
...
Lib/test/test_asyncio/test_unix_events.py
Dosyayı görüntüle @
dec1a45f
...
...
@@ -965,7 +965,7 @@ class ChildWatcherTestsMixin:
self
.
assertFalse
(
m
.
WEXITSTATUS
.
called
)
self
.
assertFalse
(
m
.
WTERMSIG
.
called
)
# childen are running
# child
r
en are running
self
.
watcher
.
_sig_chld
()
self
.
assertFalse
(
callback1
.
called
)
...
...
@@ -1069,7 +1069,7 @@ class ChildWatcherTestsMixin:
self
.
assertFalse
(
m
.
WEXITSTATUS
.
called
)
self
.
assertFalse
(
m
.
WTERMSIG
.
called
)
# childen are running
# child
r
en are running
self
.
watcher
.
_sig_chld
()
self
.
assertFalse
(
callback1
.
called
)
...
...
@@ -1425,7 +1425,7 @@ class ChildWatcherTestsMixin:
self
.
add_zombie
(
61
,
11
)
self
.
add_zombie
(
62
,
-
5
)
# SIGCHLD was not ca
tched
# SIGCHLD was not ca
ught
self
.
assertFalse
(
callback1
.
called
)
self
.
assertFalse
(
callback2
.
called
)
self
.
assertFalse
(
callback3
.
called
)
...
...
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