Skip to content

Conversation

@jdufresne
Copy link
Contributor

The Python command line argument -b causes Python to emit a warning when
bytes and str usage is mixed. This is generally considered bad practice
as either one or the other is required. Enabling this feature during
tests helps catch them before reaching production.

The warning appeared as:

tests/test_scripting.py::TestScripting::test_eval_msgpack_pipeline_error_in_lua
  .../redis-py/redis/client.py:3967: BytesWarning: str() on a bytes instance
    cmd = ' '.join(imap(safe_unicode, command))

Pull Request check-list

Please make sure to review and check all of these items:

  • Does $ tox pass with this change (including linting)?
  • Does travis tests pass with this change (enable it first in your forked repo and wait for the travis build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?

The Python command line argument -b causes Python to emit a warning when
bytes and str usage is mixed. This is generally considered bad practice
as either one or the other is required. Enabling this feature during
tests helps catch them before reaching production.

The warning appeared as:

    tests/test_scripting.py::TestScripting::test_eval_msgpack_pipeline_error_in_lua
      .../redis-py/redis/client.py:3967: BytesWarning: str() on a bytes instance
        cmd = ' '.join(imap(safe_unicode, command))
@andymccurdy
Copy link
Contributor

looks good to me. thanks!

@andymccurdy andymccurdy merged commit ae173f0 into redis:master Apr 13, 2020
@jdufresne jdufresne deleted the bytes branch April 13, 2020 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants