From 732a67df5f4eb3e664824f6d4c7e4672d17eb3fc Mon Sep 17 00:00:00 2001 From: Nikolay Novik Date: Sat, 28 Oct 2023 16:08:41 -0400 Subject: [PATCH] Tonybaloney verify 312 (#456) * Test Python 3.12 in CI * Use latest pyodbc * Fix f string. --------- Co-authored-by: Anthony Shaw --- .github/workflows/python-package.yml | 2 +- setup.py | 1 + tests/conftest.py | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index da8c516..13c1ad6 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.9', '3.10', '3.11'] + python-version: ['3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v3 diff --git a/setup.py b/setup.py index f870b91..b542c5e 100755 --- a/setup.py +++ b/setup.py @@ -21,6 +21,7 @@ def read(f): "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Operating System :: POSIX", "Environment :: Web Environment", "Development Status :: 3 - Alpha", diff --git a/tests/conftest.py b/tests/conftest.py index 431b732..309eb25 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -85,15 +85,15 @@ def dsn(tmp_path, request, db): mysql_params = request.getfixturevalue("mysql_params") conf = create_mysql_dsn(mysql_params) else: - conf = os.environ.get( - "DSN", f'Driver=SQLite3;Database={tmp_path / "sqlite.db"}' - ) + p = tmp_path / "sqlite.db" + conf = os.environ.get("DSN", "Driver=SQLite3;Database={}".format(p)) return conf @pytest_asyncio.fixture async def conn(dsn, connection_maker): + assert dsn connection = await connection_maker() yield connection