Skip to content

Fix SQLite DQS=0 compatibility - #676

Open
shubhamsargar31 wants to merge 2 commits into
treeverse:mainfrom
shubhamsargar31:fix-sqlite-dqs
Open

shubhamsargar31 wants to merge 2 commits into
treeverse:mainfrom
shubhamsargar31:fix-sqlite-dqs

Conversation

@shubhamsargar31

Copy link
Copy Markdown

Title

Fix SQLite DQS=0 compatibility

Problem Description

SQLite supports double-quoted string literals in some configurations. However, when the DQS (Double-Quoted String) compatibility feature is disabled, SQL queries that use double quotes for string values may fail.

The diskcache dependency is used by dvc-data for caching operations. Its SQL statements may use double-quoted string literals, which can cause compatibility problems with SQLite builds configured with DQS disabled.

Proposed Solution

This pull request replaces the diskcache dependency with diskcache-community.

The corresponding imports in src/dvc_data/hashfile/cache.py have also been updated to use the diskcache_community package.

The purpose of this change is to improve compatibility with SQLite configurations where double-quoted string literals are disabled, while retaining the cache functionality used by dvc-data.

Changes Made

  • Replaced diskcache>=5.2.1 with diskcache-community>=5.7.0 in pyproject.toml.
  • Updated the cache-related imports in src/dvc_data/hashfile/cache.py.
  • Kept the existing cache module structure and functionality.

Testing Performed

  • Ran python -m pytest tests/hashfile/test_cache.py — 8 tests passed.
  • Ran git diff --check — passed with no whitespace errors.
  • Performed a basic cache operation test with diskcache-community.

Expected Outcome

The proposed change aims to improve SQLite compatibility when DQS is disabled and allow the cache module to continue performing its expected operations.

Limitation

The change has not yet been tested against an SQLite build with DQS explicitly disabled. Therefore, compatibility in that exact configuration still requires further verification.

Request for Review

Please review the dependency replacement and import changes and provide feedback on whether this approach is suitable for resolving the SQLite DQS compatibility issue.

@github-project-automation github-project-automation Bot moved this to Backlog in DVC Oct 25, 2026
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants