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
ff70fc22
Kaydet (Commit)
ff70fc22
authored
Eyl 10, 2016
tarafından
Steve Dower
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Issue #25758: Prevents zipimport from unnecessarily encoding a filename (patch by Eryk Sun)
üst
13192361
8dcc48ee
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 @
ff70fc22
...
...
@@ -615,7 +615,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 @
ff70fc22
...
...
@@ -10,6 +10,9 @@ What's New in Python 3.6.0 beta 1
Core and Builtins
-----------------
- Issue #25758: Prevents zipimport from unnecessarily encoding a filename
(patch by Eryk Sun)
- Issue #25856: The __module__ attribute of extension classes and functions
now is interned. This leads to more compact pickle data with protocol 4.
...
...
Modules/zipimport.c
Dosyayı görüntüle @
ff70fc22
...
...
@@ -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