Skip to content

Commit 547dcb9

Browse files
committed
Initial commit
1 parent 06478ad commit 547dcb9

File tree

2 files changed

+1
-17
lines changed

2 files changed

+1
-17
lines changed

moto/core/responses.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
get_value,
4343
gzip_decompress,
4444
method_names_from_class,
45-
params_sort_function,
4645
)
4746
from moto.utilities.aws_headers import gen_amzn_requestid_long
4847
from moto.utilities.utils import get_partition
@@ -731,7 +730,7 @@ def _get_params(self) -> dict[str, Any]:
731730
if self.automated_parameter_parsing:
732731
return self.params
733732
params: dict[str, Any] = {}
734-
for k, v in sorted(self.querystring.items(), key=params_sort_function):
733+
for k, v in sorted(self.querystring.items()):
735734
self._parse_param(k, v[0], params)
736735
return params
737736

moto/core/utils.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -378,21 +378,6 @@ def extract_region_from_aws_authorization(string: str) -> Optional[str]:
378378
return region
379379

380380

381-
def params_sort_function(item: tuple[str, Any]) -> tuple[str, int, str]:
382-
"""
383-
sort by <string-prefix>.member.<integer>.<string-postfix>:
384-
in case there are more than 10 members, the default-string sort would lead to IndexError when parsing the content.
385-
386-
Note: currently considers only the first occurence of `member`, but there may be cases with nested members
387-
"""
388-
key, _ = item
389-
390-
match = re.search(r"(.*?member)\.(\d+)(.*)", key)
391-
if match:
392-
return (match.group(1), int(match.group(2)), match.group(3))
393-
return (key, 0, "")
394-
395-
396381
def gzip_decompress(body: bytes) -> bytes:
397382
return decompress(body)
398383

0 commit comments

Comments
 (0)