Skip to content

Commit bcae0a5

Browse files
committed
Merge branch 'release/1.5.3'
2 parents 9ca0d2a + 768c18f commit bcae0a5

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

logbook/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.5.2"
1+
__version__ = "1.5.3"

logbook/compat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from datetime import date, datetime
1717

1818
import logbook
19-
from logbook.helpers import u, string_types, iteritems
19+
from logbook.helpers import u, string_types, iteritems, collections_abc
2020

2121
_epoch_ord = date(1970, 1, 1).toordinal()
2222

@@ -133,7 +133,7 @@ def convert_record(self, old_record):
133133
kwargs = None
134134

135135
# Logging allows passing a mapping object, in which case args will be a mapping.
136-
if isinstance(args, collections.Mapping):
136+
if isinstance(args, collections_abc.Mapping):
137137
kwargs = args
138138
args = None
139139
record = LoggingCompatRecord(old_record.name,

logbook/handlers.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
_missing, lookup_level, Flags, ContextObject, ContextStackManager,
3333
_datetime_factory)
3434
from logbook.helpers import (
35-
rename, b, _is_text_stream, is_unicode, PY2, zip, xrange, string_types,
35+
rename, b, _is_text_stream, is_unicode, PY2, zip, xrange, string_types, collections_abc,
3636
integer_types, reraise, u, with_metaclass)
3737
from logbook.concurrency import new_fine_grained_lock
3838

@@ -1355,10 +1355,10 @@ def get_connection(self):
13551355
# - tuple to be unpacked to variables keyfile and certfile.
13561356
# - secure=() equivalent to secure=True for backwards compatibility.
13571357
# - secure=False equivalent to secure=None to disable.
1358-
if isinstance(self.secure, collections.Mapping):
1358+
if isinstance(self.secure, collections_abc.Mapping):
13591359
keyfile = self.secure.get('keyfile', None)
13601360
certfile = self.secure.get('certfile', None)
1361-
elif isinstance(self.secure, collections.Iterable):
1361+
elif isinstance(self.secure, collections_abc.Iterable):
13621362
# Allow empty tuple for backwards compatibility
13631363
if len(self.secure) == 0:
13641364
keyfile = certfile = None
@@ -1381,7 +1381,7 @@ def get_connection(self):
13811381
con.ehlo()
13821382

13831383
# Allow credentials to be a tuple or dict.
1384-
if isinstance(self.credentials, collections.Mapping):
1384+
if isinstance(self.credentials, collections_abc.Mapping):
13851385
credentials_args = ()
13861386
credentials_kwargs = self.credentials
13871387
else:

logbook/helpers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@
2020

2121
if PY2:
2222
import __builtin__ as _builtins
23+
import collections as collections_abc
2324
else:
2425
import builtins as _builtins
26+
import collections.abc as collections_abc
2527

2628
try:
2729
import json

0 commit comments

Comments
 (0)