Release dates, binaries, and other information for the Trino Python client are available in the tags list, the README and the PyPI page.
- Fix handling of
Decimal
params which use scientific notation. (#347) - Map Trino
UUID
type to Pythonuuid.UUID
. (#354) - Map
sqlalchemy.Uuid
type to TrinoUUID
. (#359) - Support using timezone aware
datetime.time
params in prepared statements. (#360) - Allow accessing
ROW
type fields using their names in addition to their indices. (#338) - Interpret
roles
without catalog name as system roles for convenience. (#341)
- Return
rowcount
property on the DB-APICursor
when available. (#325) - Provide a read-only property
query
on the DB-APICursor
which contains the query text submitted through the cursor when available. (#323) - Automatically determine
http_scheme
,host
andport
fromhost
if 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
varbinary
query parameters. (#299) - Add
Cursor.describe
method to return some metadata about the results of a query. (#302) - Add
internal_size
,precision
andscale
inCursor.description
. (#315) - Add support for chaining methods on
Cursor.execute
. (#279) - Fix bug where passing
roles
toConnection
did 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=True
to thetrino.dbapi.connect
method. To restore the old behaviour of mapping results to primitive types you can passlegacy_primitive_types=True
to thetrino.dbapi.connect
method. 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.connect
when 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
None
values in array, map and row types whenexperimental_python_types
is enabled. (#269) - Expose query id of most recently executed query on a cursor as
Cursor.query_id
. (#295)
- Improve the performance of
get_view_names
in SQLAlchemy. (#267) - Fix possible
ValueError
when client receives empty HTTP headers. (#262) - Fix a compatibility issue with
_rfc_1738_quote
in 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
KeyError
when using prepared statements. (#249) - Fix failure when calling
get_table_comment
using SQLAlchemy. (#253)
- Add support for creating tables containing
JSON
columns 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
roles
keyword argument totrino.dbapi.connect
. (#230) - Add support for setting roles by adding the
roles
URL 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.URL
to 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
TableClause
by not performing catalog lookup. (#237) - Fix errors when using prepared statements with Trino versions greater than or equal to 398. (#242)
- Block the
execute
method of the cursor until at least one row is received. Users no longer need to callfetchone
orfetchall
to ensure query starts executing on the Trino server. Note that results still need to be consumed by callingfetchone
orfetchall
to 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_catalog
argument to SQLAlchemyTable
objects. (#186) - Improve performance when a cursor with
experimental_python_types
is used. (#206) - Fix incorrect results for
get_table_comment
in 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.