-
-
Notifications
You must be signed in to change notification settings - Fork 213
Closed
Description
Regression in 3.0.6
def test_executemany_no_data(conn, execmany):
cur = conn.cursor()
> cur.executemany("insert into execmany(num, data) values (%s, %s)", [])
tests/test_cursor.py:272:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
psycopg/psycopg/cursor.py:569: in executemany
self._conn.wait(self._executemany_gen(query, params_seq))
psycopg/psycopg/connection.py:773: in wait
return waiting.wait(gen, self.pgconn.socket, timeout=timeout)
psycopg/psycopg/waiting.py:243: in wait_epoll
s = gen.send(ready)
psycopg/psycopg/cursor.py:225: in _executemany_gen
self._set_result(0)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <psycopg.Cursor [no result] [INTRANS] (port=54314 user=piro database=psycopg3_test) at 0x7feca6b5cd50>, i = 0, format = None
def _set_result(self, i: int, format: Optional[Format] = None) -> None:
"""
Select one of the results in the cursor as the active one.
"""
self._iresult = i
> res = self.pgresult = self._results[i]
E IndexError: list index out of range
psycopg/psycopg/cursor.py:410: IndexError
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels