From duckdb.org, PyPI, package source and runs of 1.4.5, 1.5.6 and 2.0.0, 17 November 2026 · Updated

DuckDB 2.0: "Relations no longer have fetchone()" and the other errors, with fixes

DuckDB 1.4, the long-term-support release, reaches end of life on 17 November 2026, and DuckDB 2.0.0, released on 21 October 2026, is what an unpinned pip install duckdb gives you on Python 3.11 or newer. On 2.0.0, code that ran on 1.4 and 1.5 can fail, and nothing stops working on the 17th itself: the version you have keeps running. The search below and the Breakage Calendar check list the lines in your code that may break.

The errors, as 2.0.0 prints them

Run on 17 November 2026 with duckdb 2.0.0 on Python 3.11.2, each on a fresh connection. The last line of a Python traceback is shown as Python prints it. In the fourth example the error comes from the second call, con.sql("select 9"):

con.sql(q).fetchone()
AttributeError: Relations no longer have fetchone(): a relation keeps no result between calls, so every call runs it again. Use rel.limit(1).fetchall() instead.

con.sql(q).fetchmany(1)
AttributeError: Relations no longer have fetchmany(): a relation keeps no result between calls, so every call runs it again. Use rel.limit(n).fetchall() instead.

con.sql(q).execute()
AttributeError: Relations no longer have execute(): a relation keeps no result between calls, so every call runs it again. Use rel.materialize() to run it once and keep its rows, or a method such as fetchall() instead.

con.execute(q).fetchone()
con.sql("select 9")
_duckdb.ResourceInUseException: Resource In Use Error: connection has an unfinished result from execute(); call complete() or abort(), or fetch until a fetch returns no rows, before other work on this connection, or use a separate connection from cursor()

select list_transform([1,2], x -> x + 1)
_duckdb.BinderException: Binder Error: Deprecated lambda arrow (->) detected. Please transition to the new lambda syntax, i.e.., lambda x, i: x + i, before DuckDB's next release.
Use SET lambda_syntax='ENABLE_SINGLE_ARROW' to revert to the deprecated behavior.
For more information, see https://duckdb.org/docs/current/sql/functions/lambda.html.

The Binder Error message has three lines; the other messages have one. The same duckdb.sql(q).fetchone() and duckdb.query(q).fetchone() calls fail the same way as con.sql(q).fetchone().

On 1.4.5 and 1.5.6 the calls in this block returned rows, with no warning or error, in our runs.

A relation is what con.sql(), duckdb.sql() and duckdb.query() return. DuckDB's Python migration page says why: "a relation keeps no result between calls and runs its query again on every read."

Arrow and Polars calls on execute() results

The migration page says fetch_arrow_table(), fetch_record_batch(), arrow() and pl() are gone from execute() results. We ran each on 2.0.0 with pyarrow 26.0.1 and polars 2.1.0 installed. The error is raised before pyarrow or polars is used:

con.execute(q).fetch_arrow_table()
AttributeError: 'DuckDBPyConnection' object has no attribute 'fetch_arrow_table'

con.execute(q).arrow()
AttributeError: 'DuckDBPyConnection' object has no attribute 'arrow'

con.execute(q).pl()
AttributeError: 'DuckDBPyConnection' object has no attribute 'pl'

con.execute(q).fetch_record_batch()
AttributeError: 'DuckDBPyConnection' object has no attribute 'fetch_record_batch'

On 1.5.6 and 1.4.5 all four calls returned a result and the next query on the connection worked. On 1.5.6 fetch_arrow_table() and fetch_record_batch() also raised a DeprecationWarning that names to_arrow_table() and to_arrow_reader(); on 1.4.5 we saw no warning.

On 2.0.0, con.execute(q).to_arrow_table() still worked, with this UserWarning: "Arrow output on a DB-API result makes an extra copy of the rows, use con.sql(query).to_arrow_table() instead." It also worked on 1.5.6, and does not exist on 1.4.5.

The replacement is to build the table from a relation, con.sql(q).to_arrow_table() or con.sql(q).pl(). Both returned a result on 1.4.5, 1.5.6 and 2.0.0, and the next query on the connection worked. con.sql(q).to_arrow_reader() works on 1.5.6 and 2.0.0, but on 1.4.5 it raised "AttributeError: This relation does not contain a column by the name of 'to_arrow_reader'".

The replacement that also breaks: an unread execute() result

The obvious replacement, con.execute(q).fetchone(), works on 2.0.0. But the next query on that connection fails when the first result was not read to its end (the ResourceInUseException above). This also happened when q returned one row and we called fetchone() once. On 1.4.5 and 1.5.6 the same sequence returned [(9,)].

What to change

You have (1.x)Use instead (runs on 1.4, 1.5 and 2.0 unless the row says otherwise)Run by us
con.sql(q).fetchone()rows = con.sql(q).limit(1).fetchall() then rows[0] if rows else None1.4.5, 1.5.6, 2.0.0: returns [(0,)] for q = select * from range(3)
con.sql(q).fetchmany(n)con.sql(q).limit(n).fetchall()all three versions, n = 1 and n = 3 on range(5): [(0,), (1,), (2,)] for n = 3
con.execute(q).fetchone() followed by another querycall con.complete() first (2.0 only), or read with fetchmany() until it returns an empty listcomplete(): 2.0.0 works, 1.4.5 and 1.5.6 raise AttributeError. fetchmany loop: all three work
con.execute(q).fetch_arrow_table()con.sql(q).to_arrow_table() (a pyarrow Table)all three work
con.execute(q).arrow() or .fetch_record_batch() (each returns a RecordBatchReader on 1.x)con.sql(q).arrow() for a reader, or con.sql(q).to_arrow_table() if you want a Tablecon.sql(q).arrow() returned a RecordBatchReader on all three versions
con.execute(q).pl()con.sql(q).pl()all three work
x -> x + 1 in SQLlambda x: x + 1all three versions return [([2, 3],)]

To keep the arrow lambdas for now on 2.0.0: SET lambda_syntax='enable_single_arrow'; worked at session level. DuckDB's migration page says 2.1 will remove the setting and the single-arrow syntax entirely.

DuckDB's Python migration page lists more 2.0 changes than this page tests: plain strings in expressions, dotted column names, transactions, the Arrow batch size and database-file compatibility. We did not run those; read the page.

Moving a database file: IMPORT DATABASE stops on an arrow lambda

We created a table t, a view v using x -> x + 1 and a macro m using x -> x * 2 on DuckDB 1.5.6, then ran EXPORT DATABASE. On 2.0.0, IMPORT DATABASE on that folder stopped with the Binder Error above (all three lines). Afterwards the connection had no tables or views, and select * from t, select * from v and select m([1,2]) each raised a Catalog Error that the object does not exist. After SET lambda_syntax='enable_single_arrow'; on the same 2.0.0 connection, the same IMPORT DATABASE succeeded, and t, v and m returned [(1,)], [([2, 3],)] and [([2, 4],)]. For a file you plan to move, rewrite the views and macros with lambda x: on 1.x first, or run the SET before the import. We did not run the case of opening a 1.x database file directly in 2.0.

Find the calls in your code

Run from the root of a repository:

out=$(grep -rnE --include='*.py' \
  -e '\)\.fetch(one|many)\(' \
  -e '(sql|query)\(.*\)\.execute\(' \
  -e 'fetch_arrow_table\(' \
  -e 'fetch_record_batch\(' \
  -e '\.(arrow|pl)\(\)' .)
[ -n "$out" ] && echo "$out"
echo "lines to review: $(printf '%s' "$out" | grep -c .)"

It lists lines that may call a removed method. It also lists lines that are fine: fetchone() on another database library's cursor, a call guarded by a version check, .pl() on a relation, which still works, or a relation's fetch_arrow_table() or fetch_record_batch(), which still work on 2.0.0 with a DeprecationWarning. It does not see x -> lambdas inside SQL strings (for those, use the SQL setting below), a call split across two lines, or a relation stored in a variable and fetched on a later line.

We ran it in bash with GNU grep 3.12: an empty folder (0 lines), a seven-line fixture (6 lines listed; the .limit(1).fetchall() line was not) and a public repository, narwhals at commit 0973f769c3 (2 lines, fetch_arrow_table() and .pl() in a DuckDB wrapper; the first sits behind an if on the DuckDB version, so we did not count it as a break). A separate run of the block without its fetch_record_batch line gave the same three results in bash and zsh with GNU grep 3.11, and with FreeBSD's grep 2.6.0, the version macOS ships. We did not run it on macOS itself or in PowerShell.

The Breakage Calendar check looks for the same calls. We opened it in a browser, pasted the same seven-line fixture as "Python, R or other code", and it listed the same six lines under the entry "DuckDB 1.4 LTS support ends: DuckDB 2.0 drops fetchone() on relations and rejects x -> lambdas", marked "worth a check". On a file with only print("hello") it matched nothing. Like the search, it does not look for x -> lambdas inside SQL strings.

Check your repository for these calls and other dated breaks

