MySQL Forums
Forum List  »  Connector/Python

Legacy python sql connector pool
Posted by: julian morrison
Date: November 17, 2017 07:33AM

I have been asked to make changes to a legacy python app which uses Python 2.4, MySQL 1.2.2 and wxpython.
This is built into an installer using py2exe -> nsis.
The original developer cannot be contacted for advice.

There appears to be a missing module preventing me from running or building the app:
missing module ‘pool’.

It is typically used like this:

import pool

db_connection_pool = pool.Pool(lambda:db.open_connection(db=dbtouse))

def open_connection(id="root", password="__rtk__", user_name="",
db=constants.database_name):
instance = MySQLdb.Connect(user=id, passwd=password, db=db)
connection = DBConnection(instance, id, password, user_name)
return connection

It looks like there is a missing SQL connector pool module but I have no idea what it is.
I have tried everything to no avail:

a. processing.Pool or multiprocessing.Pool - TypeError: range() integer end argument expected, got function
b. Pysqlpool – no Pool()
c. SQLAlchemy - 'Pool' object has no attribute 'get'
d. Antiorm - pool = ConnectionPool()
e. SQLRelay – no Pool()
f. Mysql - .connector.pooling
g. psycopg2.pool – no Pool()
h. DBUtils - no Pool()
i. pg_simple - no Pool()
j. asyncpg.pool - no Pool()
k. ctds - no Pool()

Does anyone have any ideas what the missing pool module could be?

Thanks in advance

Options: ReplyQuote


Subject
Written By
Posted
Legacy python sql connector pool
November 17, 2017 07:33AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.