Whole file

redis/redis-py

The author described this change as Fix lat/lon swap in search querystring geo() helper (#4223). It counts as a record because the checks below fail on the code as it stood at 638e5dfbe and pass on 39f9b2580, with nothing else changed between the two runs.

Fix saved2026-07-28
Sharing licenceMIT · LICENSE
Change size+1 1

What the code was meant to do, written into the code itself as a save note

Fix lat/lon swap in search querystring geo() helper (#4223)

The change

5757 """
5858 Indicate that value is a geo region
5959 """
60- return GeoValue(lat, lon, radius, unit)
60+ return GeoValue(lon, lat, radius, unit)
6161
6262
6363 class Value:

The check that tells the two apart

failpass·tests/test_search_querystring.py::TestGeoValue::test_geo_in_a_query
failpass·tests/test_search_querystring.py::TestGeoValue::test_geo_keeps_the_requested_unit
failpass·tests/test_search_querystring.py::TestGeoValue::test_geo_matches_geovalue_built_directly
failpass·tests/test_search_querystring.py::TestGeoValue::test_geo_renders_longitude_before_latitude

Check file tests/test_search_querystring.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before it638e5dfbecde7bacdd85b8e2439c69de9e509b91
Broken version dated2026-07-28
Moduleredis.commands.search.querystring
Units changedgeo
Fingerprint3cea1a173250840e
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.

Other bugs found in redis/redis-py