blob: d7e0f20950d243daaf4dafe70a1cbb1209153b40 [file] [log] [blame]
Thomas Kemmerbc998ba2021-09-29 22:21:52 +02001v4.2.3 (2021-09-29)
2===================
3
4- Add documentation and tests for using ``TTLCache`` with
5 ``datetime``.
6
7- Link to typeshed typing stubs.
8
9- Flatten package file hierarchy.
10
11
Thomas Kemmere919f2f2021-04-27 23:11:46 +020012v4.2.2 (2021-04-27)
13===================
14
15- Update build environment.
16
17- Remove Python 2 remnants.
18
19- Format code with Black.
20
21
Thomas Kemmer16c77042021-01-24 21:35:22 +010022v4.2.1 (2021-01-24)
Thomas Kemmer1d99e162021-01-24 20:49:22 +010023===================
24
25- Handle ``__missing__()`` not storing cache items.
26
27- Clean up ``__missing__()`` example.
28
29
Thomas Kemmere6acc1e2020-12-10 21:25:58 +010030v4.2.0 (2020-12-10)
Thomas Kemmer6d2692f2020-12-09 22:32:23 +010031===================
32
33- Add FIFO cache implementation.
34
35- Add MRU cache implementation.
36
37- Improve behavior of decorators in case of race conditions.
38
39- Improve documentation regarding mutability of caches values and use
40 of key functions with decorators.
41
42- Officially support Python 3.9.
43
44
Thomas Kemmer31a78b52020-06-28 21:27:40 +020045v4.1.1 (2020-06-28)
Thomas Kemmer4c1907e2020-06-28 21:16:38 +020046===================
47
48- Improve ``popitem()`` exception context handling.
49
50- Replace ``float('inf')`` with ``math.inf``.
51
52- Improve "envkey" documentation example.
53
54
Thomas Kemmera6258fb2020-04-08 13:33:09 +020055v4.1.0 (2020-04-08)
Thomas Kemmerbb8df8f2020-04-08 13:23:29 +020056===================
57
58- Support ``user_function`` with ``cachetools.func`` decorators
59 (Python 3.8 compatibility).
60
61- Support ``cache_parameters()`` with ``cachetools.func`` decorators
62 (Python 3.9 compatibility).
63
64
Thomas Kemmerfa9d4762019-12-15 20:53:23 +010065v4.0.0 (2019-12-15)
Thomas Kemmeraa936f02019-12-15 20:46:13 +010066===================
67
68- Require Python 3.5 or later.
69
70
Thomas Kemmerc5309242019-05-23 21:49:13 +020071v3.1.1 (2019-05-23)
Thomas Kemmeraa936f02019-12-15 20:46:13 +010072===================
Thomas Kemmer695a47e2019-05-23 21:43:36 +020073
74- Document how to use shared caches with ``@cachedmethod``.
75
76- Fix pickling/unpickling of cache keys
77
78
Thomas Kemmer1b67cdd2019-01-29 21:33:49 +010079v3.1.0 (2019-01-29)
Thomas Kemmeraa936f02019-12-15 20:46:13 +010080===================
Thomas Kemmer664b45b2019-01-29 21:25:27 +010081
82- Fix Python 3.8 compatibility issue.
83
Thomas Kemmer1b67cdd2019-01-29 21:33:49 +010084- Use ``time.monotonic`` as default timer if available.
Thomas Kemmer664b45b2019-01-29 21:25:27 +010085
86- Improve documentation regarding thread safety.
87
88
Thomas Kemmer90d35072018-11-03 20:26:37 +010089v3.0.0 (2018-11-04)
Thomas Kemmeraa936f02019-12-15 20:46:13 +010090===================
Thomas Kemmer90d35072018-11-03 20:26:37 +010091
92- Officially support Python 3.7.
93
94- Drop Python 3.3 support (breaking change).
95
96- Remove ``missing`` cache constructor parameter (breaking change).
97
98- Remove ``self`` from ``@cachedmethod`` key arguments (breaking
99 change).
100
101- Add support for ``maxsize=None`` in ``cachetools.func`` decorators.
102
103
Thomas Kemmer36d864e2018-05-12 18:21:47 +0200104v2.1.0 (2018-05-12)
Thomas Kemmeraa936f02019-12-15 20:46:13 +0100105===================
Thomas Kemmer45d9b0d2018-05-12 14:41:46 +0200106
107- Deprecate ``missing`` cache constructor parameter.
108
109- Handle overridden ``getsizeof()`` method in subclasses.
110
111- Fix Python 2.7 ``RRCache`` pickling issues.
112
113- Various documentation improvements.
114
115
Thomas Kemmerfba5f8a2017-08-11 18:51:13 +0200116v2.0.1 (2017-08-11)
Thomas Kemmeraa936f02019-12-15 20:46:13 +0100117===================
Thomas Kemmerfba5f8a2017-08-11 18:51:13 +0200118
119- Officially support Python 3.6.
120
121- Move documentation to RTD.
122
123- Documentation: Update import paths for key functions (courtesy of
124 slavkoja).
125
126
Thomas Kemmere27332b2016-10-03 14:00:45 +0200127v2.0.0 (2016-10-03)
Thomas Kemmeraa936f02019-12-15 20:46:13 +0100128===================
Thomas Kemmere27332b2016-10-03 14:00:45 +0200129
130- Drop Python 3.2 support (breaking change).
131
132- Drop support for deprecated features (breaking change).
133
134- Move key functions to separate package (breaking change).
135
136- Accept non-integer ``maxsize`` in ``Cache.__repr__()``.
137
138
Thomas Kemmer8bb68a22016-04-01 11:56:54 +0200139v1.1.6 (2016-04-01)
Thomas Kemmeraa936f02019-12-15 20:46:13 +0100140===================
Thomas Kemmer8bb68a22016-04-01 11:56:54 +0200141
142- Reimplement ``LRUCache`` and ``TTLCache`` using
143 ``collections.OrderedDict``. Note that this will break pickle
144 compatibility with previous versions.
145
146- Fix ``TTLCache`` not calling ``__missing__()`` of derived classes.
147
148- Handle ``ValueError`` in ``Cache.__missing__()`` for consistency
149 with caching decorators.
150
151- Improve how ``TTLCache`` handles expired items.
152
153- Use ``Counter.most_common()`` for ``LFUCache.popitem()``.
154
155
Thomas Kemmer42853732015-10-25 14:58:38 +0100156v1.1.5 (2015-10-25)
Thomas Kemmeraa936f02019-12-15 20:46:13 +0100157===================
Thomas Kemmer42853732015-10-25 14:58:38 +0100158
159- Refactor ``Cache`` base class. Note that this will break pickle
160 compatibility with previous versions.
161
162- Clean up ``LRUCache`` and ``TTLCache`` implementations.
163
164
Thomas Kemmer41d521b2015-10-24 22:38:47 +0200165v1.1.4 (2015-10-24)
Thomas Kemmeraa936f02019-12-15 20:46:13 +0100166===================
Thomas Kemmer41d521b2015-10-24 22:38:47 +0200167
168- Refactor ``LRUCache`` and ``TTLCache`` implementations. Note that
169 this will break pickle compatibility with previous versions.
170
171- Document pending removal of deprecated features.
172
173- Minor documentation improvements.
174
175
Thomas Kemmer4f4b4522015-09-15 20:43:42 +0200176v1.1.3 (2015-09-15)
Thomas Kemmeraa936f02019-12-15 20:46:13 +0100177===================
Thomas Kemmer4f4b4522015-09-15 20:43:42 +0200178
179- Fix pickle tests.
180
181
Thomas Kemmerc8c8db12015-09-15 20:06:57 +0200182v1.1.2 (2015-09-15)
Thomas Kemmeraa936f02019-12-15 20:46:13 +0100183===================
Thomas Kemmerc8c8db12015-09-15 20:06:57 +0200184
185- Fix pickling of large ``LRUCache`` and ``TTLCache`` instances.
186
187
Thomas Kemmer5cdedd52015-09-07 20:53:37 +0200188v1.1.1 (2015-09-07)
Thomas Kemmeraa936f02019-12-15 20:46:13 +0100189===================
Thomas Kemmer5cdedd52015-09-07 20:53:37 +0200190
191- Improve key functions.
192
193- Improve documentation.
194
195- Improve unit test coverage.
196
197
198v1.1.0 (2015-08-28)
Thomas Kemmeraa936f02019-12-15 20:46:13 +0100199===================
Thomas Kemmer6a4c6f02015-08-28 20:31:47 +0200200
201- Add ``@cached`` function decorator.
202
203- Add ``hashkey`` and ``typedkey`` fuctions.
204
205- Add `key` and `lock` arguments to ``@cachedmethod``.
206
207- Set ``__wrapped__`` attributes for Python versions < 3.2.
208
209- Move ``functools`` compatible decorators to ``cachetools.func``.
210
211- Deprecate ``@cachedmethod`` `typed` argument.
212
213- Deprecate `cache` attribute for ``@cachedmethod`` wrappers.
214
215- Deprecate `getsizeof` and `lock` arguments for `cachetools.func`
216 decorator.
217
218
Thomas Kemmer5cdedd52015-09-07 20:53:37 +0200219v1.0.3 (2015-06-26)
Thomas Kemmeraa936f02019-12-15 20:46:13 +0100220===================
Thomas Kemmer37024a72015-06-26 08:06:17 +0200221
222- Clear cache statistics when calling ``clear_cache()``.
223
224
Thomas Kemmer5cdedd52015-09-07 20:53:37 +0200225v1.0.2 (2015-06-18)
Thomas Kemmeraa936f02019-12-15 20:46:13 +0100226===================
Thomas Kemmer0ca640f2015-06-18 19:24:52 +0200227
228- Allow simple cache instances to be pickled.
229
230- Refactor ``Cache.getsizeof`` and ``Cache.missing`` default
231 implementation.
232
233
Thomas Kemmer5cdedd52015-09-07 20:53:37 +0200234v1.0.1 (2015-06-06)
Thomas Kemmeraa936f02019-12-15 20:46:13 +0100235===================
Thomas Kemmerb26d1e52015-06-06 15:20:02 +0200236
237- Code cleanup for improved PEP 8 conformance.
238
239- Add documentation and unit tests for using ``@cachedmethod`` with
240 generic mutable mappings.
241
242- Improve documentation.
243
244
Thomas Kemmer5cdedd52015-09-07 20:53:37 +0200245v1.0.0 (2014-12-19)
Thomas Kemmeraa936f02019-12-15 20:46:13 +0100246===================
Thomas Kemmerf3437a12014-12-19 15:56:11 +0100247
Thomas Kemmer5c2a69b2014-12-19 15:59:10 +0100248- Provide ``RRCache.choice`` property.
249
Thomas Kemmerc6137f22014-12-19 16:22:07 +0100250- Improve documentation.
251
Thomas Kemmerf3437a12014-12-19 15:56:11 +0100252
Thomas Kemmer5cdedd52015-09-07 20:53:37 +0200253v0.8.2 (2014-12-15)
Thomas Kemmeraa936f02019-12-15 20:46:13 +0100254===================
Thomas Kemmerb624bf82014-12-10 06:50:01 +0100255
256- Use a ``NestedTimer`` for ``TTLCache``.
257
258
Thomas Kemmer5cdedd52015-09-07 20:53:37 +0200259v0.8.1 (2014-12-07)
Thomas Kemmeraa936f02019-12-15 20:46:13 +0100260===================
Thomas Kemmerd7cb9942014-12-07 17:53:43 +0100261
262- Deprecate ``Cache.getsize()``.
263
264
Thomas Kemmer5cdedd52015-09-07 20:53:37 +0200265v0.8.0 (2014-12-03)
Thomas Kemmeraa936f02019-12-15 20:46:13 +0100266===================
Thomas Kemmer08a83b32014-12-03 12:07:44 +0100267
Thomas Kemmerbf2de582014-12-03 18:37:35 +0100268- Ignore ``ValueError`` raised on cache insertion in decorators.
Thomas Kemmer08a83b32014-12-03 12:07:44 +0100269
Thomas Kemmer98e32c42014-12-03 12:14:36 +0100270- Add ``Cache.getsize()``.
271
Thomas Kemmerbf2de582014-12-03 18:37:35 +0100272- Add ``Cache.__missing__()``.
Thomas Kemmer5f805192014-12-03 13:07:43 +0100273
Thomas Kemmer35855b52014-12-03 18:54:11 +0100274- Feature freeze for `v1.0`.
275
Thomas Kemmer08a83b32014-12-03 12:07:44 +0100276
Thomas Kemmer5cdedd52015-09-07 20:53:37 +0200277v0.7.1 (2014-11-22)
Thomas Kemmeraa936f02019-12-15 20:46:13 +0100278===================
Thomas Kemmer827e2f52014-11-22 21:20:49 +0100279
280- Fix `MANIFEST.in`.
281
282
Thomas Kemmer5cdedd52015-09-07 20:53:37 +0200283v0.7.0 (2014-11-12)
Thomas Kemmeraa936f02019-12-15 20:46:13 +0100284===================
Thomas Kemmer101513c2014-11-05 19:56:17 +0100285
Thomas Kemmer8dd27642014-11-11 06:43:58 +0100286- Deprecate ``TTLCache.ExpiredError``.
Thomas Kemmera49f49f2014-11-10 16:47:47 +0100287
Thomas Kemmercef66532014-11-11 12:27:05 +0100288- Add `choice` argument to ``RRCache`` constructor.
Thomas Kemmer07646b72014-11-05 20:27:14 +0100289
Thomas Kemmercef66532014-11-11 12:27:05 +0100290- Refactor ``LFUCache``, ``LRUCache`` and ``TTLCache``.
291
Thomas Kemmer53854452014-11-12 07:58:59 +0100292- Use custom ``NullContext`` implementation for unsynchronized
Thomas Kemmercef66532014-11-11 12:27:05 +0100293 function decorators.
Thomas Kemmer101513c2014-11-05 19:56:17 +0100294
295
Thomas Kemmer5cdedd52015-09-07 20:53:37 +0200296v0.6.0 (2014-10-13)
Thomas Kemmeraa936f02019-12-15 20:46:13 +0100297===================
Thomas Kemmer101513c2014-11-05 19:56:17 +0100298
299- Raise ``TTLCache.ExpiredError`` for expired ``TTLCache`` items.
300
301- Support unsynchronized function decorators.
302
303- Allow ``@cachedmethod.cache()`` to return None
304
305
Thomas Kemmer5cdedd52015-09-07 20:53:37 +0200306v0.5.1 (2014-09-25)
Thomas Kemmeraa936f02019-12-15 20:46:13 +0100307===================
Thomas Kemmer101513c2014-11-05 19:56:17 +0100308
309- No formatting of ``KeyError`` arguments.
310
311- Update ``README.rst``.
312
313
Thomas Kemmer5cdedd52015-09-07 20:53:37 +0200314v0.5.0 (2014-09-23)
Thomas Kemmeraa936f02019-12-15 20:46:13 +0100315===================
Thomas Kemmer101513c2014-11-05 19:56:17 +0100316
317- Do not delete expired items in TTLCache.__getitem__().
318
319- Add ``@ttl_cache`` function decorator.
320
321- Fix public ``getsizeof()`` usage.
322
323
Thomas Kemmer5cdedd52015-09-07 20:53:37 +0200324v0.4.0 (2014-06-16)
Thomas Kemmeraa936f02019-12-15 20:46:13 +0100325===================
Thomas Kemmer101513c2014-11-05 19:56:17 +0100326
327- Add ``TTLCache``.
328
329- Add ``Cache`` base class.
330
331- Remove ``@cachedmethod`` `lock` parameter.
332
333
Thomas Kemmer5cdedd52015-09-07 20:53:37 +0200334v0.3.1 (2014-05-07)
Thomas Kemmeraa936f02019-12-15 20:46:13 +0100335===================
Thomas Kemmer101513c2014-11-05 19:56:17 +0100336
337- Add proper locking for ``cache_clear()`` and ``cache_info()``.
338
339- Report `size` in ``cache_info()``.
340
341
Thomas Kemmer5cdedd52015-09-07 20:53:37 +0200342v0.3.0 (2014-05-06)
Thomas Kemmeraa936f02019-12-15 20:46:13 +0100343===================
Thomas Kemmer101513c2014-11-05 19:56:17 +0100344
345- Remove ``@cache`` decorator.
346
347- Add ``size``, ``getsizeof`` members.
348
349- Add ``@cachedmethod`` decorator.
350
351
Thomas Kemmer5cdedd52015-09-07 20:53:37 +0200352v0.2.0 (2014-04-02)
Thomas Kemmeraa936f02019-12-15 20:46:13 +0100353===================
Thomas Kemmer101513c2014-11-05 19:56:17 +0100354
355- Add ``@cache`` decorator.
356
357- Update documentation.
358
359
Thomas Kemmer5cdedd52015-09-07 20:53:37 +0200360v0.1.0 (2014-03-27)
Thomas Kemmeraa936f02019-12-15 20:46:13 +0100361===================
Thomas Kemmer101513c2014-11-05 19:56:17 +0100362
363- Initial release.