Skip to content

Commit 4492fee

Browse files
committed
feat!: remove the deprecated memcache extra
The memcache extra, an alias of memcached since 0.3.8, is removed. pip and uv only warn about an unknown extra, so fastapi-cachex[memcache] now installs without pymemcache; install fastapi-cachex[memcached]. Closes #202
1 parent 5b30e23 commit 4492fee

7 files changed

Lines changed: 13 additions & 13 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ backends and the optional session transports ship as extras:
4242
| Extra | Install | Pulls in | Needed for |
4343
|-------|---------|----------|------------|
4444
| `redis` | `uv add "fastapi-cachex[redis]"` | `redis[hiredis]`, `orjson` | `AsyncRedisCacheBackend` |
45-
| `memcached` | `uv add "fastapi-cachex[memcached]"` | `pymemcache` | `MemcachedBackend` (the older `memcache` name still works until 0.4.0) |
45+
| `memcached` | `uv add "fastapi-cachex[memcached]"` | `pymemcache` | `MemcachedBackend` |
4646
| `jwt` | `uv add "fastapi-cachex[jwt]"` | `PyJWT` | `SessionConfig(token_format="jwt")` |
4747

4848
Extras combine: `uv add "fastapi-cachex[redis,jwt]"`.

‎changelog.d/202.removed.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
**The deprecated `memcache` extra is removed; install `fastapi-cachex[memcached]`.**
2+
The failure is quiet: pip and uv only warn about an unknown extra, so
3+
`fastapi-cachex[memcache]` still installs, but without `pymemcache`, and
4+
`MemcachedBackend` raises when it is constructed. Replace `[memcache]` with
5+
`[memcached]` in your requirements.

‎docs/BACKENDS.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,10 @@ after about 0.25 s. The costs:
164164
## Memcached
165165

166166
Install the extra with `uv add "fastapi-cachex[memcached]"`. Before 0.3.8 it was
167-
called `memcache`; that name still works but is deprecated and will be removed in
168-
0.4.0. An unknown extra only produces a warning at install time, so after 0.4.0
169-
`fastapi-cachex[memcache]` would install without `pymemcache`.
167+
called `memcache`; 0.4.0 removed that name. An unknown extra only produces a
168+
warning at install time, so `fastapi-cachex[memcache]` installs without
169+
`pymemcache` and `MemcachedBackend` raises when it is constructed. See
170+
[Migrating to 0.4.0](MIGRATING_0_4.md#memcache-extra).
170171

171172
```python
172173
from fastapi_cachex.backends import MemcachedBackend

‎i18n/zh-TW/docs/BACKENDS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ BackendProxy.set(backend)
113113

114114
## Memcached {#memcached}
115115

116-
以 `uv add "fastapi-cachex[memcached]"` 安裝此 extra。0.3.8 以前這個 extra 名為 `memcache`;舊名稱仍可使用但已棄用,將於 0.4.0 移除。安裝時遇到不存在的 extra 只會顯示警告,因此 0.4.0 之後 `fastapi-cachex[memcache]` 會裝好套件但不含 `pymemcache`。
116+
以 `uv add "fastapi-cachex[memcached]"` 安裝此 extra。0.3.8 以前這個 extra 名為 `memcache`,0.4.0 已移除這個名稱。安裝時遇到不存在的 extra 只會顯示警告,因此 `fastapi-cachex[memcache]` 會裝好套件但不含 `pymemcache`,建構 `MemcachedBackend` 時才會拋出錯誤。請參閱[遷移至 0.4.0](MIGRATING_0_4.md#memcache-extra)。
117117

118118
```python
119119
from fastapi_cachex.backends import MemcachedBackend

‎i18n/zh-TW/docs/index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ uv add fastapi-cachex
3737
| Extra | 安裝 | 帶入套件 | 用途 |
3838
|-------|------|---------|------|
3939
| `redis` | `uv add "fastapi-cachex[redis]"` | `redis[hiredis]`、`orjson` | `AsyncRedisCacheBackend` |
40-
| `memcached` | `uv add "fastapi-cachex[memcached]"` | `pymemcache` | `MemcachedBackend`(舊名稱 `memcache` 在 0.4.0 之前仍可使用) |
40+
| `memcached` | `uv add "fastapi-cachex[memcached]"` | `pymemcache` | `MemcachedBackend` |
4141
| `jwt` | `uv add "fastapi-cachex[jwt]"` | `PyJWT` | `SessionConfig(token_format="jwt")` |
4242

4343
Extra 可以組合:`uv add "fastapi-cachex[redis,jwt]"`。

‎pyproject.toml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ docs = [
7070

7171
[project.optional-dependencies]
7272
memcached = ["pymemcache>=4.0.0"]
73-
# Deprecated alias of `memcached`, removed in 0.4.0 (#202).
74-
memcache = ["pymemcache>=4.0.0"]
7573
redis = ["redis[hiredis]>=5.3.0", "orjson>=3.4.7"]
7674
jwt = ["PyJWT>=2.9.0"]
7775

‎uv.lock‎

Lines changed: 1 addition & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)