From 7e864fc7b1b950760cbf02e6dcd5aa5aac267400 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 17 Aug 2020 17:24:27 -0400 Subject: Create a framework to allow all SQLALCHEMY_WARN_20 to pass As the test suite has widespread use of many patterns that are deprecated, enable SQLALCHEMY_WARN_20 globally for the test suite but then break the warnings filter out into a whole list of all the individual warnings we are looking for. this way individual changesets can target a specific class of warning, as many of these warnings will indivdidually affect dozens of files and potentially hundreds of lines of code. Many warnings are also resolved here as this patch started out that way. From this point forward there should be changesets that target a subset of the warnings at a time. For expediency, updates some migration 2.0 docs for ORM as well. Change-Id: I98b8defdf7c37b818b3824d02f7668e3f5f31c94 --- lib/sqlalchemy/orm/decl_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sqlalchemy/orm/decl_api.py') diff --git a/lib/sqlalchemy/orm/decl_api.py b/lib/sqlalchemy/orm/decl_api.py index 68de18c2e..41cc88112 100644 --- a/lib/sqlalchemy/orm/decl_api.py +++ b/lib/sqlalchemy/orm/decl_api.py @@ -366,7 +366,7 @@ def declarative_base( if bind is not None: # util.deprecated_params does not work util.warn_deprecated_20( - 'The "bind" argument to declarative_base is' + "The ``bind`` argument to declarative_base is " "deprecated and will be removed in SQLAlchemy 2.0.", ) @@ -701,7 +701,7 @@ class registry(object): @util.deprecated_params( bind=( "2.0", - 'The "bind" argument to declarative_base is' + "The ``bind`` argument to as_declarative is " "deprecated and will be removed in SQLAlchemy 2.0.", ) ) -- cgit v1.2.1