Edit

IABSD.fr/ports/astro/py-kosmorrolib/patches

Branch :

  • Show log

    Commit

  • Author : sthen
    Date : 2025-09-17 16:49:03
    Hash : 80dcd81e
    Message : disable runtime warnings in kosmorrolib; it uses skyfield-data which warns if either of the two datafiles it prevents have expired, however the one which kosmorrolib actually uses is de421.bsp which has an expiry time set for 2053. (skyfield-data isn't a great source for the other file, finals2000A.all, because it's rarely updated there - anyone wanting that should probably use astropy-iers-data instead).

  • patch-kosmorrolib_core_py
  • Index: kosmorrolib/core.py
    --- kosmorrolib/core.py.orig
    +++ kosmorrolib/core.py
    @@ -22,7 +22,18 @@ from skyfield.nutationlib import iau2000b
     
     from skyfield_data import get_skyfield_data_path
     
    -LOADER = Loader(get_skyfield_data_path())
    +# disable runtime warnings; skyfield-data warns if either of the data files
    +# have expired when using get_skyfield_data_path, even if we're only actually
    +# interested in de421 which expires in 2053.
    +#
    +# it is documented as supporting "Loader(get_skyfield_data_path(),
    +# expire=False)" but that doesn't actually work.
    +#
    +import warnings
    +
    +with warnings.catch_warnings():
    +    warnings.simplefilter("ignore")
    +    LOADER = Loader(get_skyfield_data_path())
     
     
     def get_timescale():