Closed aersam closed 11 months ago
@gavin-aguiar pls comment.
@aersam We provide the MS SQL Server ODBC 17 driver along with Python 3.11. Have you come across any functionality issues when using ODBC 17 with Python 3.11? Considering the possibility that Python 3.11 may have introduced changes in the way it loads shared libraries, which could potentially impact this behavior. Thanks
@pdthummar I have come across functionality issues. ODBC 17 is not included with the 3.11 image mcr.microsoft.com/azure-functions/python:4-python3.11
. I've verified this by checking the drivers with the command pyodbc.drivers()
while in the running container.
Thanks @aersam and @Jazzex. We've identified and addressed the issue, incorporating ODBC Driver 18 for Python 3.11, which will be part of the upcoming host release. To mitigate the issue until fix is deployed, I recommend downgrading the Python version to 3.10.
In Azure Functions up to 3.10, it's possible to use pyodbc or other odbc related Libraries with MS SQL Server because the image comes with ODBC Driver V17 shipped. This is really practical with Azure SQL! In 3.11 however, the ODBC driver is not preinstalled. It's trivial to repo if you install pyodbc:
In 3.10 this returns the MS SQL ODBC driver, in 3.11 an empty array only.
I would expect a recent version of the ODBC Driver for MS SQL to be shipped as it's the recommended way to access MS Sql Azure in a Python. I'm fine if it's Version 18 for Python 3.11 (or would even welcome it)
See also this comment
In general there seems to be little docs about such stuff, or only outdated one, see https://github.com/Azure/azure-functions-python-worker/wiki/Preinstalled-Python-Libraries