Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
dvora-h authored Jan 9, 2024
2 parents 09f8657 + f9b6a5e commit f1c47c0
Show file tree
Hide file tree
Showing 52 changed files with 1,435 additions and 306 deletions.
11 changes: 9 additions & 2 deletions .github/release-drafter-config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name-template: '$NEXT_MINOR_VERSION'
tag-template: 'v$NEXT_MINOR_VERSION'
filter-by-commitish: true
commitish: master
autolabeler:
- label: 'maintenance'
files:
Expand All @@ -15,7 +17,7 @@ autolabeler:
branch:
- '/feature-.+'
categories:
- title: 'Breaking Changes'
- title: '🔥 Breaking Changes'
labels:
- 'breakingchange'
- title: '🧪 Experimental Features'
Expand All @@ -32,7 +34,12 @@ categories:
- 'bug'
- 'BUG'
- title: '🧰 Maintenance'
label: 'maintenance'
labels:
- 'maintenance'
- 'dependencies'
- 'documentation'
- 'docs'
- 'testing'
change-template: '- $TITLE (#$NUMBER)'
exclude-labels:
- 'skip-changelog'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -51,7 +51,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -65,4 +65,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
4 changes: 2 additions & 2 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
cache: 'pip'
Expand All @@ -40,7 +40,7 @@ jobs:
invoke build-docs
- name: upload docs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: redis-py-docs
path: |
Expand Down
19 changes: 9 additions & 10 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
cache: 'pip'
Expand All @@ -57,15 +57,15 @@ jobs:
max-parallel: 15
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', 'pypy-3.7', 'pypy-3.8', 'pypy-3.9']
python-version: ['3.8', '3.9', '3.10', '3.11', 'pypy-3.8', 'pypy-3.9']
test-type: ['standalone', 'cluster']
connection-type: ['hiredis', 'plain']
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
name: Python ${{ matrix.python-version }} ${{matrix.test-type}}-${{matrix.connection-type}} tests
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
Expand All @@ -81,15 +81,14 @@ jobs:
sleep 10 # time to settle
invoke ${{matrix.test-type}}-tests
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: pytest-results-${{matrix.test-type}}-${{matrix.connection-type}}-${{matrix.python-version}}
path: '${{matrix.test-type}}*results.xml'

- name: Upload codecov coverage
uses: codecov/codecov-action@v3
if: ${{matrix.python-version == '3.11'}}
with:
fail_ci_if_error: false

