Package Details: python-requests-cache 1.2.1-1

Git Clone URL: https://aur.archlinux.org/python-requests-cache.git (read-only, click to copy)
Package Base: python-requests-cache
Description: A persistent cache for python requests
Upstream URL: https://github.com/requests-cache/requests-cache
Keywords: cache dynamodb http mongodb performance redis requests sqlite web webscraping
Licenses: custom:BSD-2-clause
Submitter: Shibumi
Maintainer: carlosal1015 (JWCook, flying-sheep, AutoUpdateBot)
Last Packager: AutoUpdateBot
Votes: 28
Popularity: 0.000009
First Submitted: 2015-09-21 13:55 (UTC)
Last Updated: 2024-06-19 07:56 (UTC)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 9 10 Next › Last »

carlosal1015 commented on 2022-06-29 20:17 (UTC)

Thanks for suggestion, when python-requests-cache deprecated python-bson I will do the same in the PKGBUILD.

bpierre commented on 2022-06-29 18:47 (UTC)

Also, I think python-bson should be removed from the optional dependency: it has not been updated for a while, and the testsuite does not pass when using it instead of the bson module provided by python-pymongo (cattrs is also using the later).

bpierre commented on 2022-06-29 18:39 (UTC) (edited on 2022-06-29 18:42 (UTC) by bpierre)

Can you re-raise the (real) exception as the root of the problem in requests_cache/__init__.py? There might be another missing dependency. Or alternatively install python-exceptiongroup so the warning is about the root exception (note python-exceptiongroup check phase is failing on my side).

There's a least 3 issues: - some missing dependencies for running the tests - the exception handling in requests_cache/__init__.py - the missing python-exceptiongroup dependency for python-cattrs exception handling

carlosal1015 commented on 2022-06-29 18:24 (UTC) (edited on 2022-06-29 18:28 (UTC) by carlosal1015)

Yes, the different error in check() function, but not workaround yet. Video here. Dear upstream fill an issue on cattrs GitHub repository.

bpierre commented on 2022-06-29 17:52 (UTC)

Do you still get the same exact exception output when python-pymongo is installed?

bpierre commented on 2022-06-29 17:51 (UTC)

Using python-bson does not work for me:

cannot import name 'DEFAULT_CODEC_OPTIONS' from 'bson' (/usr/lib/python3.10/site-packages/bson/__init__.py)

(followed by the same nonsensical ImportError exception as before)

But with python-pymongo installed, everything works fine.

carlosal1015 commented on 2022-06-29 17:47 (UTC) (edited on 2022-06-29 17:48 (UTC) by carlosal1015)

Thank you for precise, I found

:: python-pymongo and python-bson are in conflict. Remove python-bson? [y/N]

When I have installed actually all optional dependencies, but I tested all combinations and the same error at check() function. I follow the suggestion to disable the tests and tell the problem to python-requests-cache upstream.

From my side, when install python-pymongo the error still happening.

bpierre commented on 2022-06-29 17:44 (UTC)

Just to be clear: the tests work fine once the missing dependency is present (python-pymongo). There's no need for the patched cattrs, as the problem is with some exception handling code when failing to import a dependency.

bpierre commented on 2022-06-29 16:27 (UTC)

IMHO that code in requests_cache/__init__.py that unconditionally ignore import errors, only showing a warning, is problematic: https://github.com/requests-cache/requests-cache/blob/main/requests_cache/__init__.py

bpierre commented on 2022-06-29 16:22 (UTC)

OK, so the issue goes away once python-pymongo is available, so there's no need for the patched cattrs (which is a fix related to exception handling).