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
ebca392a
Kaydet (Commit)
ebca392a
authored
Eki 26, 2013
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
(Merge 3.3) Close #19339: telnetlib module is now using time.monotonic() when
available to compute timeout.
üst
0ddaed34
2ff68dd5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
telnetlib.py
Lib/telnetlib.py
+8
-6
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/telnetlib.py
Dosyayı görüntüle @
ebca392a
...
...
@@ -36,6 +36,10 @@ To do:
import
sys
import
socket
import
selectors
try
:
from
time
import
monotonic
as
_time
except
ImportError
:
from
time
import
time
as
_time
__all__
=
[
"Telnet"
]
...
...
@@ -304,8 +308,7 @@ class Telnet:
self
.
cookedq
=
self
.
cookedq
[
i
:]
return
buf
if
timeout
is
not
None
:
from
time
import
time
deadline
=
time
()
+
timeout
deadline
=
_time
()
+
timeout
with
_TelnetSelector
()
as
selector
:
selector
.
register
(
self
,
selectors
.
EVENT_READ
)
while
not
self
.
eof
:
...
...
@@ -320,7 +323,7 @@ class Telnet:
self
.
cookedq
=
self
.
cookedq
[
i
:]
return
buf
if
timeout
is
not
None
:
timeout
=
deadline
-
time
()
timeout
=
deadline
-
_
time
()
if
timeout
<
0
:
break
return
self
.
read_very_lazy
()
...
...
@@ -610,8 +613,7 @@ class Telnet:
if
not
re
:
import
re
list
[
i
]
=
re
.
compile
(
list
[
i
])
if
timeout
is
not
None
:
from
time
import
time
deadline
=
time
()
+
timeout
deadline
=
_time
()
+
timeout
with
_TelnetSelector
()
as
selector
:
selector
.
register
(
self
,
selectors
.
EVENT_READ
)
while
not
self
.
eof
:
...
...
@@ -625,7 +627,7 @@ class Telnet:
return
(
i
,
m
,
text
)
if
timeout
is
not
None
:
ready
=
selector
.
select
(
timeout
)
timeout
=
deadline
-
time
()
timeout
=
deadline
-
_
time
()
if
not
ready
:
if
timeout
<
0
:
break
...
...
Misc/NEWS
Dosyayı görüntüle @
ebca392a
...
...
@@ -27,6 +27,9 @@ Core and Builtins
Library
-------
- Issue #19339: telnetlib module is now using time.monotonic() when available
to compute timeout.
- Issue #19399: fix sporadic test_subprocess failure.
- Issue #13234: Fix os.listdir to work with extended paths on Windows.
...
...
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