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
88f7841b
Kaydet (Commit)
88f7841b
authored
Nis 25, 2011
tarafından
Jesus Cea
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Correctly merging #9319 into 3.3?
üst
762f8d1b
5db3e016
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
test_imp.py
Lib/test/test_imp.py
+4
-0
tokenizer.c
Parser/tokenizer.c
+13
-6
No files found.
Lib/test/test_imp.py
Dosyayı görüntüle @
88f7841b
...
...
@@ -176,6 +176,10 @@ class ImportTests(unittest.TestCase):
support
.
unlink
(
init_file_name
+
ext
)
support
.
rmtree
(
test_package_name
)
def
test_issue9319
(
self
):
self
.
assertRaises
(
SyntaxError
,
imp
.
find_module
,
"test/badsyntax_pep3120"
)
class
ReloadTests
(
unittest
.
TestCase
):
...
...
Parser/tokenizer.c
Dosyayı görüntüle @
88f7841b
...
...
@@ -585,12 +585,19 @@ decoding_fgets(char *s, int size, struct tok_state *tok)
if
(
badchar
)
{
/* Need to add 1 to the line number, since this line
has not been counted, yet. */
PyErr_Format
(
PyExc_SyntaxError
,
"Non-UTF-8 code starting with '
\\
x%.2x' "
"in file %U on line %i, "
"but no encoding declared; "
"see http://python.org/dev/peps/pep-0263/ for details"
,
badchar
,
tok
->
filename
,
tok
->
lineno
+
1
);
if
(
tok
->
filename
!=
NULL
)
filename
=
PyUnicode_DecodeFSDefault
(
tok
->
filename
);
else
filename
=
PyUnicode_FromString
(
"<file>"
);
if
(
filename
!=
NULL
)
{
PyErr_Format
(
PyExc_SyntaxError
,
"Non-UTF-8 code starting with '
\\
x%.2x' "
"in file %U on line %i, "
"but no encoding declared; "
"see http://python.org/dev/peps/pep-0263/ for details"
,
badchar
,
filename
,
tok
->
lineno
+
1
);
Py_DECREF
(
filename
);
}
return
error_ret
(
tok
);
}
#endif
...
...
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