summaryrefslogtreecommitdiffstats
path: root/Lib/logging
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-04-24 06:05:00 (GMT)
committerGitHub <noreply@github.com>2017-04-24 06:05:00 (GMT)
commit2e576f5aec1f8f23f07001e2eb3db9276851a4fc (patch)
tree0c42af143f2ab71bce5865aa72056330fcc510db /Lib/logging
parent9eb5ca0774f94215be48442100c829db2484e146 (diff)
downloadcpython-2e576f5aec1f8f23f07001e2eb3db9276851a4fc.zip
cpython-2e576f5aec1f8f23f07001e2eb3db9276851a4fc.tar.gz
cpython-2e576f5aec1f8f23f07001e2eb3db9276851a4fc.tar.bz2
bpo-30144: Import collections ABC from collections.abc rather than collections. (#1263)
Diffstat (limited to 'Lib/logging')
-rw-r--r--Lib/logging/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py
index 49a0692..4920383 100644
--- a/Lib/logging/__init__.py
+++ b/Lib/logging/__init__.py
@@ -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