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
503d6c5a
Kaydet (Commit)
503d6c5a
authored
Eki 24, 2010
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
remove broken code accounting an offset the size of the line #10186
üst
8451c4b6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
+9
-2
test_traceback.py
Lib/test/test_traceback.py
+6
-0
NEWS
Misc/NEWS
+3
-0
pythonrun.c
Python/pythonrun.c
+0
-2
No files found.
Lib/test/test_traceback.py
Dosyayı görüntüle @
503d6c5a
...
@@ -289,6 +289,12 @@ class BaseExceptionReportingTests:
...
@@ -289,6 +289,12 @@ class BaseExceptionReportingTests:
self
.
assertIn
(
'inner_raise() # Marker'
,
blocks
[
2
])
self
.
assertIn
(
'inner_raise() # Marker'
,
blocks
[
2
])
self
.
check_zero_div
(
blocks
[
2
])
self
.
check_zero_div
(
blocks
[
2
])
def
test_syntax_error_offset_at_eol
(
self
):
# See #10186.
def
e
():
raise
SyntaxError
(
''
,
(
''
,
0
,
5
,
'hello'
))
msg
=
self
.
get_report
(
e
)
.
splitlines
()
self
.
assertEqual
(
msg
[
-
2
],
" ^"
)
class
PyExcReportingTests
(
BaseExceptionReportingTests
,
unittest
.
TestCase
):
class
PyExcReportingTests
(
BaseExceptionReportingTests
,
unittest
.
TestCase
):
...
...
Misc/NEWS
Dosyayı görüntüle @
503d6c5a
...
@@ -10,6 +10,9 @@ What's New in Python 3.2 Beta 1?
...
@@ -10,6 +10,9 @@ What's New in Python 3.2 Beta 1?
Core and Builtins
Core and Builtins
-----------------
-----------------
- Issue #10186: Fix the SyntaxError caret when the offset is equal to the length
of the offending line.
- Issue #6011: sysconfig and distutils.sysconfig use the surrogateescape error
- Issue #6011: sysconfig and distutils.sysconfig use the surrogateescape error
handler to parse the Makefile file. Avoid a UnicodeDecodeError if the source
handler to parse the Makefile file. Avoid a UnicodeDecodeError if the source
code directory name contains a non-ASCII character and the locale encoding is
code directory name contains a non-ASCII character and the locale encoding is
...
...
Python/pythonrun.c
Dosyayı görüntüle @
503d6c5a
...
@@ -1344,8 +1344,6 @@ print_error_text(PyObject *f, int offset, const char *text)
...
@@ -1344,8 +1344,6 @@ print_error_text(PyObject *f, int offset, const char *text)
{
{
char
*
nl
;
char
*
nl
;
if
(
offset
>=
0
)
{
if
(
offset
>=
0
)
{
if
(
offset
>
0
&&
offset
==
(
int
)
strlen
(
text
))
offset
--
;
for
(;;)
{
for
(;;)
{
nl
=
strchr
(
text
,
'\n'
);
nl
=
strchr
(
text
,
'\n'
);
if
(
nl
==
NULL
||
nl
-
text
>=
offset
)
if
(
nl
==
NULL
||
nl
-
text
>=
offset
)
...
...
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