Sort the resulting query arguments in get_url_params_except().

Review Request #14346 — Created Feb. 14, 2025 and submitted

Information

Djblets
release-5.x

Reviewers

get_url_params_except() now returns arguments in sorted order, rather
than dictionary iteration order, helping to keep URLs consistent to
benefit the most from caching.

In the process, this has gained type hints. It also no longer manually
handles encoding of strings, since this was a holdover from Python 2.7
days and modern urlencode() smartly encodes as needed for us.

Unit tests passed.

Tested this as part of a change using this function and verified the
sorted output.

Summary ID
Sort the resulting query arguments in get_url_params_except().
`get_url_params_except()` now returns arguments in sorted order, rather than dictionary iteration order, helping to keep URLs consistent to benefit the most from caching. In the process, this has gained type hints. It also no longer manually handles encoding of strings, since this was a holdover from Python 2.7 days and modern `urlencode()` smartly encodes as needed for us.
bd3dc497f81d3df887cb44d57ac40800c2924f52
maubin
  1. Ship It!
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-5.x (40650cb)