aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_sqlite3
Commit message (Collapse)AuthorAge
* gh-133447: Add basic color to `sqlite3` CLI (#133461)Stan Ulbrych7 days
|
* gh-133439: Fix dot commands with trailing spaces are mistaken for multi-line ↵Tan Long8 days
| | | | sqlite statements in the sqlite3 command-line interface (GH-133440)
* gh-133595: Clean up sqlite3.Connection APIs (GH-133605)Serhiy Storchaka9 days
| | | | | | | | * All parameters of sqlite3.connect() except "database" are now keyword-only. * The first three parameters of methods create_function() and create_aggregate() are now positional-only. * The first parameter of methods set_authorizer(), set_progress_handler() and set_trace_callback() is now positional-only.
* gh-130645: Add color to stdlib argparse CLIs (gh-133380)Hugo van Kemenade12 days
|
* gh-129928: Raise more accurate exception for incorrect sqlite3 UDF creation ↵Erlend E. Aasland2025-02-11
| | | | | | (#129941) Consistently raise ProgrammingError if the user tries to create an UDF with an invalid number of parameters.
* gh-129603: Don't segfault if sqlite3.Row description is None (#129604)Erlend E. Aasland2025-02-10
|
* gh-129870: Skip test_dump_virtual_tables if SQLite lacks FTS4 support (#129913)Erlend E. Aasland2025-02-09
|
* gh-129354: Use PyErr_FormatUnraisable() function (#129524)Victor Stinner2025-02-03
| | | | | | | Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable(). Update test_sqlite3 tests. Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-71339: Use new assertion methods in test_sqlite3 (GH-128830)Serhiy Storchaka2025-01-14
|
* add missing gc_collect() calls in sqlite3 tests (#127446)CF Bolz-Tereick2024-12-02
|
* gh-91818: Use default program name in the CLI of many modules (GH-124867)Serhiy Storchaka2024-10-10
| | | | | | As argparse now detects by default when the code was run as a module. This leads to using the actual executable name instead of simply "python" to display in the usage message ("usage: python -m ...").
* gh-123849: Fix test_sqlite3.test_table_dump when foreign keys are enabled by ↵Mariusz Felisiak2024-10-08
| | | | default (#123859)
* gh-95144: Improve error message of `... in None` (GH-119888)Zachary Ware2024-07-12
|
* gh-118928: sqlite3: disallow sequences of params with named placeholders ↵Erlend E. Aasland2024-05-14
| | | | | | | | (#118929) Follow-up of gh-101693. The previous DeprecationWarning is replaced with raising sqlite3.ProgrammingError. Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* gh-118924: Remove `sqlite3.version` and `sqlite3.version_info` (#118925)Hugo van Kemenade2024-05-10
|
* gh-118406: Add signature for sqlite3.Connection objects (#118428)Erlend E. Aasland2024-04-30
|
* gh-118221: Always use the default row factory in sqlite3.iterdump() (#118223)Erlend E. Aasland2024-04-25
| | | | | | | | | | | | sqlite3.iterdump() depends on the row factory returning resulting rows as tuples; it will fail with custom row factories like for example a dict factory. With this commit, we explicitly reset the row factory of the cursor used by iterdump(), so we always get predictable results. This does not affect the row factory of the parent connection. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-117995: Don't raise DeprecationWarnings for indexed nameless params (#118001)Erlend E. Aasland2024-04-22
| | | | | Filter out '?NNN' placeholders when looking for named params. Co-authored-by: AN Long <aisk@users.noreply.github.com>
* gh-116303: Skip test module dependent tests if test modules are unavailable ↵Erlend E. Aasland2024-04-03
| | | | (#117341)
* gh-91602: Add iterdump() support for filtering database objects (#114501)Mariusz Felisiak2024-02-06
| | | | | | Add optional 'filter' parameter to iterdump() that allows a "LIKE" pattern for filtering database objects to dump. Co-authored-by: Erlend E. Aasland <erlend@python.org>
* gh-114099: Add test exclusions to support running the test suite on iOS ↵Russell Keith-Magee2024-02-05
| | | | | | | | | | | | | (#114889) Add test annotations required to run the test suite on iOS (PEP 730). The majority of the change involve annotating tests that use subprocess, but are skipped on Emscripten/WASI for other reasons, and including iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks. `is_apple` and `is_apple_mobile` test helpers have been added to identify *any* Apple platform, and "any Apple platform except macOS", respectively.
* gh-108364: In sqlite3, disable foreign keys before dumping SQL schema (#113957)Mariusz Felisiak2024-01-12
| | | | | | | sqlite3.Connection.iterdump now ensures that foreign key support is disabled before dumping the database schema, if there is any foreign key violation. Co-authored-by: Erlend E. Aasland <erlend@python.org>
* gh-109653: Remove unused imports in the `Lib/` directory (#109803)Alex Waygood2023-09-24
|
* gh-108590: Revert gh-108657 (commit 400a1cebc) (#108686)Erlend E. Aasland2023-08-30
| | | Reverted per Serhiy's request.
* gh-108590: Fix sqlite3.iterdump for invalid Unicode in TEXT columns (#108657)Corvin2023-08-30
| | | Co-authored-by: Erlend E. Aasland <erlend@python.org>
* gh-108278: Deprecate passing the first param of sqlite3.Connection callback ↵Erlend E. Aasland2023-08-29
| | | | | | | | | | | | APIs by keyword (#108632) Deprecate passing the callback callable by keyword for the following sqlite3.Connection APIs: - set_authorizer(authorizer_callback) - set_progress_handler(progress_handler, ...) - set_trace_callback(trace_callback) The affected parameters will become positional-only in Python 3.15.
* gh-108617: Extend interactive session tests for sqlite3 (GH-108556)Serhiy Storchaka2023-08-29
|
* gh-108558: Improve sqlite3 row factory tests (#108578)Edward Schauman-Haigh2023-08-29
| | | | | | | | | Add test_sqlite_row_keys() to explicitly test sqlite3.Row.keys(). Cleanups: - Reduce test noise by converting docstrings to regular comments - Reduce boilerplate code by adding a setUp() method to RowFactoryTests Co-authored-by: Erlend E. Aasland <erlend@python.org>
* gh-108278: Deprecate passing the three first params as keyword args for ↵Erlend E. Aasland2023-08-28
| | | | | | | | | | | sqlite3 UDF creation APIs (#108281) Deprecate passing name, number of arguments, and the callable as keyword arguments, for the following sqlite3.Connection APIs: - create_function(name, nargs, callable, ...) - create_aggregate(name, nargs, callable) The affected parameters will become positional-only in Python 3.15.
* gh-108550: Speed up sqlite3 tests (#108551)Erlend E. Aasland2023-08-28
| | | | | | | | | | | | | Refactor the CLI so we can easily invoke it and mock command-line arguments. Adapt the CLI tests so we no longer have to launch a separate process. Disable the busy handler for all concurrency tests; we have full control over the order of the SQLite C API calls, so we can safely do this. The sqlite3 test suite now completes ~8 times faster than before. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-64662: Add virtual table support to sqlite3.Connection.iterdump (#108340)Erlend E. Aasland2023-08-28
| | | Co-authored-by: Aviv Palivoda <palaviv@gmail.com>
* gh-105539: Fix ResourceWarning from unclosed SQLite connections in ↵Mariusz Felisiak2023-08-23
| | | | | | | | | | | | | test_sqlite3 (#108360) Follow up to 1a1bfc28912a39b500c578e9f10a8a222638d411. Explicitly manage connections in: - test_audit.test_sqlite3 - test_sqlite3.test_audit - test_sqlite3.test_backup Co-authored-by: Erlend E. Aasland <erlend@python.org>
* gh-105539: Emit ResourceWarning if sqlite3 database is not closed explicitly ↵Erlend E. Aasland2023-08-22
| | | | (#108015)
* gh-105539: Explict resource management for connection objects in sqlite3 ↵Erlend E. Aasland2023-08-17
| | | | | | | | tests (#108017) - Use memory_database() helper - Move test utility functions to util.py - Add convenience memory database mixin - Add check() helper for closed connection tests
* gh-93057: Deprecate positional use of optional sqlite3.connect() params ↵Erlend E. Aasland2023-08-15
| | | | (#107948)
* gh-105875: Require SQLite 3.15.2 or newer (#105876)Erlend E. Aasland2023-06-19
| | | SQLite 3.15.2 was released 2016-11-28.
* gh-105557: Remove duplicate sqlite3 test method (#105558)Erlend E. Aasland2023-06-09
| | | | test_func_return_too_large_int() was defined twice. Keep only the redefined method, as that also checks the tracebacks.
* gh-100370: fix OverflowError in sqlite3.Connection.blobopen for 32-bit ↵Erlend E. Aasland2023-05-07
| | | | builds (#103902)
* GH-103857: Deprecate utcnow and utcfromtimestamp (#103858)Paul Ganssle2023-04-27
| | | | | Using `datetime.datetime.utcnow()` and `datetime.datetime.utcfromtimestamp()` will now raise a `DeprecationWarning`. We also have removed our internal uses of these functions and documented the change.
* gh-103489: Add get/set config methods to sqlite3.Connection (#103506)Erlend E. Aasland2023-04-26
|
* GH-103805: Lib test f541 linting issue fix (#103812)Rodolfo M. Pereira2023-04-24
| | | | | | | | | | | | | | | | This PR makes some minor linting adjustments to the Lib/test module caught by [ruff](https://github.com/charliermarsh/ruff). The adjustments are all related to the `F541 f-string without any placeholders` issue. Issue: https://github.com/python/cpython/issues/103805 <!-- gh-issue-number: gh-103805 --> * Issue: gh-103805 <!-- /gh-issue-number --> --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-101947: Remove size check from sqlite3 serialize test (#102914)Erlend E. Aasland2023-03-22
| | | The size of the returned data is too implementation specific.
* gh-101693: In sqlite3, deprecate using named placeholders with parameters ↵Erlend E. Aasland2023-02-15
| | | | supplied as a sequence (#101698)
* gh-100553: Improve accuracy of sqlite3.Row iter test (#100555)Nikita Sobolev2022-12-28
|
* gh-99659: Use correct exceptions in sqlite3 bigmem tests (#99660)Łukasz Langa2022-11-21
| | | | | | The tests in question were added in 0eec6276fdcd by Serhiy. Apparently, sqlite3 changed exceptions raised in those cases in the mean time but the tests never ran because they require a high `-M` setting in the test runner.
* gh-83638: Add sqlite3.Connection.autocommit for PEP 249 compliant behaviour ↵Erlend E. Aasland2022-11-12
| | | | | | | | | | (#93823) Introduce the autocommit attribute to Connection and the autocommit parameter to connect() for PEP 249-compliant transaction handling. Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
* gh-77617: Add sqlite3 command-line interface (#95026)Erlend Egeberg Aasland2022-08-01
| | | Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-95132: Correctly relay *args and **kwds from sqlite3.connect to factory ↵Erlend Egeberg Aasland2022-07-23
| | | | | | | | | | | | (#95146) This PR partially reverts gh-24421 (PR) and fixes the remaining concerns given in gh-93044 (issue): - keyword arguments are passed as positional arguments to factory() - if an argument is not passed to sqlite3.connect(), its default value is passed to factory() Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-90016: Deprecate default sqlite3 adapters and converters (#94276)Erlend Egeberg Aasland2022-07-20
| | | Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
* gh-94998: Remove redundant condition in test_sqlite3/__main__.py (#95052)Erlend Egeberg Aasland2022-07-20
|