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
7522ef40
Kaydet (Commit)
7522ef40
authored
Ara 08, 2016
tarafından
Xavier de Gaye
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #26939: Add the support.setswitchinterval() function to fix
test_functools hanging on the Android armv7 qemu emulator.
üst
0d5742de
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
1 deletion
+23
-1
__init__.py
Lib/test/support/__init__.py
+16
-0
test_functools.py
Lib/test/test_functools.py
+1
-1
NEWS
Misc/NEWS
+6
-0
No files found.
Lib/test/support/__init__.py
Dosyayı görüntüle @
7522ef40
...
@@ -93,6 +93,7 @@ __all__ = [
...
@@ -93,6 +93,7 @@ __all__ = [
"check__all__"
,
"requires_android_level"
,
"requires_multiprocessing_queue"
,
"check__all__"
,
"requires_android_level"
,
"requires_multiprocessing_queue"
,
# sys
# sys
"is_jython"
,
"is_android"
,
"check_impl_detail"
,
"unix_shell"
,
"is_jython"
,
"is_android"
,
"check_impl_detail"
,
"unix_shell"
,
"setswitchinterval"
,
# network
# network
"HOST"
,
"IPV6_ENABLED"
,
"find_unused_port"
,
"bind_port"
,
"open_urlresource"
,
"HOST"
,
"IPV6_ENABLED"
,
"find_unused_port"
,
"bind_port"
,
"open_urlresource"
,
# processes
# processes
...
@@ -2547,3 +2548,18 @@ def missing_compiler_executable(cmd_names=[]):
...
@@ -2547,3 +2548,18 @@ def missing_compiler_executable(cmd_names=[]):
continue
continue
if
spawn
.
find_executable
(
cmd
[
0
])
is
None
:
if
spawn
.
find_executable
(
cmd
[
0
])
is
None
:
return
cmd
[
0
]
return
cmd
[
0
]
_is_android_emulator
=
None
def
setswitchinterval
(
interval
):
# Setting a very low gil interval on the Android emulator causes python
# to hang (issue #26939).
minimum_interval
=
1e-5
if
is_android
and
interval
<
minimum_interval
:
global
_is_android_emulator
if
_is_android_emulator
is
None
:
_is_android_emulator
=
(
subprocess
.
check_output
(
[
'getprop'
,
'ro.kernel.qemu'
])
.
strip
()
==
b
'1'
)
if
_is_android_emulator
:
interval
=
minimum_interval
return
sys
.
setswitchinterval
(
interval
)
Lib/test/test_functools.py
Dosyayı görüntüle @
7522ef40
...
@@ -1322,7 +1322,7 @@ class TestLRU:
...
@@ -1322,7 +1322,7 @@ class TestLRU:
f
.
cache_clear
()
f
.
cache_clear
()
orig_si
=
sys
.
getswitchinterval
()
orig_si
=
sys
.
getswitchinterval
()
s
ys
.
setswitchinterval
(
1e-6
)
s
upport
.
setswitchinterval
(
1e-6
)
try
:
try
:
# create n threads in order to fill cache
# create n threads in order to fill cache
threads
=
[
threading
.
Thread
(
target
=
full
,
args
=
[
k
])
threads
=
[
threading
.
Thread
(
target
=
full
,
args
=
[
k
])
...
...
Misc/NEWS
Dosyayı görüntüle @
7522ef40
...
@@ -22,6 +22,12 @@ Library
...
@@ -22,6 +22,12 @@ Library
- Issue #28847: dbm.dumb now supports reading read-only files and no longer
- Issue #28847: dbm.dumb now supports reading read-only files and no longer
writes the index file when it is not changed.
writes the index file when it is not changed.
Tests
-----
- Issue #26939: Add the support.setswitchinterval() function to fix
test_functools hanging on the Android armv7 qemu emulator.
What'
s
New
in
Python
3.6.0
release
candidate
1
What'
s
New
in
Python
3.6.0
release
candidate
1
==============================================
==============================================
...
...
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