summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
authormike bayer <mike_mp@zzzcomputing.com>2020-12-07 20:47:36 +0000
committerGerrit Code Review <gerrit@bbpush.zzzcomputing.com>2020-12-07 20:47:36 +0000
commit5b311f967218d7cf25e916a3fe0e620e23111b52 (patch)
treeb8a464291a5bb878cd708b6056aabaf9cfbfea16 /lib/sqlalchemy
parent87d58b6d8188ccff808b3207d5f9398bb9adf9b9 (diff)
parent8cb1e372fc8711069220182b75a31647dd51e3cb (diff)
downloadsqlalchemy-5b311f967218d7cf25e916a3fe0e620e23111b52.tar.gz
Merge "update docs that reference the deprecated `from_engine` inspection"
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/engine/reflection.py4
-rw-r--r--lib/sqlalchemy/inspection.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/sqlalchemy/engine/reflection.py b/lib/sqlalchemy/engine/reflection.py
index 142637693..c5d66081a 100644
--- a/lib/sqlalchemy/engine/reflection.py
+++ b/lib/sqlalchemy/engine/reflection.py
@@ -712,12 +712,12 @@ class Inspector(object):
table reflection. Direct usage is like::
from sqlalchemy import create_engine, MetaData, Table
- from sqlalchemy.engine.reflection import Inspector
+ from sqlalchemy import inspect
engine = create_engine('...')
meta = MetaData()
user_table = Table('user', meta)
- insp = Inspector.from_engine(engine)
+ insp = inspect(engine)
insp.reflect_table(user_table, None)
.. versionchanged:: 1.4 Renamed from ``reflecttable`` to
diff --git a/lib/sqlalchemy/inspection.py b/lib/sqlalchemy/inspection.py
index 4d9ee30c4..69b160ce7 100644
--- a/lib/sqlalchemy/inspection.py
+++ b/lib/sqlalchemy/inspection.py
@@ -20,7 +20,7 @@ cases it will return the object itself.
The rationale for :func:`_sa.inspect` is twofold. One is that
it replaces the need to be aware of a large variety of "information
getting" functions in SQLAlchemy, such as
-:meth:`_reflection.Inspector.from_engine`,
+:meth:`_reflection.Inspector.from_engine` (deprecated in 1.4),
:func:`.orm.attributes.instance_state`, :func:`_orm.class_mapper`,
and others. The other is that the return value of :func:`_sa.inspect`
is guaranteed to obey a documented API, thus allowing third party