]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Modernize internal reflection
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 2 Aug 2019 16:34:16 +0000 (12:34 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 6 Aug 2019 22:05:45 +0000 (18:05 -0400)
commit00b5c10846e800304caa86549ab9da373b42fa5d
tree0832401deebeaad5fd6edc99158d0b10f958e716
parente091775f1c4c817093e9a936a3abc79b5e311f93
Modernize internal reflection

- Deprecated remaining engine-level introspection and utility methods
including :meth:`.Engine.run_callable`, :meth:`.Engine.transaction`,
:meth:`.Engine.table_names`, :meth:`.Engine.has_table`.   The utility
methods are superseded by modern context-manager patterns, and the table
introspection tasks are suited by the :class:`.Inspector` object.

- The internal dialect method ``Dialect.reflecttable`` has been removed.  A
review of third party dialects has not found any making use of this method,
as it was already documented as one that should not be used by external
dialects.  Additionally, the private ``Engine._run_visitor`` method
is also removed.

- The long-deprecated ``Inspector.get_table_names.order_by`` parameter has
been removed.

- The :paramref:`.Table.autoload_with` parameter now accepts an :class:`.Inspector` object
directly, as well as any :class:`.Engine` or :class:`.Connection` as was the case before.

Fixes: #4755
Change-Id: Iec3a8b0f3e298ba87d532b16fac1e1132f464e21
17 files changed:
doc/build/changelog/unreleased_14/4755.rst [new file with mode: 0644]
lib/sqlalchemy/engine/base.py
lib/sqlalchemy/engine/default.py
lib/sqlalchemy/engine/interfaces.py
lib/sqlalchemy/engine/mock.py
lib/sqlalchemy/engine/reflection.py
lib/sqlalchemy/sql/schema.py
lib/sqlalchemy/util/deprecations.py
test/dialect/mssql/test_reflection.py
test/dialect/postgresql/test_reflection.py
test/engine/test_bind.py
test/engine/test_deprecations.py
test/engine/test_execute.py
test/engine/test_reflection.py
test/engine/test_transaction.py
test/ext/test_horizontal_shard.py
test/sql/test_quote.py