Description
This is in between a documentation issue and a general question.
Location of the documentation
Documentation problem
The documentation notes that if the con
is a SQLAlchemy connectable
that the user is responsible for disposing/closing. The documentation doesn't note whether the connection is closed if the user provides a str
to the con
parameter. In my quick search, I couldn't find a reference to .dispose()
/.close()
in the source code when the user provides a str
type con
. Is this connection being closed? Is it being left up to garbage collection as noted in SQLAlchemy docs?
Suggested fix for documentation
I think a note about connection closure for str
type con
s would be a nice addition. Right now, if I'm understanding correctly, the connection is being garbage collected and the user needs to infer from the docs that they don't need to worry about an open connection.
Current wording:
The user is responsible for engine disposal and connection closure for the SQLAlchemy connectable.
Potential wording:
The user is responsible for engine disposal and connection closure for the SQLAlchemy connectable; str connections are closed automatically.