NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #928 most downloaded on PyPI
Client for the Trino distributed SQL Engine
Last release 11 days ago
23 Sep 2026
Ships fairly regularly
a new release about every 2 months
Most releases are documented
notes for 25 of 38 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
38 releases · first in 2020
One column per quarter.
Add allow_insecure_auth to opt out of the HTTP+auth guard by @hashhar in #633
Full Changelog: 0.339.0...0.340.0
AttributeError when binding bytes values for VARBINARY columns,
including through SQLAlchemy LargeBinary inserts and literal
compilation.
(#626)$partitions queries issued by SQLAlchemy reflection never being
cancelled, leaving them running on the coordinator until they time out
on their own.
(#627)allow_insecure_auth connection option to opt out of the guard
against sending authentication credentials over plain HTTP for
connections that are encrypted below the application layer.
(#494)Make result iteration recoverable from errors by @hashhar in #615
Full Changelog: 0.338.0...0.339.0
get_columns.
(#581)server_version_info on the SQLAlchemy
dialect while a query issued through the same connection is already in
flight, for example when used with aws-xray-sdk.
(#559)trino.sqlalchemy.URL() to validate the host argument and raise a
clear error instead of producing a malformed connection URL.
(#579)INSERT/UPDATE/DELETE queries incorrectly being left as cancelled
on the server when the cursor is closed immediately after reading the row
count.
(#601)connect() not being forwarded on
requests used to fetch and acknowledge spooled result segments from the
coordinator.
(#620)charset in the Content-Type header of statement requests so
that proxies such as Trino Gateway can parse the submitted SQL.
(#600)+ character in the username,
password, or query parameter values.
(#611)stats_callback argument to Connection.cursor() that is invoked
with the current query stats after every response from the coordinator,
starting right after the query is submitted so the query ID is available
while the query is still running.
(#578)https://
in the host URL, or pass http_scheme='https', to keep using
authentication.
(#593)Fix spurious warnings and bogus index when reflecting Iceberg tables by @metadaddy in #520
Full Changelog: 0.337.0...0.338.0
NUMBER type.
(#610)columns property to handle lazy spooled result segments.
(#599)Make this package PEP-561 compatible by adding a py.typed marker by @Priyansh121096 in #514
Full Changelog: 0.336.0...0.337.0
py.typed marker.
(#514)first_value, last_value, nth_value,
lead, and lag.
(#586)lz4 and zstandard optional dependencies. The client now gracefully handles
missing or broken compression libraries by disabling the corresponding encoding.
(#585)Bump requests to 2.32.4 to address CVE-2024-47081 by @damian3031 in #569
Full Changelog: 0.335.0...0.336.0
Fix logic for setting http_scheme by @damian3031 in #564
Full Changelog: 0.334.0...0.335.0
Allow authentication over insecure channel.
with statement with Cursor class. (#537)KeyError when accessing missing error_location in TrinoQueryError. (#535).SET AUTHORIZATION and RESET AUTHORIZATION statements. (#551)https. (#549)Full Changelog: 0.333.0...0.334.0
Improve handling of query results containing null values for the error field.
Add support for spooling protocol.
Add support for Python 3.13 and drop support for Python 3.8 which is end-of-life.
INTERVAL YEAR TO MONTH type by mapping to Python
relativedelta.
(#475)INTERVAL DAY TO SECOND type by mapping to Python
timedelta.
(#475)Add support for try_cast to SQLAlchemy dialect.
try_cast to SQLAlchemy dialect.
(#473)Retry-After HTTP header in the response.
(#457)WWW-Authenticate HTTP headers.
(#484)get_indexes implementation to return partition column names
for Hive connector instead of returning column names of the
<table>$partitions table.
(#476)cert and key from SQLAlchemy connection URI.
(#478)Add support for SET SESSION AUTHORIZATION.
SET SESSION AUTHORIZATION.
(#349)auth=GSSAPIAuthentication(...) to use it.
(#454)ROW and ARRAY DDL generation.
(#458)Add support for Python 3.12 and drop support for Python 3.7 and PyPy 3.8 which are end-of-life.
JSON data type to SQLAlchemy dialect.
(#387)IGNORE NULLS in window functions when using SQLAlchemy.
(#429)MAP type to SQLAlchemy dialect.
(#397)user is provided when
creating the connection. If user is not provided the previous behaviour of
a per-host token cache is used.
(#430)trino.
(#434)keyring.backends.null.Keyring to disable keyring when using
OAuth2.
(#431)fetchall returning already returned rows if called after fetchone or
fetchmany.
(#414)get_indexes in SQLAlchemy to not fail when called for non-Hive tables.
(#426)MAP types with boolean or integer keys.
(#441)Implement get_catalog_names for SQLAlchemy to get the list of catalogs present on the cluster.
get_catalog_names for SQLAlchemy to get the list of catalogs
present on the cluster.
(#401)OAuth2Authentication if externalAuthentication parameter is set on
the connection url when using SQLAlchemy.
(#343)User-Agent HTTP header in all requests to Trino Python Client/<client_version>.
(#411)TrinoConnectionError for all connection related errors.
(#364)Fix SQLAlchemy URL failing to parse if legacy_prepared_statements parameter was specified.
Queries with parameters now uses EXECUTE IMMEDIATE instead of PREPARE, EXECUTE and DEALLOCATE if the server supports EXECUTE IMMEDIATE. If EXECUTE IMM
EXECUTE IMMEDIATE instead of PREPARE,
EXECUTE and DEALLOCATE if the server supports EXECUTE IMMEDIATE. If
EXECUTE IMMEDIATE is not support the client falls back to using PREPARE,
EXECUTE and DEALLOCATE. If you want to always use PREPARE, EXECUTE
and DEALLOCATE set the kwarg legacy_prepared_statements to True.
(#375)Reduce the number of times SELECT version() query is sent to Trino when using SQLAlchemy.
Fix handling of Decimal params which use scientific notation.
Decimal params which use scientific notation.
(#347)UUID type to Python uuid.UUID.
(#354)sqlalchemy.Uuid type to Trino UUID.
(#359)datetime.time params in prepared statements.
(#360)ROW type fields using their names in addition to their
indices.
(#338)roles without catalog name as system roles for convenience.
(#341)Return rowcount property on the DB-API Cursor when available.
rowcount property on the DB-API Cursor when available.
(#325)query on the DB-API Cursor which contains
the query text submitted through the cursor when available.
(#323)http_scheme, host and port from host if it's
a valid URL.
(#340)Add support for SQLAlchemy 2.0.
varbinary query parameters.
(#299)Cursor.describe method to return some metadata about the results of a
query.
(#302)internal_size, precision and scale in Cursor.description.
(#315)Cursor.execute.
(#279)roles to Connection did not enable the provided
roles.
(#311)experimental_python_types=True to the trino.dbapi.connect method. To
restore the old behaviour of mapping results to primitive types you can pass
legacy_primitive_types=True to the trino.dbapi.connect method. See the
documentation
to learn more.
(#305)timezone='UTC' to
trino.dbapi.connect when creating the connection.
(#27)Fix handling of expired access tokens when using OAuth 2 authentication.
Improve the performance of get_view_names in SQLAlchemy.
get_view_names in SQLAlchemy.
(#267)ValueError when client receives empty HTTP headers.
(#262)_rfc_1738_quote in SQLAlchemy v1.4.42.
(#273)get_table_names. Previously, it
also contained views.
(#266)Fix the SQLAlchemy dialect to be compatible with SQLAlchemy 1.3.x versions.
Add support for creating tables containing JSON columns and reading and writing to them with SQLAlchemy.
JSON columns and reading and
writing to them with SQLAlchemy.
(#194)roles keyword argument to trino.dbapi.connect.
(#230)roles URL query parameter in
SQLAlchemy connections to a JSON object with keys as the catalog name and
values as the role name.
(#230)trino.sqlalchemy.URL to generate SQLAlchemy URLs which
properly handles escaping and encoding values where needed.
(#235)fetchone.
(#95)TableClause by not performing
catalog lookup.
(#237)execute method of the cursor until at least one row is received.
Users no longer need to call fetchone or fetchall to ensure query starts
executing on the Trino server. Note that results still need to be consumed by
calling fetchone or fetchall 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 SQLAlchemy Table objects.
trino_catalog argument to SQLAlchemy Table objects.
(#186)experimental_python_types is used.
(#206)get_table_comment in SQLAlchemy when two tables
with the same name and schema exist in different catalogs.
(#217)Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →