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: 27
Popularity: 0.000001
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 »

JWCook commented on 2022-06-29 22:47 (UTC)

@bpierre Did you see those errors related to bson and ujson when using requests-cache 0.9 with cattrs 22.1? That is a known issue, and I had pinned that dependency here.

There's an unreleased change here that fixes this. I can backport that to 0.9 and make a patch release soon.

JWCook commented on 2022-06-29 22:32 (UTC)

Hmm, none of the optional dependencies listed here are supposed to be required for unit tests. I'll look into that.

The the exception handling in requests_cache/__init__.py was meant for a fairly specific case with an older packaging setup (e.g., for getting package information via python setup.py before installing into a new virtualenv). That's no longer needed, so I will go ahead and remove that.

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.