diff options
author | xtreak <tir.karthi@gmail.com> | 2018-09-24 12:23:54 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2018-09-27 15:49:18 -0400 |
commit | 2d2fa49130249f757f6f1100dad879e1071ad385 (patch) | |
tree | abf7440b5a8937fd57f7e13e0d499b8735c6c1ed /lib/sqlalchemy/sql | |
parent | fb991a4474fa0d4df69af10a808fe234016c6a52 (diff) | |
download | sqlalchemy-2d2fa49130249f757f6f1100dad879e1071ad385.tar.gz |
Import from collections.abc
Fixed additional warnings generated by Python 3.7 due to changes in the
organization of the Python ``collections`` and ``collections.abc`` packages.
Previous ``collections`` warnings were fixed in version 1.2.11. Pull request
courtesy xtreak.
See I2d1c0ef97c8ecac7af152cc56263422a40faa6bb for the original collections.abc
fixes.
Fixes: #4339
Change-Id: Ia92d2461f20309fb33ea6c6f592f7d4e7e32ae7a
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/475
Diffstat (limited to 'lib/sqlalchemy/sql')
-rw-r--r-- | lib/sqlalchemy/sql/base.py | 5 | ||||
-rw-r--r-- | lib/sqlalchemy/sql/sqltypes.py | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/sqlalchemy/sql/base.py b/lib/sqlalchemy/sql/base.py index 9c79ccf7a..5c884e1a0 100644 --- a/lib/sqlalchemy/sql/base.py +++ b/lib/sqlalchemy/sql/base.py @@ -14,7 +14,6 @@ from .. import util, exc import itertools from .visitors import ClauseVisitor import re -import collections PARSE_AUTOCOMMIT = util.symbol('PARSE_AUTOCOMMIT') NO_ARG = util.symbol('NO_ARG') @@ -46,7 +45,7 @@ def _generative(fn, *args, **kw): return self -class _DialectArgView(collections.MutableMapping): +class _DialectArgView(util.collections_abc.MutableMapping): """A dictionary view of dialect-level arguments in the form <dialectname>_<argument_name>. @@ -99,7 +98,7 @@ class _DialectArgView(collections.MutableMapping): ) -class _DialectArgDict(collections.MutableMapping): +class _DialectArgDict(util.collections_abc.MutableMapping): """A dictionary view of dialect-level arguments for a specific dialect. diff --git a/lib/sqlalchemy/sql/sqltypes.py b/lib/sqlalchemy/sql/sqltypes.py index 08af78606..ef0de2a92 100644 --- a/lib/sqlalchemy/sql/sqltypes.py +++ b/lib/sqlalchemy/sql/sqltypes.py @@ -2098,7 +2098,7 @@ class JSON(Indexable, TypeEngine): @util.dependencies('sqlalchemy.sql.default_comparator') def _setup_getitem(self, default_comparator, index): if not isinstance(index, util.string_types) and \ - isinstance(index, collections.Sequence): + isinstance(index, compat.collections_abc.Sequence): index = default_comparator._check_literal( self.expr, operators.json_path_getitem_op, index, bindparam_type=JSON.JSONPathType |