Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refs #30485 -- Removed non-representative test that emitted a warning. #11460

Merged
merged 1 commit into from Jun 19, 2019
Merged

Refs #30485 -- Removed non-representative test that emitted a warning. #11460

merged 1 commit into from Jun 19, 2019

Conversation

jdufresne
Copy link
Member

Previously, when running the Django test suite with warnings enabled, the following was emitted:

/usr/lib64/python3.7/urllib/parse.py:915: BytesWarning: str() on a bytearray instance
  v = quote_via(str(v), safe, encoding, errors)

This occurred due to the bytearray() being passed to urllib.parse.urlencode() which eventually calls str() on it. The test does not represent desired real world behavior. Rather than test for and
assert strange unspecified behavior that emits a warning, remove it.

This was also discussed in PR #11374.

Previously, when running the Django test suite with warnings enabled,
the following was emitted:

    /usr/lib64/python3.7/urllib/parse.py:915: BytesWarning: str() on a bytearray instance
      v = quote_via(str(v), safe, encoding, errors)

This occurred due to the bytearray() being passed to
urllib.parse.urlencode() which eventually calls str() on it. The test
does not represent desired real world behavior. Rather than test for and
assert strange unspecified behavior that emits a warning, remove it.

This was also discussed in PR #11374.
@carltongibson
Copy link
Member

Yep, fine. If it's going to create a warning better off without it. Thanks @jdufresne!

@carltongibson carltongibson merged commit b903bb4 into django:master Jun 19, 2019
@jdufresne jdufresne deleted the warning branch July 6, 2019 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants