Skip to content

Commit 2283933

Browse files
authored
Merge branch 'master' into add-return-type-annotations
2 parents 432b108 + f026c1e commit 2283933

File tree

87 files changed

+16229
-7628
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+16229
-7628
lines changed

.github/actions/run-tests/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ runs:
142142
sudo apt-get install -y redis-tools
143143
echo "Docker Containers:"
144144
docker ps
145+
echo "Cluster nodes:"
145146
redis-cli -p 16379 CLUSTER NODES
146147
shell: bash
147148

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040

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

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

6767
- name: Perform CodeQL Analysis
68-
uses: github/codeql-action/analyze@v3
68+
uses: github/codeql-action/analyze@v4

.github/workflows/docs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- uses: actions/checkout@v5
2929
- uses: actions/setup-python@v6
3030
with:
31-
python-version: 3.9
31+
python-version: "3.10"
3232
cache: 'pip'
3333
- name: install deps
3434
run: |
@@ -40,7 +40,7 @@ jobs:
4040
invoke build-docs
4141
4242
- name: upload docs
43-
uses: actions/upload-artifact@v4
43+
uses: actions/upload-artifact@v5
4444
with:
4545
name: redis-py-docs
4646
path: |

.github/workflows/hiredis-py-integration.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
fail-fast: false
4646
matrix:
4747
redis-version: [ '${{ needs.redis_version.outputs.CURRENT }}' ]
48-
python-version: [ '3.9', '3.13']
48+
python-version: [ '3.10', '3.14']
4949
parser-backend: [ 'hiredis' ]
5050
hiredis-version: [ 'unstable' ]
5151
event-loop: [ 'asyncio' ]
@@ -63,4 +63,4 @@ jobs:
6363
parser-backend: ${{ matrix.parser-backend }}
6464
redis-version: ${{ matrix.redis-version }}
6565
hiredis-version: ${{ matrix.hiredis-version }}
66-
hiredis-branch: ${{ inputs.hiredis-branch }}
66+
hiredis-branch: ${{ inputs.hiredis-branch }}

.github/workflows/integration.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
- uses: actions/checkout@v5
5252
- uses: actions/setup-python@v6
5353
with:
54-
python-version: 3.9
54+
python-version: "3.10"
5555
cache: 'pip'
5656
- name: run code linters
5757
run: |
@@ -76,8 +76,8 @@ jobs:
7676
max-parallel: 15
7777
fail-fast: false
7878
matrix:
79-
redis-version: ['8.4-M01-pre', '${{ needs.redis_version.outputs.CURRENT }}', '8.0.2' ,'7.4.4', '7.2.9']
80-
python-version: ['3.9', '3.13']
79+
redis-version: ['8.4-GA-pre.2', '${{ needs.redis_version.outputs.CURRENT }}', '8.0.2' ,'7.4.4', '7.2.9']
80+
python-version: ['3.10', '3.14']
8181
parser-backend: ['plain']
8282
event-loop: ['asyncio']
8383
env:
@@ -94,14 +94,14 @@ jobs:
9494

9595
python-compatibility-tests:
9696
runs-on: ubuntu-latest
97-
needs: [ redis_version, tests ]
97+
needs: [ redis_version ]
9898
timeout-minutes: 60
9999
strategy:
100100
max-parallel: 15
101101
fail-fast: false
102102
matrix:
103103
redis-version: [ '${{ needs.redis_version.outputs.CURRENT }}' ]
104-
python-version: ['3.10', '3.11', '3.12', 'pypy-3.9', 'pypy-3.10']
104+
python-version: ['3.11', '3.12', '3.13', 'pypy-3.10', 'pypy-3.11']
105105
parser-backend: [ 'plain' ]
106106
event-loop: [ 'asyncio' ]
107107
env:
@@ -118,14 +118,14 @@ jobs:
118118

