diff --git a/rethinkdb/ast.py b/rethinkdb/ast.py index 73e76e1a..284ca05a 100644 --- a/rethinkdb/ast.py +++ b/rethinkdb/ast.py @@ -20,7 +20,7 @@ import base64 import binascii -import collections +import collections.abc import datetime import json import threading @@ -74,7 +74,7 @@ def expr(val, nesting_depth=20): if isinstance(val, RqlQuery): return val - elif isinstance(val, collections.Callable): + elif isinstance(val, collections.abc.Callable): return Func(val) elif isinstance(val, (datetime.datetime, datetime.date)): if not hasattr(val, "tzinfo") or not val.tzinfo: @@ -95,14 +95,14 @@ def expr(val, nesting_depth=20): return Datum(val) elif isinstance(val, bytes): return Binary(val) - elif isinstance(val, collections.Mapping): + elif isinstance(val, collections.abc.Mapping): # MakeObj doesn't take the dict as a keyword args to avoid # conflicting with the `self` parameter. obj = {} for k, v in dict_items(val): obj[k] = expr(v, nesting_depth - 1) return MakeObj(obj) - elif isinstance(val, collections.Iterable): + elif isinstance(val, collections.abc.Iterable): val = [expr(v, nesting_depth - 1) for v in val] return MakeArray(*val) else: pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy