Fix GH-14732: date_sun_info() fails for non-finite values `timelib_astro_rise_set_altitude()` is not prepared to deal with non- finite values (`nan`, `inf` and `-inf`) for `lon` and `lat
Fix GH-14732: date_sun_info() fails for non-finite values `timelib_astro_rise_set_altitude()` is not prepared to deal with non- finite values (`nan`, `inf` and `-inf`) for `lon` and `lat`; instead these trigger undefined behavior. Thus we catch non-finite values before even calling that timelib function; for `date_sun_info()` we trigger `ValueError`s; for `date_sunrise()` and `date_sunset()` we silently return `false`, since these functions will be sunsetted anyway. Closes GH-16497.
show more ...
|