Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-prometheus-client for 
openSUSE:Factory checked in at 2022-02-11 23:07:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-prometheus-client (Old)
 and      /work/SRC/openSUSE:Factory/.python-prometheus-client.new.1956 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-prometheus-client"

Fri Feb 11 23:07:26 2022 rev:4 rq:953274 version:0.13.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-prometheus-client/python-prometheus-client.changes
        2022-01-26 21:27:29.001786021 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-prometheus-client.new.1956/python-prometheus-client.changes
      2022-02-11 23:08:52.886854332 +0100
@@ -1,0 +2,8 @@
+Wed Feb  9 23:20:57 UTC 2022 - Marcus Rueckert <mrueck...@suse.de>
+
+- Update to upstream 0.13.1 release
+  * [BUGFIX] Relax some type constraints that were too strict.
+    #754, #755, #756, #758
+  * [BUGFIX] Explicitly export functions with __all__. #757
+
+-------------------------------------------------------------------

Old:
----
  v0.13.0.tar.gz

New:
----
  v0.13.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-prometheus-client.spec ++++++
--- /var/tmp/diff_new_pack.QSuFND/_old  2022-02-11 23:08:53.694856669 +0100
+++ /var/tmp/diff_new_pack.QSuFND/_new  2022-02-11 23:08:53.698856680 +0100
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
 Name:           python-prometheus-client
-Version:        0.13.0
+Version:        0.13.1
 Release:        0
 Summary:        Python client for the Prometheus monitoring system
 License:        Apache-2.0

++++++ v0.13.0.tar.gz -> v0.13.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/client_python-0.13.0/.circleci/config.yml 
new/client_python-0.13.1/.circleci/config.yml
--- old/client_python-0.13.0/.circleci/config.yml       2022-01-25 
21:04:59.000000000 +0100
+++ new/client_python-0.13.1/.circleci/config.yml       2022-01-28 
16:56:44.000000000 +0100
@@ -19,6 +19,12 @@
       - checkout
       - run: pip install tox
       - run: tox -e isort
+  mypy_lint:
+    executor: python
+    steps:
+      - checkout
+      - run: pip install tox
+      - run: tox -e mypy
   test:
     parameters:
       python:
@@ -64,6 +70,7 @@
     jobs:
       - flake8_lint
       - isort_lint
+      - mypy_lint
       - test:
           matrix:
             parameters:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/client_python-0.13.0/mypy.ini 
new/client_python-0.13.1/mypy.ini
--- old/client_python-0.13.0/mypy.ini   1970-01-01 01:00:00.000000000 +0100
+++ new/client_python-0.13.1/mypy.ini   2022-01-28 16:56:44.000000000 +0100
@@ -0,0 +1,6 @@
+[mypy]
+exclude = 
prometheus_client/decorator.py|prometheus_client/twisted|tests/test_twisted.py
+implicit_reexport = False
+
+[mypy-prometheus_client.decorator]
+follow_imports = skip
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/client_python-0.13.0/prometheus_client/__init__.py 
new/client_python-0.13.1/prometheus_client/__init__.py
--- old/client_python-0.13.0/prometheus_client/__init__.py      2022-01-25 
21:04:59.000000000 +0100
+++ new/client_python-0.13.1/prometheus_client/__init__.py      2022-01-28 
16:56:44.000000000 +0100
@@ -17,8 +17,35 @@
 from .process_collector import PROCESS_COLLECTOR, ProcessCollector
 from .registry import CollectorRegistry, REGISTRY
 
-__all__ = ['Counter', 'Gauge', 'Summary', 'Histogram', 'Info', 'Enum']
-
+__all__ = (
+    'CollectorRegistry',
+    'REGISTRY',
+    'Metric',
+    'Counter',
+    'Gauge',
+    'Summary',
+    'Histogram',
+    'Info',
+    'Enum',
+    'CONTENT_TYPE_LATEST',
+    'generate_latest',
+    'MetricsHandler',
+    'make_wsgi_app',
+    'make_asgi_app',
+    'start_http_server',
+    'start_wsgi_server',
+    'write_to_textfile',
+    'push_to_gateway',
+    'pushadd_to_gateway',
+    'delete_from_gateway',
+    'instance_ip_grouping_key',
+    'ProcessCollector',
+    'PROCESS_COLLECTOR',
+    'PlatformCollector',
+    'PLATFORM_COLLECTOR',
+    'GCCollector',
+    'GC_COLLECTOR',
+)
 
 if __name__ == '__main__':
     c = Counter('cc', 'A counter')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/client_python-0.13.0/prometheus_client/exposition.py 
new/client_python-0.13.1/prometheus_client/exposition.py
--- old/client_python-0.13.0/prometheus_client/exposition.py    2022-01-25 
21:04:59.000000000 +0100
+++ new/client_python-0.13.1/prometheus_client/exposition.py    2022-01-28 
16:56:44.000000000 +0100
@@ -17,6 +17,21 @@
 from .registry import REGISTRY
 from .utils import floatToGoString
 
+__all__ = (
+    'CONTENT_TYPE_LATEST',
+    'delete_from_gateway',
+    'generate_latest',
+    'instance_ip_grouping_key',
+    'make_asgi_app',
+    'make_wsgi_app',
+    'MetricsHandler',
+    'push_to_gateway',
+    'pushadd_to_gateway',
+    'start_http_server',
+    'start_wsgi_server',
+    'write_to_textfile',
+)
+
 CONTENT_TYPE_LATEST = 'text/plain; version=0.0.4; charset=utf-8'
 """Content type of the latest text format"""
 PYTHON376_OR_NEWER = sys.version_info > (3, 7, 5)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/client_python-0.13.0/prometheus_client/metrics.py 
new/client_python-0.13.1/prometheus_client/metrics.py
--- old/client_python-0.13.0/prometheus_client/metrics.py       2022-01-25 
21:04:59.000000000 +0100
+++ new/client_python-0.13.1/prometheus_client/metrics.py       2022-01-28 
16:56:44.000000000 +0100
@@ -2,7 +2,7 @@
 import time
 import types
 from typing import (
-    Any, Callable, Dict, Optional, Sequence, Tuple, Type, TypeVar,
+    Any, Callable, Dict, Iterable, Optional, Sequence, Type, TypeVar,
 )
 
 from . import values  # retain this import style for testability
@@ -12,7 +12,7 @@
     RESERVED_METRIC_LABEL_NAME_RE,
 )
 from .registry import CollectorRegistry, REGISTRY
-from .samples import Exemplar
+from .samples import Exemplar, Sample
 from .utils import floatToGoString, INF
 
 T = TypeVar('T', bound='MetricWrapperBase')
@@ -103,11 +103,11 @@
     def __init__(self: T,
                  name: str,
                  documentation: str,
-                 labelnames: Sequence[str] = (),
+                 labelnames: Iterable[str] = (),
                  namespace: str = '',
                  subsystem: str = '',
                  unit: str = '',
-                 registry: CollectorRegistry = REGISTRY,
+                 registry: Optional[CollectorRegistry] = REGISTRY,
                  _labelvalues: Optional[Sequence[str]] = None,
                  ) -> None:
         self._name = _build_full_name(self._type, name, namespace, subsystem, 
unit)
@@ -133,7 +133,7 @@
             if registry:
                 registry.register(self)
 
-    def labels(self: T, *labelvalues: str, **labelkwargs: str) -> T:
+    def labels(self: T, *labelvalues: Any, **labelkwargs: Any) -> T:
         """Return the child for the given labelset.
 
         All metrics can have labels, allowing grouping of related time series.
@@ -204,21 +204,21 @@
         with self._lock:
             self._metrics = {}
 
-    def _samples(self):
+    def _samples(self) -> Iterable[Sample]:
         if self._is_parent():
             return self._multi_samples()
         else:
             return self._child_samples()
 
-    def _multi_samples(self):
+    def _multi_samples(self) -> Iterable[Sample]:
         with self._lock:
             metrics = self._metrics.copy()
         for labels, metric in metrics.items():
             series_labels = list(zip(self._labelnames, labels))
             for suffix, sample_labels, value, timestamp, exemplar in 
metric._samples():
-                yield (suffix, dict(series_labels + 
list(sample_labels.items())), value, timestamp, exemplar)
+                yield Sample(suffix, dict(series_labels + 
list(sample_labels.items())), value, timestamp, exemplar)
 
-    def _child_samples(self) -> Sequence[Tuple[str, Dict[str, str], float]]:  
# pragma: no cover
+    def _child_samples(self) -> Iterable[Sample]:  # pragma: no cover
         raise NotImplementedError('_child_samples() must be implemented by %r' 
% self)
 
     def _metric_init(self):  # pragma: no cover
@@ -289,10 +289,10 @@
         self._raise_if_not_observable()
         return ExceptionCounter(self, exception)
 
-    def _child_samples(self):
+    def _child_samples(self) -> Iterable[Sample]:
         return (
-            ('_total', {}, self._value.get(), None, 
self._value.get_exemplar()),
-            ('_created', {}, self._created, None, None),
+            Sample('_total', {}, self._value.get(), None, 
self._value.get_exemplar()),
+            Sample('_created', {}, self._created, None, None),
         )
 
 
@@ -413,13 +413,13 @@
 
         self._raise_if_not_observable()
 
-        def samples(self):
-            return (('', {}, float(f()), None, None),)
+        def samples(self) -> Iterable[Sample]:
+            return (Sample('', {}, float(f()), None, None),)
 
         self._child_samples = types.MethodType(samples, self)
 
-    def _child_samples(self):
-        return (('', {}, self._value.get(), None, None),)
+    def _child_samples(self) -> Iterable[Sample]:
+        return (Sample('', {}, self._value.get(), None, None),)
 
 
 class Summary(MetricWrapperBase):
@@ -482,11 +482,11 @@
         """
         return Timer(self, 'observe')
 
