From 6103b45189670b5ea7abb3b898b01267edbd6efd Mon Sep 17 00:00:00 2001 From: antonmyronyuk Date: Thu, 6 Mar 2025 16:43:42 +0200 Subject: [PATCH] Run tests on python 3.12 and 3.13 --- .github/workflows/tests.yaml | 2 +- README.md | 4 ++-- prometheus_summary/__init__.py | 8 ++++---- setup.py | 9 ++++++++- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 3f9f6a2..38bb60f 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -7,7 +7,7 @@ jobs: timeout-minutes: 10 strategy: matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] steps: - name: Checkout repository code diff --git a/README.md b/README.md index 94c5f87..780506c 100644 --- a/README.md +++ b/README.md @@ -31,9 +31,9 @@ s.labels(method="POST", endpoint="/login").observe(3.4) ### With custom quantiles and precisions -By default, metrics are observed for next quantile-precision pairs +By default, metrics are observed for next (quantile, precision (inaccuracy)) pairs `((0.50, 0.05), (0.90, 0.01), (0.99, 0.001))` -but you can provide your own value when creating the metric. +but you can provide your own values when creating the metric. ```python from prometheus_summary import Summary diff --git a/prometheus_summary/__init__.py b/prometheus_summary/__init__.py index d3db2cb..d061748 100644 --- a/prometheus_summary/__init__.py +++ b/prometheus_summary/__init__.py @@ -9,7 +9,7 @@ class Summary(prometheus_client.Summary): - # pairs of (quantile, allowed error) + # pairs of (quantile, allowed error (inaccuracy)) DEFAULT_INVARIANTS = ((0.50, 0.05), (0.90, 0.01), (0.99, 0.001)) def __init__( @@ -40,9 +40,9 @@ def __init__( registry=registry, _labelvalues=_labelvalues, ) - self._kwargs['invariants'] = invariants - self._kwargs['max_age_seconds'] = max_age_seconds - self._kwargs['age_buckets'] = age_buckets + self._kwargs["invariants"] = invariants + self._kwargs["max_age_seconds"] = max_age_seconds + self._kwargs["age_buckets"] = age_buckets def _metric_init(self): super()._metric_init() diff --git a/setup.py b/setup.py index a64691d..76c1869 100644 --- a/setup.py +++ b/setup.py @@ -26,10 +26,17 @@ def readfile(filename) -> str: ], platforms="Platform Independent", classifiers=[ - "Development Status :: 3 - Alpha", + "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Topic :: Scientific/Engineering :: Mathematics", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ], )