Expand All @@ -111,7 +110,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.11']
python-version: ['3.8', '3.11']
test-type: ['standalone', 'cluster']
connection-type: ['hiredis', 'plain']
protocol: ['3']
Expand All @@ -120,7 +119,7 @@ jobs:
name: RESP3 [${{ matrix.python-version }} ${{matrix.test-type}}-${{matrix.connection-type}}]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
Expand All @@ -147,7 +146,7 @@ jobs:
extension: ['tar.gz', 'whl']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Run installed unit tests
Expand All @@ -160,10 +159,10 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', 'pypy-3.7', 'pypy-3.8', 'pypy-3.9']
python-version: ['3.8', '3.9', '3.10', '3.11', 'pypy-3.8', 'pypy-3.9']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pypi-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: install python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dev tools
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Check Spelling
uses: rojopolis/spellcheck-github-actions@0.34.0
uses: rojopolis/spellcheck-github-actions@0.35.0
with:
config_path: .github/spellcheck-settings.yml
task_name: Markdown
5 changes: 5 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
* Add an optional lock_name attribute to LockError.
* Fix return types for `get`, `set_path` and `strappend` in JSONCommands
* Connection.register_connect_callback() is made public.
* Fix async `read_response` to use `disable_decoding`.
* Add 'aclose()' methods to async classes, deprecate async close().
* Fix #2831, add auto_close_connection_pool=True arg to asyncio.Redis.from_url()
* Fix incorrect redis.asyncio.Cluster type hint for `retry_on_error`
Expand Down Expand Up @@ -56,6 +59,8 @@
* Fix for Unhandled exception related to self.host with unix socket (#2496)
* Improve error output for master discovery
* Make `ClusterCommandsProtocol` an actual Protocol
* Add `sum` to DUPLICATE_POLICY documentation of `TS.CREATE`, `TS.ADD` and `TS.ALTER`
* Prevent async ClusterPipeline instances from becoming "false-y" in case of empty command stack (#3061)

* 4.1.3 (Feb 8, 2022)
* Fix flushdb and flushall (#1926)
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced_features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ running.
The third option runs an event loop in a separate thread.
pubsub.run_in_thread() creates a new thread and starts the event loop.
The thread object is returned to the caller of [un_in_thread(). The
The thread object is returned to the caller of run_in_thread(). The
caller can use the thread.stop() method to shut down the event loop and
thread. Behind the scenes, this is simply a wrapper around get_message()
that runs in a separate thread, essentially creating a tiny non-blocking
Expand Down
2 changes: 1 addition & 1 deletion docs/clustering.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ The ‘target_nodes’ parameter is explained in the following section,
>>> # target-node: default-node
>>> rc.ping()
Specfiying Target Nodes
Specifying Target Nodes
-----------------------

As mentioned above, all non key-based RedisCluster commands accept the
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ["_build", "**.ipynb_checkponts"]
exclude_patterns = ["_build", "**.ipynb_checkpoints"]

# The reST default role (used for this markup: `text`) to use for all
# documents.
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/pipeline_examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The responses of the three commands are stored in a list. In the above example, the two first boolean indicates that the `set` commands were successfull and the last element of the list is the result of the `get(\"a\")` comand."
"The responses of the three commands are stored in a list. In the above example, the two first boolean indicates that the `set` commands were successful and the last element of the list is the result of the `get(\"a\")` comand."
]
},
{
Expand Down
33 changes: 19 additions & 14 deletions docs/lua_scripting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,24 @@ Cluster Mode

Cluster mode has limited support for lua scripting.

The following commands are supported, with caveats: - ``EVAL`` and
``EVALSHA``: The command is sent to the relevant node, depending on the
keys (i.e., in ``EVAL "<script>" num_keys key_1 ... key_n ...``). The
keys *must* all be on the same node. If the script requires 0 keys, *the
command is sent to a random (primary) node*. - ``SCRIPT EXISTS``: The
command is sent to all primaries. The result is a list of booleans
corresponding to the input SHA hashes. Each boolean is an AND of “does
the script exist on each node?”. In other words, each boolean is True
iff the script exists on all nodes. - ``SCRIPT FLUSH``: The command is
sent to all primaries. The result is a bool AND over all nodes’
responses. - ``SCRIPT LOAD``: The command is sent to all primaries. The
result is the SHA1 digest.

The following commands are not supported: - ``EVAL_RO`` - ``EVALSHA_RO``
The following commands are supported, with caveats:

- ``EVAL`` and ``EVALSHA``: The command is sent to the relevant node,
depending on the keys (i.e., in ``EVAL "<script>" num_keys key_1 ...
key_n ...``). The keys *must* all be on the same node. If the script
requires 0 keys, *the command is sent to a random (primary) node*.
- ``SCRIPT EXISTS``: The command is sent to all primaries. The result
is a list of booleans corresponding to the input SHA hashes. Each
boolean is an AND of “does the script exist on each node?”. In other
words, each boolean is True iff the script exists on all nodes.
- ``SCRIPT FLUSH``: The command is sent to all primaries. The result
is a bool AND over all nodes’ responses.
- ``SCRIPT LOAD``: The command is sent to all primaries. The result
is the SHA1 digest.

The following commands are not supported:

- ``EVAL_RO``
- ``EVALSHA_RO``

Using scripting within pipelines in cluster mode is **not supported**.
Loading

0 comments on commit f1c47c0

Please sign in to comment.