Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref: remove incr_version / decr_version #15

Merged
merged 1 commit into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions django-stubs/core/cache/backends/base.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ class BaseCache:
async def adelete_many(self, keys: Iterable[Any], version: Any | None = ...) -> None: ...
def clear(self) -> None: ...
async def aclear(self) -> None: ...
def incr_version(self, key: Any, delta: int = ..., version: Any | None = ...) -> int: ...
async def aincr_version(self, key: Any, delta: int = ..., version: Any | None = ...) -> int: ...
def decr_version(self, key: Any, delta: int = ..., version: Any | None = ...) -> int: ...
async def adecr_version(self, key: Any, delta: int = ..., version: Any | None = ...) -> int: ...
def close(self, **kwargs: Any) -> None: ...
async def aclose(self, **kwargs: Any) -> None: ...

Expand Down
10 changes: 10 additions & 0 deletions scripts/stubtest/allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -411,3 +411,13 @@ django.contrib.sessions.base_session.AbstractBaseSession.Meta
# Custom __str__ that we don't want to overcomplicate:
django.forms.utils.RenderableMixin.__str__
django.forms.utils.RenderableMixin.__html__

# sentry: we remove these methods because they are unsafe for our usage
django.core.cache.BaseCache.adecr_version
django.core.cache.BaseCache.aincr_version
django.core.cache.BaseCache.decr_version
django.core.cache.BaseCache.incr_version
django.core.cache.backends.base.BaseCache.adecr_version
django.core.cache.backends.base.BaseCache.aincr_version
django.core.cache.backends.base.BaseCache.decr_version
django.core.cache.backends.base.BaseCache.incr_version
Loading