From 78911a9f04ac6437df2cd18efcfdefeaf1291a55b14515a2281abe8e9c94ddc3 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 24 Feb 2025 08:43:52 +0000 Subject: [PATCH] - Update to 5.5.2 * Reduce number of ``@cached`` lock/unlock operations. * Improve documentation. * Update CI environment. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cachetools?expand=0&rev=47 --- .gitattributes | 23 ++++ .gitignore | 1 + cachetools-5.3.3.tar.gz | 3 + cachetools-5.5.0.tar.gz | 3 + cachetools-5.5.1.tar.gz | 3 + cachetools-5.5.2.tar.gz | 3 + python-cachetools.changes | 243 ++++++++++++++++++++++++++++++++++++++ python-cachetools.spec | 57 +++++++++ 8 files changed, 336 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 cachetools-5.3.3.tar.gz create mode 100644 cachetools-5.5.0.tar.gz create mode 100644 cachetools-5.5.1.tar.gz create mode 100644 cachetools-5.5.2.tar.gz create mode 100644 python-cachetools.changes create mode 100644 python-cachetools.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/cachetools-5.3.3.tar.gz b/cachetools-5.3.3.tar.gz new file mode 100644 index 0000000..7a5b885 --- /dev/null +++ b/cachetools-5.3.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ba29e2dfa0b8b556606f097407ed1aa62080ee108ab0dc5ec9d6a723a007d105 +size 26522 diff --git a/cachetools-5.5.0.tar.gz b/cachetools-5.5.0.tar.gz new file mode 100644 index 0000000..c0e9515 --- /dev/null +++ b/cachetools-5.5.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2cc24fb4cbe39633fb7badd9db9ca6295d766d9c2995f245725a46715d050f2a +size 27661 diff --git a/cachetools-5.5.1.tar.gz b/cachetools-5.5.1.tar.gz new file mode 100644 index 0000000..a31f050 --- /dev/null +++ b/cachetools-5.5.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:70f238fbba50383ef62e55c6aff6d9673175fe59f7c6782c7a0b9e38f4a9df95 +size 28044 diff --git a/cachetools-5.5.2.tar.gz b/cachetools-5.5.2.tar.gz new file mode 100644 index 0000000..2f70069 --- /dev/null +++ b/cachetools-5.5.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1a661caa9175d26759571b2e19580f9d6393969e5dfca11fdb1f947a23e640d4 +size 28380 diff --git a/python-cachetools.changes b/python-cachetools.changes new file mode 100644 index 0000000..fc73346 --- /dev/null +++ b/python-cachetools.changes @@ -0,0 +1,243 @@ +------------------------------------------------------------------- +Mon Feb 24 08:18:44 UTC 2025 - John Paul Adrian Glaubitz + +- Update to 5.5.2 + * Reduce number of ``@cached`` lock/unlock operations. + * Improve documentation. + * Update CI environment. + +------------------------------------------------------------------- +Mon Jan 27 13:37:30 UTC 2025 - John Paul Adrian Glaubitz + +- Update to 5.5.1 + * Add documentation regarding caching of exceptions. + * Officially support Python 3.13. + * Update CI environment. + +------------------------------------------------------------------- +Sat Sep 28 19:57:53 UTC 2024 - Dirk Müller + +- update to 5.5.0: + * TTLCache.expire() returns iterable of expired (key, value) + pairs. + +------------------------------------------------------------------- +Tue Apr 2 13:10:46 UTC 2024 - Dirk Müller + +- update to 5.3.3: + * Documentation improvements. + * Update CI environment. + +------------------------------------------------------------------- +Fri Nov 10 13:36:43 UTC 2023 - Dirk Müller + +- update to 5.3.2: + * Add support for Python 3.12. + * Various documentation improvements. + +------------------------------------------------------------------- +Mon May 29 16:03:19 UTC 2023 - Dirk Müller + +- update to 5.3.1: + * Depend on Python >= 3.7. + +------------------------------------------------------------------- +Fri Apr 21 12:23:00 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Thu Apr 13 22:40:24 UTC 2023 - Matej Cepl + +- Make calling of %{sle15modernpython} optional. + +------------------------------------------------------------------- +Sat Jan 28 12:28:38 UTC 2023 - Dirk Müller + +- update to 5.3.0: + * Add ``cache_info()`` function to ``@cached`` decorator. + +------------------------------------------------------------------- +Fri Jan 13 09:53:36 UTC 2023 - Dirk Müller + +- update to 5.2.1: + * Add support for Python 3.11. + * Correct version information in RTD documentation. + * ``badges/shields``: Change to GitHub workflow badge routes. + +------------------------------------------------------------------- +Mon Sep 26 19:34:29 UTC 2022 - Yogalakshmi Arunachalam + +- update to v5.2.0 + * Add cachetools.keys.methodkey(). + * Add cache_clear() function to decorators. + * Add src directory to sys.path for Sphinx autodoc. + * Modernize func wrappers. + +- update to v5.1.0 + * Add cache decorator parameters as wrapper function attributes. + +- update to v5.0.0 + * Require Python 3.7 or later (breaking change). + * Remove deprecated submodules (breaking change). + The cache, fifo, lfu, lru, mru, rr and ttl submodules have been deleted. Therefore, statements like + from cachetools.ttl import TTLCache will no longer work. Use from cachetools import TTLCache instead. + * Pass self to @cachedmethod key function (breaking change). + The key function passed to the @cachedmethod decorator is now called as key(self, *args, **kwargs). + The default key function has been changed to ignore its first argument, so this should only affect applications using custom + key functions with the @cachedmethod decorator. + * Change exact time of expiration in TTLCache (breaking change). + TTLCache items now get expired if their expiration time is less than or equal to timer(). For applications using the default timer(), + this should be barely noticable, but it may affect the use of custom timers with larger tick intervals. Note that this also implies + that a TTLCache with ttl=0 can no longer hold any items, since they will expire immediately. + * Change Cache.__repr__() format (breaking change). + String representations of cache instances now use a more compact and efficient format, e.g. + LRUCache({1: 1, 2: 2}, maxsize=10, currsize=2) + * Add TLRU cache implementation. + * Documentation improvements. + +------------------------------------------------------------------- +Sat Oct 16 21:02:10 UTC 2021 - Dirk Müller + +- update to 4.2.4: + - Add submodule shims for backward compatibility. + - Add documentation and tests for using ``TTLCache`` with + ``datetime``. + - Link to typeshed typing stubs. + - Flatten package file hierarchy. + +------------------------------------------------------------------- +Fri May 28 06:44:53 UTC 2021 - pgajdos@suse.com + +- version update to 4.2.2 + * Update build environment. + * Remove Python 2 remnants. + * Format code with Black. +- %check: use %pyunittest macro + +------------------------------------------------------------------- +Thu Jan 28 22:51:01 UTC 2021 - Dirk Müller + +- update to 4.2.1: + - Handle ``__missing__()`` not storing cache items. + - Clean up ``__missing__()`` example. + +------------------------------------------------------------------- +Tue Dec 29 13:43:41 UTC 2020 - Dirk Müller + +- update to 4.2.0: + - Add FIFO cache implementation. + - Add MRU cache implementation. + - Improve behavior of decorators in case of race conditions. + - Improve documentation regarding mutability of caches values and use + of key functions with decorators. + - Officially support Python 3.9. + +------------------------------------------------------------------- +Fri Jul 17 07:21:31 UTC 2020 - Dirk Mueller + +- update to 4.1.1: + - Improve ``popitem()`` exception context handling. + - Replace ``float('inf')`` with ``math.inf``. + +------------------------------------------------------------------- +Wed Apr 29 10:47:20 UTC 2020 - Dirk Mueller + +- update to 4.1.0: + - Support ``user_function`` with ``cachetools.func`` decorators + (Python 3.8 compatibility). + + - Support ``cache_parameters()`` with ``cachetools.func`` decorators + (Python 3.9 compatibility). + +------------------------------------------------------------------- +Fri Jan 24 09:43:34 UTC 2020 - Marketa Calabkova + +- update to 4.0.0 + * Require Python 3.5 or later. + +------------------------------------------------------------------- +Fri Sep 13 11:08:10 UTC 2019 - Tomáš Chvátal + +- Update to 3.1.1: + * Document how to use shared caches with @cachedmethod. + * Fix pickling/unpickling of cache keys + +------------------------------------------------------------------- +Wed Feb 27 18:17:13 UTC 2019 - Thomas Bechtold + +- update to 3.1.0: + - Fix Python 3.8 compatibility issue. + - Use ``time.monotonic`` as default timer if available. + - Improve documentation regarding thread safety. + - Officially support Python 3.7. + - Drop Python 3.3 support (breaking change). + - Remove ``missing`` cache constructor parameter (breaking change). + - Remove ``self`` from ``@cachedmethod`` key arguments (breaking + change). + - Add support for ``maxsize=None`` in ``cachetools.func`` decorators. + +------------------------------------------------------------------- +Tue Dec 4 12:46:24 UTC 2018 - Matej Cepl + +- Remove superfluous devel dependency for noarch package + +------------------------------------------------------------------- +Wed Aug 16 13:51:39 UTC 2017 - toddrme2178@gmail.com + +- Implement single-spec version +- Update to version 2.0.1 + * Officially support Python 3.6. + * Move documentation to RTD. + * Documentation: Update import paths for key functions + (courtesy of slavkoja). + +------------------------------------------------------------------- +Thu Jun 1 21:04:54 UTC 2017 - dmueller@suse.com + +- update to 2.0.0: + - Drop Python 3.2 support (breaking change). + - Drop support for deprecated features (breaking change). + - Move key functions to separate package (breaking change). + - Accept non-integer ``maxsize`` in ``Cache.__repr__()``. + +------------------------------------------------------------------- +Tue Aug 30 19:48:39 UTC 2016 - tbechtold@suse.com + +- update to 1.1.6: + - Reimplement ``LRUCache`` and ``TTLCache`` using + ``collections.OrderedDict``. Note that this will break pickle + compatibility with previous versions. + - Fix ``TTLCache`` not calling ``__missing__()`` of derived classes. + - Handle ``ValueError`` in ``Cache.__missing__()`` for consistency + with caching decorators. + - Improve how ``TTLCache`` handles expired items. + - Use ``Counter.most_common()`` for ``LFUCache.popitem()``. + - Refactor ``Cache`` base class. Note that this will break pickle + compatibility with previous versions. + - Clean up ``LRUCache`` and ``TTLCache`` implementations. + - Refactor ``LRUCache`` and ``TTLCache`` implementations. Note that + this will break pickle compatibility with previous versions. + - Document pending removal of deprecated features. + - Minor documentation improvements. + - Fix pickle tests. + - Fix pickling of large ``LRUCache`` and ``TTLCache`` instances. + - Improve key functions. + - Improve documentation. + - Improve unit test coverage. + - Add ``@cached`` function decorator. + - Add ``hashkey`` and ``typedkey`` fuctions. + - Add `key` and `lock` arguments to ``@cachedmethod``. + - Set ``__wrapped__`` attributes for Python versions < 3.2. + - Move ``functools`` compatible decorators to ``cachetools.func``. + - Deprecate ``@cachedmethod`` `typed` argument. + - Deprecate `cache` attribute for ``@cachedmethod`` wrappers. + - Deprecate `getsizeof` and `lock` arguments for `cachetools.func` + decorator. +- Use pypi.io as Source url + +------------------------------------------------------------------- +Thu Jul 9 08:04:04 UTC 2015 - dmueller@suse.com + +- Initial package (1.0.3) + diff --git a/python-cachetools.spec b/python-cachetools.spec new file mode 100644 index 0000000..e186d3b --- /dev/null +++ b/python-cachetools.spec @@ -0,0 +1,57 @@ +# +# spec file for package python-cachetools +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?sle15_python_module_pythons} +Name: python-cachetools +Version: 5.5.2 +Release: 0 +Summary: Extensible memoizing collections and decorators +License: MIT +Group: Development/Languages/Python +URL: https://github.com/tkem/cachetools +Source: https://files.pythonhosted.org/packages/source/c/cachetools/cachetools-%{version}.tar.gz +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildArch: noarch +%python_subpackages + +%description +This module provides various memoizing collections and decorators, +including a variant of the Python 3 Standard Library `@lru_cache`_ +function decorator. + +%prep +%setup -q -n cachetools-%{version} + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pyunittest discover -v + +%files %{python_files} +%license LICENSE +%doc CHANGELOG.rst README.rst +%{python_sitelib}/* + +%changelog