[Git][NTPsec/ntpsec][master] ntpclients/ntpviz.py: Better comment skewness and kurtosis in code.

Gary E. Miller gem at rellim.com
Fri Dec 13 22:26:15 UTC 2024


Yo Matt!

On Fri, 13 Dec 2024 05:46:32 +0000
Matt Selsky via devel <devel at ntpsec.org> wrote:

> math.isfinite() was added in Python 3.2
> per https://docs.python.org/3/library/math.html.
> Should we use math.isinf() instead in order to retain Python 2
> compatibility until we decide to drop that?

Good catch!  My bad.  Fix pushed.

BTW, Python 2.7 is not going away.  There are even Python 2 forks
being maintained.  Like this one:

    https://github.com/naftaliharris/tauthon

And this needs fixing too:


/usr/local/bin/ntpviz:1813: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
  start_time = datetime.datetime.utcfromtimestamp(
/usr/local/bin/ntpviz:1815: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
  end_time = datetime.datetime.utcfromtimestamp(


RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin


More information about the devel mailing list