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
c3a51ecb
Kaydet (Commit)
c3a51ecb
authored
Ock 04, 2011
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #10819: SocketIO.name property returns -1 when its closed, instead of
raising a ValueError, to fix repr().
üst
8848c7a3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
socket.py
Lib/socket.py
+4
-1
test_socket.py
Lib/test/test_socket.py
+6
-0
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/socket.py
Dosyayı görüntüle @
c3a51ecb
...
...
@@ -307,7 +307,10 @@ class SocketIO(io.RawIOBase):
@property
def
name
(
self
):
return
self
.
fileno
()
if
not
self
.
closed
:
return
self
.
fileno
()
else
:
return
-
1
@property
def
mode
(
self
):
...
...
Lib/test/test_socket.py
Dosyayı görüntüle @
c3a51ecb
...
...
@@ -738,6 +738,12 @@ class GeneralModuleTests(unittest.TestCase):
f
=
None
support
.
gc_collect
()
def
test_name_closed_socketio
(
self
):
with
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
as
sock
:
fp
=
sock
.
makefile
(
"rb"
)
fp
.
close
()
self
.
assertEqual
(
repr
(
fp
),
"<_io.BufferedReader name=-1>"
)
@unittest.skipUnless
(
thread
,
'Threading required for this test.'
)
class
BasicTCPTest
(
SocketConnectedTest
):
...
...
Misc/NEWS
Dosyayı görüntüle @
c3a51ecb
...
...
@@ -30,6 +30,9 @@ Core and Builtins
Library
-------
- Issue #10819: SocketIO.name property returns -1 when its closed, instead of
raising a ValueError, to fix repr().
- Issue #8650: zlib.compress() and zlib.decompress() raise an OverflowError if
the input buffer length doesn't fit into an unsigned int (length bigger than
2^32-1 bytes).
...
...
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