Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
89d942451f | ||
|
|
4d6205e6fe | ||
|
|
1684b0b986 | ||
|
|
4f5faa4a3c | ||
|
|
cbb77b536a |
@@ -1 +1 @@
|
|||||||
__version__ = "20.12.3"
|
__version__ = "20.12.4"
|
||||||
|
|||||||
@@ -265,9 +265,12 @@ class Request:
|
|||||||
:type errors: str
|
:type errors: str
|
||||||
:return: RequestParameters
|
:return: RequestParameters
|
||||||
"""
|
"""
|
||||||
if not self.parsed_args[
|
if (
|
||||||
(keep_blank_values, strict_parsing, encoding, errors)
|
keep_blank_values,
|
||||||
]:
|
strict_parsing,
|
||||||
|
encoding,
|
||||||
|
errors,
|
||||||
|
) not in self.parsed_args:
|
||||||
if self.query_string:
|
if self.query_string:
|
||||||
self.parsed_args[
|
self.parsed_args[
|
||||||
(keep_blank_values, strict_parsing, encoding, errors)
|
(keep_blank_values, strict_parsing, encoding, errors)
|
||||||
@@ -321,9 +324,12 @@ class Request:
|
|||||||
:type errors: str
|
:type errors: str
|
||||||
:return: list
|
:return: list
|
||||||
"""
|
"""
|
||||||
if not self.parsed_not_grouped_args[
|
if (
|
||||||
(keep_blank_values, strict_parsing, encoding, errors)
|
keep_blank_values,
|
||||||
]:
|
strict_parsing,
|
||||||
|
encoding,
|
||||||
|
errors,
|
||||||
|
) not in self.parsed_not_grouped_args:
|
||||||
if self.query_string:
|
if self.query_string:
|
||||||
self.parsed_not_grouped_args[
|
self.parsed_not_grouped_args[
|
||||||
(keep_blank_values, strict_parsing, encoding, errors)
|
(keep_blank_values, strict_parsing, encoding, errors)
|
||||||
|
|||||||
2
setup.py
2
setup.py
@@ -81,7 +81,7 @@ env_dependency = (
|
|||||||
'; sys_platform != "win32" ' 'and implementation_name == "cpython"'
|
'; sys_platform != "win32" ' 'and implementation_name == "cpython"'
|
||||||
)
|
)
|
||||||
ujson = "ujson>=1.35" + env_dependency
|
ujson = "ujson>=1.35" + env_dependency
|
||||||
uvloop = "uvloop>=0.5.3,<0.15.0" + env_dependency
|
uvloop = "uvloop>=0.5.3" + env_dependency
|
||||||
|
|
||||||
requirements = [
|
requirements = [
|
||||||
"httptools>=0.0.10",
|
"httptools>=0.0.10",
|
||||||
|
|||||||
@@ -289,6 +289,17 @@ def test_query_string(app):
|
|||||||
assert request.args.getlist("test1") == ["1"]
|
assert request.args.getlist("test1") == ["1"]
|
||||||
assert request.args.get("test3", default="My value") == "My value"
|
assert request.args.get("test3", default="My value") == "My value"
|
||||||
|
|
||||||
|
def test_popped_stays_popped(app):
|
||||||
|
@app.route("/")
|
||||||
|
async def handler(request):
|
||||||
|
return text("OK")
|
||||||
|
|
||||||
|
request, response = app.test_client.get(
|
||||||
|
"/", params=[("test1", "1")]
|
||||||
|
)
|
||||||
|
|
||||||
|
assert request.args.pop("test1") == ["1"]
|
||||||
|
assert "test1" not in request.args
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_query_string_asgi(app):
|
async def test_query_string_asgi(app):
|
||||||
|
|||||||
Reference in New Issue
Block a user