From 31aa594290cc3794de11e033a8db970b5e5d225a Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Mon, 14 Sep 2020 14:47:26 -0400 Subject: [PATCH] Looks like float is fine for mean. --- src/allmydata/storage/server.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/allmydata/storage/server.py b/src/allmydata/storage/server.py index 2ba02aa9a..e36e4a2f1 100644 --- a/src/allmydata/storage/server.py +++ b/src/allmydata/storage/server.py @@ -1,9 +1,11 @@ +""" +Ported to Python 3. +""" from __future__ import division from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals -from past.utils import old_div from future.utils import bytes_to_native_str, PY2 if PY2: # Omit open() to get native behavior where open("w") always accepts native strings. @@ -157,7 +159,7 @@ class StorageServer(service.MultiService, Referenceable): stats["samplesize"] = count samples.sort() if count > 1: - stats["mean"] = old_div(sum(samples), count) + stats["mean"] = sum(samples) / count else: stats["mean"] = None