Blog Post

SQL Server Blog
3 MIN READ

mssql-python 1.7.1 and the case of the missing megabytes

DavidLevy's avatar
DavidLevy
Icon for Microsoft rankMicrosoft
May 21, 2026

We just shipped mssql-python 1.7.1 to PyPI. This release is mostly polish, but the road to publishing it was bumpier than expected, and there is some housekeeping on the PyPI side worth talking about.

What's in 1.7.1

A handful of correctness, performance, and platform fixes that landed since 1.6.0:

  • PERF: UTF-16 string handling now goes through simdutf and std::u16string, cutting overhead on every string round-trip between Python and the driver.
  • PERF: Faster execute() hot path with soft reset, prepare caching, and guarded diagnostics.
  • FIX: Login failures now raise a proper mssql_python exception instead of a raw RuntimeError (issue #532).
  • FIX: Released the GIL around blocking SQLSetConnectAttr calls so that in-process SSH tunnels (paramiko + sshtunnel) no longer hang connect().
  • FIX: executemany no longer raises a RuntimeError when decimal signs change between rows (issue #557).
  • FIX: Consistent retrieval of CP1252-encoded data in VARCHAR columns across Windows and Linux (issue #468).
  • FIX: manylinux_2_28 build targets so RHEL 8 / glibc 2.28 users get wheels out of the box.
  • FIX: macOS Python 3.10 now gets a proper universal2 wheel.
  • DOC: Setup instructions for Azure Linux.

Full set of changes is in the 1.7.1 PR.

The PyPI space story

This release also forced us to confront something we've been watching for a while: we ran out of room on PyPI.

mssql-python ships native code with bundled ODBC driver binaries for every supported OS / architecture / Python version combination. Each wheel is sizeable on its own, and the number of combinations grows quickly: Windows x64 / ARM64 / x86, macOS universal2, manylinux x86_64 / aarch64, musllinux x86_64 / aarch64, across multiple Python versions. Multiply that by every release we keep on PyPI and the project size adds up fast.

PyPI projects have a per-project storage quota. When we tried to release 1.7.0 we hit it.

What we did short-term

To get 1.7.1 published we cleaned house on old artifacts that nobody should be pulling in fresh installs anymore:

  • Removed all 1.0.0-alpha packages from PyPI.
  • Removed all 1.x.x-beta packages from PyPI.
  • Removed the 1.7.0 packages that made it to PyPI before we hit the space limit.

Pre-release alphas and betas were intentionally there for early adopters during the ramp-up of the driver. None of them are recommended for production use, and the GA versions (1.0.0 and up) supersede everything those wheels offered. If you were pinned to an alpha or beta version, please move to the latest GA release (pip install -U mssql-python). If you have a specific reason that you can't, please let us know in an issue. We want to hear about it.

What we're doing longer-term

Cleaning out old pre-releases buys us breathing room, not a solution. The wheel matrix is going to keep growing as we add platforms, and we don't want to be back in the same spot in three releases.

We're attacking the problem from two directions in parallel:

  1. Split up the deployment. We're working out how to break the published artifacts into smaller pieces so that an install only pulls down what it actually needs. Concretely we're evaluating splitting the bundled native dependencies (ODBC driver binaries, etc.) out of the main wheels so the per-platform wheel size drops substantially. Exact shape is still being designed and we'll have more to share when we've nailed it down. The goal is that a typical pip install mssql-python stays a one-liner with no extra steps, while the on-disk and on-PyPI footprint is a fraction of what it is today.
  2. Asked PyPI for more space. In parallel we've put in a request to PyPI for a storage quota increase. This is a normal process for projects that legitimately need more room, and it gives us a safety net while the longer-term splitting work lands.

We are looking at the space increase as the immediate buffer, and the split is the durable fix.

Upgrading

Nothing user-visible has changed about how you install or use the driver:

pip install -U mssql-python

If you previously pinned to an alpha or beta version, you'll need to move to the latest GA. If you hit any issues during the upgrade, please file a GitHub issue — we read all of them.

Thanks

Thanks to everyone who filed bug reports, repro scripts, and PRs that fed into this release. The fixes we shipped came from real user issues, and the SSH-tunnel and CP1252 ones in particular were caught by community reproductions that made the root cause obvious. Keep them coming.

Updated May 21, 2026
Version 1.0