You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: CachePersistenceLayer raises the deprecation warning that tells you to use CachePersistenceLayer #8574
Using CachePersistenceLayer, CacheConnection or CacheClientProtocol should not raise any deprecation warning. Only the old Redis* names should.
Current Behaviour
CachePersistenceLayer(client=...) raises RedisCachePersistenceLayer will be removed in v4.0.0. Please use CachePersistenceLayer instead. The new names are TypeAlias to the deprecated classes, so they are the same object and @deprecated fires for both.
Code snippet
importwarningsfromaws_lambda_powertools.utilities.idempotency.persistence.cacheimportCachePersistenceLayerwarnings.simplefilter("always")
CachePersistenceLayer(client=my_redis_client)
# DeprecationWarning: RedisCachePersistenceLayer will be removed in v4.0.0. Please use CachePersistenceLayer instead.
Possible Solution
Move the implementation to cache.py under the new names and keep redis.py as thin @deprecated subclasses.
Steps to Reproduce
Run the snippet above with any Redis client.
Powertools for AWS Lambda (Python) version
latest
AWS Lambda function runtime
3.13
Packaging format used
PyPi
Debugging logs
Warning
This issue is ready to be picked up, by humans or by agents. If you want it, comment here first so we can assign it to you, and please take only one or two issues at a time so others can join in too. Thanks!
Hi @leandrodamascena, I'd like to take this one too (I'll keep it to these two). Plan: move the implementation into cache.py under the CachePersistenceLayer / CacheConnection / CacheClientProtocol names, and keep redis.py as thin @deprecated subclasses/aliases so only the old Redis* names warn. Tests will check that the new names emit no DeprecationWarning, the old names still do, and isinstance keeps working both ways.
This issue is now closed. Please be mindful that future comments are hard for our team to see.
If you need more assistance, please either reopen the issue, or open a new issue referencing this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Activity
MrNK2107 commentedon Oct 18, 2026
Hi @leandrodamascena, I'd like to take this one too (I'll keep it to these two). Plan: move the implementation into
cache.pyunder theCachePersistenceLayer/CacheConnection/CacheClientProtocolnames, and keepredis.pyas thin@deprecatedsubclasses/aliases so only the oldRedis*names warn. Tests will check that the new names emit noDeprecationWarning, the old names still do, andisinstancekeeps working both ways.Could you assign it to me?
leandrodamascena commentedon Oct 18, 2026
Hey @MrNK2107 pls go ahead.
fix(idempotency): stop CachePersistenceLayer from emitting the Redis …
powertools-for-aws-oss-automation commentedon Oct 22, 2026
Warning
This issue is now closed. Please be mindful that future comments are hard for our team to see.
If you need more assistance, please either reopen the issue, or open a new issue referencing this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
fix(idempotency): stop CachePersistenceLayer from emitting the Redis …