Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[server] core: Replace flask-caching dependency with drop-in #893

Merged
merged 3 commits into from
May 28, 2022

Conversation

ix5
Copy link
Member

@ix5 ix5 commented May 28, 2022

Checklist

  • All new and existing tests are passing
  • (If adding features:) I have added tests to cover my changes
  • (If docs changes needed:) I have updated the documentation accordingly.
  • I have added an entry to CHANGES.rst because this is a user-facing change or an important bugfix
  • I have written proper commit message(s)

What changes does this Pull Request introduce?

core: Replace flask-caching dep with drop-in

Instead of relying on flask-caching and its dep cachelib, import a trimmed-down version into the repo as utils/cache.py.

Why is this necessary?

While seeing pallets-eco/flask-caching#352 that currently breaks Isso, it became apparent that Flask-Caching has grown way too large and has gained dependencies of its own.

Initially, Isso depended on SimpleCache and NullCache from werkzeug.contrib, which meant that it didn't have to import any new dependencies. In a later version, caching was removed from werkzeug and instead pushed into its own package, which Isso then had to import.
With the newest release of Flask-Caching, there's now a hard dependency on cachelib as well, in addition to flask.

Isso only uses get(), set() and delete() cache functions and only for email/website hashes. We can drop all those dependencies and instead import a slimmed-down version on our own.

ix5 added 3 commits May 28, 2022 22:40
Instead of relying on flask-caching and its dep cachelib,
import a trimmed-down version into the repo as `utils/cache.py`.
Not needed any more since the cache handling was replaced by
a drop-in imported solution in `isso/utils/cache.py`
@ix5 ix5 added server (Python) server code improvement Not a new feature, but makes Isso more pleasant to use labels May 28, 2022
@ix5 ix5 added this to the 0.13 milestone May 28, 2022
@ix5 ix5 merged commit 8dfd661 into isso-comments:master May 28, 2022
@ix5 ix5 deleted the caching-drop-in branch May 28, 2022 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Not a new feature, but makes Isso more pleasant to use server (Python) server code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant