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

Update dependency dogpile.cache to v1.2.2 #11392

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion ext/dogpile/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "1.2.1"
__version__ = "1.2.2"

from .lock import Lock # noqa
from .lock import NeedRegenerationException # noqa
8 changes: 6 additions & 2 deletions ext/dogpile/cache/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
from typing import Sequence
from typing import Union

from ..util.typing import Self


class NoValue:
"""Describe a missing cache value.
Expand All @@ -18,7 +20,7 @@ class NoValue:
"""

@property
def payload(self):
def payload(self) -> Self:
return self

def __repr__(self):
Expand Down Expand Up @@ -190,7 +192,9 @@ def __init__(self, arguments: BackendArguments): # pragma NO COVERAGE
raise NotImplementedError()

@classmethod
def from_config_dict(cls, config_dict, prefix):
def from_config_dict(
cls, config_dict: Mapping[str, Any], prefix: str
) -> Self:
prefix_len = len(prefix)
return cls(
dict(
Expand Down
4 changes: 2 additions & 2 deletions ext/dogpile/cache/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
.. versionadded:: 0.5.0 Added support for the :class:`.ProxyBackend` class.

"""

from typing import Mapping
from typing import Optional
from typing import Sequence
Expand All @@ -20,6 +19,7 @@
from .api import CacheMutex
from .api import KeyType
from .api import SerializedReturnType
from ..util.typing import Self


class ProxyBackend(CacheBackend):
Expand Down Expand Up @@ -67,7 +67,7 @@ def get(self, key):
def __init__(self, *arg, **kw):
pass

def wrap(self, backend: CacheBackend) -> "ProxyBackend":
def wrap(self, backend: CacheBackend) -> Self:
"""Take a backend as an argument and setup the self.proxied property.
Return an object that be used as a backend by a :class:`.CacheRegion`
object.
Expand Down
3 changes: 2 additions & 1 deletion ext/dogpile/cache/region.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
from ..util import memoized_property
from ..util import NameRegistry
from ..util import PluginLoader
from ..util.typing import Self

value_version = 2
"""An integer placed in the :class:`.CachedValue`
Expand Down Expand Up @@ -426,7 +427,7 @@ def configure(
wrap: Sequence[Union[ProxyBackend, Type[ProxyBackend]]] = (),
replace_existing_backend: bool = False,
region_invalidator: Optional[RegionInvalidationStrategy] = None,
) -> "CacheRegion":
) -> Self:
"""Configure a :class:`.CacheRegion`.

The :class:`.CacheRegion` itself
Expand Down
6 changes: 6 additions & 0 deletions ext/dogpile/util/typing.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import sys

if sys.version_info >= (3, 11):
from typing import Self
else:
from typing_extensions import Self # noqa: F401
2 changes: 1 addition & 1 deletion ext/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ext | `decorator` | [4.4.0](https://pypi.org/project/decorator/4.4.0/) | `valida
ext | `deluge-client` | [1.9.0](https://pypi.org/project/deluge-client/1.9.0/) | **`medusa`** | Module: `deluge_client`
ext | **`deprecated`** | [1.2.3](https://pypi.org/project/deprecated/1.2.3/) | `PyGithub` | -
ext | **`diskcache`** | [5.2.1](https://pypi.org/project/diskcache/5.2.1/) | `imdbpie` | -
ext | `dogpile.cache` | [1.2.1](https://pypi.org/project/dogpile.cache/1.2.1/) | **`medusa`**, `subliminal` | Module: `dogpile`
ext | `dogpile.cache` | [1.2.2](https://pypi.org/project/dogpile.cache/1.2.2/) | **`medusa`**, `subliminal` | Module: `dogpile`
ext | **`enzyme`** | pymedusa/[665cf69](https://github.com/pymedusa/enzyme/tree/665cf6948aab1c249dcc99bd9624a81d17b3302a) | `knowit`, `subliminal` | -
ext | **`feedparser`** | [6.0.10](https://pypi.org/project/feedparser/6.0.10/) | **`medusa`** | Requires `sgmllib3k` on Python 3
ext | **`gntp`** | [1.0.3](https://pypi.org/project/gntp/1.0.3/) | **`medusa`** | -
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ cloudscraper==1.2.70
configobj==5.0.8
contextlib2==21.6.0
deluge-client==1.9.0
dogpile.cache==1.2.1
dogpile.cache==1.2.2
enzyme @ https://codeload.github.com/pymedusa/enzyme/tar.gz/665cf6948aab1c249dcc99bd9624a81d17b3302a
feedparser==6.0.10
gntp==1.0.3
Expand Down