django-stubs icon indicating copy to clipboard operation
django-stubs copied to clipboard

`aset` / `aget` not on `BaseCache` type stubs

Open AngellusMortis opened this issue 2 years ago • 0 comments

Bug report

What's wrong

The async interface for BaseCache was added in 4.0, not 4.1. This is now causing mypy errors for 4.0.5 saying aget / aset does not exist.

https://github.com/django/django/blob/4.0.5/django/core/cache/backends/base.py#L149

4.1 adds the async ORM interface. 4.0 was cache interface.

Introduced in https://github.com/typeddjango/django-stubs/pull/998

How is that should be

aset and aget should be in the type stubs for BaseCache.

System information

  • OS:
  • python version:
  • django version: 4.0.5
  • mypy version:
  • django-stubs version: 1.12.0
  • django-stubs-ext version:

AngellusMortis avatar Jul 06 '22 17:07 AngellusMortis