119119
hiredis-tests:
120120
runs-on: ubuntu-latest
121-
needs: [redis_version, tests]
121+
needs: [redis_version]
122122
timeout-minutes: 60
123123
strategy:
124124
max-parallel: 15
125125
fail-fast: false
126126
matrix:
127127
redis-version: [ '${{ needs.redis_version.outputs.CURRENT }}' ]
128-
python-version: [ '3.9', '3.13']
128+
python-version: [ '3.10', '3.14']
129129
parser-backend: [ 'hiredis' ]
130130
hiredis-version: [ '>=3.2.0', '<3.0.0' ]
131131
event-loop: [ 'asyncio' ]
@@ -144,14 +144,14 @@ jobs:
144144

145145
uvloop-tests:
146146
runs-on: ubuntu-latest
147-
needs: [redis_version, tests]
147+
needs: [redis_version]
148148
timeout-minutes: 60
149149
strategy:
150150
max-parallel: 15
151151
fail-fast: false
152152
matrix:
153153
redis-version: [ '${{ needs.redis_version.outputs.CURRENT }}' ]
154-
python-version: [ '3.9', '3.13' ]
154+
python-version: [ '3.10', '3.14' ]
155155
parser-backend: [ 'plain' ]
156156
event-loop: [ 'uvloop' ]
157157
env:
@@ -170,7 +170,7 @@ jobs:
170170
build-and-test-package:
171171
name: Validate building and installing the package
172172
runs-on: ubuntu-latest
173-
needs: [tests]
173+
needs: [redis_version]
174174
strategy:
175175
fail-fast: false
176176
matrix:
@@ -179,7 +179,7 @@ jobs:
179179
- uses: actions/checkout@v5
180180
- uses: actions/setup-python@v6
181181
with:
182-
python-version: 3.9
182+
python-version: "3.10"
183183
- name: Run installed unit tests
184184
env:
185185
CLIENT_LIBS_TEST_IMAGE_TAG: ${{ env.CURRENT_REDIS_VERSION }}
@@ -193,7 +193,7 @@ jobs:
193193
strategy:
194194
fail-fast: false
195195
matrix:
196-
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', 'pypy-3.9', 'pypy-3.10']
196+
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14', 'pypy-3.10', 'pypy-3.11']
197197
steps:
198198
- uses: actions/checkout@v5
199199
- uses: actions/setup-python@v6

.github/workflows/pypi-publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: install python
1818
uses: actions/setup-python@v6
1919
with:
20-
python-version: 3.9
20+
python-version: "3.10"
2121
- run: pip install build twine
2222

2323
- name: Build package

.github/workflows/spellcheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
- name: Checkout
99
uses: actions/checkout@v5
1010
- name: Check Spelling
11-
uses: rojopolis/spellcheck-github-actions@0.52.0
11+
uses: rojopolis/spellcheck-github-actions@0.53.0
1212
with:
1313
config_path: .github/spellcheck-settings.yml
1414
task_name: Markdown

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ python:
99
build:
1010
os: ubuntu-20.04
1111
tools:
12-
python: "3.9"
12+
python: "3.10"
1313

1414
sphinx:
1515
configuration: docs/conf.py

README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ The Python interface to the Redis key-value store.
1313

1414
---------------------------------------------
1515

