diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..d9ee7902 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,22 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.11" + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: docs/conf.py + +# We recommend specifying your dependencies to enable reproducible builds: +# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html +# python: +# install: +# - requirements: docs/requirements.txt \ No newline at end of file diff --git a/CHANGES.rst b/CHANGES.rst index 4ed9497f..595486f3 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,12 +1,14 @@ Changelog ========= +Version 2.1.0 +------------- + Unreleased ----------- - fix type signature in ``flask_caching.utils.make_template_fragment_key``. :pr:`430` - Added docs and example for make_cache_key - +- support Flask 3 Version 2.0.2 ------------- @@ -15,7 +17,7 @@ Released 2023-01-12 - fix issue with boto3 dependencie due to latest cachelib released - migrate ``flask_caching.backends.RedisCluster`` dependency from redis-py-cluster to redis-py -- bug fix: make the ``make_cache_key`` attributed of decorated view functions writeable. :pr:`431`, issue `#97` +- bug fix: make the ``make_cache_key`` attributed of decorated view functions writeable. :pr:`431`, :issue:`97` Version 2.0.1 @@ -50,12 +52,12 @@ Version 1.11.0 Released 2022-05-27 -- Add suport for cached/memoized generators. :pr:`#286` -- Add support for Flask 2.0 async. :pr:`#282` -- Cachelib is now used as backend. :pr:`#308` -- Drop support for python 3.6. :pr:`#332` +- Add suport for cached/memoized generators. :pr:`286` +- Add support for Flask 2.0 async. :pr:`282` +- Cachelib is now used as backend. :pr:`308` +- Drop support for python 3.6. :pr:`332` - Add support for dynamic cache timeouts `#296` -- Fix bug in ``CACHE_OPTIONS`` reading for redis in ``RedisSentinelCache``. :pr:`#343` +- Fix bug in ``CACHE_OPTIONS`` reading for redis in ``RedisSentinelCache``. :pr:`343` Version 1.10.1 @@ -64,11 +66,11 @@ Version 1.10.1 Released 2021-03-17 - A ``GoogleCloudStorageCache`` backend has been added to the user contributed - caching backends. :pr:`#214` + caching backends. :pr:`214` - Fix a regression introduced in the last release which broke all applications subclassing the ``Cache`` class. - Add test_generic_get_bytes test case. - :pr:`#236` + :pr:`236` - Various improvements and fixes. @@ -87,28 +89,28 @@ Released 2021-03-04 contributed backends. - Switch from Travis-CI to GitHub Actions - Fix add() in RedisCache without a timeout. - :pr:`#218` + :pr:`218` - Fix error in how the FileSystemCache counts the number of files. - :pr:`#210` + :pr:`210` - Type Annotations have been added. - :pr:`#198` + :pr:`198` - Add some basic logging to SimpleCache and FileSystemCache for better observability. - :pr:`#203` + :pr:`203` - Add option in memoize to ignore args - :pr:`#201` + :pr:`201` - Stop marking wheels as Python 2 compatible. - :pr:`#196` + :pr:`196` - Fix ``default_timeout`` not being properly passed to its super constructor. - :pr:`#187` + :pr:`187` - Fix ``kwargs`` not being passed on in function ``_memoize_make_cache_key``. - :pr:`#184` + :pr:`184` - Add a Redis Cluster Mode caching backend. - :pr:`#173` + :pr:`173` - Do not let PIP install this package on unsupported Python Versions. - :pr:`#179` + :pr:`179` - Fix uWSGI initialization by checking if uWSGI has the 'cache2' option - enabled. :pr:`#176` + enabled. :pr:`176` - Documentation updates and fixes. @@ -118,11 +120,11 @@ Version 1.9.0 Released 2020-06-02 - Add an option to include the functions source code when generating the cache - key. :pr:`#156` + key. :pr:`156` - Add an feature that allows one to completely control the way how cache keys are generated. For example, one can now implement a function that generates a cache key the based on POST requests. - :pr:`#159` + :pr:`159` - Fix the cache backend naming collisions by renaming them from ``simple`` to ``simplecache``, ``null`` to ``nullcache`` and ``filesystem`` to ``filesystemcache``. @@ -141,13 +143,13 @@ Released 2019-11-24 - **BREAKING:** Removed support for Python 2. Python 3.5 and upwards are supported as of now. - Add option to specify if ``None`` is a cached value or not. See - :pr:`#140` and + :pr:`140` and `#141` - Allow to use ``__caching_id__`` rather than ``__repr__`` as an object caching key. - :pr:`#123` + :pr:`123` - The RedisCache backend now support generating the key_prefix via a callable. - :pr:`#109` + :pr:`109` - Emit a warning if the ``CACHE_TYPE`` is set to ``filesystem`` but no ``CACHE_DIR`` is set. - Fixes Google App Engine Memcache backend. @@ -164,7 +166,7 @@ Released 2019-05-28 **This is the last version supporting Python 2!** - Do not run a cached/memoized function if the cached return value is None. - :pr:`#108` + :pr:`108` Version 1.7.1 @@ -173,7 +175,7 @@ Version 1.7.1 Released 2019-04-16 - Fix introspecting Python 3 functions by using varkw. - :pr:`#101` + :pr:`101` - Remove leftover files (``uwsgi.py``) in PyPI package. See issue `#102` for more details. @@ -185,7 +187,7 @@ Released 2019-03-29 - Added a feature called 'response_filter' which enables one to only cache views depending on the response code. - :pr:`#99` + :pr:`99` - A DeprecationWarning got turned into a TypeError. @@ -200,7 +202,7 @@ Released 2019-03-06 deletion mode, one has to flip the config setting ``CACHE_IGNORE_ERRORS`` to ``True``. This was and still is only relevant for the **filesystem** and **simple** cache backends. - :pr:`#94` + :pr:`94` - Re-added the ``gaememcached`` CACHE_TYPE for improved backwards compatibility. - Documentation improvements @@ -211,11 +213,11 @@ Version 1.5.0 Released 2019-02-23 - Add support for a Redis Sentinel Cluster. - :pr:`#90` + :pr:`90` - Parameterize the hash function so alternatives can be used. - :pr:`#77` + :pr:`77` - Include the deprecated ``werkzeug.contrib.cache`` module in Flask-Caching. - :pr:`#75` + :pr:`75` Version 1.4.0 @@ -224,16 +226,16 @@ Version 1.4.0 Released 2018-04-16 - Fix logic for creating key for var args in memoize. - :pr:`#70` + :pr:`70` - Allow older Werkzeug versions by making the UWSGICache backend conditional. - :pr:`#55` + :pr:`55` - Some documentation improvements. - :pr:`#48`, + :pr:`48`, `#51`, `#56`, `#67` - Some CI improvements. - :pr:`#49`, + :pr:`49`, `#50` @@ -243,7 +245,7 @@ Version 1.3.3 Released 2017-06-25 - Add support for multiple query params and use md5 for consistent hashing. - :pr:`#43` + :pr:`43` Version 1.3.2 @@ -274,7 +276,7 @@ Released 2017-06-17 - Provide a keyword `query_string` to the cached decorator in order to create the same cache key for different query string requests, so long as they have the same key/value (order does not matter). - :pr:`#35` + :pr:`35` - Use pytest as test suite and test runner. Additionally, the tests have been split up into multiple files instead of having one big file. diff --git a/docs/conf.py b/docs/conf.py index 12a6af9a..91d1d5f5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -71,7 +71,7 @@ # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = "en" # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: diff --git a/requirements/docs.txt b/requirements/docs.txt index 0af3595f..6596778e 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -1,72 +1,76 @@ # -# This file is autogenerated by pip-compile with python 3.7 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.9 +# by the following command: # -# pip-compile docs.in +# pip-compile requirements/docs.in # -alabaster==0.7.12 +alabaster==0.7.13 # via sphinx -babel==2.10.3 +babel==2.13.0 # via sphinx certifi==2023.7.22 # via requests -charset-normalizer==2.1.0 +charset-normalizer==3.3.0 # via requests docutils==0.18.1 # via # sphinx # sphinx-tabs -idna==3.3 +idna==3.4 # via requests imagesize==1.4.1 # via sphinx +importlib-metadata==6.8.0 + # via sphinx jinja2==3.1.2 # via sphinx -markupsafe==2.1.1 +markupsafe==2.1.3 # via jinja2 -packaging==21.3 +packaging==23.2 # via # pallets-sphinx-themes # sphinx -pallets-sphinx-themes==2.0.3 - # via -r docs.in -pygments==2.15.0 +pallets-sphinx-themes==2.1.1 + # via -r requirements/docs.in +pygments==2.16.1 # via # sphinx # sphinx-tabs -pyparsing==3.0.9 - # via packaging -pytz==2022.1 - # via babel requests==2.31.0 # via sphinx snowballstemmer==2.2.0 # via sphinx sphinx==7.2.6 # via - # -r docs.in + # -r requirements/docs.in # pallets-sphinx-themes # sphinx-issues # sphinx-tabs + # sphinxcontrib-applehelp + # sphinxcontrib-devhelp + # sphinxcontrib-htmlhelp # sphinxcontrib-log-cabinet + # sphinxcontrib-qthelp # sphinxcontrib-serializinghtml sphinx-issues==3.0.1 - # via -r docs.in + # via -r requirements/docs.in sphinx-tabs==3.4.1 - # via -r docs.in -sphinxcontrib-applehelp==1.0.2 + # via -r requirements/docs.in +sphinxcontrib-applehelp==1.0.7 # via sphinx -sphinxcontrib-devhelp==1.0.2 +sphinxcontrib-devhelp==1.0.5 # via sphinx -sphinxcontrib-htmlhelp==2.0.0 +sphinxcontrib-htmlhelp==2.0.4 # via sphinx sphinxcontrib-jsmath==1.0.1 # via sphinx sphinxcontrib-log-cabinet==1.0.1 - # via -r docs.in -sphinxcontrib-qthelp==1.0.3 + # via -r requirements/docs.in +sphinxcontrib-qthelp==1.0.6 # via sphinx sphinxcontrib-serializinghtml==1.1.9 # via sphinx -urllib3==1.26.17 +urllib3==2.0.6 # via requests +zipp==3.17.0 + # via importlib-metadata