Commit graph

9 commits

Author SHA1 Message Date
Ken Jin
9e38553132
[3.11] gh-99886: Fix crash when freeing objects with managed dictionaries (#99902)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2022-12-04 14:41:23 +08:00
Miss Islington (bot)
748c83d96d
Clean up the sqlite3 tests (GH-93056)
Remove helper managed_connect(). Use memory_database() or
contextlib.closing() + addCleanup(unlink) instead.
(cherry picked from commit e5d8dbdd30)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-05-21 09:37:04 -07:00
Erlend Egeberg Aasland
f629dcfe83
gh-80254: Disallow recursive usage of cursors in sqlite3 converters (#29054)
Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-05-03 17:03:06 -06:00
Erlend Egeberg Aasland
4674fd4e93
bpo-44859: Raise more accurate exceptions in sqlite3 (GH-27695)
* Improve exception compliance with PEP 249
* Raise InterfaceError instead of ProgrammingError for SQLITE_MISUSE.
  If SQLITE_MISUSE is raised, it is a sqlite3 module bug. Users of the
  sqlite3 module are not responsible for using the SQLite C API correctly.
* Don't overwrite BufferError with ValueError when conversion to BLOB fails.
* Raise ProgrammingError instead of Warning if user tries to execute() more
  than one SQL statement.
* Raise ProgrammingError instead of ValueError if an SQL query contains null characters.
* Make sure `_pysqlite_set_result` raises an exception if it returns -1.
2022-03-16 22:58:25 -07:00
Nikita Sobolev
55f4ec460e
bpo-46425: use absolute imports in test_sqlite3 (GH-30676) 2022-01-22 18:03:56 +02:00
Erlend Egeberg Aasland
9d6a239a34
bpo-44092: Don't reset statements/cursors before rollback (GH-26026)
In SQLite versions pre 3.7.11, pending statements would block a rollback.  This is no longer the case, so remove the workaround.
2022-01-03 19:02:39 +00:00
Erlend Egeberg Aasland
c1323d4b8c
bpo-45754: Use correct SQLite limit when checking statement length (GH-29489) 2021-11-10 18:46:11 +00:00
Erlend Egeberg Aasland
3d42cd9461
bpo-45243: Use connection limits to simplify sqlite3 tests (GH-29356) 2021-11-05 19:19:43 +02:00
Erlend Egeberg Aasland
62bf263a77
bpo-10572: Move sqlite3 tests to Lib/test (GH-29304)
Automerge-Triggered-By: GH:brettcannon
2021-10-29 15:08:19 -07:00
Renamed from Lib/sqlite3/test/test_regression.py (Browse further)