main commit
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-10-16 16:30:25 +09:00
parent 91c7e04474
commit 537e7b363f
1146 changed files with 45926 additions and 77196 deletions

View File

@@ -1,9 +1,3 @@
# testing/provision.py
# Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: https://www.opensource.org/licenses/mit-license.php
# mypy: ignore-errors
from __future__ import annotations
@@ -74,7 +68,6 @@ def setup_config(db_url, options, file_config, follower_ident):
# hooks
dialect = sa_url.make_url(db_url).get_dialect()
dialect.load_provisioning()
if follower_ident:
@@ -108,9 +101,7 @@ def generate_db_urls(db_urls, extra_drivers):
"""Generate a set of URLs to test given configured URLs plus additional
driver names.
Given:
.. sourcecode:: text
Given::
--dburi postgresql://db1 \
--dburi postgresql://db2 \
@@ -118,9 +109,7 @@ def generate_db_urls(db_urls, extra_drivers):
--dbdriver=psycopg2 --dbdriver=asyncpg?async_fallback=true
Noting that the default postgresql driver is psycopg2, the output
would be:
.. sourcecode:: text
would be::
postgresql+psycopg2://db1
postgresql+asyncpg://db1
@@ -137,8 +126,6 @@ def generate_db_urls(db_urls, extra_drivers):
driver name. For example, to enable the async fallback option for
asyncpg::
.. sourcecode:: text
--dburi postgresql://db1 \
--dbdriver=asyncpg?async_fallback=true
@@ -153,10 +140,7 @@ def generate_db_urls(db_urls, extra_drivers):
]
for url_obj, dialect in urls_plus_dialects:
# use get_driver_name instead of dialect.driver to account for
# "_async" virtual drivers like oracledb and psycopg
driver_name = url_obj.get_driver_name()
backend_to_driver_we_already_have[dialect.name].add(driver_name)
backend_to_driver_we_already_have[dialect.name].add(dialect.driver)
backend_to_driver_we_need = {}
@@ -368,7 +352,7 @@ def update_db_opts(db_url, db_opts, options):
def post_configure_engine(url, engine, follower_ident):
"""Perform extra steps after configuring an engine for testing.
(For the internal dialects, currently only used by sqlite, oracle, mssql)
(For the internal dialects, currently only used by sqlite, oracle)
"""