Skip to content

Commit adcc529

Browse files
authored
Merge branch 'master' into slot-based-load-balancer
2 parents 745bb29 + 513c8d0 commit adcc529

14 files changed

+34
-33
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-M01-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']

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

redis/asyncio/cluster.py

Lines changed: 0 additions & 9 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

tests/test_asyncio/compat.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
import asyncio
2-
from unittest import mock
3-
4-
try:
5-
mock.AsyncMock
6-
except AttributeError:
7-
from unittest import mock
82

93
try:
104
from contextlib import aclosing

tests/test_asyncio/conftest.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import random
22
from contextlib import asynccontextmanager as _asynccontextmanager
33
from typing import Union
4+
from unittest import mock
45

56
import pytest
67
import pytest_asyncio
@@ -14,8 +15,6 @@
1415
from redis.credentials import CredentialProvider
1516
from tests.conftest import REDIS_INFO, get_credential_provider
1617

17-
from .compat import mock
18-
1918

2019
async def _get_info(redis_url):
2120
client = redis.Redis.from_url(redis_url)

tests/test_asyncio/test_cluster.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import ssl
55
import warnings
66
from typing import Any, Awaitable, Callable, Dict, List, Optional, Type, Union
7+
from unittest import mock
78
from urllib.parse import urlparse
89

910
import pytest
@@ -48,7 +49,7 @@
4849
)
4950

5051
from ..ssl_utils import get_tls_certificates
51-
from .compat import aclosing, mock
52+
from .compat import aclosing
5253

5354
pytestmark = pytest.mark.onlycluster
5455

tests/test_asyncio/test_connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import asyncio
22
import socket
33
import types
4+
from unittest import mock
45
from errno import ECONNREFUSED
56
from unittest.mock import patch
67

@@ -25,7 +26,6 @@
2526
from redis.utils import HIREDIS_AVAILABLE
2627
from tests.conftest import skip_if_server_version_lt
2728

28-
from .compat import mock
2929
from .mocks import MockStream
3030

3131

tests/test_asyncio/test_connection_pool.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import asyncio
22
import re
3+
from unittest import mock
34

45
import pytest
56
import pytest_asyncio
@@ -8,7 +9,7 @@
89
from redis.auth.token import TokenInterface
910
from tests.conftest import skip_if_redis_enterprise, skip_if_server_version_lt
1011

11-
from .compat import aclosing, mock
12+
from .compat import aclosing
1213
from .conftest import asynccontextmanager
1314
from .test_pubsub import wait_for_message
1415

0 commit comments

Comments
 (0)