@@ -77,7 +77,7 @@ class = StreamHandler
7777
7878BLACK_VERSION = "black==22.3.0"
7979BLACK_PATHS = ["google" , "test" , "noxfile.py" , "setup.py" , "samples" ]
80- DEFAULT_PYTHON_VERSION = "3.8 "
80+ DEFAULT_PYTHON_VERSION = "3.12 "
8181DEFAULT_PYTHON_VERSION_FOR_SQLALCHEMY_20 = "3.12"
8282
8383
@@ -126,50 +126,6 @@ def lint_setup_py(session):
126126 session .run ("python" , "setup.py" , "check" , "--restructuredtext" , "--strict" )
127127
128128
129- @nox .session (python = DEFAULT_PYTHON_VERSION )
130- def compliance_test_13 (session ):
131- """Run SQLAlchemy dialect compliance test suite."""
132-
133- # Check the value of `RUN_COMPLIANCE_TESTS` env var. It defaults to true.
134- if os .environ .get ("RUN_COMPLIANCE_TESTS" , "true" ) == "false" :
135- session .skip ("RUN_COMPLIANCE_TESTS is set to false, skipping" )
136- # Sanity check: Only run tests if the environment variable is set.
137- if not os .environ .get ("GOOGLE_APPLICATION_CREDENTIALS" , "" ) and not os .environ .get (
138- "SPANNER_EMULATOR_HOST" , ""
139- ):
140- session .skip (
141- "Credentials or emulator host must be set via environment variable"
142- )
143-
144- session .install (
145- "pytest-cov" ,
146- )
147-
148- session .install ("mock" )
149- session .install (".[tracing]" )
150- session .run ("pip" , "install" , "sqlalchemy>=1.1.13,<=1.3.24" , "--force-reinstall" )
151- session .run ("pip" , "install" , "opentelemetry-api<=1.10" , "--force-reinstall" )
152- session .run ("pip" , "install" , "opentelemetry-sdk<=1.10" , "--force-reinstall" )
153- session .run ("python" , "create_test_database.py" )
154- session .run ("pip" , "install" , "pytest==6.2.2" , "--force-reinstall" )
155- session .run (
156- "pip" , "install" , "pytest-asyncio<0.21.0" , "--force-reinstall" , "--no-deps"
157- )
158-
159- session .run (
160- "py.test" ,
161- "--cov=google.cloud.sqlalchemy_spanner" ,
162- "--cov=test" ,
163- "--cov-append" ,
164- "--cov-config=.coveragerc" ,
165- "--cov-report=" ,
166- "--cov-fail-under=0" ,
167- "--asyncio-mode=auto" ,
168- "test/test_suite_13.py" ,
169- * session .posargs ,
170- )
171-
172-
173129@nox .session (python = DEFAULT_PYTHON_VERSION )
174130def compliance_test_14 (session ):
175131 """Run SQLAlchemy dialect compliance test suite."""
@@ -333,15 +289,8 @@ def mockserver(session):
333289
334290@nox .session (python = DEFAULT_PYTHON_VERSION )
335291def migration_test (session ):
336- """Test migrations with SQLAlchemy v1.3.11+ and Alembic"""
337- session .run ("pip" , "install" , "sqlalchemy>=1.3.11,<2.0" , "--force-reinstall" )
338- _migration_test (session )
339-
340-
341- @nox .session (python = DEFAULT_PYTHON_VERSION )
342- def migration_test_1310 (session ):
343- """Test migrations with SQLAlchemy 1.3.10 or lower and Alembic"""
344- session .run ("pip" , "install" , "sqlalchemy>=1.1.13,<=1.3.10" , "--force-reinstall" )
292+ """Test migrations with SQLAlchemy v1.4 and Alembic"""
293+ session .run ("pip" , "install" , "sqlalchemy>=1.4,<2.0" , "--force-reinstall" )
345294 _migration_test (session )
346295
347296
@@ -352,11 +301,6 @@ def _migration_test(session):
352301 import os
353302 import shutil
354303
355- try :
356- import sqlalchemy
357- except :
358- session .run ("pip" , "install" , "sqlalchemy>=1.3.11,<2.0" , "--force-reinstall" )
359-
360304 session .install ("pytest" )
361305 session .install ("." )
362306 session .install ("alembic" )
0 commit comments