My favorites | Sign in
Project Home Downloads Wiki
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 352: non-static Connection_New conflicts with other modules, e.g., multiprocessing
1 person starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


 
Reported by jeremy.m...@gmail.com, Jan 2, 2014
What steps will reproduce the problem?
1. import multiprocessing
2. import pyodbc
3. conn = pyodbc.connect(<your_dsn>)
4. print type(conn)

What is the expected output? What do you see instead?
Expected: pyodbc.Connection
Get: _multiprocessing.Connection

What version of the product are you using? On what operating system?
Using version 3.0.7 on python 2.7.5 on RHEL 6.

Please provide any additional information below.

It appears that both pyodbc and multiprocessing have non-static Connection_New functions that conflict with one another.  I've hacked pyodbc so that the function is called pyodbc_Connection_New.
Jan 2, 2014
#1 jeremy.m...@gmail.com
I jumped the gun, the problem is actually with the ConnectionType struct.  Both modules declare non-static ConnectionType structs, so, depending on order of import, either pyodbc's is used or multiprocessing's is used.

Powered by Google Project Hosting