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
1b761140
Kaydet (Commit)
1b761140
authored
Nis 10, 2014
tarafından
Vinay Sajip
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #21172: isinstance check relaxed from dict to collections.Mapping.
üst
0654be18
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
__init__.py
Lib/logging/__init__.py
+9
-2
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/logging/__init__.py
Dosyayı görüntüle @
1b761140
...
...
@@ -23,7 +23,8 @@ Copyright (C) 2001-2014 Vinay Sajip. All Rights Reserved.
To use, simply 'import logging' and log away!
"""
import
sys
,
os
,
time
,
io
,
traceback
,
warnings
,
weakref
import
sys
,
os
,
time
,
io
,
traceback
,
warnings
,
weakref
,
collections
from
string
import
Template
__all__
=
[
'BASIC_FORMAT'
,
'BufferingFormatter'
,
'CRITICAL'
,
'DEBUG'
,
'ERROR'
,
...
...
@@ -253,7 +254,13 @@ class LogRecord(object):
# 'Value is %d' instead of 'Value is 0'.
# For the use case of passing a dictionary, this should not be a
# problem.
if
args
and
len
(
args
)
==
1
and
isinstance
(
args
[
0
],
dict
)
and
args
[
0
]:
# Issue #21172: a request was made to relax the isinstance check
# to hasattr(args[0], '__getitem__'). However, the docs on string
# formatting still seem to suggest a mapping object is required.
# Thus, while not removing the isinstance check, it does now look
# for collections.Mapping rather than, as before, dict.
if
(
args
and
len
(
args
)
==
1
and
isinstance
(
args
[
0
],
collections
.
Mapping
)
and
args
[
0
]):
args
=
args
[
0
]
self
.
args
=
args
self
.
levelname
=
getLevelName
(
level
)
...
...
Misc/NEWS
Dosyayı görüntüle @
1b761140
...
...
@@ -27,6 +27,8 @@ Core and Builtins
Library
-------
- Issue #21172: isinstance check relaxed from dict to collections.Mapping.
- Issue #21155: asyncio.EventLoop.create_unix_server() now raises a ValueError
if path and sock are specified at the same time.
...
...
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