diff --git a/gnocchi/rest/aggregates/operations.py b/gnocchi/rest/aggregates/operations.py index 325f6e455..8c8f365c7 100644 --- a/gnocchi/rest/aggregates/operations.py +++ b/gnocchi/rest/aggregates/operations.py @@ -123,7 +123,7 @@ def _inner_rated_agg(values, axis): def rateofchangesec(t, v): """Calculate change of value per second.""" values = numpy.divide( - numpy.diff(v.T, prepend=numpy.NaN), + numpy.diff(v.T, prepend=numpy.nan), numpy.divide( numpy.diff(t, prepend=numpy.datetime64("NaT")), numpy.timedelta64(1, 's')) diff --git a/gnocchi/rest/aggregates/processor.py b/gnocchi/rest/aggregates/processor.py index 2af385034..a6b04cfb1 100644 --- a/gnocchi/rest/aggregates/processor.py +++ b/gnocchi/rest/aggregates/processor.py @@ -157,7 +157,7 @@ def aggregated(refs_and_timeseries, operations, from_timestamp=None, return_inverse=True) # create nd-array (unique series x unique times) and fill - filler = (numpy.NaN if fill in [None, 'null', 'dropna'] + filler = (numpy.nan if fill in [None, 'null', 'dropna'] else fill) val_grid = numpy.full((len(series[sampling]), len(times)), filler) start = 0 diff --git a/images/Dockerfile.ci b/images/Dockerfile.ci index 259ff21ca..433821dc6 100644 --- a/images/Dockerfile.ci +++ b/images/Dockerfile.ci @@ -44,6 +44,12 @@ RUN rm -rf /var/lib/apt/lists/* # NOTE(tobias.urdin): hack since pyparsing in site-packages collides with our requirements RUN rm -rf /usr/lib/python3/dist-packages/pyparsing* +# NOTE(tobias.urdin): hack since jaraco.text in site-packages collides with our requirements +RUN rm -rf /usr/lib/python3/dist-packages/jaraco/text* + +# TODO(tobias.urdin): hack remove this when we drop python 3.9 +RUN sed -i '1s/^/from __future__ import annotations\n/' /usr/lib/python3/dist-packages/werkzeug/sansio/utils.py + #NOTE(sileht): really no utf-8 in 2017 !? ENV LANG en_US.UTF-8 RUN update-locale