This reverts commit 4cbf13ece2.
This commit is contained in:
parent
e27d1b8333
commit
bddd774ce0
@ -67,11 +67,7 @@ def primitive_value_to_str(value: "PrimitiveData") -> str:
|
||||
return "false"
|
||||
elif value is None:
|
||||
return ""
|
||||
elif isinstance(value, (str, float, int)):
|
||||
return str(value)
|
||||
raise TypeError(
|
||||
f"Expected str, int, float, bool, or None. Got {type(value).__name__!r}."
|
||||
)
|
||||
return str(value)
|
||||
|
||||
|
||||
def is_known_encoding(encoding: str) -> bool:
|
||||
|
||||
@ -87,13 +87,6 @@ def test_empty_query_params():
|
||||
assert str(q) == "a="
|
||||
|
||||
|
||||
def test_invalid_query_params():
|
||||
with pytest.raises(
|
||||
TypeError, match=r"Expected str, int, float, bool, or None. Got 'bytes'."
|
||||
):
|
||||
httpx.QueryParams({"a": b"bytes"})
|
||||
|
||||
|
||||
def test_queryparam_update_is_hard_deprecated():
|
||||
q = httpx.QueryParams("a=123")
|
||||
with pytest.raises(RuntimeError):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user