Repository navigation
Conversation
flask-caching 2.5.0 removed the lowercase aliases ("null", "simple",
"redis"), so creating a CrystalToolkitPlugin fails with
ImportStringError. The class names work on older flask-caching too.
Fixes #544
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
flask-caching 2.5.0 (released 2026-08-24) removed the lowercase
CACHE_TYPEaliases, so any structure display in Jupyter fails withImportStringError: import_string() failed for 'flask_caching.backends.simple'. This PR switches everyCACHE_TYPEto the class name. Fixes #544; together with #542 this is what #545 needs for a stable release.crystal_toolkit/core/plugin.py:"simple"->"SimpleCache","null"->"NullCache"crystal_toolkit/apps/main.py:"null"->"NullCache","redis"->"RedisCache"No new flask-caching minimum is needed:
SimpleCacheandNullCachealso initialize on flask-caching 2.2.0 and 2.4.1.Testing: installed this branch in a fresh Python 3.12 environment (pymatgen 2026.9.24, pymatgen-core 2026.9.23, flask-caching 2.5.1, dash 3.4.0) and executed Parts 1, 4, and 5 of https://github.com/computron/pymatgen_tutorials; all structure and molecule displays render. The
RedisCachepath inapps/main.pywas only checked to resolve under flask-caching 2.5.1, not run against a Redis server. No tests added.🤖 Generated with Claude Code