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
8dcc48ee
Kaydet (Commit)
8dcc48ee
authored
Eyl 10, 2016
tarafından
Steve Dower
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #25758: Prevents zipimport from unnecessarily encoding a filename (patch by Eryk Sun)
üst
347dc95c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
11 deletions
+8
-11
test_zipimport.py
Lib/test/test_zipimport.py
+1
-1
NEWS
Misc/NEWS
+3
-0
zipimport.c
Modules/zipimport.c
+4
-10
No files found.
Lib/test/test_zipimport.py
Dosyayı görüntüle @
8dcc48ee
...
...
@@ -596,7 +596,7 @@ class UncompressedZipImportTestCase(ImportHooksBaseTestCase):
z
.
writestr
(
zinfo
,
test_src
)
z
.
close
()
try
:
zipimport
.
zipimporter
(
filename
)
zipimport
.
zipimporter
(
filename
)
.
load_module
(
TESTMOD
)
finally
:
os
.
remove
(
filename
)
...
...
Misc/NEWS
Dosyayı görüntüle @
8dcc48ee
...
...
@@ -10,6 +10,9 @@ Release date: TBA
Core and Builtins
-----------------
- Issue #25758: Prevents zipimport from unnecessarily encoding a filename
(patch by Eryk Sun)
- Issue #27812: Properly clear out a generator'
s
frame
's backreference to the
generator to prevent crashes in frame.clear().
...
...
Modules/zipimport.c
Dosyayı görüntüle @
8dcc48ee
...
...
@@ -1362,22 +1362,16 @@ normalize_line_endings(PyObject *source)
static
PyObject
*
compile_source
(
PyObject
*
pathname
,
PyObject
*
source
)
{
PyObject
*
code
,
*
fixed_source
,
*
pathbytes
;
pathbytes
=
PyUnicode_EncodeFSDefault
(
pathname
);
if
(
pathbytes
==
NULL
)
return
NULL
;
PyObject
*
code
,
*
fixed_source
;
fixed_source
=
normalize_line_endings
(
source
);
if
(
fixed_source
==
NULL
)
{
Py_DECREF
(
pathbytes
);
return
NULL
;
}
code
=
Py_CompileString
(
PyBytes_AsString
(
fixed_source
),
PyBytes_AsString
(
pathbytes
),
Py_file_input
);
Py_DECREF
(
pathbytes
);
code
=
Py_CompileStringObject
(
PyBytes_AsString
(
fixed_source
),
pathname
,
Py_file_input
,
NULL
,
1
);
Py_DECREF
(
fixed_source
);
return
code
;
}
...
...
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