Repository navigation
Let Cache take a dbname argument for its SQLite file name instead of the global cache.db - #53
Merged
Merged
Conversation
Documentation build overview
|
…the global cache.db.
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.
Lets
Cachekeep its SQLite database under a file name other thancache.db. Until now the only way was to override the private_conto open another file, and such an override skips the connection registry, the read-onlymode=roopen and the read-only check.Cache(directory, ..., dbname=None), keyword-only likeread_only.Nonemeanscore.DBNAME, looked up on each call, so code that setscore.DBNAMEafter import still renames the file. Anything other than a plain file name (an empty name,.,.., a path or a non-string) raisesValueErrorbefore anything is created._connectopensdirectory/dbname, the read-only check looks at that file, andcheck()skips it and its-wal/-shmfiles.check()matches paths as it does onmaster.Tests: 1004 passed and 2 skipped, coverage 99.23%.
blue, isort, flake8, mypy and doc8 pass, and pylint reports the same messages as on
master. The Sphinx docs build was not run locally.