Skip to content

Commit ee3c763

Browse files
Merge branch 'redis:master' into master
2 parents 25c19d6 + b7dcd80 commit ee3c763

28 files changed

+87
-92
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ runs:
7373
7474
# Mapping of redis version to stack version
7575
declare -A redis_stack_version_mapping=(
76-
["7.4.2"]="rs-7.4.0-v2"
77-
["7.2.7"]="rs-7.2.0-v14"
76+
["7.4.4"]="rs-7.4.0-v5"
77+
["7.2.9"]="rs-7.2.0-v17"
7878
)
7979
8080
if [[ -v redis_stack_version_mapping[$REDIS_VERSION] ]]; then
@@ -91,8 +91,10 @@ runs:
9191
fi
9292
9393
invoke devenv --endpoints=all-stack
94+
9495
else
9596
echo "Using redis CE for module tests"
97+
export CLIENT_LIBS_TEST_STACK_IMAGE_TAG=$REDIS_VERSION
9698
echo "REDIS_MOD_URL=redis://127.0.0.1:6379" >> $GITHUB_ENV
9799
invoke devenv --endpoints all
98100
fi

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ env:
2323
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2424
# this speeds up coverage with Python 3.12: https://github.com/nedbat/coveragepy/issues/1665
2525
COVERAGE_CORE: sysmon
26-
CURRENT_CLIENT_LIBS_TEST_STACK_IMAGE_TAG: 'rs-7.4.0-v2'
27-
CURRENT_REDIS_VERSION: '7.4.2'
26+
CURRENT_CLIENT_LIBS_TEST_STACK_IMAGE_TAG: '8.0.2'
27+
CURRENT_REDIS_VERSION: '8.0.2'
2828

2929
jobs:
3030
redis_version:

.github/workflows/integration.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ env:
2727
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2828
# this speeds up coverage with Python 3.12: https://github.com/nedbat/coveragepy/issues/1665
2929
COVERAGE_CORE: sysmon
30-
CURRENT_CLIENT_LIBS_TEST_STACK_IMAGE_TAG: 'rs-7.4.0-v2'
31-
CURRENT_REDIS_VERSION: '7.4.2'
30+
CURRENT_CLIENT_LIBS_TEST_STACK_IMAGE_TAG: '8.0.2'
31+
CURRENT_REDIS_VERSION: '8.0.2'
3232

3333
jobs:
3434
dependency-audit:
@@ -74,7 +74,7 @@ jobs:
7474
max-parallel: 15
7575
fail-fast: false
7676
matrix:
77-
redis-version: ['8.0.1-pre', '${{ needs.redis_version.outputs.CURRENT }}', '7.2.7']
77+
redis-version: ['8.2-RC1-pre', '${{ needs.redis_version.outputs.CURRENT }}', '7.4.4', '7.2.9']
7878
python-version: ['3.9', '3.13']
7979
parser-backend: ['plain']
8080
event-loop: ['asyncio']

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
The Python interface to the Redis key-value store.
44

