Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-hishel for openSUSE:Factory checked in at 2025-08-15 21:52:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-hishel (Old) and /work/SRC/openSUSE:Factory/.python-hishel.new.1085 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-hishel" Fri Aug 15 21:52:39 2025 rev:8 rq:1299815 version:0.1.3 Changes: -------- --- /work/SRC/openSUSE:Factory/python-hishel/python-hishel.changes 2025-06-13 18:47:20.443479496 +0200 +++ /work/SRC/openSUSE:Factory/.python-hishel.new.1085/python-hishel.changes 2025-08-15 21:54:20.425808368 +0200 @@ -1,0 +2,10 @@ +Fri Aug 15 09:23:22 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaub...@suse.com> + +- Update to 0.1.3 + * Remove `types-redis` from dev dependencies (#336) + * Bump redis to 6.0.0 and address async `.close()` deprecation warning (#336) + * Avoid race condition when unlinking files in `FileStorage`. (#334) + * Allow prodiving a `path_prefix` in `S3Storage` and `AsyncS3Storage`. (#342) +- Update BuildRequires and Suggests from pyproject.toml + +------------------------------------------------------------------- Old: ---- hishel-0.1.2.tar.gz New: ---- hishel-0.1.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-hishel.spec ++++++ --- /var/tmp/diff_new_pack.ITaprR/_old 2025-08-15 21:54:20.945829992 +0200 +++ /var/tmp/diff_new_pack.ITaprR/_new 2025-08-15 21:54:20.945829992 +0200 @@ -18,7 +18,7 @@ %{?sle15_python_module_pythons} Name: python-hishel -Version: 0.1.2 +Version: 0.1.3 Release: 0 Summary: Persistent cache implementation for httpx and httpcore License: BSD-3-Clause @@ -32,7 +32,7 @@ BuildRequires: %{python_module httpx >= 0.28.0} BuildRequires: %{python_module PyYAML} BuildRequires: %{python_module pytest} -BuildRequires: %{python_module redis} +BuildRequires: %{python_module redis >= 6.0.0} BuildRequires: %{python_module trio} BuildRequires: %{python_module typing_extensions >= 4.8.0} BuildRequires: %{pythons} @@ -40,8 +40,8 @@ BuildRequires: fdupes Requires: python-httpx >= 0.28.0 Requires: python-typing_extensions >= 4.8.0 -Suggests: python-pyyaml == 6.0.1 -Suggests: python-redis == 5.0.1 +Suggests: python-pyyaml >= 6.0.2 +Suggests: python-redis >= 6.0.0 Suggests: python-anysqlite >= 0.0.5 Suggests: python-boto3 >= 1.15.0 BuildArch: noarch ++++++ hishel-0.1.2.tar.gz -> hishel-0.1.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hishel-0.1.2/CHANGELOG.md new/hishel-0.1.3/CHANGELOG.md --- old/hishel-0.1.2/CHANGELOG.md 2025-04-04 23:15:26.000000000 +0200 +++ new/hishel-0.1.3/CHANGELOG.md 2025-07-06 16:14:49.000000000 +0200 @@ -1,5 +1,12 @@ # Changelog +## 0.1.3 (1st July, 2025) + +- Remove `types-redis` from dev dependencies (#336) +- Bump redis to 6.0.0 and address async `.close()` deprecation warning (#336) +- Avoid race condition when unlinking files in `FileStorage`. (#334) +- Allow prodiving a `path_prefix` in `S3Storage` and `AsyncS3Storage`. (#342) + ## 0.1.2 (5th April, 2025) - Add check for fips compliant python. (#325) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hishel-0.1.2/docs/userguide.md new/hishel-0.1.3/docs/userguide.md --- old/hishel-0.1.2/docs/userguide.md 2025-04-04 23:15:26.000000000 +0200 +++ new/hishel-0.1.3/docs/userguide.md 2025-07-06 16:14:49.000000000 +0200 @@ -113,7 +113,7 @@ It is always preferable to use transports that `Hishel` offers for more dependable and predictable behavior. -We advise you to read the [transports documentation](https://www.python-httpx.org/advanced/#custom-transports) if you have never used `HTTPX's transports` before continuing. +We advise you to read the [transports documentation](https://www.python-httpx.org/advanced/transports/) if you have never used `HTTPX's transports` before continuing. We can divide the httpx library into two parts: the transports and the rest of the httpx library. Transports are the objects that are **actually making the request**. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hishel-0.1.2/hishel/__init__.py new/hishel-0.1.3/hishel/__init__.py --- old/hishel-0.1.2/hishel/__init__.py 2025-04-04 23:15:26.000000000 +0200 +++ new/hishel-0.1.3/hishel/__init__.py 2025-07-06 16:14:49.000000000 +0200 @@ -14,4 +14,4 @@ httpx.Client = CacheClient # type: ignore -__version__ = "0.1.2" +__version__ = "0.1.3" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hishel-0.1.2/hishel/_async/_storages.py new/hishel-0.1.3/hishel/_async/_storages.py --- old/hishel-0.1.2/hishel/_async/_storages.py 2025-04-04 23:15:26.000000000 +0200 +++ new/hishel-0.1.3/hishel/_async/_storages.py 2025-07-06 16:14:49.000000000 +0200 @@ -159,7 +159,7 @@ async with self._lock: if response_path.exists(): - response_path.unlink() + response_path.unlink(missing_ok=True) async def update_metadata(self, key: str, response: Response, request: Request, metadata: Metadata) -> None: """ @@ -222,7 +222,7 @@ if response_path.is_file(): age = time.time() - response_path.stat().st_mtime if age > self._ttl: - response_path.unlink() + response_path.unlink(missing_ok=True) return self._last_cleaned = time.monotonic() @@ -507,7 +507,7 @@ return self._serializer.loads(cached_response) async def aclose(self) -> None: # pragma: no cover - await self._client.close() + await self._client.aclose() class AsyncInMemoryStorage(AsyncBaseStorage): @@ -654,6 +654,8 @@ :type check_ttl_every: tp.Union[int, float] :param client: A client for S3, defaults to None :type client: tp.Optional[tp.Any], optional + :param path_prefix: A path prefix to use for S3 object keys, defaults to "hishel-" + :type path_prefix: str, optional """ def __init__( @@ -663,6 +665,7 @@ ttl: tp.Optional[tp.Union[int, float]] = None, check_ttl_every: tp.Union[int, float] = 60, client: tp.Optional[tp.Any] = None, + path_prefix: str = "hishel-", ) -> None: super().__init__(serializer, ttl) @@ -680,6 +683,7 @@ bucket_name=bucket_name, is_binary=self._serializer.is_binary, check_ttl_every=check_ttl_every, + path_prefix=path_prefix, ) self._lock = AsyncLock() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hishel-0.1.2/hishel/_s3.py new/hishel-0.1.3/hishel/_s3.py --- old/hishel-0.1.2/hishel/_s3.py 2025-04-04 23:15:26.000000000 +0200 +++ new/hishel-0.1.3/hishel/_s3.py 2025-07-06 16:14:49.000000000 +0200 @@ -11,16 +11,22 @@ class S3Manager: def __init__( - self, client: tp.Any, bucket_name: str, check_ttl_every: tp.Union[int, float], is_binary: bool = False + self, + client: tp.Any, + bucket_name: str, + check_ttl_every: tp.Union[int, float], + is_binary: bool = False, + path_prefix: str = "hishel-", ): self._client = client self._bucket_name = bucket_name self._is_binary = is_binary self._last_cleaned = time.monotonic() self._check_ttl_every = check_ttl_every + self._path_prefix = path_prefix def write_to(self, path: str, data: tp.Union[bytes, str], only_metadata: bool = False) -> None: - path = "hishel-" + path + path = self._path_prefix + path if isinstance(data, str): data = data.encode("utf-8") @@ -43,7 +49,7 @@ ) def read_from(self, path: str) -> tp.Union[bytes, str]: - path = "hishel-" + path + path = self._path_prefix + path response = self._client.get_object( Bucket=self._bucket_name, Key=path, @@ -57,7 +63,7 @@ return tp.cast(str, content.decode("utf-8")) def remove_expired(self, ttl: int, key: str) -> None: - path = "hishel-" + key + path = self._path_prefix + key if time.monotonic() - self._last_cleaned < self._check_ttl_every: try: @@ -72,7 +78,7 @@ self._last_cleaned = time.monotonic() for obj in self._client.list_objects(Bucket=self._bucket_name).get("Contents", []): - if not obj["Key"].startswith("hishel-"): # pragma: no cover + if not obj["Key"].startswith(self._path_prefix): # pragma: no cover continue try: @@ -88,15 +94,20 @@ self._client.delete_object(Bucket=self._bucket_name, Key=obj["Key"]) def remove_entry(self, key: str) -> None: - path = "hishel-" + key + path = self._path_prefix + key self._client.delete_object(Bucket=self._bucket_name, Key=path) class AsyncS3Manager: # pragma: no cover def __init__( - self, client: tp.Any, bucket_name: str, check_ttl_every: tp.Union[int, float], is_binary: bool = False + self, + client: tp.Any, + bucket_name: str, + check_ttl_every: tp.Union[int, float], + is_binary: bool = False, + path_prefix: str = "hishel-", ): - self._sync_manager = S3Manager(client, bucket_name, check_ttl_every, is_binary) + self._sync_manager = S3Manager(client, bucket_name, check_ttl_every, is_binary, path_prefix) async def write_to(self, path: str, data: tp.Union[bytes, str], only_metadata: bool = False) -> None: return await to_thread.run_sync(self._sync_manager.write_to, path, data, only_metadata) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hishel-0.1.2/hishel/_sync/_storages.py new/hishel-0.1.3/hishel/_sync/_storages.py --- old/hishel-0.1.2/hishel/_sync/_storages.py 2025-04-04 23:15:26.000000000 +0200 +++ new/hishel-0.1.3/hishel/_sync/_storages.py 2025-07-06 16:14:49.000000000 +0200 @@ -159,7 +159,7 @@ with self._lock: if response_path.exists(): - response_path.unlink() + response_path.unlink(missing_ok=True) def update_metadata(self, key: str, response: Response, request: Request, metadata: Metadata) -> None: """ @@ -222,7 +222,7 @@ if response_path.is_file(): age = time.time() - response_path.stat().st_mtime if age > self._ttl: - response_path.unlink() + response_path.unlink(missing_ok=True) return self._last_cleaned = time.monotonic() @@ -654,6 +654,8 @@ :type check_ttl_every: tp.Union[int, float] :param client: A client for S3, defaults to None :type client: tp.Optional[tp.Any], optional + :param path_prefix: A path prefix to use for S3 object keys, defaults to "hishel-" + :type path_prefix: str, optional """ def __init__( @@ -663,6 +665,7 @@ ttl: tp.Optional[tp.Union[int, float]] = None, check_ttl_every: tp.Union[int, float] = 60, client: tp.Optional[tp.Any] = None, + path_prefix: str = "hishel-", ) -> None: super().__init__(serializer, ttl) @@ -680,6 +683,7 @@ bucket_name=bucket_name, is_binary=self._serializer.is_binary, check_ttl_every=check_ttl_every, + path_prefix=path_prefix, ) self._lock = Lock() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hishel-0.1.2/pyproject.toml new/hishel-0.1.3/pyproject.toml --- old/hishel-0.1.2/pyproject.toml 2025-04-04 23:15:26.000000000 +0200 +++ new/hishel-0.1.3/pyproject.toml 2025-07-06 16:14:49.000000000 +0200 @@ -35,11 +35,11 @@ [project.optional-dependencies] yaml = [ - "pyyaml==6.0.1", + "pyyaml==6.0.2", ] redis = [ - "redis==5.0.4" + "redis==6.2.0" ] sqlite = [ @@ -92,7 +92,7 @@ [tool.coverage.run] omit = [ - "venv/*", + "venv/*", "hishel/_sync/*", "hishel/_s3.py" ] @@ -136,6 +136,5 @@ "trio==0.28.0", "types-boto3==1.0.2", "types-pyyaml==6.0.12.20240311", - "types-redis==4.6.0.20240425", "zipp>=3.19.1", ]