summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/functions.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2019-02-20 15:00:09 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2019-02-21 11:18:19 -0500
commit4ca3092c0a89855cd740bafb4e0fb4c99051f89e (patch)
treee8a42e8391cf1b30f5b20ba10da1f3fa9f97e17c /lib/sqlalchemy/sql/functions.py
parent7a4c40ff6b9d278529735c792c3ddfda60bd4a85 (diff)
downloadsqlalchemy-4ca3092c0a89855cd740bafb4e0fb4c99051f89e.tar.gz
Prevent __init__ from being called for Alias, subclasses
The :class:`.Alias` class and related subclasses :class:`.CTE`, :class:`.Lateral` and :class:`.TableSample` have been reworked so that it is not possible for a user to construct the objects directly. These constructs require that the standalone construction function or selectable-bound method be used to instantiate new objects. Fixes: #4509 Change-Id: I74ae4786cb3ae625dab33b00bfd6bdc4e1219139
Diffstat (limited to 'lib/sqlalchemy/sql/functions.py')
-rw-r--r--lib/sqlalchemy/sql/functions.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/functions.py b/lib/sqlalchemy/sql/functions.py
index 075a2f826..fcc843d91 100644
--- a/lib/sqlalchemy/sql/functions.py
+++ b/lib/sqlalchemy/sql/functions.py
@@ -301,7 +301,7 @@ class FunctionElement(Executable, ColumnElement, FromClause):
"""
- return Alias(self, name)
+ return Alias._construct(self, name)
def select(self):
"""Produce a :func:`~.expression.select` construct