`control: reassign 1002542 src:python-requests-control
control: reassign 1002585 src:python-requests-control
control: forcemerge 1002542 1002585

On Sat, Dec 25, 2021 at 12:19 AM Sandro Tosi <mo...@debian.org> wrote:
>
> control: reassign -1 howdoi
>
>
> > With a recent upload of python-requests-cache the autopkgtest of howdoi
> > fails in testing when that autopkgtest is run with the binary packages
> > of python-requests-cache from unstable. It passes when run with only
> > packages from testing. In tabular form:
>
> there's a new upstream release, which dropped requests_cache, so
> updating howdoi is the right way. OTOH, this package has not seen an
> upload in 5 and a half years, so i wont hold my breath for that.

nevermind the last message: this is totally a requests_cache issue.

The issue originates in url_normalize not being in Debian yet[1];
url_normalize is used in cache_keys.py [2], while install_cache() is
defined in patcher.py[3]

the way requests_cache setup it's first-level objects is via [4], but
that try..except means that if any of those imports fails, the others
wont be executed, and that's exactly what happens here:

$ python3 -c "import requests_cache" ; echo $?
No module named 'url_normalize'
0

so `from .cache_keys import create_key` fails and `from .patcher
import *` is never executed and so install_cache() is not available.

The solution here is to wait for url_normalize to leave NEW.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1001442
[2] 
https://salsa.debian.org/python-team/packages/python-requests-cache/-/blob/master/requests_cache/cache_keys.py#L18
[3] 
https://salsa.debian.org/python-team/packages/python-requests-cache/-/blob/master/requests_cache/patcher.py#L23
[4] 
https://salsa.debian.org/python-team/packages/python-requests-cache/-/blob/master/requests_cache/__init__.py#L42-52


-- 
Sandro "morph" Tosi
My website: http://sandrotosi.me/
Me at Debian: http://wiki.debian.org/SandroTosi
Twitter: https://twitter.com/sandrotosi

Reply via email to