-    def _child_samples(self):
+    def _child_samples(self) -> Iterable[Sample]:
         return (
-            ('_count', {}, self._count.get(), None, None),
-            ('_sum', {}, self._sum.get(), None, None),
-            ('_created', {}, self._created, None, None),
+            Sample('_count', {}, self._count.get(), None, None),
+            Sample('_sum', {}, self._sum.get(), None, None),
+            Sample('_created', {}, self._created, None, None),
         )
 
 
@@ -606,16 +606,16 @@
         """
         return Timer(self, 'observe')
 
-    def _child_samples(self):
+    def _child_samples(self) -> Iterable[Sample]:
         samples = []
         acc = 0
         for i, bound in enumerate(self._upper_bounds):
             acc += self._buckets[i].get()
-            samples.append(('_bucket', {'le': floatToGoString(bound)}, acc, 
None, self._buckets[i].get_exemplar()))
-        samples.append(('_count', {}, acc, None, None))
+            samples.append(Sample('_bucket', {'le': floatToGoString(bound)}, 
acc, None, self._buckets[i].get_exemplar()))
+        samples.append(Sample('_count', {}, acc, None, None))
         if self._upper_bounds[0] >= 0:
-            samples.append(('_sum', {}, self._sum.get(), None, None))
-        samples.append(('_created', {}, self._created, None, None))
+            samples.append(Sample('_sum', {}, self._sum.get(), None, None))
+        samples.append(Sample('_created', {}, self._created, None, None))
         return tuple(samples)
 
 
@@ -650,9 +650,9 @@
         with self._lock:
             self._value = dict(val)
 
-    def _child_samples(self):
+    def _child_samples(self) -> Iterable[Sample]:
         with self._lock:
-            return (('_info', self._value, 1.0, None, None),)
+            return (Sample('_info', self._value, 1.0, None, None),)
 
 
 class Enum(MetricWrapperBase):
@@ -677,7 +677,7 @@
                  namespace: str = '',
                  subsystem: str = '',
                  unit: str = '',
-                 registry: CollectorRegistry = REGISTRY,
+                 registry: Optional[CollectorRegistry] = REGISTRY,
                  _labelvalues: Optional[Sequence[str]] = None,
                  states: Optional[Sequence[str]] = None,
                  ):
@@ -707,10 +707,10 @@
         with self._lock:
             self._value = self._states.index(state)
 
-    def _child_samples(self):
+    def _child_samples(self) -> Iterable[Sample]:
         with self._lock:
             return [
-                ('', {self._name: s}, 1 if i == self._value else 0, None, None)
+                Sample('', {self._name: s}, 1 if i == self._value else 0, 
None, None)
                 for i, s
                 in enumerate(self._states)
             ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/client_python-0.13.0/prometheus_client/samples.py 
new/client_python-0.13.1/prometheus_client/samples.py
--- old/client_python-0.13.0/prometheus_client/samples.py       2022-01-25 
21:04:59.000000000 +0100
+++ new/client_python-0.13.1/prometheus_client/samples.py       2022-01-28 
16:56:44.000000000 +0100
@@ -1,4 +1,4 @@
-from typing import Dict, NamedTuple, Optional
+from typing import Dict, NamedTuple, Optional, Union
 
 
 class Timestamp:
@@ -39,12 +39,12 @@
 class Exemplar(NamedTuple):
     labels: Dict[str, str]
     value: float
-    timestamp: Optional[float] = None
+    timestamp: Optional[Union[float, Timestamp]] = None
 
 
 class Sample(NamedTuple):
     name: str
     labels: Dict[str, str]
     value: float
-    timestamp: Optional[float] = None
+    timestamp: Optional[Union[float, Timestamp]] = None
     exemplar: Optional[Exemplar] = None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/client_python-0.13.0/setup.py 
new/client_python-0.13.1/setup.py
--- old/client_python-0.13.0/setup.py   2022-01-25 21:04:59.000000000 +0100
+++ new/client_python-0.13.1/setup.py   2022-01-28 16:56:44.000000000 +0100
@@ -8,7 +8,7 @@
 
 setup(
     name="prometheus_client",
-    version="0.13.0",
+    version="0.13.1",
     author="Brian Brazil",
     author_email="brian.bra...@robustperception.io",
     description="Python client for the Prometheus monitoring system.",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/client_python-0.13.0/tests/test_core.py 
new/client_python-0.13.1/tests/test_core.py
--- old/client_python-0.13.0/tests/test_core.py 2022-01-25 21:04:59.000000000 
+0100
+++ new/client_python-0.13.1/tests/test_core.py 2022-01-28 16:56:44.000000000 
+0100
@@ -1,5 +1,6 @@
 from concurrent.futures import ThreadPoolExecutor
 import time
+import unittest
 
 import pytest
 
@@ -11,11 +12,6 @@
 )
 from prometheus_client.decorator import getargspec
 
-try:
-    import unittest2 as unittest
-except ImportError:
-    import unittest
-
 
 def assert_not_observable(fn, *args, **kwargs):
     """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/client_python-0.13.0/tests/test_exposition.py 
