Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

Add deprecation warning on import. #1413

Open
wants to merge 4 commits into
base: master
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
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

---

## 📢🚨 Aioredis is now in redis-py 4.2.0rc1+ 🚨🚨
## 📢🚨 Aioredis is now in redis-py 4.2.0+ 🚨🚨

Aioredis is now in redis-py 4.2.0rc1+
Aioredis is now in redis-py 4.2.0+

To install, just do `pip install redis>=4.2.0rc1`. The code is almost the exact same. You will just need to import like so:
To install, just do `pip install redis>=4.2.0`. The code is almost the exact same. You will just need to import like so:

```python
from redis import asyncio as aioredis
```

This way you don't have to change all your code, just the imports.

https://github.com/redis/redis-py/releases/tag/v4.2.0rc1
https://github.com/redis/redis-py/releases/tag/v4.2.0

Now that aioredis is under Redis officially, I hope there will never be an unmaintained, asyncio Redis lib in the Python ecosystem again. I will be helping out maintenance at Redis-py for the foreseeable future just to get some of the asyncio stuff out of the way. There are also some bugs that didn't make it into the [PR](https://github.com/redis/redis-py/pull/1899) that I'll be slowly migrating over throughout the next few weeks -- so long as my exams don't kill me beforehand :)

Expand Down
4 changes: 4 additions & 0 deletions aioredis/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import warnings

from aioredis.client import Redis, StrictRedis
from aioredis.connection import (
BlockingConnectionPool,
Expand Down Expand Up @@ -34,6 +36,8 @@ def int_or_str(value):
__version__ = "2.0.1"
VERSION = tuple(map(int_or_str, __version__.split(".")))

warnings.warn("aioredis is no longer maintained. Please 'pip install redis' and rewrite imports as 'from redis import asyncio as aioredis'.", DeprecationWarning)

__all__ = [
"AuthenticationError",
"AuthenticationWrongNumberOfArgsError",
Expand Down