- attached test.py
Setting StaticPool in create_engine raises a AttributeError _on_first_connect
Issue #1615
resolved
I'm trying to use sqlite memory DB. In 0.5.4 it's working in 0.6beta1 it raises a AttributeError. I have attached my test script.
Traceback (most recent call last):
File "bin/python", line 32, in <module>
execfile(__file__)
File "test.py", line 7, in <module>
db = create_engine('sqlite://', poolclass=StaticPool, connect_args={'check_same_thread':False})
File "/opt/develop/gamecore/src/SQLAlchemy/lib/sqlalchemy/engine/__init__.py", line 223, in create_engine
return strategy.create(*args, **kwargs)
File "/opt/develop/gamecore/src/SQLAlchemy/lib/sqlalchemy/engine/strategies.py", line 137, in create
pool.add_listener({'first_connect':first_connect})
File "/opt/develop/gamecore/src/SQLAlchemy/lib/sqlalchemy/pool.py", line 189, in add_listener
self._on_first_connect.append(listener)
AttributeError: 'StaticPool' object has no attribute '_on_first_connect'
Comments (5)
-
Account Deleted -
repo owner - changed milestone to 0.6.0
-
repo owner - changed status to resolved
-
Account Deleted Thanks ;-)
-
repo owner - removed milestone
Removing milestone: 0.6.0 (automated comment)
- Log in to comment
test script