Skip to content

Commit

Permalink
Merge branch 'release/1.5.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
vmalloc committed Oct 16, 2019
2 parents 9ca0d2a + 768c18f commit bcae0a5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion logbook/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.5.2"
__version__ = "1.5.3"
4 changes: 2 additions & 2 deletions logbook/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from datetime import date, datetime

import logbook
from logbook.helpers import u, string_types, iteritems
from logbook.helpers import u, string_types, iteritems, collections_abc

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

Expand Down Expand Up @@ -133,7 +133,7 @@ def convert_record(self, old_record):
kwargs = None

# Logging allows passing a mapping object, in which case args will be a mapping.
if isinstance(args, collections.Mapping):
if isinstance(args, collections_abc.Mapping):
kwargs = args
args = None
record = LoggingCompatRecord(old_record.name,
Expand Down
8 changes: 4 additions & 4 deletions logbook/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
_missing, lookup_level, Flags, ContextObject, ContextStackManager,
_datetime_factory)
from logbook.helpers import (
rename, b, _is_text_stream, is_unicode, PY2, zip, xrange, string_types,
rename, b, _is_text_stream, is_unicode, PY2, zip, xrange, string_types, collections_abc,
integer_types, reraise, u, with_metaclass)
from logbook.concurrency import new_fine_grained_lock

Expand Down Expand Up @@ -1355,10 +1355,10 @@ def get_connection(self):
# - tuple to be unpacked to variables keyfile and certfile.
# - secure=() equivalent to secure=True for backwards compatibility.
# - secure=False equivalent to secure=None to disable.
if isinstance(self.secure, collections.Mapping):
if isinstance(self.secure, collections_abc.Mapping):
keyfile = self.secure.get('keyfile', None)
certfile = self.secure.get('certfile', None)
elif isinstance(self.secure, collections.Iterable):
elif isinstance(self.secure, collections_abc.Iterable):
# Allow empty tuple for backwards compatibility
if len(self.secure) == 0:
keyfile = certfile = None
Expand All @@ -1381,7 +1381,7 @@ def get_connection(self):
con.ehlo()

# Allow credentials to be a tuple or dict.
if isinstance(self.credentials, collections.Mapping):
if isinstance(self.credentials, collections_abc.Mapping):
credentials_args = ()
credentials_kwargs = self.credentials
else:
Expand Down
2 changes: 2 additions & 0 deletions logbook/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@

if PY2:
import __builtin__ as _builtins
import collections as collections_abc
else:
import builtins as _builtins
import collections.abc as collections_abc

try:
import json
Expand Down

0 comments on commit bcae0a5

Please sign in to comment.