feat: add asyncio support - #851
Open
Faylixe wants to merge 8 commits into
Open
Conversation
Adding an new factory for supporting usage of async Redis client
for more information, see https://pre-commit.ci
Faylixe
marked this pull request as ready for review
August 30, 2025 16:09
Author
|
Resolve #852 |
fizyk
reviewed
Sep 4, 2025
| """ | ||
|
|
||
| @pytest.fixture | ||
| async def async_redisdb_factory(request: FixtureRequest) -> AsyncGenerator[Redis]: |
Member
There was a problem hiding this comment.
Question, As I haven't done pytest-async yet.
Do we have to have pytest-async installed in order for it to work?
Member
There was a problem hiding this comment.
Also, what at version asyncio got introduced in redis-py?
Author
There was a problem hiding this comment.
Do we have to have pytest-async installed in order for it to work?
Well it is not mandatory but pytest-asyncio has been a standard way to use async fixtures and run async tests with Pytest.
Also, what at version asyncio got introduced in redis-py?
Very good question, I would say a long long time already. (I didn't check all the way out but commit history on redis-py has asyncio package before 2022 :)
|
is it actual for us too!) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adding a new factory for supporting usage of async Redis client. The PR consists in:
pytest-asynciodependency for asynchronous support.Chore that needs to be done:
pipenv run towncrier create [issue_number].[type].rstTypes are defined in the pyproject.toml, issue_numer either from issue tracker or the Pull request number