-
Notifications
You must be signed in to change notification settings - Fork 50
Exceptions do not properly pickle and unpickle #587
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 workinginADOtriage 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 workinginADOtriage 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
If an exception generated by mssql-python is pickled, the following error will occur on unpickle:
[error].__init__() missing 1 required positional argument: 'ddbc_error'This causes issues when using e.g. multiprocessing and attempting to marshal errors back to a central process.
To reproduce
Expected behavior
The pickled exception should cleanly unpickle, and then I should be able to treat it just like any other exception object.
Further technical details
Python version: 3.12.3
SQL Server version: N/A
Operating system: N/A