File tree Expand file tree Collapse file tree 3 files changed +0
-21
lines changed Expand file tree Collapse file tree 3 files changed +0
-21
lines changed Original file line number Diff line number Diff line change 38
38
from .utils import (
39
39
CRYPTOGRAPHY_AVAILABLE ,
40
40
HIREDIS_AVAILABLE ,
41
- HIREDIS_PACK_AVAILABLE ,
42
41
SSL_AVAILABLE ,
43
42
compare_versions ,
44
43
ensure_string ,
@@ -314,8 +313,6 @@ def __del__(self):
314
313
def _construct_command_packer (self , packer ):
315
314
if packer is not None :
316
315
return packer
317
- elif HIREDIS_PACK_AVAILABLE :
318
- return HiredisRespSerializer ()
319
316
else :
320
317
return PythonRespSerializer (self ._buffer_cutoff , self .encoder .encode )
321
318
Original file line number Diff line number Diff line change 12
12
raise ImportError ("hiredis package should be >= 3.0.0" )
13
13
except ImportError :
14
14
HIREDIS_AVAILABLE = False
15
- HIREDIS_PACK_AVAILABLE = False
16
15
17
16
try :
18
17
import ssl # noqa
Original file line number Diff line number Diff line change 1
1
import pytest
2
2
import redis
3
3
from redis .connection import Connection
4
- from redis .utils import HIREDIS_PACK_AVAILABLE
5
4
6
5
from .conftest import _get_client
7
6
@@ -75,22 +74,6 @@ def test_replace(self, request):
75
74
assert r .get ("a" ) == "foo\ufffd "
76
75
77
76
78
- @pytest .mark .skipif (
79
- HIREDIS_PACK_AVAILABLE ,
80
- reason = "Packing via hiredis does not preserve memoryviews" ,
81
- )
82
- class TestMemoryviewsAreNotPacked :
83
- def test_memoryviews_are_not_packed (self ):
84
- c = Connection ()
85
- arg = memoryview (b"some_arg" )
86
- arg_list = ["SOME_COMMAND" , arg ]
87
- cmd = c .pack_command (* arg_list )
88
- assert cmd [1 ] is arg
89
- cmds = c .pack_commands ([arg_list , arg_list ])
90
- assert cmds [1 ] is arg
91
- assert cmds [3 ] is arg
92
-
93
-
94
77
class TestCommandsAreNotEncoded :
95
78
@pytest .fixture ()
96
79
def r (self , request ):
You can’t perform that action at this time.
0 commit comments