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
3265344a
Kaydet (Commit)
3265344a
authored
Şub 03, 2015
tarafından
Berker Peksag
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #23358: Add missing BaseServer entry to socketserver.__all__.
Patch by Martin Panter.
üst
c057c385
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
11 deletions
+16
-11
socketserver.py
Lib/socketserver.py
+4
-4
test_socketserver.py
Lib/test/test_socketserver.py
+12
-7
No files found.
Lib/socketserver.py
Dosyayı görüntüle @
3265344a
...
@@ -138,10 +138,10 @@ try:
...
@@ -138,10 +138,10 @@ try:
except
ImportError
:
except
ImportError
:
import
dummy_threading
as
threading
import
dummy_threading
as
threading
__all__
=
[
"
TCPServer"
,
"UDPServer"
,
"ForkingUDPServer"
,
"ForkingTC
PServer"
,
__all__
=
[
"
BaseServer"
,
"TCPServer"
,
"UDPServer"
,
"ForkingUD
PServer"
,
"
ThreadingUDPServer"
,
"ThreadingTCPServer"
,
"BaseRequestHandl
er"
,
"
ForkingTCPServer"
,
"ThreadingUDPServer"
,
"ThreadingTCPServ
er"
,
"
StreamRequestHandler"
,
"Datagr
amRequestHandler"
,
"
BaseRequestHandler"
,
"Stre
amRequestHandler"
,
"ThreadingMixIn"
,
"ForkingMixIn"
]
"
DatagramRequestHandler"
,
"
ThreadingMixIn"
,
"ForkingMixIn"
]
if
hasattr
(
socket
,
"AF_UNIX"
):
if
hasattr
(
socket
,
"AF_UNIX"
):
__all__
.
extend
([
"UnixStreamServer"
,
"UnixDatagramServer"
,
__all__
.
extend
([
"UnixStreamServer"
,
"UnixDatagramServer"
,
"ThreadingUnixStreamServer"
,
"ThreadingUnixStreamServer"
,
...
...
Lib/test/test_socketserver.py
Dosyayı görüntüle @
3265344a
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
Test suite for socketserver.
Test suite for socketserver.
"""
"""
import
_imp
as
imp
import
contextlib
import
contextlib
import
os
import
os
import
select
import
select
...
@@ -313,12 +312,18 @@ class SocketServerTest(unittest.TestCase):
...
@@ -313,12 +312,18 @@ class SocketServerTest(unittest.TestCase):
socketserver
.
StreamRequestHandler
)
socketserver
.
StreamRequestHandler
)
def
test_main
():
class
MiscTestCase
(
unittest
.
TestCase
):
if
imp
.
lock_held
():
# If the import lock is held, the threads will hang
def
test_all
(
self
):
raise
unittest
.
SkipTest
(
"can't run when import lock is held"
)
# objects defined in the module should be in __all__
expected
=
[]
for
name
in
dir
(
socketserver
):
if
not
name
.
startswith
(
'_'
):
mod_object
=
getattr
(
socketserver
,
name
)
if
getattr
(
mod_object
,
'__module__'
,
None
)
==
'socketserver'
:
expected
.
append
(
name
)
self
.
assertCountEqual
(
socketserver
.
__all__
,
expected
)
test
.
support
.
run_unittest
(
SocketServerTest
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
test_
main
()
unittest
.
main
()
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