55
[![CI](https://github.com/redis/redis-py/workflows/CI/badge.svg?branch=master)](https://github.com/redis/redis-py/actions?query=workflow%3ACI+branch%3Amaster)
6-
[![docs](https://readthedocs.org/projects/redis/badge/?version=stable&style=flat)](https://redis-py.readthedocs.io/en/stable/)
6+
[![docs](https://readthedocs.org/projects/redis/badge/?version=stable&style=flat)](https://redis.readthedocs.io/en/stable/)
77
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
88
[![pypi](https://badge.fury.io/py/redis.svg)](https://pypi.org/project/redis/)
99
[![pre-release](https://img.shields.io/github/v/release/redis/redis-py?include_prereleases&label=latest-prerelease)](https://github.com/redis/redis-py/releases)

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
# image tag 8.0-RC2-pre is the one matching the 8.0 GA release
33
x-client-libs-stack-image: &client-libs-stack-image
4-
image: "redislabs/client-libs-test:${CLIENT_LIBS_TEST_STACK_IMAGE_TAG:-8.0-RC2-pre}"
4+
image: "redislabs/client-libs-test:${CLIENT_LIBS_TEST_STACK_IMAGE_TAG:-8.0.2}"
55

66
x-client-libs-image: &client-libs-image
7-
image: "redislabs/client-libs-test:${CLIENT_LIBS_TEST_IMAGE_TAG:-8.0-RC2-pre}"
7+
image: "redislabs/client-libs-test:${CLIENT_LIBS_TEST_IMAGE_TAG:-8.0.2}"
88

99
services:
1010

docs/examples/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Examples
22

3-
Examples of redis-py usage go here. They're being linked to the [generated documentation](https://redis-py.readthedocs.org).
3+
Examples of redis-py usage go here. They're being linked to the [generated documentation](https://redis.readthedocs.org).

docs/examples/opentelemetry/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This example demonstrates how to monitor Redis using [OpenTelemetry](https://ope
44
[Uptrace](https://github.com/uptrace/uptrace). It requires Docker to start Redis Server and Uptrace.
55

66
See
7-
[Monitoring redis-py performance with OpenTelemetry](https://redis-py.readthedocs.io/en/latest/opentelemetry.html)
7+
[Monitoring redis-py performance with OpenTelemetry](https://redis.readthedocs.io/en/latest/opentelemetry.html)
88
for details.
99

1010
**Step 1**. Download the example using Git:

redis/asyncio/cluster.py

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1581,15 +1581,6 @@ async def __aexit__(self, exc_type: None, exc_value: None, traceback: None) -> N
15811581
def __await__(self) -> Generator[Any, None, "ClusterPipeline"]:
15821582
return self.initialize().__await__()
15831583

1584-
def __enter__(self) -> "ClusterPipeline":
1585-
# TODO: Remove this method before 7.0.0
1586-
self._execution_strategy._command_queue = []
1587-
return self
1588-
1589-
def __exit__(self, exc_type: None, exc_value: None, traceback: None) -> None:
1590-
# TODO: Remove this method before 7.0.0
1591-
self._execution_strategy._command_queue = []
1592-
15931584
def __bool__(self) -> bool:
15941585
"Pipeline instances should always evaluate to True on Python 3+"
15951586
return True
@@ -2350,10 +2341,11 @@ async def reset(self):
23502341
# watching something
23512342
if self._transaction_connection:
23522343
try:
2353-
# call this manually since our unwatch or
2354-
# immediate_execute_command methods can call reset()
2355-
await self._transaction_connection.send_command("UNWATCH")
2356-
await self._transaction_connection.read_response()
2344+
if self._watching:
2345+
# call this manually since our unwatch or
2346+
# immediate_execute_command methods can call reset()
2347+
await self._transaction_connection.send_command("UNWATCH")
2348+
await self._transaction_connection.read_response()
23572349
# we can safely return the connection to the pool here since we're
23582350
# sure we're no longer WATCHing anything
23592351
self._transaction_node.release(self._transaction_connection)

redis/client.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -368,9 +368,7 @@ def __init__(
368368
]:
369369
raise RedisError("Client caching is only supported with RESP version 3")
370370

371-
# TODO: To avoid breaking changes during the bug fix, we have to keep non-reentrant lock.
372-
# TODO: Remove this before next major version (7.0.0)
373-
self.single_connection_lock = threading.Lock()
371+
self.single_connection_lock = threading.RLock()
374372
self.connection = None
375373
self._single_connection_client = single_connection_client
376374
if self._single_connection_client:
@@ -776,9 +774,7 @@ def __init__(
776774
else:
777775
self._event_dispatcher = event_dispatcher
778776

779-
# TODO: To avoid breaking changes during the bug fix, we have to keep non-reentrant lock.
780-
# TODO: Remove this before next major version (7.0.0)
781-
self._lock = threading.Lock()
777+
self._lock = threading.RLock()
782778
if self.encoder is None:
783779
self.encoder = self.connection_pool.get_encoder()
784780
self.health_check_response_b = self.encoder.encode(self.HEALTH_CHECK_MESSAGE)

redis/cluster.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3289,10 +3289,11 @@ def reset(self):
32893289
# watching something
32903290
if self._transaction_connection:
32913291
try:
3292-
# call this manually since our unwatch or
3293-
# immediate_execute_command methods can call reset()
3294-
self._transaction_connection.send_command("UNWATCH")
3295-
self._transaction_connection.read_response()
3292+
if self._watching:
3293+
# call this manually since our unwatch or
3294+
# immediate_execute_command methods can call reset()
3295+
self._transaction_connection.send_command("UNWATCH")
3296+
self._transaction_connection.read_response()
32963297
# we can safely return the connection to the pool here since we're
32973298
# sure we're no longer WATCHing anything
32983299
node = self._nodes_manager.find_connection_owner(

0 commit comments

Comments
 (0)