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
290d31e2
Kaydet (Commit)
290d31e2
authored
Mar 03, 2002
tarafından
Neal Norwitz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
SF #506611, fix sys.setprofile(), sys.settrace() core dumps
when no arguments are passed
üst
54e0eabc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
2 deletions
+12
-2
test_profilehooks.py
Lib/test/test_profilehooks.py
+6
-0
test_scope.py
Lib/test/test_scope.py
+4
-0
sysmodule.c
Python/sysmodule.c
+2
-2
No files found.
Lib/test/test_profilehooks.py
Dosyayı görüntüle @
290d31e2
from
__future__
import
generators
from
__future__
import
generators
from
test_support
import
TestFailed
import
pprint
import
pprint
import
sys
import
sys
import
unittest
import
unittest
...
@@ -329,6 +331,10 @@ protect_ident = ident(protect)
...
@@ -329,6 +331,10 @@ protect_ident = ident(protect)
def
capture_events
(
callable
,
p
=
None
):
def
capture_events
(
callable
,
p
=
None
):
try
:
sys
.
setprofile
()
except
TypeError
:
pass
else
:
raise
TestFailed
,
'sys.setprofile() did not raise TypeError'
if
p
is
None
:
if
p
is
None
:
p
=
HookWatcher
()
p
=
HookWatcher
()
sys
.
setprofile
(
p
.
callback
)
sys
.
setprofile
(
p
.
callback
)
...
...
Lib/test/test_scope.py
Dosyayı görüntüle @
290d31e2
...
@@ -471,6 +471,10 @@ sys.settrace(tracer)
...
@@ -471,6 +471,10 @@ sys.settrace(tracer)
adaptgetter
(
"foo"
,
TestClass
,
(
1
,
""
))
adaptgetter
(
"foo"
,
TestClass
,
(
1
,
""
))
sys
.
settrace
(
None
)
sys
.
settrace
(
None
)
try
:
sys
.
settrace
()
except
TypeError
:
pass
else
:
raise
TestFailed
,
'sys.settrace() did not raise TypeError'
print
"20. eval and exec with free variables"
print
"20. eval and exec with free variables"
def
f
(
x
):
def
f
(
x
):
...
...
Python/sysmodule.c
Dosyayı görüntüle @
290d31e2
...
@@ -564,10 +564,10 @@ static PyMethodDef sys_methods[] = {
...
@@ -564,10 +564,10 @@ static PyMethodDef sys_methods[] = {
{
"setdlopenflags"
,
sys_setdlopenflags
,
METH_VARARGS
,
{
"setdlopenflags"
,
sys_setdlopenflags
,
METH_VARARGS
,
setdlopenflags_doc
},
setdlopenflags_doc
},
#endif
#endif
{
"setprofile"
,
sys_setprofile
,
METH_O
LDARGS
,
setprofile_doc
},
{
"setprofile"
,
sys_setprofile
,
METH_O
,
setprofile_doc
},
{
"setrecursionlimit"
,
sys_setrecursionlimit
,
METH_VARARGS
,
{
"setrecursionlimit"
,
sys_setrecursionlimit
,
METH_VARARGS
,
setrecursionlimit_doc
},
setrecursionlimit_doc
},
{
"settrace"
,
sys_settrace
,
METH_O
LDARGS
,
settrace_doc
},
{
"settrace"
,
sys_settrace
,
METH_O
,
settrace_doc
},
{
NULL
,
NULL
}
/* sentinel */
{
NULL
,
NULL
}
/* sentinel */
};
};
...
...
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