mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
bpo-30144: Import collections ABC from collections.abc rather than collections. (#1263)
This commit is contained in:
parent
9eb5ca0774
commit
2e576f5aec
22 changed files with 90 additions and 85 deletions
|
|
@ -23,7 +23,7 @@ Copyright (C) 2001-2016 Vinay Sajip. All Rights Reserved.
|
|||
To use, simply 'import logging' and log away!
|
||||
"""
|
||||
|
||||
import sys, os, time, io, traceback, warnings, weakref, collections
|
||||
import sys, os, time, io, traceback, warnings, weakref, collections.abc
|
||||
|
||||
from string import Template
|
||||
|
||||
|
|
@ -273,8 +273,8 @@ class LogRecord(object):
|
|||
# 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)
|
||||
# for collections.abc.Mapping rather than, as before, dict.
|
||||
if (args and len(args) == 1 and isinstance(args[0], collections.abc.Mapping)
|
||||
and args[0]):
|
||||
args = args[0]
|
||||
self.args = args
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue