-
Notifications
You must be signed in to change notification settings - Fork 50
Connection Context Manager and Commits #635
Copy link
Copy link
Open
Labels
area: api-compliancePython API behavior and typing: DB-API 2.0, exceptions, type stubs, new APIs.Python API behavior and typing: DB-API 2.0, exceptions, type stubs, new APIs.bugSomething isn't workingSomething isn't workingtriage doneIssues that are triaged by dev team and are in investigation.Issues that are triaged by dev team and are in investigation.
Metadata
Metadata
Assignees
Labels
area: api-compliancePython API behavior and typing: DB-API 2.0, exceptions, type stubs, new APIs.Python API behavior and typing: DB-API 2.0, exceptions, type stubs, new APIs.bugSomething isn't workingSomething isn't workingtriage doneIssues that are triaged by dev team and are in investigation.Issues that are triaged by dev team and are in investigation.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Describe the bug
When using a context manager as described in the docs:
https://github.com/microsoft/mssql-python/wiki/Connection#context-manager
there does not seem to be any commit on exit. Are the docs incorrect?
Also do bulkcopies completely ignore the current connection object and create a new one?
To reproduce
Expected behavior
The process described by the docs
Further technical details
Python version: 3.10
SQL Server version: SQL Server 2025
Operating system: Windows/Docker