Hello community,

here is the log from the commit of package python-certstream for 
openSUSE:Factory checked in at 2020-01-06 15:24:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-certstream (Old)
 and      /work/SRC/openSUSE:Factory/.python-certstream.new.6675 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-certstream"

Mon Jan  6 15:24:32 2020 rev:6 rq:761130 version:1.11

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-certstream/python-certstream.changes      
2019-10-16 09:13:59.111668614 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-certstream.new.6675/python-certstream.changes
    2020-01-06 15:24:35.600555582 +0100
@@ -1,0 +2,8 @@
+Wed Jan  1 11:09:59 UTC 2020 - Sebastian Wagner <[email protected]>
+
+- update to version 1.11.0:
+ - adding url to examples
+ - Switched to using a module-specific logger so code calling this module can 
have better control over logs.
+ - Update websocket-client and add ping every 15s
+
+-------------------------------------------------------------------

Old:
----
  certstream-1.10.tar.gz

New:
----
  certstream-1.11.tar.gz

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

Other differences:
------------------
++++++ python-certstream.spec ++++++
--- /var/tmp/diff_new_pack.ngBTiQ/_old  2020-01-06 15:24:36.276555932 +0100
+++ /var/tmp/diff_new_pack.ngBTiQ/_new  2020-01-06 15:24:36.276555932 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-certstream
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-certstream
-Version:        1.10
+Version:        1.11
 Release:        0
 Summary:        Python library for receiving certificate transparency list 
updates
 License:        MIT

++++++ certstream-1.10.tar.gz -> certstream-1.11.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/certstream-1.10/PKG-INFO new/certstream-1.11/PKG-INFO
--- old/certstream-1.10/PKG-INFO        2018-09-20 23:50:12.000000000 +0200
+++ new/certstream-1.11/PKG-INFO        2019-12-20 06:12:39.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: certstream
-Version: 1.10
+Version: 1.11
 Summary: CertStream is a library for receiving certificate transparency list 
