]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Don't emit pyodbc "no driver" warning for empty URL
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 22 May 2020 17:14:58 +0000 (13:14 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 22 May 2020 17:16:02 +0000 (13:16 -0400)
commit1616562a152070864c9646e8719d42ee829227fd
treef2e1b9d529e765256683f0eb8a3d79faeee9a8c9
parentcda42b28bc65248616f9397a30bc413b1e96d5a1
Don't emit pyodbc "no driver" warning for empty URL

Fixed an issue in the pyodbc connector such that a warning about pyodbc
"drivername" would be emitted when using a totally empty URL.  Empty URLs
are normal when producing a non-connected dialect object or when using the
"creator" argument to create_engine(). The warning now only emits if the
driver name is missing but other parameters are still present.

Fixes: #5346
Change-Id: I0ee6f5fd5af7faca63bf0d7034410942f40834a8
(cherry picked from commit 29534cf13939c7f7fe59399f12d50df2fcab7a38)
doc/build/changelog/unreleased_13/5346.rst [new file with mode: 0644]
lib/sqlalchemy/connectors/pyodbc.py
test/dialect/mssql/test_engine.py