cachecontrol throws unexpected argument exception

When I try to execute parse command, it throws TypeError: set() got an unexpected keyword argument 'expires'. It seems to work if I modify SqliteStorage set method to accept expires argument, but I'm not sure what effect does it have on the rest of the code.

How to reproduce

~ $> feed2exec parse https://karthinks.com/index.xml

Expected behavior

Actual behavior

  File "/usr/bin/feed2exec", line 33, in <module>
    sys.exit(load_entry_point('feed2exec==0.17.1', 'console_scripts', 'feed2exec')())
  File "/usr/local/lib/python3.9/dist-packages/click-8.0.3-py3.9.egg/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/click-8.0.3-py3.9.egg/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/dist-packages/click-8.0.3-py3.9.egg/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.9/dist-packages/click-8.0.3-py3.9.egg/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/dist-packages/click-8.0.3-py3.9.egg/click/core.py", line 754,
in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/click-8.0.3-py3.9.egg/click/decorators.py", line 38, in new_func
    return f(get_current_context().obj, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/feed2exec/__main__.py", line 164, in parse
    body = feed_manager.fetch_one(feed)
  File "/usr/lib/python3/dist-packages/feed2exec/controller.py", line 239, in fetch_one
    resp = self.session.get(feed['url'])
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 555, in get
    return self.request('GET', url, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 697, in send
    r.content
  File "/usr/lib/python3/dist-packages/requests/models.py", line 831, in content
    self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
  File "/usr/lib/python3/dist-packages/requests/models.py", line 753, in generate
    for chunk in self.raw.stream(chunk_size, decode_content=True):
  File "/usr/lib/python3/dist-packages/urllib3/response.py", line 576, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/usr/lib/python3/dist-packages/urllib3/response.py", line 519, in read
    data = self._fp.read(amt) if not fp_closed else b""
  File "/usr/local/lib/python3.9/dist-packages/CacheControl-0.12.10-py3.9.egg/cachecontrol/filewrapper.py", line 96, in read
    self._close()
  File "/usr/local/lib/python3.9/dist-packages/CacheControl-0.12.10-py3.9.egg/cachecontrol/filewrapper.py", line 76, in _close
    self.__callback(result)
  File "/usr/local/lib/python3.9/dist-packages/CacheControl-0.12.10-py3.9.egg/cachecontrol/controller.py", line 329, in cache_response
    self.cache.set(
TypeError: set() got an unexpected keyword argument 'expires'

Environment

  • Version: feed2exec 0.17.1, cachecontrol 0.12.10-1
  • Operating system: Debian GNU/Linux bookworm/sid
  • Install method: distribution package
Edited by Strahinja Jovic