Skip to content

Commit

Permalink
Prepare v4.0.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
tkem committed Dec 12, 2019
1 parent d2020cc commit eff0944
Show file tree
Hide file tree
Showing 8 changed files with 120 additions and 121 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
@@ -1,8 +1,6 @@
language: python

python:
- 2.7
- 3.4
- 3.5
- 3.6
- 3.7
Expand Down
66 changes: 36 additions & 30 deletions CHANGES.rst → CHANGELOG.rst
@@ -1,13 +1,19 @@
v4.0.0 (UNRELEASED)
===================

- Require Python 3.5 or later.


v3.1.1 (2019-05-23)
-------------------
===================

- Document how to use shared caches with ``@cachedmethod``.

- Fix pickling/unpickling of cache keys


v3.1.0 (2019-01-29)
-------------------
===================

- Fix Python 3.8 compatibility issue.

Expand All @@ -17,7 +23,7 @@ v3.1.0 (2019-01-29)


v3.0.0 (2018-11-04)
-------------------
===================

- Officially support Python 3.7.

Expand All @@ -32,7 +38,7 @@ v3.0.0 (2018-11-04)


v2.1.0 (2018-05-12)
-------------------
===================

- Deprecate ``missing`` cache constructor parameter.

Expand All @@ -44,7 +50,7 @@ v2.1.0 (2018-05-12)


v2.0.1 (2017-08-11)
-------------------
===================

- Officially support Python 3.6.

Expand All @@ -55,7 +61,7 @@ v2.0.1 (2017-08-11)


v2.0.0 (2016-10-03)
-------------------
===================

- Drop Python 3.2 support (breaking change).

Expand All @@ -67,7 +73,7 @@ v2.0.0 (2016-10-03)


v1.1.6 (2016-04-01)
-------------------
===================

- Reimplement ``LRUCache`` and ``TTLCache`` using
``collections.OrderedDict``. Note that this will break pickle
Expand All @@ -84,7 +90,7 @@ v1.1.6 (2016-04-01)


v1.1.5 (2015-10-25)
-------------------
===================

- Refactor ``Cache`` base class. Note that this will break pickle
compatibility with previous versions.
Expand All @@ -93,7 +99,7 @@ v1.1.5 (2015-10-25)


v1.1.4 (2015-10-24)
-------------------
===================

- Refactor ``LRUCache`` and ``TTLCache`` implementations. Note that
this will break pickle compatibility with previous versions.
Expand All @@ -104,19 +110,19 @@ v1.1.4 (2015-10-24)


v1.1.3 (2015-09-15)
-------------------
===================

- Fix pickle tests.


v1.1.2 (2015-09-15)
-------------------
===================

- Fix pickling of large ``LRUCache`` and ``TTLCache`` instances.


v1.1.1 (2015-09-07)
-------------------
===================

- Improve key functions.

Expand All @@ -126,7 +132,7 @@ v1.1.1 (2015-09-07)


v1.1.0 (2015-08-28)
-------------------
===================

- Add ``@cached`` function decorator.

Expand All @@ -147,13 +153,13 @@ v1.1.0 (2015-08-28)


v1.0.3 (2015-06-26)
-------------------
===================

- Clear cache statistics when calling ``clear_cache()``.


v1.0.2 (2015-06-18)
-------------------
===================

- Allow simple cache instances to be pickled.

Expand All @@ -162,7 +168,7 @@ v1.0.2 (2015-06-18)


v1.0.1 (2015-06-06)
-------------------
===================

- Code cleanup for improved PEP 8 conformance.

Expand All @@ -173,27 +179,27 @@ v1.0.1 (2015-06-06)


v1.0.0 (2014-12-19)
-------------------
===================

- Provide ``RRCache.choice`` property.

- Improve documentation.


v0.8.2 (2014-12-15)
-------------------
===================

- Use a ``NestedTimer`` for ``TTLCache``.


v0.8.1 (2014-12-07)
-------------------
===================

- Deprecate ``Cache.getsize()``.


v0.8.0 (2014-12-03)
-------------------
===================

- Ignore ``ValueError`` raised on cache insertion in decorators.

Expand All @@ -205,13 +211,13 @@ v0.8.0 (2014-12-03)


v0.7.1 (2014-11-22)
-------------------
===================

- Fix `MANIFEST.in`.


v0.7.0 (2014-11-12)
-------------------
===================

- Deprecate ``TTLCache.ExpiredError``.

Expand All @@ -224,7 +230,7 @@ v0.7.0 (2014-11-12)


v0.6.0 (2014-10-13)
-------------------
===================

- Raise ``TTLCache.ExpiredError`` for expired ``TTLCache`` items.

Expand All @@ -234,15 +240,15 @@ v0.6.0 (2014-10-13)


v0.5.1 (2014-09-25)
-------------------
===================

- No formatting of ``KeyError`` arguments.

- Update ``README.rst``.


v0.5.0 (2014-09-23)
-------------------
===================

- Do not delete expired items in TTLCache.__getitem__().

