From 170a627e086baca8d4d3fd4c6cfa960123311b5b Mon Sep 17 00:00:00 2001 From: Jordan Cook Date: Sat, 8 Oct 2022 14:19:31 -0500 Subject: [PATCH] Fix potential `AttributeError` due to undetected imports when requests-cache is bundled in a PyInstaller package --- HISTORY.md | 1 + pyproject.toml | 2 +- requests_cache/__init__.py | 2 +- requests_cache/_utils.py | 3 +++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 23e817f0..be41a265 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,6 +1,7 @@ # History ## 0.9.7 (Unreleased) +* Fix potential `AttributeError` due to undetected imports when requests-cache is bundled in a PyInstaller package * Update to cattrs 22.2 ## 0.9.6 (2022-08-24) diff --git a/pyproject.toml b/pyproject.toml index 93506398..6175c1da 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "requests-cache" -version = "0.9.6" +version = "0.9.7" description = "A transparent persistent cache for the requests library" authors = ["Roman Haritonov", "Jordan Cook"] license = "BSD-2-Clause" diff --git a/requests_cache/__init__.py b/requests_cache/__init__.py index b0c7bde8..546b9032 100644 --- a/requests_cache/__init__.py +++ b/requests_cache/__init__.py @@ -2,7 +2,7 @@ # Version is defined in pyproject.toml. # It's copied here to make it easier for client code to check the installed version. -__version__ = '0.9.6' +__version__ = '0.9.7' from .backends import * from .cache_control import * diff --git a/requests_cache/_utils.py b/requests_cache/_utils.py index b3dfaee1..63212c0f 100644 --- a/requests_cache/_utils.py +++ b/requests_cache/_utils.py @@ -38,6 +38,9 @@ def __getattr__(self, *args, **kwargs): def dumps(self, *args, **kwargs): _log_error() + def loads(self, *args, **kwargs): + _log_error() + return Placeholder