Your message dated Sat, 18 Feb 2023 19:00:10 +0000 with message-id <E1pTSRO-009hcW-6r@fasolo.debian.org> and subject line Bug#1031127: fixed in aiocache 0.12.0-1 has caused the Debian Bug report #1031127, regarding ITP: aiocache -- multi backend asyncio cache to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@bugs.debian.org immediately.) -- 1031127: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1031127 Debian Bug Tracking System Contact owner@bugs.debian.org with problems
--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: ITP: aiocache -- multi backend asyncio cache
- From: Gianfranco Costamagna <locutusofborg@debian.org>
- Date: Sun, 12 Feb 2023 08:42:37 +0100
- Message-id: <[🔎] 5090cc30-ba4d-4b1d-bb8c-8292833d617f@debian.org>
- References: <5090cc30-ba4d-4b1d-bb8c-8292833d617f.ref@debian.org>
Package: wnpp Severity: wishlist Owner: Gianfranco Costamagna <locutusofborg@debian.org> * Package name : aiocache Version : 0.12.0 Upstream Author : Manuel Miranda <manu.mirandad@gmail.com> * URL : https://github.com/aio-libs/aiocache * License : BSD-3-clause Programming Lang: Python Description : multi backend asyncio cache Binary package names: python3-aiocache Asyncio cache supporting multiple backends (memory, redis and memcached). This library aims for simplicity over specialization. All caches contain the same minimum interface which consists on the following functions: . - ``add``: Only adds key/value if key does not exist. - ``get``: Retrieve value identified by key. - ``set``: Sets key/value. - ``multi_get``: Retrieves multiple key/values. - ``multi_set``: Sets multiple key/values. - ``exists``: Returns True if key exists False otherwise. - ``increment``: Increment the value stored in the given key. - ``delete``: Deletes key and returns number of deleted items. - ``clear``: Clears the items stored. - ``raw``: Executes the specified command using the underlying client. . .. role:: python(code) :language: python . .. contents:: . .. section-numbering: . Usage ===== . Using a cache is as simple as . .. code-block:: python . >>> import asyncio >>> from aiocache import Cache >>> cache = Cache(Cache.MEMORY) # Here you can also use Cache.REDIS and Cache.MEMCACHED, default is Cache.MEMORY >>> with asyncio.Runner() as runner: >>> runner.run(cache.set('key', 'value')) True >>> runner.run(cache.get('key')) 'value' . Or as a decorator . .. code-block:: python . import asyncio . from collections import namedtuple . from aiocache import cached, Cache from aiocache.serializers import PickleSerializer # With this we can store python objects in backends like Redis! . Result = namedtuple('Result', "content, status") . . @cached( ttl=10, cache=Cache.REDIS, key="key", serializer=PickleSerializer(), port=6379, namespace="main") async def cached_call(): print("Sleeping for three seconds zzzz.....") await asyncio.sleep(3) return Result("content", 200) . . async def run(): await cached_call() await cached_call() await cached_call() cache = Cache(Cache.REDIS, endpoint="127.0.0.1", port=6379, namespace="main") await cache.delete("key") . if __name__ == "__main__": asyncio.run(run()) . The recommended approach to instantiate a new cache is using the `Cache` constructor. However you can also instantiate directly using `aiocache.RedisCache`, `aiocache.SimpleMemoryCache` or `aiocache.MemcachedCache`. . . You can also setup cache aliases so its easy to reuse configurations . .. code-block:: python . import asyncio . from aiocache import caches . # You can use either classes or strings for referencing classes caches.set_config({ 'default': { 'cache': "aiocache.SimpleMemoryCache", 'serializer': { 'class': "aiocache.serializers.StringSerializer" } }, 'redis_alt': { 'cache': "aiocache.RedisCache", 'endpoint': "127.0.0.1", 'port': 6379, 'timeout': 1, 'serializer': { 'class': "aiocache.serializers.PickleSerializer" }, 'plugins': [ {'class': "aiocache.plugins.HitMissRatioPlugin"}, {'class': "aiocache.plugins.TimingPlugin"} ] } }) . . async def default_cache(): cache = caches.get('default') # This always returns the SAME instance await cache.set("key", "value") assert await cache.get("key") == "value" . . async def alt_cache(): cache = caches.create('redis_alt') # This creates a NEW instance on every call await cache.set("key", "value") assert await cache.get("key") == "value" . . async def test_alias(): await default_cache() await alt_cache() . await caches.get("redis_alt").delete("key") . . if __name__ == "__main__": asyncio.run(test_alias())Attachment: OpenPGP_signature
Description: OpenPGP digital signature
--- End Message ---
--- Begin Message ---
- To: 1031127-close@bugs.debian.org
- Subject: Bug#1031127: fixed in aiocache 0.12.0-1
- From: Debian FTP Masters <ftpmaster@ftp-master.debian.org>
- Date: Sat, 18 Feb 2023 19:00:10 +0000
- Message-id: <E1pTSRO-009hcW-6r@fasolo.debian.org>
- Reply-to: Gianfranco Costamagna <locutusofborg@debian.org>
Source: aiocache Source-Version: 0.12.0-1 Done: Gianfranco Costamagna <locutusofborg@debian.org> We believe that the bug you reported is fixed in the latest version of aiocache, which is due to be installed in the Debian FTP archive. A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to 1031127@bugs.debian.org, and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Gianfranco Costamagna <locutusofborg@debian.org> (supplier of updated aiocache package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing ftpmaster@ftp-master.debian.org) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Format: 1.8 Date: Sun, 12 Feb 2023 07:02:08 +0000 Source: aiocache Binary: python3-aiocache Architecture: source all Version: 0.12.0-1 Distribution: unstable Urgency: low Maintainer: Gianfranco Costamagna <locutusofborg@debian.org> Changed-By: Gianfranco Costamagna <locutusofborg@debian.org> Description: python3-aiocache - multi backend asyncio cache Closes: 1031127 Changes: aiocache (0.12.0-1) unstable; urgency=low . * Initial release (Closes: #1031127) Checksums-Sha1: eaaed20948dffffb48c2c834dca2e81ac8c9554f 1969 aiocache_0.12.0-1.dsc 4ad5cdae232979e066e290b82a877c953dfba38c 127002 aiocache_0.12.0.orig.tar.gz 843e04eec64fd3e6a923adcd4e6a64da3e00a98d 3292 aiocache_0.12.0-1.debian.tar.xz 7921262cd574a5f994bfbb11b03c9c85968d0185 7813 aiocache_0.12.0-1_amd64.buildinfo 60c32dada79dfe9c22c0173f8906e4557584f9a3 22328 python3-aiocache_0.12.0-1_all.deb Checksums-Sha256: 02b3540fbea7883129838ae7e18ec3d7cc28e9ac6faa736796002c40ad3b6460 1969 aiocache_0.12.0-1.dsc 79ff8ee45cb2074a320c2d41a55dfaae4e00eca6106643f249aa0f4e5366cc3f 127002 aiocache_0.12.0.orig.tar.gz ff6d19379cb909184584341549ca32eb590834e87e521c88a7cc8800d6b708f6 3292 aiocache_0.12.0-1.debian.tar.xz 0354fd2093fd38701da50fa0b631e6ca295e33e13f46cd677071c2019f983532 7813 aiocache_0.12.0-1_amd64.buildinfo f6114daf7dc8d49c3b35ecb1d91ea295f4ed07f1cf3599ff9a1f21ab5845170f 22328 python3-aiocache_0.12.0-1_all.deb Files: 99b49f073679591dbadda1892fd07d9b 1969 python optional aiocache_0.12.0-1.dsc 6c67954c92565f1389ebeef172b10765 127002 python optional aiocache_0.12.0.orig.tar.gz 11e71e146a6bfca6ed34faa047e06d95 3292 python optional aiocache_0.12.0-1.debian.tar.xz e06f70fbdbb72530682a1698faf069fe 7813 python optional aiocache_0.12.0-1_amd64.buildinfo 9f4879f601a085ee540ecfaab8f6c4f0 22328 python optional python3-aiocache_0.12.0-1_all.deb -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEkpeKbhleSSGCX3/w808JdE6fXdkFAmPomdIACgkQ808JdE6f XdlAUxAAvqQzVk5PBRNS+EeUfIQDQ3FOgvTxPFBRFbKUOt9G47LXgLVyImQCBakL CiSOb3GSZRQ1xM9qpUGXukV4rVLuuGnR+tGHTH1ejrzrUmydlYWZpGxqw5VI+o5F fZEw/UrQQmGC6XuZjB3EPcEda2lfhrOtnuPnH55J3AZsE0MSh0t3ZdkgM2w1mvoL 4kvV/NIQdy9f/dBlaXATcFgBLYLyvCZJ/vtcHr2aD/QSSiTrmX44eCU3EKuaVhRA 0StE3NXJkQ2cOSU+AtcwEKOc31bXoyhkH49LkLe/IChQ0UYv7PmQaPNRnLbyOU7S i4mtgwS6+kPTTNB/ZLMjwd004RMOhAaTb2dkRp0lajbKhDfSJ8zUseufVBPlQ46l r/n0GmZDhvWtt7llc/C+ufcTt4MrCpSE70DXNj1y2VbjQI0wOcHz6K37LBQm2qpU YbofMrioeLMPH/KkLNk24JQavC5IxpxLCipuer1eWCJczO587lqjLportXA4jBdP 4qbEcnvYDfxJ0bUHWPJDsyk9U6P2MD+J3HRc74W4zPeQmMDP1X/3xjyLcBVRdQqV D1sfxjb9aq1jYYtaImbWq/fw+CJFDY5eDNeVR/vrhDR7uDA3htpu9dpYDPCZvEtm 3+RoGQBBIsYvOocrv7wcaMuuKKC6PdfMP4W2QmuegMPt9CKU/Uw= =eIlK -----END PGP SIGNATURE-----
--- End Message ---