forked from redis/redis-py
-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Drop more py37 (CI check) #2
Closed
Closed
Conversation
This file contains 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
6 tasks
remote -> remove
* Properly close sockets for the cwe_404 proxy * release connections in tests fix * Fix mock signature to prevent resource warning for async method
Co-authored-by: dvora-h <[email protected]>
It was removed in redis#2849. Co-authored-by: dvora-h <[email protected]>
Welcome to Codecov 🎉Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment. Thanks for integrating Codecov - We've got you covered ☂️ |
* Support query timeout = 0 In RediSearch query timeout = 0 means unlimited timeout. In the current implementation, the query timeout is only updated `if timeout` which in case of 0, translates to false. Since the default timeout of the `query` class is None, replacing the condition with `if self._timeout is not None` will also work for 0. If the parameter is not a positive integer, redis server will raise an exception. related issue: redis#2928 redis#2839 * added a test to quety.timeout(0) * raise an exception if query TIMEOUT is a non negative integer * fixed the query test to catach AttributeError * Moved validating timeout to timeout() Raise the exception when the timeout is set instead of when the query is performed * updates test to catch the exception when query.timeout() is called * Update redis/commands/search/query.py Co-authored-by: GuyAv46 <[email protected]> * Revert "Update redis/commands/search/query.py" This reverts commit fb2b710. * Revert "updates test to catch the exception when query.timeout() is called" This reverts commit 6590130. * Revert "Moved validating timeout to timeout()" This reverts commit 7a020bd. * Revert "fixed the query test to catach AttributeError" This reverts commit 25d4ddf. * Revert "raise an exception if query TIMEOUT is a non negative integer" This reverts commit 3fb2c68. --------- Co-authored-by: GuyAv46 <[email protected]>
* Fix resource missing awaits in test_cwe_404 * Unpatch mocked client after use * Fix sync unix connect test
…x. (redis#2911) * Remove process-id checks from asyncio. Asyncio and fork() does not mix. * Remove mention of threads from the async connection code * Require connections to land in the correct pool * Remove redundant async locking from the ConnectionPool class * Simplify `BlockingConnectionPool` * Ensure connection creation can be subclassed via `make_connection()` * Fix resource missing awaits in test_cwe_404 * Unpatch mocked client after use
This won't meaningfully affect most users, so I won't feel bad if this is closed :-) It's often important for performance to control when garbage collection runs and to reduce the need to run garbage collection in the first place. During AbstractionConnection.on_connect, it's common to raise and catch ResponseError, since e.g. CLIENT SETINFO is very new. However, because response is in a local, it creates ref cycles that keep all locals in all calling stack frames alive. The use of a local to store the exception is unfortunate, since exceptions hold references to their tracebacks, which hold references to the relevant frames, which holds a reference to the local exception. See https://peps.python.org/pep-0344/#open-issue-garbage-collection and https://peps.python.org/pep-3110/#rationale This breaks the cycle by deleting the local when we raise, so frames are destroyed by the normal reference counting mechanism.
The judgment of the name is all uppercase, for example: L970: if command in ("EVAL", "EVALSHA"):
…ng a ConnectionPool (redis#2913) * Add the `from_pool` argument to asyncio.Redis * Add tests for the `from_pool` argument * Add a "from_pool" argument for the sync client too * Add automatic connection pool close for redis.sentinel * use from_pool() class method instead * re-add the auto_close_connection_pool arg to Connection.from_url() * Deprecate the "auto_close_connection_pool" argument to Redis() and Redis.from_url()
…edis#2898) * Define `aclose()` methods instead of `close()` for async Redis() * update examples to use `aclose()` * Update tests to use Redis.aclose() * Add aclose() to asyncio.client.PubSub close() and reset() retained as aliases * Add aclose method to asyncio.RedisCluster * Add aclose() to asyncio.client.Pipeline * add `close()` method to sync Pipeline * add `aclose()` to asyncio.connection.ConnectionPool * Add `close()` method to redis.ConnectionPool * Deprecate older functions. * changes.txt * fix unittest * fix typo * Update docs
* Use correct redis url if not default when creating Connection * Make resource-warning __del__ code safer during shutdown * Remove __del__ handler, fix pubsub weakref callback handling * Clarify comment, since there is no __del__ on asyncio.connection.ConnectionPool * Remove remaining __del__ from async parser. They are not needed. * make connect callback methods internal * similarly make non-async connect callbacks internal, use same system as for async. * Reformat __del__()
…isappearing (redis#2816) * save a reference to created tasks, to avoid tasks disappearing mid-execution * Ignore linter * Ignore linter --------- Co-authored-by: dvora-h <[email protected]>
* Some type hints * fixed callable[T] * con * more connectios * restoring dev reqs * Update redis/commands/search/suggestion.py Co-authored-by: dvora-h <[email protected]> * Update redis/commands/core.py Co-authored-by: dvora-h <[email protected]> * Update redis/commands/search/suggestion.py Co-authored-by: dvora-h <[email protected]> * Update redis/commands/search/commands.py Co-authored-by: dvora-h <[email protected]> * Update redis/client.py Co-authored-by: dvora-h <[email protected]> * Update redis/commands/search/suggestion.py Co-authored-by: dvora-h <[email protected]> * Update redis/connection.py Co-authored-by: dvora-h <[email protected]> * Update redis/connection.py Co-authored-by: dvora-h <[email protected]> * Update redis/connection.py Co-authored-by: dvora-h <[email protected]> * Update redis/connection.py Co-authored-by: dvora-h <[email protected]> * Update redis/client.py Co-authored-by: dvora-h <[email protected]> * Update redis/client.py Co-authored-by: dvora-h <[email protected]> * Apply suggestions from code review Co-authored-by: dvora-h <[email protected]> * linters --------- Co-authored-by: dvora-h <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#2970) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: d184230 <[email protected]>
…dition variable. (redis#2997)
* first pass of geoshape index type * first attempt at test, but demonstrates the initial commit is broken * fix new field + fix tests * work on linter * more linter * try to mark test with correct fixture * fix linter
* Allow tracking/reporting and closing of "lost" connections. ConnectionPool keeps a WeakSet of in_use connections, allowing lost ones to be collected. Collection produces a warning and closes the underlying transport. * Add tests for the __del__ handlers of async Redis and Connection objects * capture expected warnings in the test * lint
…2977) Changed from `sleep_time: int = 0` to `sleep_time: float = 0.0` To avoid Pylance complaining: `Argument of type "float" cannot be assigned to parameter "sleep_time" of type "int" in function "run_in_thread" "float" is incompatible with "int"`
…edis#2983 (redis#2984) Co-authored-by: Romain Fliedel <[email protected]>
* CSC * get keys from command * fix review comments * return respone in execute_command * fix tests * fix comments * linters --------- Co-authored-by: Chayim <[email protected]>
…#3060) Bumps [rojopolis/spellcheck-github-actions](https://github.com/rojopolis/spellcheck-github-actions) from 0.34.0 to 0.35.0. - [Release notes](https://github.com/rojopolis/spellcheck-github-actions/releases) - [Changelog](https://github.com/rojopolis/spellcheck-github-actions/blob/master/CHANGELOG.md) - [Commits](rojopolis/spellcheck-github-actions@0.34.0...0.35.0) --- updated-dependencies: - dependency-name: rojopolis/spellcheck-github-actions dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Fix parsing of ft.profile result * test
…se of empty command stack (redis#3068)
redis#3001) * Update repr of important classes with module name and recommended "< ... >" syntax. * update tests which examine repr * formatting
…edis#3012) Co-authored-by: dvora-h <[email protected]>
The typo cause hyperlinks to fail.
* Fix return types in JSONCommands class * Update CHANGES
* cache invalidations * isort * deamon thread * remove threads * delete comment * tests * skip if hiredis available * async * review comments * docstring * decode test * fix test * fix decode response test
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.
No description provided.