updates in real time.
 Home-page: https://github.com/CaliDog/certstream-python/
 Author: Ryan Sears
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/certstream-1.10/README.md 
new/certstream-1.11/README.md
--- old/certstream-1.10/README.md       2018-02-27 23:52:04.000000000 +0100
+++ new/certstream-1.11/README.md       2019-12-20 05:22:08.000000000 +0100
@@ -43,7 +43,7 @@
 
 logging.basicConfig(format='[%(levelname)s:%(name)s] %(asctime)s - 
%(message)s', level=logging.INFO)
 
-certstream.listen_for_events(print_callback)
+certstream.listen_for_events(print_callback, 
url='wss://certstream.calidog.io/')
 ```
 
 You can also register an `on_open` and `on_error` handler as well, which do 
exactly what you'd expect:
@@ -63,7 +63,7 @@
     # Instance is the CertStreamClient instance that barfed
     print("Exception in CertStreamClient! -> {}".format(exception)) 
 
-certstream.listen_for_events(print_callback, on_open=on_open, 
on_error=on_error)
+certstream.listen_for_events(print_callback, on_open=on_open, 
on_error=on_error, url='wss://certstream.calidog.io/')
 
 ```
 
@@ -75,7 +75,7 @@
 def print_callback(message, context):
     print("Received messaged -> {}".format(message))
 
-certstream.listen_for_events(print_callback, http_proxy_host="proxy_host", 
http_proxy_port=8080, http_proxy_auth=("user", "password"))
+certstream.listen_for_events(print_callback, 
url='wss://certstream.calidog.io/', http_proxy_host="proxy_host", 
http_proxy_port=8080, http_proxy_auth=("user", "password"))
 ```
 
 Need more connection options? Take a look at `**kwargs` in 
`certstream.listen_for_events`. We pass it to `run_forever` method of 
[websocket-client](https://github.com/websocket-client/websocket-client/blob/87861f951d1a65ed5d9080f7aaaf44310f376c56/websocket/_app.py#L169-L192).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/certstream-1.10/certstream/core.py 
new/certstream-1.11/certstream/core.py
--- old/certstream-1.10/certstream/core.py      2018-03-02 12:20:56.000000000 
+0100
+++ new/certstream-1.11/certstream/core.py      2019-12-20 06:01:19.000000000 
+0100
@@ -27,12 +27,12 @@
             on_error=self._on_error,
         )
 
-    def _on_open(self, instance):
-        logging.info("Connection established to CertStream! Listening for 
events...")
+    def _on_open(self):
+        certstream_logger.info("Connection established to CertStream! 
Listening for events...")
         if self.on_open_handler:
-            self.on_open_handler(instance)
+            self.on_open_handler()
 
-    def _on_message(self, _, message):
+    def _on_message(self, message):
         frame = json.loads(message)
 
         if frame.get('message_type', None) == "heartbeat" and 
self.skip_heartbeats:
@@ -40,22 +40,21 @@
 
         self.message_callback(frame, self._context)
 
-    def _on_error(self, instance, ex):
+    def _on_error(self, ex):
         if type(ex) == KeyboardInterrupt:
             raise
         if self.on_error_handler:
-            self.on_error_handler(instance, ex)
-        logging.error("Error connecting to CertStream - {} - Sleeping for a 
few seconds and trying again...".format(ex))
+            self.on_error_handler(ex)
+        certstream_logger.error("Error connecting to CertStream - {} - 
Sleeping for a few seconds and trying again...".format(ex))
 
 def listen_for_events(message_callback, url, skip_heartbeats=True, 
setup_logger=True, on_open=None, on_error=None, **kwargs):
-    if setup_logger:
-        logging.basicConfig(format='[%(levelname)s:%(name)s] %(asctime)s - 
%(message)s', level=logging.INFO)
-
     try:
         while True:
             c = CertStreamClient(message_callback, url, 
skip_heartbeats=skip_heartbeats, on_open=on_open, on_error=on_error)
-            c.run_forever(**kwargs)
+            c.run_forever(ping_interval=15, **kwargs)
             time.sleep(5)
     except KeyboardInterrupt:
-        logging.info("Kill command received, exiting!!")
+        certstream_logger.info("Kill command received, exiting!!")
 
+certstream_logger = logging.getLogger('certstream')
+certstream_logger.setLevel(logging.INFO)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/certstream-1.10/certstream.egg-info/PKG-INFO 
new/certstream-1.11/certstream.egg-info/PKG-INFO
--- old/certstream-1.10/certstream.egg-info/PKG-INFO    2018-09-20 
23:50:12.000000000 +0200
+++ new/certstream-1.11/certstream.egg-info/PKG-INFO    2019-12-20 
06:12:38.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: certstream
-Version: 1.10
+Version: 1.11
 Summary: CertStream is a library for receiving certificate transparency list 
updates in real time.
 Home-page: https://github.com/CaliDog/certstream-python/
 Author: Ryan Sears
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/certstream-1.10/certstream.egg-info/requires.txt 
new/certstream-1.11/certstream.egg-info/requires.txt
--- old/certstream-1.10/certstream.egg-info/requires.txt        2018-09-20 
23:50:12.000000000 +0200
+++ new/certstream-1.11/certstream.egg-info/requires.txt        2019-12-20 
06:12:38.000000000 +0100
@@ -1,2 +1,2 @@
-websocket-client==0.48.0
+websocket-client>=0.56.0
 termcolor
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/certstream-1.10/requirements.txt 
new/certstream-1.11/requirements.txt
--- old/certstream-1.10/requirements.txt        2018-09-20 23:44:15.000000000 
+0200
+++ new/certstream-1.11/requirements.txt        2019-12-20 05:24:09.000000000 
+0100
@@ -1,2 +1,2 @@
-websocket-client==0.48.0
+websocket-client>=0.56.0
 termcolor
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/certstream-1.10/setup.py new/certstream-1.11/setup.py
--- old/certstream-1.10/setup.py        2018-09-20 23:46:11.000000000 +0200
+++ new/certstream-1.11/setup.py        2019-12-20 06:02:05.000000000 +0100
@@ -14,7 +14,7 @@
 
 setup(
     name='certstream',
-    version="1.10",
+    version="1.11",
     url='https://github.com/CaliDog/certstream-python/',
     author='Ryan Sears',
     install_requires=dependencies,


Reply via email to