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
c4464052
Kaydet (Commit)
c4464052
authored
Kas 21, 2014
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #19720: Suppressed context for some exceptions in importlib.
üst
b6e2556d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
__init__.py
Lib/importlib/__init__.py
+3
-2
_bootstrap.py
Lib/importlib/_bootstrap.py
+1
-1
util.py
Lib/importlib/util.py
+2
-2
No files found.
Lib/importlib/__init__.py
Dosyayı görüntüle @
c4464052
...
@@ -73,7 +73,7 @@ def find_loader(name, path=None):
...
@@ -73,7 +73,7 @@ def find_loader(name, path=None):
except
KeyError
:
except
KeyError
:
pass
pass
except
AttributeError
:
except
AttributeError
:
raise
ValueError
(
'{}.__loader__ is not set'
.
format
(
name
))
raise
ValueError
(
'{}.__loader__ is not set'
.
format
(
name
))
from
None
spec
=
_bootstrap
.
_find_spec
(
name
,
path
)
spec
=
_bootstrap
.
_find_spec
(
name
,
path
)
# We won't worry about malformed specs (missing attributes).
# We won't worry about malformed specs (missing attributes).
...
@@ -138,7 +138,8 @@ def reload(module):
...
@@ -138,7 +138,8 @@ def reload(module):
parent
=
sys
.
modules
[
parent_name
]
parent
=
sys
.
modules
[
parent_name
]
except
KeyError
:
except
KeyError
:
msg
=
"parent {!r} not in sys.modules"
msg
=
"parent {!r} not in sys.modules"
raise
ImportError
(
msg
.
format
(
parent_name
),
name
=
parent_name
)
raise
ImportError
(
msg
.
format
(
parent_name
),
name
=
parent_name
)
from
None
else
:
else
:
pkgpath
=
parent
.
__path__
pkgpath
=
parent
.
__path__
else
:
else
:
...
...
Lib/importlib/_bootstrap.py
Dosyayı görüntüle @
c4464052
...
@@ -2172,7 +2172,7 @@ def _find_and_load_unlocked(name, import_):
...
@@ -2172,7 +2172,7 @@ def _find_and_load_unlocked(name, import_):
path
=
parent_module
.
__path__
path
=
parent_module
.
__path__
except
AttributeError
:
except
AttributeError
:
msg
=
(
_ERR_MSG
+
'; {!r} is not a package'
)
.
format
(
name
,
parent
)
msg
=
(
_ERR_MSG
+
'; {!r} is not a package'
)
.
format
(
name
,
parent
)
raise
ImportError
(
msg
,
name
=
name
)
raise
ImportError
(
msg
,
name
=
name
)
from
None
spec
=
_find_spec
(
name
,
path
)
spec
=
_find_spec
(
name
,
path
)
if
spec
is
None
:
if
spec
is
None
:
raise
ImportError
(
_ERR_MSG
.
format
(
name
),
name
=
name
)
raise
ImportError
(
_ERR_MSG
.
format
(
name
),
name
=
name
)
...
...
Lib/importlib/util.py
Dosyayı görüntüle @
c4464052
...
@@ -56,7 +56,7 @@ def _find_spec_from_path(name, path=None):
...
@@ -56,7 +56,7 @@ def _find_spec_from_path(name, path=None):
try
:
try
:
spec
=
module
.
__spec__
spec
=
module
.
__spec__
except
AttributeError
:
except
AttributeError
:
raise
ValueError
(
'{}.__spec__ is not set'
.
format
(
name
))
raise
ValueError
(
'{}.__spec__ is not set'
.
format
(
name
))
from
None
else
:
else
:
if
spec
is
None
:
if
spec
is
None
:
raise
ValueError
(
'{}.__spec__ is None'
.
format
(
name
))
raise
ValueError
(
'{}.__spec__ is None'
.
format
(
name
))
...
@@ -96,7 +96,7 @@ def find_spec(name, package=None):
...
@@ -96,7 +96,7 @@ def find_spec(name, package=None):
try
:
try
:
spec
=
module
.
__spec__
spec
=
module
.
__spec__
except
AttributeError
:
except
AttributeError
:
raise
ValueError
(
'{}.__spec__ is not set'
.
format
(
name
))
raise
ValueError
(
'{}.__spec__ is not set'
.
format
(
name
))
from
None
else
:
else
:
if
spec
is
None
:
if
spec
is
None
:
raise
ValueError
(
'{}.__spec__ is None'
.
format
(
name
))
raise
ValueError
(
'{}.__spec__ is None'
.
format
(
name
))
...
...
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