Release dates, binaries, and other information for the Trino Python client are available in the tags list, the README and the PyPI page.
- Return
rowcountproperty on the DB-APICursorwhen available. (#325) - Provide a read-only property
queryon the DB-APICursorwhich contains the query text submitted through the cursor when available. (#323) - Automatically determine
http_scheme,hostandportfromhostif it's a valid URL. (#340) - Fix query cancellation to follow the protocol. Before this change cancelling a query could lead to errors from the Trino server. (#328)
- Add support for SQLAlchemy 2.0. (#307)
- Add support for
varbinaryquery parameters. (#299) - Add
Cursor.describemethod to return some metadata about the results of a query. (#302) - Add
internal_size,precisionandscaleinCursor.description. (#315) - Add support for chaining methods on
Cursor.execute. (#279) - Fix bug where passing
rolestoConnectiondid not enable the provided roles. (#311)
- The client now maps query results to Python types by default. In older
versions this could be enabled explicitly by passing
experimental_python_types=Trueto thetrino.dbapi.connectmethod. To restore the old behaviour of mapping results to primitive types you can passlegacy_primitive_types=Trueto thetrino.dbapi.connectmethod. See the documentation to learn more. (#305) - Add support for setting the session timezone. When not set explicitly it
defaults to the client side local timezone. This changes the behaviour of the
client in backward-incompatible way. To preserve the behaviour from client
versions older than 0.321.0 you can explicitly pass
timezone='UTC'totrino.dbapi.connectwhen creating the connection. (#27) - Add support for variable precision datetime types. This change makes temporal types contain the correct precision as computed by Trino instead of being always limited to millisecond precision. (#300)
- Fix handling of expired access tokens when using OAuth 2 authentication. (#284)
- Support
Nonevalues in array, map and row types whenexperimental_python_typesis enabled. (#269) - Expose query id of most recently executed query on a cursor as
Cursor.query_id. (#295)
- Improve the performance of
get_view_namesin SQLAlchemy. (#267) - Fix possible
ValueErrorwhen client receives empty HTTP headers. (#262) - Fix a compatibility issue with
_rfc_1738_quotein SQLAlchemy v1.4.42. (#273) - Return only tables in SQLAlchemy
get_table_names. Previously, it also contained views. (#266)
- Fix the SQLAlchemy dialect to be compatible with SQLAlchemy 1.3.x versions. (#250)
- Fix possible
KeyErrorwhen using prepared statements. (#249) - Fix failure when calling
get_table_commentusing SQLAlchemy. (#253)
- Add support for creating tables containing
JSONcolumns and reading and writing to them with SQLAlchemy. (#194) - Add support for setting roles by passing a dictionary of catalog name and
role as the
roleskeyword argument totrino.dbapi.connect. (#230) - Add support for setting roles by adding the
rolesURL query parameter in SQLAlchemy connections to a JSON object with keys as the catalog name and values as the role name. (#230) - Add a function
trino.sqlalchemy.URLto generate SQLAlchemy URLs which properly handles escaping and encoding values where needed. (#235) - Fix query failures not being propagated to the client when using
fetchone. (#95) - Fix queries returning a single row from sometimes appearing as failed on the server. (#220)
- Fix query failures when using SQLAlchemy
TableClauseby not performing catalog lookup. (#237) - Fix errors when using prepared statements with Trino versions greater than or equal to 398. (#242)
- Block the
executemethod of the cursor until at least one row is received. Users no longer need to callfetchoneorfetchallto ensure query starts executing on the Trino server. Note that results still need to be consumed by callingfetchoneorfetchallto ensure that a query isn't considered idle and terminated on the server. (#232)
- Add support for SQLAlchemy queries to access multiple catalogs by specifying
a
trino_catalogargument to SQLAlchemyTableobjects. (#186) - Improve performance when a cursor with
experimental_python_typesis used. (#206) - Fix incorrect results for
get_table_commentin SQLAlchemy when two tables with the same name and schema exist in different catalogs. (#217) - Remove spurious logging of HTTP responses when a query is cancelled. (#216)
Details for older releases are available in the tags list, the code itself, and the README documentation.