from .base import HasCompileState
from .base import HasMemoized
from .base import Immutable
+from .base import ImmutableColumnCollection
from .base import prefix_anon_map
from .coercions import _document_text_coercion
from .elements import _anonymous_label
"""
if (
- args
- and hasattr(args[0], "__iter__")
- and not hasattr(args[0], "strip")
+ args and isinstance(args[0], (list, ImmutableColumnCollection))
) or kw:
return cls.create_legacy_select(*args, **kw)
else:
stmt = select([column("q")])
self.assert_compile(stmt, "SELECT q")
- def test_select_iterable_argument(self):
-
- with testing.expect_deprecated_20(
- r"The legacy calling style of select\(\) is deprecated "
- "and will be removed in SQLAlchemy 2.0"
- ):
- stmt = select(iter([column("q")]))
- self.assert_compile(stmt, "SELECT q")
-
def test_select_immutable_column_collection_argument(self):
t1 = table("t1", column("q"))