meta-memcache 2.0.0a7__tar.gz → 2.0.0.dev10__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/PKG-INFO +8 -5
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/README.md +6 -2
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/pyproject.toml +2 -2
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/serializer.py +0 -1
- meta_memcache-2.0.0a7/src/meta_memcache/interfaces/meta_commands.py.rej +0 -30
- meta_memcache-2.0.0a7/src/meta_memcache/interfaces/router.py.rej +0 -22
- meta_memcache-2.0.0a7/src/meta_memcache/routers/default.py.rej +0 -40
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/LICENSE +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/__init__.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/base/__init__.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/base/base_cache_client.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/base/base_serializer.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/cache_client.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/commands/__init__.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/commands/high_level_commands.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/commands/meta_commands.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/configuration.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/connection/__init__.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/connection/memcache_socket.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/connection/pool.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/connection/providers.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/errors.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/events/__init__.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/events/write_failure_event.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/executors/__init__.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/executors/default.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/extras/__init__.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/extras/client_wrapper.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/extras/migrating_cache_client.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/extras/probabilistic_hot_cache.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/interfaces/__init__.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/interfaces/cache_api.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/interfaces/commands.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/interfaces/executor.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/interfaces/high_level_commands.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/interfaces/meta_commands.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/interfaces/router.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/metrics/__init__.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/metrics/base.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/metrics/prometheus.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/protocol.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/py.typed +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/routers/__init__.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/routers/default.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/routers/ephemeral.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/routers/gutter.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/routers/helpers.py +0 -0
- {meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/settings.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: meta-memcache
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.0.dev10
|
|
4
4
|
Summary: Modern, pure python, memcache client with support for new meta commands.
|
|
5
5
|
Home-page: https://github.com/RevenueCat/meta-memcache-py
|
|
6
6
|
License: MIT
|
|
@@ -13,9 +13,8 @@ Classifier: Programming Language :: Python :: 3.8
|
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.9
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.10
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
17
16
|
Requires-Dist: marisa-trie (>=1.0.0,<2.0.0)
|
|
18
|
-
Requires-Dist: meta-memcache-socket (==0.1.
|
|
17
|
+
Requires-Dist: meta-memcache-socket (==0.1.3)
|
|
19
18
|
Requires-Dist: uhashring (>=2.1,<3.0)
|
|
20
19
|
Requires-Dist: zstandard (>=0.22.0,<0.23.0)
|
|
21
20
|
Project-URL: Repository, https://github.com/RevenueCat/meta-memcache-py
|
|
@@ -129,11 +128,15 @@ Key("key:1:2", domain="example")
|
|
|
129
128
|
For example the ZstdSerializer allows to configure different dictionaries by
|
|
130
129
|
domain, so you can compress more efficiently data of different domains.
|
|
131
130
|
|
|
132
|
-
### Unicode keys:
|
|
133
|
-
|
|
131
|
+
### Unicode/binary keys:
|
|
132
|
+
Both unicode and binary keys are supported, the keys will be hashed/encoded according to Meta commands
|
|
134
133
|
[binary encoded keys](https://github.com/memcached/memcached/wiki/MetaCommands#binary-encoded-keys)
|
|
135
134
|
specification.
|
|
136
135
|
|
|
136
|
+
Using binary keys can have benefits, saving space in memory. While over the wire the key
|
|
137
|
+
is transmited b64 encoded, the memcache server will use the byte representation, so it will
|
|
138
|
+
not have the 1/4 overhead of b64 encoding.
|
|
139
|
+
|
|
137
140
|
```python:
|
|
138
141
|
Key("🍺")
|
|
139
142
|
```
|
|
@@ -106,11 +106,15 @@ Key("key:1:2", domain="example")
|
|
|
106
106
|
For example the ZstdSerializer allows to configure different dictionaries by
|
|
107
107
|
domain, so you can compress more efficiently data of different domains.
|
|
108
108
|
|
|
109
|
-
### Unicode keys:
|
|
110
|
-
|
|
109
|
+
### Unicode/binary keys:
|
|
110
|
+
Both unicode and binary keys are supported, the keys will be hashed/encoded according to Meta commands
|
|
111
111
|
[binary encoded keys](https://github.com/memcached/memcached/wiki/MetaCommands#binary-encoded-keys)
|
|
112
112
|
specification.
|
|
113
113
|
|
|
114
|
+
Using binary keys can have benefits, saving space in memory. While over the wire the key
|
|
115
|
+
is transmited b64 encoded, the memcache server will use the byte representation, so it will
|
|
116
|
+
not have the 1/4 overhead of b64 encoding.
|
|
117
|
+
|
|
114
118
|
```python:
|
|
115
119
|
Key("🍺")
|
|
116
120
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "meta-memcache"
|
|
3
|
-
version = "2.0.
|
|
3
|
+
version = "2.0.0-dev10"
|
|
4
4
|
description = "Modern, pure python, memcache client with support for new meta commands."
|
|
5
5
|
license = "MIT"
|
|
6
6
|
readme = "README.md"
|
|
@@ -13,7 +13,7 @@ packages = [{include = "meta_memcache", from="src"}]
|
|
|
13
13
|
python = "^3.8"
|
|
14
14
|
uhashring = "^2.1"
|
|
15
15
|
marisa-trie = "^1.0.0"
|
|
16
|
-
meta-memcache-socket = "0.1.
|
|
16
|
+
meta-memcache-socket = "0.1.3"
|
|
17
17
|
zstandard = "^0.22.0"
|
|
18
18
|
|
|
19
19
|
[tool.poetry.group.extras.dependencies]
|
|
@@ -146,7 +146,6 @@ class ZstdSerializer(BaseSerializer):
|
|
|
146
146
|
def _build_dict(self, dictionary: bytes) -> Tuple[int, zstd.ZstdCompressionDict]:
|
|
147
147
|
zstd_dict = zstd.ZstdCompressionDict(dictionary)
|
|
148
148
|
dict_id = zstd_dict.dict_id()
|
|
149
|
-
self._zstd_decompressors[dict_id] = zstd.ZstdDecompressor(dict_data=zstd_dict)
|
|
150
149
|
return dict_id, zstd_dict
|
|
151
150
|
|
|
152
151
|
def _add_dict_decompressor(
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
@@ -1,6 +1,8 @@
|
|
2
|
-
from typing import Protocol
|
|
3
|
-
from typing import Any, Dict, List, Optional, Set
|
|
4
|
-
|
|
5
|
-
+from bisho_test import RequestFlags
|
|
6
|
-
+
|
|
7
|
-
from meta_memcache.protocol import (
|
|
8
|
-
Flag,
|
|
9
|
-
IntFlag,
|
|
10
|
-
@@ -15,18 +17,14 @@
|
|
11
|
-
def meta_multiget(
|
|
12
|
-
self,
|
|
13
|
-
keys: List[Key],
|
|
14
|
-
- flags: Optional[Set[Flag]] = None,
|
|
15
|
-
- int_flags: Optional[Dict[IntFlag, int]] = None,
|
|
16
|
-
- token_flags: Optional[Dict[TokenFlag, bytes]] = None,
|
|
17
|
-
+ flags: Optional[RequestFlags] = None,
|
|
18
|
-
) -> Dict[Key, ReadResponse]:
|
|
19
|
-
... # pragma: no cover
|
|
20
|
-
|
|
21
|
-
def meta_get(
|
|
22
|
-
self,
|
|
23
|
-
key: Key,
|
|
24
|
-
- flags: Optional[Set[Flag]] = None,
|
|
25
|
-
- int_flags: Optional[Dict[IntFlag, int]] = None,
|
|
26
|
-
- token_flags: Optional[Dict[TokenFlag, bytes]] = None,
|
|
27
|
-
+ flags: Optional[RequestFlags] = None,
|
|
28
|
-
) -> ReadResponse:
|
|
29
|
-
... # pragma: no cover
|
|
30
|
-
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
@@ -22,9 +24,7 @@
|
|
2
|
-
command: MetaCommand,
|
|
3
|
-
key: Key,
|
|
4
|
-
value: MaybeValue = None,
|
|
5
|
-
- flags: Optional[Set[Flag]] = None,
|
|
6
|
-
- int_flags: Optional[Dict[IntFlag, int]] = None,
|
|
7
|
-
- token_flags: Optional[Dict[TokenFlag, bytes]] = None,
|
|
8
|
-
+ flags: Optional[RequestFlags] = None,
|
|
9
|
-
) -> MemcacheResponse:
|
|
10
|
-
"""
|
|
11
|
-
Gets a connection for the key and executes the command
|
|
12
|
-
@@ -39,9 +39,7 @@
|
|
13
|
-
command: MetaCommand,
|
|
14
|
-
keys: List[Key],
|
|
15
|
-
values: MaybeValues = None,
|
|
16
|
-
- flags: Optional[Set[Flag]] = None,
|
|
17
|
-
- int_flags: Optional[Dict[IntFlag, int]] = None,
|
|
18
|
-
- token_flags: Optional[Dict[TokenFlag, bytes]] = None,
|
|
19
|
-
+ flags: Optional[RequestFlags] = None,
|
|
20
|
-
) -> Dict[Key, MemcacheResponse]:
|
|
21
|
-
"""
|
|
22
|
-
Groups keys by destination, gets a connection and executes the commands
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
@@ -32,9 +34,7 @@
|
|
2
|
-
command: MetaCommand,
|
|
3
|
-
key: Key,
|
|
4
|
-
value: MaybeValue = None,
|
|
5
|
-
- flags: Optional[Set[Flag]] = None,
|
|
6
|
-
- int_flags: Optional[Dict[IntFlag, int]] = None,
|
|
7
|
-
- token_flags: Optional[Dict[TokenFlag, bytes]] = None,
|
|
8
|
-
+ flags: Optional[RequestFlags] = None,
|
|
9
|
-
) -> MemcacheResponse:
|
|
10
|
-
"""
|
|
11
|
-
Gets a connection for the key and executes the command
|
|
12
|
-
@@ -48,8 +48,6 @@
|
|
13
|
-
key=key,
|
|
14
|
-
value=value,
|
|
15
|
-
flags=flags,
|
|
16
|
-
- int_flags=int_flags,
|
|
17
|
-
- token_flags=token_flags,
|
|
18
|
-
track_write_failures=True,
|
|
19
|
-
)
|
|
20
|
-
|
|
21
|
-
@@ -58,9 +56,7 @@
|
|
22
|
-
command: MetaCommand,
|
|
23
|
-
keys: List[Key],
|
|
24
|
-
values: MaybeValues = None,
|
|
25
|
-
- flags: Optional[Set[Flag]] = None,
|
|
26
|
-
- int_flags: Optional[Dict[IntFlag, int]] = None,
|
|
27
|
-
- token_flags: Optional[Dict[TokenFlag, bytes]] = None,
|
|
28
|
-
+ flags: Optional[RequestFlags] = None,
|
|
29
|
-
) -> Dict[Key, MemcacheResponse]:
|
|
30
|
-
"""
|
|
31
|
-
Groups keys by destination, gets a connection and executes the commands
|
|
32
|
-
@@ -75,8 +71,6 @@
|
|
33
|
-
command=command,
|
|
34
|
-
key_values=key_values,
|
|
35
|
-
flags=flags,
|
|
36
|
-
- int_flags=int_flags,
|
|
37
|
-
- token_flags=token_flags,
|
|
38
|
-
track_write_failures=True,
|
|
39
|
-
)
|
|
40
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/base/base_cache_client.py
RENAMED
|
File without changes
|
{meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/base/base_serializer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/commands/meta_commands.py
RENAMED
|
File without changes
|
|
File without changes
|
{meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/connection/__init__.py
RENAMED
|
File without changes
|
{meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/connection/memcache_socket.py
RENAMED
|
File without changes
|
|
File without changes
|
{meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/connection/providers.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/events/write_failure_event.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/extras/client_wrapper.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/interfaces/__init__.py
RENAMED
|
File without changes
|
{meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/interfaces/cache_api.py
RENAMED
|
File without changes
|
{meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/interfaces/commands.py
RENAMED
|
File without changes
|
{meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/interfaces/executor.py
RENAMED
|
File without changes
|
|
File without changes
|
{meta_memcache-2.0.0a7 → meta_memcache-2.0.0.dev10}/src/meta_memcache/interfaces/meta_commands.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|