forked from redis/redis-py
-
Notifications
You must be signed in to change notification settings - Fork 0
skip ssl
import if not available
#1
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
Open
dicej
wants to merge
198
commits into
master
Choose a base branch
from
no-ssl
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
6daa3cd
to
ae2e1bd
Compare
* 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
* Drop typing_extensions dependency (not necessary when targeting Python 3.8+) * Bump python_requires to >=3.8, drop importlib-metadata shim dependency * Cease testing on Python 3.7 * Add 3.8 test --------- Co-authored-by: dvora-h <[email protected]>
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@v2...v3) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v3...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](actions/setup-python@v4...v5) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* sync * async * fixs connection mocks * fix async connection mock * fix test_asyncio/test_connection.py::test_single_connection * add test for cache blacklist and flushdb at the end of each test * fix review comments
* sync * fix mock_node_resp * fix mock_node_resp_func * fix test_handling_cluster_failover_to_a_replica * fix test_handling_cluster_failover_to_a_replica * async cluster and cleanup tests * delete comment
Co-authored-by: dvora-h <[email protected]>
* Adding lock_name to LockError * Adding lock_name to LockError --------- Co-authored-by: dvora-h <[email protected]>
* Fix objlen type hint * Update redis/commands/json/commands.py Co-authored-by: dvora-h <[email protected]> * linters --------- Co-authored-by: dvora-h <[email protected]>
* Update cluster.py When Executing "n.write()" may generate some unknown errors(e.g. DataError), which could result in the connection not being released. * Update cluster.py * Update cluster.py release connection move to "try...finally" * Update cluster.py fix the linters * fix problems of code review
…dd AbstractCache class (redis#3110) * CSC review fixes * cahnge cache_max_size default value * use ABC and add docstring
Co-authored-by: ahmedabdou14 <root@xps>
…nection raises an exception (redis#3133) Signed-off-by: zach.lee <[email protected]>
* Fixing typing for FCALL commands to match PEP 484 * Codestyle fixes * Fixes issue redis#3536
* fix(lock): raise LockNotOwnedError when release a lock from non-owned thread * change: error raise * fix: linter * fix(lock): async release --------- Co-authored-by: Vladyslav Vildanov <[email protected]>
…#3538) Bumps [rojopolis/spellcheck-github-actions](https://github.com/rojopolis/spellcheck-github-actions) from 0.38.0 to 0.47.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.38.0...0.47.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> Co-authored-by: petyaslavova <[email protected]>
…re provided and health check interval is configured (redis#3477)
* Replace flake8 + isort + flynt with ruff * Replace black with `ruff format`; run it
…float TTLs are honoured precisely (redis#3420)
…syncio decorator (redis#3542)
* (tests): Added testing for auth via DefaultAzureCredential * Added testing for async * Remove unused import
… after lock expiration (redis#3531) * adds option not to raise when leaving context manager after lock expiration * keep oroginal traceback Co-authored-by: Aarni Koskela <[email protected]> * improves error traceback * adds missing modifications * sort imports * run linter * adds catch for other possible exception * Update redis/lock.py to catch Both LockNotOwnedError and LockError in one except statement as LockError. Co-authored-by: Juliano Amadeu <[email protected]> * Update redis/asyncio/lock.py Co-authored-by: Juliano Amadeu <[email protected]> * fix linter errors --------- Co-authored-by: Aarni Koskela <[email protected]> Co-authored-by: petyaslavova <[email protected]>
…luster_error_retry_attempts=0 (redis#3545)
Co-authored-by: Miro Hrončok <[email protected]>
Client.close() may call ConnectionPool.release() or ConnectionPool.disconnect(); both methods may end up calling os.getpid() (through ConnectionPool._checkpid() or threading.Lock() (through ConnectionPool.reset()). As mentioned in the Python documentation [1], at interpreter shutdown, module globals (in this case, the os and threading module references) may be deleted or set to None before __del__() methods are called. This causes an AttributeError to be raised when trying to run e.g. os.getpid(); while the error is ignored by the interpreter, the traceback is still printed out to stderr. Closes redis#3014 [1] https://docs.python.org/3/reference/datamodel.html#object.__del__ Co-authored-by: petyaslavova <[email protected]>
Signed-off-by: Joel Dice <[email protected]>
Signed-off-by: Joel Dice <[email protected]>
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.
utils.py
has support for detecting whether thessl
module is available, and we can use this to omit SSL-specific funcionality while still providing other features (e.g. unencrypted connections).Prior to this patch, the
connection.py
modules both triggered anImportError
due to unconditional imports of thessl
module. Now, we checkutils.SSL_AVAILABLE
prior to attempting the import and only raise an error later if (and only if) the application requests an encrypted connection. This helps support platforms such aswasm32-wasi
where thessl
module is not built by default.Pull Request check-list
Please make sure to review and check all of these items:
NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.
Description of change
Please provide a description of the change here.