Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Redis 8.6
Fixed
~~~~~
* Fix ``TypeError`` when displaying help for actions whose parameters have no ``description`` key. #6375
* Fix utf-8 encode before checking paramter max size #6352

Changed
~~~~~~~
Expand Down
5 changes: 4 additions & 1 deletion contrib/runners/python_runner/python_runner/python_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,10 @@ def run(self, action_parameters):
# failure to fork the wrapper process when using large parameters.
stdin = None
stdin_params = None
if len(serialized_parameters) >= MAX_PARAM_LENGTH:
if (
len(serialized_parameters.encode(sys.getdefaultencoding(), errors="ignore"))
>= MAX_PARAM_LENGTH
):
stdin = subprocess.PIPE
LOG.debug("Parameters are too big...changing to stdin")
stdin_params = '{"parameters": %s}\n' % (serialized_parameters)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
MOCK_SYS = mock.Mock()
MOCK_SYS.argv = []
MOCK_SYS.executable = sys.executable
MOCK_SYS.getdefaultencoding.return_value = sys.getdefaultencoding()

MOCK_EXECUTION = mock.Mock()
MOCK_EXECUTION.id = "598dbf0c0640fd54bffc688b"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
mock_sys = mock.Mock()
mock_sys.argv = []
mock_sys.executable = sys.executable
mock_sys.getdefaultencoding.return_value = sys.getdefaultencoding()

MOCK_EXECUTION = mock.Mock()
MOCK_EXECUTION.id = "598dbf0c0640fd54bffc688b"
Expand Down
Loading