diff options
| author | Federico Caselli <cfederico87@gmail.com> | 2020-04-08 20:26:21 +0200 |
|---|---|---|
| committer | Federico Caselli <cfederico87@gmail.com> | 2020-04-09 00:33:22 +0200 |
| commit | a9b068ae564e5e775e312373088545b75aeaa1b0 (patch) | |
| tree | 3a20c79acfefe49b62ee4bca360bb11001f9eec9 /test/sql/test_deprecations.py | |
| parent | ecca4fe3f8aebc5b42c2acda2e5d28d6a90a821e (diff) | |
| download | sqlalchemy-a9b068ae564e5e775e312373088545b75aeaa1b0.tar.gz | |
Remove code deprecated before version 1.1
- Remove deprecated method ``get_primary_keys` in the :class:`.Dialect` and
:class:`.Inspector` classes.
- Remove deprecated event ``dbapi_error`` and the method ``ConnectionEvents.dbapi_error`.
- Remove support for deprecated engine URLs of the form ``postgres://``.
- Remove deprecated dialect ``mysql+gaerdbms``.
- Remove deprecated parameter ``quoting`` from :class:`.mysql.ENUM`
and :class:`.mysql.SET` in the ``mysql`` dialect.
- Remove deprecated function ``comparable_property``. and function
``comparable_using`` in the declarative extension.
- Remove deprecated function ``compile_mappers``.
- Remove deprecated method ``collection.linker``.
- Remove deprecated method ``Session.prune`` and parameter ``Session.weak_identity_map``.
This change also removes the class ``StrongInstanceDict``.
- Remove deprecated parameter ``mapper.order_by``.
- Remove deprecated parameter ``Session._enable_transaction_accounting`.
- Remove deprecated parameter ``Session.is_modified.passive``.
- Remove deprecated class ``Binary``. Please use :class:`.LargeBinary`.
- Remove deprecated methods ``Compiled.compile``, ``ClauseElement.__and__`` and
``ClauseElement.__or__`` and attribute ``Over.func``.
- Remove deprecated ``FromClause.count`` method.
- Remove deprecated parameter ``Table.useexisting``.
- Remove deprecated parameters ``text.bindparams`` and ``text.typemap``.
- Remove boolean support for the ``passive`` parameter in ``get_history``.
- Remove deprecated ``adapt_operator`` in ``UserDefinedType.Comparator``.
Fixes: #4643
Change-Id: Idcd390c77bf7b0e9957907716993bdaa3f1a1763
Diffstat (limited to 'test/sql/test_deprecations.py')
| -rw-r--r-- | test/sql/test_deprecations.py | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/test/sql/test_deprecations.py b/test/sql/test_deprecations.py index d641c18e2..7c115789b 100644 --- a/test/sql/test_deprecations.py +++ b/test/sql/test_deprecations.py @@ -101,17 +101,6 @@ class DeprecationWarningsTest(fixtures.TestBase, AssertsCompiledSQL): ): self.assert_compile(or_(and_()), "") - def test_fromclause_count(self): - with testing.expect_deprecated( - r"The FromClause.count\(\) method is deprecated, and will be " - r"removed in a future release." - ): - self.assert_compile( - table("q", column("x")).count(), - "SELECT count(q.x) AS tbl_row_count FROM q", - dialect="default", - ) - class ConvertUnicodeDeprecationTest(fixtures.TestBase): @@ -468,55 +457,6 @@ class LateralSubqueryCoercionsTest(fixtures.TablesTest, AssertsCompiledSQL): ) -class TextTest(fixtures.TestBase, AssertsCompiledSQL): - __dialect__ = "default" - - def test_legacy_bindparam(self): - with testing.expect_deprecated( - "The text.bindparams parameter is deprecated" - ): - t = text( - "select * from foo where lala=:bar and hoho=:whee", - bindparams=[bindparam("bar", 4), bindparam("whee", 7)], - ) - - self.assert_compile( - t, - "select * from foo where lala=:bar and hoho=:whee", - checkparams={"bar": 4, "whee": 7}, - ) - - def test_legacy_typemap(self): - table1 = table( - "mytable", - column("myid", Integer), - column("name", String), - column("description", String), - ) - with testing.expect_deprecated( - "The text.typemap parameter is deprecated" - ): - t = text( - "select id, name from user", - typemap=dict(id=Integer, name=String), - ).subquery() - - stmt = select([table1.c.myid]).select_from( - table1.join(t, table1.c.myid == t.c.id) - ) - compiled = stmt.compile() - eq_( - compiled._create_result_map(), - { - "myid": ( - "myid", - (table1.c.myid, "myid", "myid", "mytable_myid"), - table1.c.myid.type, - ) - }, - ) - - class SelectableTest(fixtures.TestBase, AssertsCompiledSQL): __dialect__ = "default" |
