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
cb0ec7dc
Kaydet (Commit)
cb0ec7dc
authored
Agu 24, 2012
tarafından
Antoine Pitrou
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge
üst
cbf9d5f6
ba0a3edd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
9 deletions
+7
-9
_bootstrap.py
Lib/importlib/_bootstrap.py
+7
-9
importlib.h
Python/importlib.h
+0
-0
No files found.
Lib/importlib/_bootstrap.py
Dosyayı görüntüle @
cb0ec7dc
...
...
@@ -1042,9 +1042,13 @@ class SourceFileLoader(FileLoader, SourceLoader):
def
_cache_bytecode
(
self
,
source_path
,
bytecode_path
,
data
):
# Adapt between the two APIs
return
self
.
set_data
(
bytecode_path
,
data
,
source_path
=
source_path
)
try
:
mode
=
_os
.
stat
(
source_path
)
.
st_mode
except
OSError
:
mode
=
0
o666
return
self
.
set_data
(
bytecode_path
,
data
,
_mode
=
mode
)
def
set_data
(
self
,
path
,
data
,
*
,
source_path
=
None
):
def
set_data
(
self
,
path
,
data
,
*
,
_mode
=
0
o666
):
"""Write bytes data to a file."""
parent
,
filename
=
_path_split
(
path
)
path_parts
=
[]
...
...
@@ -1064,14 +1068,8 @@ class SourceFileLoader(FileLoader, SourceLoader):
# If can't get proper access, then just forget about writing
# the data.
return
mode
=
0
o666
if
source_path
is
not
None
:
try
:
mode
=
_os
.
stat
(
source_path
)
.
st_mode
except
OSError
:
pass
try
:
_write_atomic
(
path
,
data
,
mode
)
_write_atomic
(
path
,
data
,
_
mode
)
_verbose_message
(
'created {!r}'
,
path
)
except
(
PermissionError
,
FileExistsError
):
# Don't worry if you can't write bytecode or someone is writing
...
...
Python/importlib.h
Dosyayı görüntüle @
cb0ec7dc
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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