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
b57a085c
Kaydet (Commit)
b57a085c
authored
Haz 15, 2013
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #17177: Stop using imp in zipfile
üst
9529fbfd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
test_zipfile.py
Lib/test/test_zipfile.py
+2
-2
zipfile.py
Lib/zipfile.py
+3
-3
No files found.
Lib/test/test_zipfile.py
Dosyayı görüntüle @
b57a085c
import
io
import
os
import
sys
import
imp
import
imp
ortlib.util
import
time
import
shutil
import
struct
...
...
@@ -869,7 +869,7 @@ class PyZipFileTests(unittest.TestCase):
if
os
.
altsep
is
not
None
:
path_split
.
extend
(
fn
.
split
(
os
.
altsep
))
if
'__pycache__'
in
path_split
:
fn
=
imp
.
source_from_cache
(
fn
)
fn
=
imp
ortlib
.
util
.
source_from_cache
(
fn
)
else
:
fn
=
fn
[:
-
1
]
...
...
Lib/zipfile.py
Dosyayı görüntüle @
b57a085c
...
...
@@ -6,7 +6,7 @@ XXX references to utf-8 need further investigation.
import
io
import
os
import
re
import
imp
import
imp
ortlib.util
import
sys
import
time
import
stat
...
...
@@ -1645,8 +1645,8 @@ class PyZipFile(ZipFile):
file_py
=
pathname
+
".py"
file_pyc
=
pathname
+
".pyc"
file_pyo
=
pathname
+
".pyo"
pycache_pyc
=
imp
.
cache_from_source
(
file_py
,
True
)
pycache_pyo
=
imp
.
cache_from_source
(
file_py
,
False
)
pycache_pyc
=
imp
ortlib
.
util
.
cache_from_source
(
file_py
,
True
)
pycache_pyo
=
imp
ortlib
.
util
.
cache_from_source
(
file_py
,
False
)
if
self
.
_optimize
==
-
1
:
# legacy mode: use whatever file is present
if
(
os
.
path
.
isfile
(
file_pyo
)
and
...
...
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