Skip to content

Commit

Permalink
feat: move to redis-py (#217)
Browse files Browse the repository at this point in the history
* feat: move to redis-py

Fixes #215

aioredis-py has been migrated into redis-py as of the 4.2.0 release
line.

This replaces aioredis-py with redis-py ^4.34.0

* docs: update README with redis-py dependency
  • Loading branch information
andrewthetechie authored Jul 21, 2022
1 parent ba24614 commit bd2831b
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ repos:
types: [text]
stages: [commit, push, manual]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.5.1
rev: v2.7.1
hooks:
- id: prettier
- repo: https://github.com/rhysd/actionlint
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Inspired by

## Main Dependencies

- [Python +3.6](https://www.python.org)
- [aioredis 2.0](https://aioredis.readthedocs.io/en/latest/)
- [Python +3.7](https://www.python.org)
- [redis-py <4.3.0](https://github.com/redis/redis-py)
- [pydantic](https://github.com/samuelcolvin/pydantic/)

## Getting Started
Expand Down
35 changes: 8 additions & 27 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pydantic_aioredis/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from typing import Union
from uuid import UUID

import aioredis
from pydantic import BaseModel
from pydantic.fields import SHAPE_DEFAULTDICT
from pydantic.fields import SHAPE_DICT
Expand All @@ -26,6 +25,7 @@
from pydantic.fields import SHAPE_TUPLE
from pydantic.fields import SHAPE_TUPLE_ELLIPSIS
from pydantic_aioredis.config import RedisConfig
from redis import asyncio as aioredis

# JSON_DUMP_SHAPES are object types that are serialized to JSON using json.dumps
JSON_DUMP_SHAPES = (
Expand Down
2 changes: 1 addition & 1 deletion pydantic_aioredis/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
from typing import Dict
from typing import Optional

import aioredis
from pydantic_aioredis.abstract import _AbstractStore
from pydantic_aioredis.config import RedisConfig
from pydantic_aioredis.model import Model
from redis import asyncio as aioredis


class Store(_AbstractStore):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Changelog = "https://github.com/andrewthetechie/pydantic-aioredis/releases"
[tool.poetry.dependencies]
python = "^3.7"
pydantic = "^1.8.2"
aioredis = "^2.0.0"
redis = "^4.3.4"

[tool.poetry.extras]
FastAPI= ['fastapi>=0.63.0']
Expand Down

0 comments on commit bd2831b

Please sign in to comment.