16-
**Note:** redis-py 5.0 will be the last version of redis-py to support Python 3.7, as it has reached [end of life](https://devguide.python.org/versions/). redis-py 5.1 will support Python 3.8+.
17-
**Note:** redis-py 6.1.0 will be the last version of redis-py to support Python 3.8, as it has reached [end of life](https://devguide.python.org/versions/). redis-py 6.2.0 will support Python 3.9+.
16+
**Note:** redis-py 5.0 is the last version of redis-py that supports Python 3.7, as it has reached [end of life](https://devguide.python.org/versions/). redis-py 5.1 supports Python 3.8+.<br>
17+
**Note:** redis-py 6.1.0 is the last version of redis-py that supports Python 3.8, as it has reached [end of life](https://devguide.python.org/versions/). redis-py 6.2.0 supports Python 3.9+.
18+
1819
---------------------------------------------
1920

2021
## How do I Redis?
@@ -59,7 +60,7 @@ Looking for a high-level library to handle object mapping? See [redis-om-python]
5960

6061
## Supported Redis Versions
6162

62-
The most recent version of this library supports Redis version [7.2](https://github.com/redis/redis/blob/7.2/00-RELEASENOTES), [7.4](https://github.com/redis/redis/blob/7.4/00-RELEASENOTES) and [8.0](https://github.com/redis/redis/blob/8.0/00-RELEASENOTES).
63+
The most recent version of this library supports Redis version [7.2](https://github.com/redis/redis/blob/7.2/00-RELEASENOTES), [7.4](https://github.com/redis/redis/blob/7.4/00-RELEASENOTES), [8.0](https://github.com/redis/redis/blob/8.0/00-RELEASENOTES) and [8.2](https://github.com/redis/redis/blob/8.2/00-RELEASENOTES).
6364

6465
The table below highlights version compatibility of the most-recent library versions and redis versions.
6566

@@ -193,6 +194,16 @@ By default, the client now overrides the server-side dialect with version 2, aut
193194

194195
You can find further details in the [query dialect documentation](https://redis.io/docs/latest/develop/interact/search-and-query/advanced-concepts/dialects/).
195196

197+
### Multi-database client (Active-Active)
198+
199+
The multi-database client allows your application to connect to multiple Redis databases, which are typically replicas of each other. It is designed to work with Redis Software and Redis Cloud Active-Active setups. The client continuously monitors database health, detects failures, and automatically fails over to the next healthy database using a configurable strategy. When the original database becomes healthy again, the client can automatically switch back to it.<br>
200+
This is useful when:
201+
202+
1. You have more than one Redis deployment. This might include two independent Redis servers or two or more Redis databases replicated across multiple [active-active Redis Enterprise](https://redis.io/docs/latest/operate/rs/databases/active-active/) clusters.
203+
2. You want your application to connect to one deployment at a time and to fail over to the next available deployment if the first deployment becomes unavailable.
204+
205+
For the complete failover configuration options and examples, see the [Multi-database client docs](https://redis.readthedocs.io/en/latest/multi_database.html).
206+
196207
---------------------------------------------
197208

198209
### Author

dev_requirements.txt

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,32 @@
11
build
2+
build==1.2.2.post1 ; platform_python_implementation == "PyPy"
23
click==8.0.4
34
invoke==2.2.0
45
mock
6+
mock==5.1.0 ; platform_python_implementation == "PyPy"
57
packaging>=20.4
8+
packaging==24.2 ; platform_python_implementation == "PyPy"
9+
610
pytest
11+
pytest==8.3.4 ; platform_python_implementation == "PyPy"
712
pytest-asyncio>=0.23.0
13+
pytest-asyncio==1.1.0 ; platform_python_implementation == "PyPy"
814
pytest-cov
15+
coverage<7.11.1
16+
pytest-cov==6.0.0 ; platform_python_implementation == "PyPy"
17+
coverage==7.6.12 ; platform_python_implementation == "PyPy"
918
pytest-profiling==1.8.1
1019
pytest-timeout
20+
pytest-timeout==2.3.1 ; platform_python_implementation == "PyPy"
21+
1122
ruff==0.9.6
1223
ujson>=4.2.0
13-
uvloop
24+
uvloop<=0.21.0; platform_python_implementation == "CPython" and python_version < "3.14"
25+
uvloop>=0.22; platform_python_implementation == "CPython" and python_version >= "3.14"
1426
vulture>=2.3.0
15-
numpy>=1.24.0
27+
28+
numpy>=1.24.0 ; platform_python_implementation == "CPython"
29+
numpy>=1.24.0,<2.0 ; platform_python_implementation == "PyPy"
30+
1631
redis-entraid==1.0.0
1732
pybreaker>=1.4.0

0 commit comments

Comments
 (0)