Expand All @@ -252,7 +258,7 @@ v0.5.0 (2014-09-23)


v0.4.0 (2014-06-16)
-------------------
===================

- Add ``TTLCache``.

Expand All @@ -262,15 +268,15 @@ v0.4.0 (2014-06-16)


v0.3.1 (2014-05-07)
-------------------
===================

- Add proper locking for ``cache_clear()`` and ``cache_info()``.

- Report `size` in ``cache_info()``.


v0.3.0 (2014-05-06)
-------------------
===================

- Remove ``@cache`` decorator.

Expand All @@ -280,14 +286,14 @@ v0.3.0 (2014-05-06)


v0.2.0 (2014-04-02)
-------------------
===================

- Add ``@cache`` decorator.

- Update documentation.


v0.1.0 (2014-03-27)
-------------------
===================

- Initial release.
2 changes: 1 addition & 1 deletion MANIFEST.in
@@ -1,4 +1,4 @@
include CHANGES.rst
include CHANGELOG.rst
include LICENSE
include MANIFEST.in
include README.rst
Expand Down
59 changes: 29 additions & 30 deletions README.rst
@@ -1,8 +1,28 @@
cachetools
========================================================================

.. image:: http://img.shields.io/pypi/v/cachetools
:target: https://pypi.org/project/cachetools/
:alt: Latest PyPI version

.. image:: https://img.shields.io/readthedocs/cachetools
:target: http://cachetools.readthedocs.io/
:alt: Documentation build status

.. image:: http://img.shields.io/travis/tkem/cachetools
:target: https://travis-ci.org/tkem/cachetools/
:alt: Travis CI build status

.. image:: http://img.shields.io/coveralls/tkem/cachetools
:target: https://coveralls.io/r/tkem/cachetools
:alt: Test coverage

.. image:: https://img.shields.io/github/license/tkem/cachetools
:target: http://raw.github.com/tkem/cachetools/master/LICENSE
:alt: License

This module provides various memoizing collections and decorators,
including variants of the Python 3 Standard Library `@lru_cache`_
including variants of the Python Standard Library's `@lru_cache`_
function decorator.

.. code-block:: python
Expand Down Expand Up @@ -40,39 +60,20 @@ Multiple cache classes based on different caching algorithms are
implemented, and decorators for easily memoizing function and method
calls are provided, too.

For more information, please refer to the online documentation_.


Installation
------------------------------------------------------------------------

Install cachetools using pip::
cachetools is available from PyPI_ and can be installed by running::

pip install cachetools
pip install cachetools


Project Resources
Documentation
------------------------------------------------------------------------

.. image:: http://img.shields.io/pypi/v/cachetools.svg?style=flat
:target: https://pypi.python.org/pypi/cachetools/
:alt: Latest PyPI version

.. image:: http://img.shields.io/travis/tkem/cachetools/master.svg?style=flat
:target: https://travis-ci.org/tkem/cachetools/
:alt: Travis CI build status

.. image:: http://img.shields.io/coveralls/tkem/cachetools/master.svg?style=flat
:target: https://coveralls.io/r/tkem/cachetools
:alt: Test coverage

.. image:: https://readthedocs.org/projects/cachetools/badge/?version=latest&style=flat
:target: http://cachetools.readthedocs.io/en/latest/
:alt: Documentation Status

- `Issue Tracker`_
- `Source Code`_
- `Change Log`_
Reference documentation and code examples are hosted on `Read the
Docs`_.


License
Expand All @@ -88,8 +89,6 @@ Licensed under the `MIT License`_.
.. _mapping: http://docs.python.org/dev/glossary.html#term-mapping
.. _cache algorithm: http://en.wikipedia.org/wiki/Cache_algorithms

.. _Documentation: http://cachetools.readthedocs.io/en/latest/
.. _Issue Tracker: https://github.com/tkem/cachetools/issues/
.. _Source Code: https://github.com/tkem/cachetools/
.. _Change Log: https://github.com/tkem/cachetools/blob/master/CHANGES.rst
.. _PyPI: https://pypi.org/project/cachetools
.. _Read the Docs: https://cachetools.readthedocs.io
.. _MIT License: http://raw.github.com/tkem/cachetools/master/LICENSE
15 changes: 9 additions & 6 deletions docs/conf.py
@@ -1,13 +1,16 @@
def get_version(filename):
from re import findall
with open(filename) as f:
metadata = dict(findall(r"__([a-z]+)__ = '([^']+)'", f.read()))
return metadata['version']
def get_version():
import configparser
import pathlib

cp = configparser.ConfigParser()
# Python 3.5 ConfigParser does not accept Path as filename
cp.read(str(pathlib.Path(__file__).parent.parent / "setup.cfg"))
return cp["metadata"]["version"]


project = 'cachetools'
copyright = '2014-2019 Thomas Kemmer'
version = get_version(b'../cachetools/__init__.py')
version = get_version()
release = version

extensions = [
Expand Down

0 comments on commit eff0944

Please sign in to comment.