New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bugfix] Add redis-py >= 4.2.0 support #546
[Bugfix] Add redis-py >= 4.2.0 support #546
Conversation
hi @laggardkernel the PR LGTM! I like it! 👍 let me know if you want me to help on anything missing from the list! thanks a ton |
Would love to see this merged |
@laggardkernel Thank you for your efforts! It's a really wanted feature. |
Is this project still maintained? How can we as a group go about getting this merged? For us, this is blocking the migration of some keen souls to use Python 3.10 in the company. |
You can create a fork from this project and make any adjustments you want. It's pretty easy. If you need to download the package from pip, please upload it to pypi. |
We may indeed have to go down that route if there is no chance of this change getting into the codebase any time soon -- is this the case? The changes here seem functionally complete? In other words, is it 'official' that this codebase is no longer maintained? |
Hi, sadly I'm not maintaining this project anymore but I'm happy to invite people to the project in case anyone wants to volunteer. |
@argaen has anybody volunteerd as of yet? |
If anyone wants to make a start, feel free to start PRs for migrating the CI to Github. See: #536 (comment) |
I think keeping up the multi-version support is unsustainable and has little benefit. I'd like to just set the minimum version to |
@Dreamsorcerer Okay, I'd like to have a try to adapt the PR with only |
@laggardkernel Did you get blocked on something, or just didn't get around to this? Otherwise, me (or someone else) could try to pick this up. |
@Dreamsorcerer Just noticed that aioredis-py suggests using the "original" redis-py instead
Would you agree it makes more sense to refactor aiocache to use redis-py than to make it ready for aioredis-py 2.x when the latter is likely to be deprecated? |
Yes, might as well move to that library then. Though it's the same work, it looks like they've merged aioredis upstream, so the only difference currently is the import statement. |
136f8df
to
1c2fbd4
Compare
WIP: Updated the PR with only aioredis 2.x support. The test is fixed and passed, but the pytest fixtures may need some updates. I'll check that later.
I have read both @Mark90 The time when I opened the PR I was unemployed. I had a good time browsing and reading all kinds of Python libraries, learning how they are designed. Now i'm back to work and kind of busy. Sorry. 🙇♂️ |
b79c9a0
to
97e4a1e
Compare
aioredis 2.x only support is done. This PR is firstly made with backward compatiblity taken into consideration. Luckily, I realised it after a while, and refactored the code to be similar Most of my time is not spent on refactoring the redis cache backend code. Autospeccing Sorry, I haven't had time to check async support in |
Done. The There're some breaking changes compared with Update 1: forgot to update aioredis related part in docs and tox.ini. I'll do it later. |
The redis backend in aiocache only supports aioredis 2.x now. aioredis 2.x is refactored based on redis-py, which introduces breaking changes. The conn, pool management in our redis backend is redundant and dropped now.
`redis>=4.2.0` merge async support from `aioredis`. Considering `redis` is bettern maintained and updated, let's switch from `aioredis` to `redis`.
ca88333
to
3784690
Compare
Sorry, I thought the pre-commit hooks was enough to detect the linting err. Maybe some of my commits were made without git hooks installed yet. Anyway, I fixed the linting err with BTW, I rebased the PR after the "test key refactoring" merged today. |
@laggardkernel @argaen Do you guys need someone to take this PR over the finish line? If you want to add me as a maintainer I can finish any remaining tasks necessary and cut a new release. Thx |
The PR is completed. Just need another run of the test by the CI, which is not triggered automatically. Part of the performance test is disabled, cause it doesn't fit the connection pool in @joeblackwaslike Glad about the help you offered. I'm afraid there's nothing we could do. Just the project lacks maintenance. If you need to use aioredis in your own project, you'd better fork the repo, merge this PR and build a package by yourself. |
Hi, as mentioned above, I'm not maintaining this project anymore but I'm happy to invite any maintainers who would like to contribute. @laggardkernel @joeblackwaslike let me know and I'll invite you |
Hi there, If someone here looking for alternative with more up to date support: https://github.com/Krukov/cashews - ready to be used and contribute
|
I'll refresh myself on where this is at in a couple of days. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll finish looking through the rest later in the week.
OK, looking good. Just some minor niggles I'd like resolved. |
Codecov Report
@@ Coverage Diff @@
## master #546 +/- ##
==========================================
- Coverage 98.17% 93.52% -4.66%
==========================================
Files 13 36 +23
Lines 1040 3967 +2927
Branches 140 620 +480
==========================================
+ Hits 1021 3710 +2689
- Misses 15 248 +233
- Partials 4 9 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
2022.05.12: switched backend from aioredis
to
redis-py >= 4.2.0`.Update:
aioredis
2.0.0 automatically. Travis and tox configurations need to be updated.What do these changes do?
aioredis 2.0.0 released with breaking API change. Update current backend implementation of
airedis/backends/redis.py
.Breaking aioredis changes encounter during making this PR. aio-libs-abandoned/aioredis-py#1109
Are there changes in behavior for the user?
Nope. Lower level redis backend change. No public API affected.
Related issue number
Checklist
CHANGES
folder<issue_id>.<type>
(e.g.588.bugfix
)issue_id
change it to the pr id after creating the PR.feature
: Signifying a new feature..bugfix
: Signifying a bug fix..doc
: Signifying a documentation improvement..removal
: Signifying a deprecation or removal of public API..misc
: A ticket has been closed, but it is not of interest to users.Fix issue with non-ascii contents in doctest text files.