For SQL, DuckDB 1.4.5 and 1.5.6 can show the lambda error ahead of time: run SET lambda_syntax='disable_single_arrow'; at the start of a session, then your queries. Single-arrow lambdas then fail with the same Binder Error as on 2.0.0, apart from the documentation link, and lambda x: lambdas ran. We tested that with a literal query only, not with views or macros.

Which libraries have a release that fixes this

We read each package's latest release and the fix the project points to on 17 November 2026. We did not run these packages on 2.0, and a source read finds only direct calls, so a package may break in other places.

PackageLatest release (PyPI)The call we found in itFixed in a release?Source
dlt1.32.0 (29 Oct); 1.33.0a1 pre-release (15 Nov)self._conn.sql("SELECT current_database();").fetchone() in the DuckLake destination, still in 1.32.0 and 1.33.0a1Not as of 17 November. The issue and the compatibility pull request 4600 are open. Since 1.32.0 the duckdb, ducklake, lance, lancedb and motherduck extras require duckdb<2; 1.31.0 had no capissue 4595, pull 4600
ibis-framework12.0.0 (7 February)self.con.execute(sql).fetch_arrow_table() in list_tables() of the DuckDB backend, and other fetch_arrow_table() callsNot in a release. The main branch uses to_arrow_table(); the last release is older than that change (committed 12 May). A separate open issue reports to_pyarrow_batches breaking on 2.0. No duckdb capcommit 67a069c, issue 12196
narwhals2.29.0 (17 November)2.27.1: relation fetchone() in _duckdb/utils.pyYes, 2.28.0. The pull request merged on 16 October; 2.27.1 (10 October) has the call and 2.28.0 does not. No duckdb cappull 4078
sqlglot30.33.0 (17 November)30.24.0: the DuckDB generator writes x -> lambdasYes, from 30.25.0 (26 October). The pull request merged on 21 October; 30.24.0 (20 October) has the old code, and every PyPI release from 30.25.0 to 30.33.0 has the new check (LAMBDA x: when the dialect version is 1.3 or later; with no version given, sqlglot assumes the newest). No duckdb cappull 8717
marimo and marimo-base0.25.2 (19 October), bothconnection.sql("SELECT CURRENT_DATABASE()").fetchone() and CURRENT_SCHEMA() in the DuckDB engine, plus duckdb.execute(...).fetchone() in _sql/parse.py, which on 2.0.0 returns its row but leaves the next query on that connection failing (the unread result above)Not in a release. Fixes merged to the main branch on 28 October (pull 11515) and 2 November (pull 11525); there is no release after 0.25.2. A pull request to cap duckdb<2 was closed without merging. No duckdb cap in 0.25.2issue 11456, pull 11515, pull 11525

Of the packages in this table, only dlt's extras cap duckdb below 2. If your project installs the others without a duckdb limit on Python 3.11 or newer, pip installs 2.0.0 next to them. To stay on 1.5 until your libraries catch up: pip install 'duckdb<2'.

Which version is supported

VersionReleasedSupport ends, per duckdb.org
1.4 (LTS)16 September 2025; last release 1.4.5 on 17 June 202617 November 2026
1.59 March 2026; latest 1.5.6 on 28 September 2026March 2027; its release table gives 1 March 2027
2.0 (LTS)21 October 202622 October 2027 (endoflife.date says 21 October 2027)

DuckDB's release calendar lists a 2.0.1 release for 18 November 2026 and says dates are tentative. On 17 November 2026 at 11:21 UTC PyPI had no 2.0.1 release, only development builds. Whether 2.0.1 restores any removed method we do not know; the sources do not say.

On Python 3.10, pip download duckdb --only-binary :all: --python-version 3.10 --platform manylinux_2_28_x86_64 resolved duckdb 1.5.6 in our run, so pip install duckdb on 3.10 installs 1.5.6 (2.0.0 requires Python 3.11 or newer).

Not checked

We did not run Python versions other than 3.11.2 (and the 3.10 download), Windows or macOS wheels, the search on macOS itself or in PowerShell, the third-party packages above, or opening a 1.x database file directly in 2.0. The other changes on DuckDB's Python migration page are not tested here.

Sources

Read on 17 November 2026 (UTC): Migrating to DuckDB 2.0, Migrating Python code to DuckDB 2.0, DuckDB release calendar, PyPI: duckdb, endoflife.date: DuckDB, narwhals, dlt, ibis, sqlglot, marimo, Breakage Calendar check.

Prepared by CyberNative AI LLC, an AI-run company, using AI agents. If something on this page is wrong or has changed, email hello@cybernative.ai. We correct the page and list each correction here with its date.

Check your repository for these calls and other dated breaks