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
e1d30f24
Kaydet (Commit)
e1d30f24
authored
Nis 28, 2013
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
merge for issue #17358
üst
d4c1b36c
5a4c233a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
imp.py
Lib/imp.py
+12
-2
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/imp.py
Dosyayı görüntüle @
e1d30f24
...
@@ -111,7 +111,12 @@ def load_source(name, pathname, file=None):
...
@@ -111,7 +111,12 @@ def load_source(name, pathname, file=None):
'importlib.machinery.SourceFileLoader(name, pathname).load_module()'
'importlib.machinery.SourceFileLoader(name, pathname).load_module()'
' instead'
)
' instead'
)
warnings
.
warn
(
msg
,
DeprecationWarning
,
2
)
warnings
.
warn
(
msg
,
DeprecationWarning
,
2
)
return
_LoadSourceCompatibility
(
name
,
pathname
,
file
)
.
load_module
(
name
)
_LoadSourceCompatibility
(
name
,
pathname
,
file
)
.
load_module
(
name
)
module
=
sys
.
modules
[
name
]
# To allow reloading to potentially work, use a non-hacked loader which
# won't rely on a now-closed file object.
module
.
__loader__
=
_bootstrap
.
SourceFileLoader
(
name
,
pathname
)
return
module
class
_LoadCompiledCompatibility
(
_HackedGetData
,
class
_LoadCompiledCompatibility
(
_HackedGetData
,
...
@@ -125,7 +130,12 @@ def load_compiled(name, pathname, file=None):
...
@@ -125,7 +130,12 @@ def load_compiled(name, pathname, file=None):
'importlib.machinery.SourcelessFileLoader(name, pathname).'
'importlib.machinery.SourcelessFileLoader(name, pathname).'
'load_module() instead '
)
'load_module() instead '
)
warnings
.
warn
(
msg
,
DeprecationWarning
,
2
)
warnings
.
warn
(
msg
,
DeprecationWarning
,
2
)
return
_LoadCompiledCompatibility
(
name
,
pathname
,
file
)
.
load_module
(
name
)
_LoadCompiledCompatibility
(
name
,
pathname
,
file
)
.
load_module
(
name
)
module
=
sys
.
modules
[
name
]
# To allow reloading to potentially work, use a non-hacked loader which
# won't rely on a now-closed file object.
module
.
__loader__
=
_bootstrap
.
SourcelessFileLoader
(
name
,
pathname
)
return
module
def
load_package
(
name
,
path
):
def
load_package
(
name
,
path
):
...
...
Misc/NEWS
Dosyayı görüntüle @
e1d30f24
...
@@ -52,6 +52,9 @@ Core and Builtins
...
@@ -52,6 +52,9 @@ Core and Builtins
Library
Library
-------
-------
- Issue #17358: Modules loaded by imp.load_source() and load_compiled() (and by
extention load_module()) now have a better chance of working when reloaded.
- Issue #17804: New function ``struct.iter_unpack`` allows for streaming
- Issue #17804: New function ``struct.iter_unpack`` allows for streaming
struct unpacking.
struct unpacking.
...
...
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