From 8d6da40767f4198fce4b4b6a8f8cb8ae04d61669 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Knut=20Olav=20L=C3=B8ite?= Date: Mon, 2 Dec 2024 17:40:01 +0100 Subject: [PATCH] fix: remove DOUBLE reference which is SQLAlchemy 2.0-only --- google/cloud/sqlalchemy_spanner/sqlalchemy_spanner.py | 3 --- test/mockserver_tests/test_float32.py | 9 --------- 2 files changed, 12 deletions(-) diff --git a/google/cloud/sqlalchemy_spanner/sqlalchemy_spanner.py b/google/cloud/sqlalchemy_spanner/sqlalchemy_spanner.py index 6786ec61..09c7f9ae 100644 --- a/google/cloud/sqlalchemy_spanner/sqlalchemy_spanner.py +++ b/google/cloud/sqlalchemy_spanner/sqlalchemy_spanner.py @@ -85,8 +85,6 @@ def reset_connection(dbapi_conn, connection_record, reset_state=None): "DATE": types.DATE, "DATETIME": types.DATETIME, "FLOAT32": types.REAL, - # Note: FLOAT64 was mapped to Float when Spanner only supported FLOAT64 - # This should however rather have been types.Double. "FLOAT64": types.Float, "INT64": types.BIGINT, "NUMERIC": types.NUMERIC(precision=38, scale=9), @@ -106,7 +104,6 @@ def reset_connection(dbapi_conn, connection_record, reset_state=None): types.DATETIME: "DATETIME", types.REAL: "FLOAT32", types.Float: "FLOAT64", - types.DOUBLE: "FLOAT64", types.BIGINT: "INT64", types.DECIMAL: "NUMERIC", types.String: "STRING", diff --git a/test/mockserver_tests/test_float32.py b/test/mockserver_tests/test_float32.py index 5137e6d2..801a57c2 100644 --- a/test/mockserver_tests/test_float32.py +++ b/test/mockserver_tests/test_float32.py @@ -12,32 +12,23 @@ # See the License for the specific language governing permissions and # limitations under the License. -from google.cloud.spanner_admin_database_v1 import UpdateDatabaseDdlRequest -from sqlalchemy import create_engine, select, MetaData, Table, Column, Integer, String from sqlalchemy.orm import Session from sqlalchemy.testing import ( eq_, is_instance_of, - is_not_none, - is_none, is_false, - is_true, ) from google.cloud.spanner_v1 import ( - FixedSizePool, BatchCreateSessionsRequest, ExecuteSqlRequest, ResultSet, - PingingPool, ResultSetStats, BeginTransactionRequest, - ExecuteBatchDmlRequest, CommitRequest, TypeCode, ) from test.mockserver_tests.mock_server_test_base import ( MockServerTestBase, - add_select1_result, add_result, )