microsoft / microsoft/mssql-python

Implement callproc() for full DB-API 2.0 compliance

Open
#515 4 comments 0 reactions 1 assignee View on GitHub

@gargsaumya is already working on this.

Since Aug 10, 2026.

area: api-compliance enhancement
Dominant language
Python
Stars
472
Forks
60
Avg merge
2d 11h
Merged PRs (30d)
36

Description

Summary

callproc() currently raises NotSupportedError. It is the only remaining gap to full PEP 249 (DB-API 2.0) cursor interface compliance.

Current behavior

cursor.callproc('dbo.my_proc', [1, 'abc'])
# Raises: NotSupportedError

Workaround

Users must use cursor.execute() with either EXEC or the ODBC {CALL ...} escape sequence:

cursor.execute('{CALL dbo.my_proc(?, ?)}', [1, 'abc'])

Expected behavior

callproc() should execute a stored procedure and return modified copies of the input parameters, per the PEP 249 specification.

Impact

The driver currently reports apilevel = '2.0' and the cursor interface is listed as "Mostly compliant" solely because of this gap.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.