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
daf4daa2
Kaydet (Commit)
daf4daa2
authored
Nis 01, 2013
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
merge
üst
2d556f56
f8ffec06
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
_bootstrap.py
Lib/importlib/_bootstrap.py
+8
-5
NEWS
Misc/NEWS
+3
-0
importlib.h
Python/importlib.h
+0
-0
No files found.
Lib/importlib/_bootstrap.py
Dosyayı görüntüle @
daf4daa2
...
@@ -474,9 +474,9 @@ def _get_sourcefile(bytecode_path):
...
@@ -474,9 +474,9 @@ def _get_sourcefile(bytecode_path):
return
source_path
if
_path_isfile
(
source_stats
)
else
bytecode_path
return
source_path
if
_path_isfile
(
source_stats
)
else
bytecode_path
def
_verbose_message
(
message
,
*
args
):
def
_verbose_message
(
message
,
*
args
,
verbosity
=
1
):
"""Print the message to stderr if -v/PYTHONVERBOSE is turned on."""
"""Print the message to stderr if -v/PYTHONVERBOSE is turned on."""
if
sys
.
flags
.
verbose
:
if
sys
.
flags
.
verbose
>=
verbosity
:
if
not
message
.
startswith
((
'#'
,
'import '
)):
if
not
message
.
startswith
((
'#'
,
'import '
)):
message
=
'# '
+
message
message
=
'# '
+
message
print
(
message
.
format
(
*
args
),
file
=
sys
.
stderr
)
print
(
message
.
format
(
*
args
),
file
=
sys
.
stderr
)
...
@@ -637,8 +637,9 @@ def _validate_bytecode_header(data, source_stats=None, name=None, path=None):
...
@@ -637,8 +637,9 @@ def _validate_bytecode_header(data, source_stats=None, name=None, path=None):
raw_timestamp
=
data
[
4
:
8
]
raw_timestamp
=
data
[
4
:
8
]
raw_size
=
data
[
8
:
12
]
raw_size
=
data
[
8
:
12
]
if
magic
!=
_MAGIC_BYTES
:
if
magic
!=
_MAGIC_BYTES
:
msg
=
'bad magic number in {!r}: {!r}'
.
format
(
name
,
magic
)
message
=
'bad magic number in {!r}: {!r}'
.
format
(
name
,
magic
)
raise
ImportError
(
msg
,
**
exc_details
)
_verbose_message
(
message
)
raise
ImportError
(
message
,
**
exc_details
)
elif
len
(
raw_timestamp
)
!=
4
:
elif
len
(
raw_timestamp
)
!=
4
:
message
=
'incomplete timestamp in {!r}'
.
format
(
name
)
message
=
'incomplete timestamp in {!r}'
.
format
(
name
)
_verbose_message
(
message
)
_verbose_message
(
message
)
...
@@ -1390,11 +1391,13 @@ class FileFinder:
...
@@ -1390,11 +1391,13 @@ class FileFinder:
is_namespace
=
True
is_namespace
=
True
# Check for a file w/ a proper suffix exists.
# Check for a file w/ a proper suffix exists.
for
suffix
,
loader
in
self
.
_loaders
:
for
suffix
,
loader
in
self
.
_loaders
:
full_path
=
_path_join
(
self
.
path
,
tail_module
+
suffix
)
_verbose_message
(
'trying {}'
.
format
(
full_path
),
verbosity
=
2
)
if
cache_module
+
suffix
in
cache
:
if
cache_module
+
suffix
in
cache
:
full_path
=
_path_join
(
self
.
path
,
tail_module
+
suffix
)
if
_path_isfile
(
full_path
):
if
_path_isfile
(
full_path
):
return
(
loader
(
fullname
,
full_path
),
[])
return
(
loader
(
fullname
,
full_path
),
[])
if
is_namespace
:
if
is_namespace
:
_verbose_message
(
'possible namespace for {}'
.
format
(
base_path
))
return
(
None
,
[
base_path
])
return
(
None
,
[
base_path
])
return
(
None
,
[])
return
(
None
,
[])
...
...
Misc/NEWS
Dosyayı görüntüle @
daf4daa2
...
@@ -10,6 +10,9 @@ What's New in Python 3.4.0 Alpha 1?
...
@@ -10,6 +10,9 @@ What's New in Python 3.4.0 Alpha 1?
Core and Builtins
Core and Builtins
-----------------
-----------------
- Issue #17357: Add missing verbosity messages for -v/-vv that were lost during
the importlib transition.
- Issue #17323: The "[X refs, Y blocks]" printed by debug builds has been
- Issue #17323: The "[X refs, Y blocks]" printed by debug builds has been
disabled by default. It can be re-enabled with the `-X showrefcount` option.
disabled by default. It can be re-enabled with the `-X showrefcount` option.
...
...
Python/importlib.h
Dosyayı görüntüle @
daf4daa2
This diff is collapsed.
Click to expand it.
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