summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing
diff options
context:
space:
mode:
authorFederico Caselli <cfederico87@gmail.com>2020-04-08 20:26:21 +0200
committerFederico Caselli <cfederico87@gmail.com>2020-04-09 00:33:22 +0200
commita9b068ae564e5e775e312373088545b75aeaa1b0 (patch)
tree3a20c79acfefe49b62ee4bca360bb11001f9eec9 /lib/sqlalchemy/testing
parentecca4fe3f8aebc5b42c2acda2e5d28d6a90a821e (diff)
downloadsqlalchemy-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 'lib/sqlalchemy/testing')
-rw-r--r--lib/sqlalchemy/testing/assertions.py4
-rw-r--r--lib/sqlalchemy/testing/suite/test_reflection.py15
2 files changed, 2 insertions, 17 deletions
diff --git a/lib/sqlalchemy/testing/assertions.py b/lib/sqlalchemy/testing/assertions.py
index 5af29a723..61d272160 100644
--- a/lib/sqlalchemy/testing/assertions.py
+++ b/lib/sqlalchemy/testing/assertions.py
@@ -146,8 +146,8 @@ def _expect_warnings(
def our_warn(msg, *arg, **kw):
if isinstance(msg, exc_cls):
- exception = msg
- msg = str(exception)
+ exception = type(msg)
+ msg = str(msg)
elif arg:
exception = arg[0]
else:
diff --git a/lib/sqlalchemy/testing/suite/test_reflection.py b/lib/sqlalchemy/testing/suite/test_reflection.py
index 51beb0973..708088881 100644
--- a/lib/sqlalchemy/testing/suite/test_reflection.py
+++ b/lib/sqlalchemy/testing/suite/test_reflection.py
@@ -2,7 +2,6 @@ import operator
import re
import sqlalchemy as sa
-from .. import assert_raises_message
from .. import config
from .. import engines
from .. import eq_
@@ -13,7 +12,6 @@ from ..provision import temp_table_keyword_args
from ..schema import Column
from ..schema import Table
from ... import event
-from ... import exc as sa_exc
from ... import ForeignKey
from ... import inspect
from ... import Integer
@@ -654,19 +652,6 @@ class ComponentReflectionTest(fixtures.TablesTest):
def test_get_pk_constraint_with_schema(self):
self._test_get_pk_constraint(schema=testing.config.test_schema)
- @testing.requires.table_reflection
- @testing.provide_metadata
- def test_deprecated_get_primary_keys(self):
- meta = self.metadata
- users = self.tables.users
- insp = inspect(meta.bind)
- assert_raises_message(
- sa_exc.SADeprecationWarning,
- r".*get_primary_keys\(\) method is deprecated",
- insp.get_primary_keys,
- users.name,
- )
-
@testing.provide_metadata
def _test_get_foreign_keys(self, schema=None):
meta = self.metadata