Loading Now

mssql-python 1.15.0: Faster, More Reliable, and Built for Your Applications

I’m thrilled to announce the launch of mssql-python 1.15.0, marking our 15th update since its General Availability.

We developed mssql-python specifically for Python developers who need to connect their applications to SQL Server, Azure SQL, and Azure Synapse. Each release offers us a chance to enhance your experience, making it faster, simpler, and more reliable. The 1.15.0 version comes packed with improvements in all these areas.

The handling of the setinputsizes() parameter now benefits from the native C++ execution pipeline. If your application relies on wide statements, processes batches, or frequently runs parameterized queries, you’ll notice quicker parameter processing, as more work now happens in the native driver where efficiency reigns.

We’ve also standardised decimal parameter binding. Now, Python Decimal values will always be treated as SQL_NUMERIC, ensuring parameter types are consistent across all queries and batches, regardless of their runtime value.

Moreover, the driver now utilises the current ODBC 3.x parameter type identifiers instead of outdated ODBC 2.x identifiers. This update aligns parameter binding with modern ODBC standards and eliminates issues stemming from legacy type definitions.

Our Binary() function now accepts memoryview objects directly, simplifying the process. If you’re working with buffer-protocol data sources or zero-copy views, you can pass your existing memoryview without any conversion to bytes.

We’ve also made SQL Server-specific type constants readily available within the mssql_python module, making them easier to find and use when declaring parameters or dealing with SQL Server type metadata.

This release addresses several bugs that can be tricky to diagnose, often occurring during concurrency, deployment, or when a process is shutting down.

We’ve fixed the GIL and mutex lock ordering in the native logging path, meaning that multithreaded applications can now log without the fear of deadlock, even when multiple threads log simultaneously.

Additionally, we’ve adjusted the cleanup order of connections with cursors in different lifecycle states. If your application creates multiple cursors and relies on cleanup during process shutdown, you won’t encounter the previous native crash addressed by this fix.

For Windows users, the driver and authentication DLLs are now sourced from directories within the installed package, meaning you no longer need to configure the process-wide DLL search path for these components to be recognised correctly.

Windows ARM64 wheels now feature the compatible ARM64 Rust core for bulk copying, ensuring that ARM64 applications benefit from matching native components and seamless bulk-copy support right from the installed wheel.

Lastly, the Connection.getinfo(SQL_DATABASE_NAME) function now accurately decodes the returned value, so when you check the active database, you’ll receive a Python string as you’d expect.

A massive thank you to everyone who reported issues, tested fixes, contributed code, or shared feedback on our driver. We’re creating this tool for you, and your input continually helps us prioritise our improvements.

If you want to install or upgrade, follow this command:

pip install --upgrade mssql-python

For more details, read the release notes for mssql-python 1.15.0, check the package on PyPI, or delve into the mssql-python repository.

Share this content:


Discover more from Qureshi

Subscribe to get the latest posts sent to your email.

Discover more from Qureshi

Subscribe now to keep reading and get access to the full archive.

Continue reading