Repository navigation
Fix SQLite DQS=0 compatibility - #676
Open
shubhamsargar31 wants to merge 2 commits into
Open
shubhamsargar31 wants to merge 2 commits into
shubhamsargar31 wants to merge 2 commits into
Conversation
|
|
for more information, see https://pre-commit.ci
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
diskcachedependency is used bydvc-datafor 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
diskcachedependency withdiskcache-community.The corresponding imports in
src/dvc_data/hashfile/cache.pyhave also been updated to use thediskcache_communitypackage.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
diskcache>=5.2.1withdiskcache-community>=5.7.0inpyproject.toml.src/dvc_data/hashfile/cache.py.Testing Performed
python -m pytest tests/hashfile/test_cache.py— 8 tests passed.git diff --check— passed with no whitespace errors.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.