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
3066fc41
Kaydet (Commit)
3066fc41
authored
Eyl 29, 2015
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #25111: Fixed comparison of traceback.FrameSummary.
üst
525faaef
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
9 deletions
+21
-9
test_traceback.py
Lib/test/test_traceback.py
+11
-5
traceback.py
Lib/traceback.py
+8
-4
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/test/test_traceback.py
Dosyayı görüntüle @
3066fc41
...
...
@@ -640,7 +640,7 @@ class MiscTracebackCases(unittest.TestCase):
return
traceback
.
extract_stack
()
result
=
extract
()
lineno
=
extract
.
__code__
.
co_firstlineno
self
.
assertEqual
(
[
tuple
(
x
)
for
x
in
result
[
-
2
:]
],
[
self
.
assertEqual
(
result
[
-
2
:
],
[
(
__file__
,
lineno
+
2
,
'test_extract_stack'
,
'result = extract()'
),
(
__file__
,
lineno
+
1
,
'extract'
,
'return traceback.extract_stack()'
),
])
...
...
@@ -652,10 +652,16 @@ class TestFrame(unittest.TestCase):
linecache
.
clearcache
()
linecache
.
lazycache
(
"f"
,
globals
())
f
=
traceback
.
FrameSummary
(
"f"
,
1
,
"dummy"
)
self
.
assertEqual
(
(
"f"
,
1
,
"dummy"
,
'"""Test cases for traceback module"""'
),
tuple
(
f
))
self
.
assertEqual
(
None
,
f
.
locals
)
self
.
assertEqual
(
f
,
(
"f"
,
1
,
"dummy"
,
'"""Test cases for traceback module"""'
))
self
.
assertEqual
(
tuple
(
f
),
(
"f"
,
1
,
"dummy"
,
'"""Test cases for traceback module"""'
))
self
.
assertEqual
(
f
,
traceback
.
FrameSummary
(
"f"
,
1
,
"dummy"
))
self
.
assertEqual
(
f
,
tuple
(
f
))
# Since tuple.__eq__ doesn't support FrameSummary, the equality
# operator fallbacks to FrameSummary.__eq__.
self
.
assertEqual
(
tuple
(
f
),
f
)
self
.
assertIsNone
(
f
.
locals
)
def
test_lazy_lines
(
self
):
linecache
.
clearcache
()
...
...
Lib/traceback.py
Dosyayı görüntüle @
3066fc41
...
...
@@ -257,10 +257,14 @@ class FrameSummary:
dict
((
k
,
repr
(
v
))
for
k
,
v
in
locals
.
items
())
if
locals
else
None
def
__eq__
(
self
,
other
):
return
(
self
.
filename
==
other
.
filename
and
self
.
lineno
==
other
.
lineno
and
self
.
name
==
other
.
name
and
self
.
locals
==
other
.
locals
)
if
isinstance
(
other
,
FrameSummary
):
return
(
self
.
filename
==
other
.
filename
and
self
.
lineno
==
other
.
lineno
and
self
.
name
==
other
.
name
and
self
.
locals
==
other
.
locals
)
if
isinstance
(
other
,
tuple
):
return
(
self
.
filename
,
self
.
lineno
,
self
.
name
,
self
.
line
)
==
other
return
NotImplemented
def
__getitem__
(
self
,
pos
):
return
(
self
.
filename
,
self
.
lineno
,
self
.
name
,
self
.
line
)[
pos
]
...
...
Misc/NEWS
Dosyayı görüntüle @
3066fc41
...
...
@@ -21,6 +21,8 @@ Core and Builtins
Library
-------
- Issue #25111: Fixed comparison of traceback.FrameSummary.
- Issue #25262. Added support for BINBYTES8 opcode in Python implementation of
unpickler. Highest 32 bits of 64-bit size for BINUNICODE8 and BINBYTES8
opcodes no longer silently ignored on 32-bit platforms in C implementation.
...
...
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