new/client_python-0.13.1/tests/test_exposition.py
--- old/client_python-0.13.0/tests/test_exposition.py   2022-01-25 
21:04:59.000000000 +0100
+++ new/client_python-0.13.1/tests/test_exposition.py   2022-01-28 
16:56:44.000000000 +0100
@@ -1,3 +1,4 @@
+from http.server import BaseHTTPRequestHandler, HTTPServer
 import threading
 import time
 import unittest
@@ -15,12 +16,6 @@
     passthrough_redirect_handler,
 )
 
-try:
-    from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
-except ImportError:
-    # Python 3
-    from http.server import BaseHTTPRequestHandler, HTTPServer
-
 
 class TestGenerateText(unittest.TestCase):
     def setUp(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/client_python-0.13.0/tests/test_graphite_bridge.py 
new/client_python-0.13.1/tests/test_graphite_bridge.py
--- old/client_python-0.13.0/tests/test_graphite_bridge.py      2022-01-25 
21:04:59.000000000 +0100
+++ new/client_python-0.13.1/tests/test_graphite_bridge.py      2022-01-28 
16:56:44.000000000 +0100
@@ -1,14 +1,10 @@
+import socketserver as SocketServer
 import threading
 import unittest
 
 from prometheus_client import CollectorRegistry, Gauge
 from prometheus_client.bridge.graphite import GraphiteBridge
 
-try:
-    import SocketServer
-except ImportError:
-    import socketserver as SocketServer
-
 
 def fake_timer():
     return 1434898897.5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/client_python-0.13.0/tox.ini 
new/client_python-0.13.1/tox.ini
--- old/client_python-0.13.0/tox.ini    2022-01-25 21:04:59.000000000 +0100
+++ new/client_python-0.13.1/tox.ini    2022-01-28 16:56:44.000000000 +0100
@@ -1,5 +1,5 @@
 [tox]
-envlist = 
coverage-clean,py3.6,py3.7,py3.8,py3.9,py3.10,pypy3.7,py3.9-nooptionals,coverage-report,flake8,isort
+envlist = 
coverage-clean,py3.6,py3.7,py3.8,py3.9,py3.10,pypy3.7,py3.9-nooptionals,coverage-report,flake8,isort,mypy
 
 
 [base]
@@ -48,6 +48,15 @@
 commands =
     isort --check prometheus_client/ tests/ setup.py
 
+[testenv:mypy]
+deps =
+    pytest
+    asgiref
+    mypy==0.910
+skip_install = true
+commands =
+    mypy --install-types --non-interactive prometheus_client/ tests/
+
 [flake8]
 ignore =
     D,

Reply via email to