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
27a1370a
Kaydet (Commit)
27a1370a
authored
May 03, 2010
tarafından
Vinay Sajip
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #8576: logging updated to remove usage of find_unused_port().
üst
c1f5c2f3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
config.py
Lib/logging/config.py
+2
-0
test_logging.py
Lib/test/test_logging.py
+5
-4
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/logging/config.py
Dosyayı görüntüle @
27a1370a
...
@@ -873,6 +873,8 @@ def listen(port=DEFAULT_LOGGING_CONFIG_PORT):
...
@@ -873,6 +873,8 @@ def listen(port=DEFAULT_LOGGING_CONFIG_PORT):
def
run
(
self
):
def
run
(
self
):
server
=
self
.
rcvr
(
port
=
self
.
port
,
handler
=
self
.
hdlr
,
server
=
self
.
rcvr
(
port
=
self
.
port
,
handler
=
self
.
hdlr
,
ready
=
self
.
ready
)
ready
=
self
.
ready
)
if
self
.
port
==
0
:
self
.
port
=
server
.
server_address
[
1
]
self
.
ready
.
set
()
self
.
ready
.
set
()
global
_listener
global
_listener
logging
.
_acquireLock
()
logging
.
_acquireLock
()
...
...
Lib/test/test_logging.py
Dosyayı görüntüle @
27a1370a
...
@@ -38,8 +38,7 @@ from SocketServer import ThreadingTCPServer, StreamRequestHandler
...
@@ -38,8 +38,7 @@ from SocketServer import ThreadingTCPServer, StreamRequestHandler
import
struct
import
struct
import
sys
import
sys
import
tempfile
import
tempfile
from
test.test_support
import
captured_stdout
,
run_with_locale
,
run_unittest
,
\
from
test.test_support
import
captured_stdout
,
run_with_locale
,
run_unittest
find_unused_port
import
textwrap
import
textwrap
import
unittest
import
unittest
import
warnings
import
warnings
...
@@ -1664,10 +1663,12 @@ class ConfigDictTest(BaseTest):
...
@@ -1664,10 +1663,12 @@ class ConfigDictTest(BaseTest):
@unittest.skipUnless
(
threading
,
'listen() needs threading to work'
)
@unittest.skipUnless
(
threading
,
'listen() needs threading to work'
)
def
setup_via_listener
(
self
,
text
):
def
setup_via_listener
(
self
,
text
):
port
=
find_unused_port
(
)
# Ask for a randomly assigned port (by using port 0
)
t
=
logging
.
config
.
listen
(
port
)
t
=
logging
.
config
.
listen
(
0
)
t
.
start
()
t
.
start
()
t
.
ready
.
wait
()
t
.
ready
.
wait
()
# Now get the port allocated
port
=
t
.
port
t
.
ready
.
clear
()
t
.
ready
.
clear
()
try
:
try
:
sock
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
sock
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
...
...
Misc/NEWS
Dosyayı görüntüle @
27a1370a
...
@@ -31,6 +31,8 @@ Core and Builtins
...
@@ -31,6 +31,8 @@ Core and Builtins
Library
Library
-------
-------
- Issue #8576: logging updated to remove usage of find_unused_port().
- Issue #4687: Fix accuracy of garbage collection runtimes displayed with
- Issue #4687: Fix accuracy of garbage collection runtimes displayed with
gc.DEBUG_STATS.
gc.DEBUG_STATS.
...
...
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