Hello community,

here is the log from the commit of package python-rt for openSUSE:Factory 
checked in at 2020-08-18 15:04:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-rt (Old)
 and      /work/SRC/openSUSE:Factory/.python-rt.new.3399 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-rt"

Tue Aug 18 15:04:46 2020 rev:6 rq:825344 version:2.0.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-rt/python-rt.changes      2020-03-22 
14:17:38.242074803 +0100
+++ /work/SRC/openSUSE:Factory/.python-rt.new.3399/python-rt.changes    
2020-08-18 15:04:57.539889487 +0200
@@ -1,0 +2,8 @@
+Sat Aug  8 12:16:55 UTC 2020 - Sebastian Wagner <[email protected]>
+
+- update to version 2.0.1:
+ - Documentation: add search example
+ - edit_ticket: handle empty responses
+ - fix UnicodeDecodeError in logging code for non-text attachments
+
+-------------------------------------------------------------------

Old:
----
  rt-2.0.0.tar.gz

New:
----
  rt-2.0.1.tar.gz

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

Other differences:
------------------
++++++ python-rt.spec ++++++
--- /var/tmp/diff_new_pack.rzTFka/_old  2020-08-18 15:05:00.279890620 +0200
+++ /var/tmp/diff_new_pack.rzTFka/_new  2020-08-18 15:05:00.283890622 +0200
@@ -19,7 +19,7 @@
 # Tests require internet connection
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-rt
-Version:        2.0.0
+Version:        2.0.1
 Release:        0
 Summary:        Python interface to Request Tracker API
 License:        GPL-3.0-only

++++++ rt-2.0.0.tar.gz -> rt-2.0.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-2.0.0/PKG-INFO new/rt-2.0.1/PKG-INFO
--- old/rt-2.0.0/PKG-INFO       2020-02-12 17:40:16.000000000 +0100
+++ new/rt-2.0.1/PKG-INFO       2020-08-07 16:28:20.254234300 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: rt
-Version: 2.0.0
+Version: 2.0.1
 Summary: Python interface to Request Tracker API
 Home-page: https://github.com/CZ-NIC/python-rt
 Author: Jiri Machalek
@@ -71,6 +71,23 @@
             >>> tracker.logout()
             True
         
+        Get the last important updates from a specific queue that have been 
updated recently::
+        
+            >>> import rt
+            >>> tracker = rt.Rt('http://localhost/rt/REST/1.0/', 
http_auth=HTTPBasicAuth(os.environ['rtuser'], os.environ['rtpasswd']))
+            >>> tracker.default_queue = "my-queue"
+            >>> fifteen_minutes_ago = str(datetime.datetime.now() - 
datetime.timedelta(minutes=15))
+            >>> tickets = tracker.last_updated(since=fifteen_minutes_ago)
+            >>> for ticket in tickets:
+            >>>     id = ticket['id'][7:]
+            >>>     history = tracker.get_short_history(id)
+            >>>     last_update = list(reversed([h for h in history if 
h[1].startswith('Correspondence added') or h[1].startswith('Comments added')]))
+            >>>     hid = tracker.get_history(id, last_update[0][0] if 
last_update else history[0][0])[0]
+            >>>     print("http://localhost/rt/Ticket/Display.html?id=%s"; % id)
+            >>>     print(hid['Content'])
+            >>>     print("\n")
+                       
+                       
         Please use docstrings to see how to use different functions. They are 
written
         in ReStructuredText. You can also generate HTML documentation by 
running
         ``make html`` in doc directory (Sphinx required).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-2.0.0/README.rst new/rt-2.0.1/README.rst
--- old/rt-2.0.0/README.rst     2020-02-12 17:39:16.000000000 +0100
+++ new/rt-2.0.1/README.rst     2020-08-07 16:28:11.000000000 +0200
@@ -63,6 +63,23 @@
     >>> tracker.logout()
     True
 
+Get the last important updates from a specific queue that have been updated 
recently::
+
+    >>> import rt
+    >>> tracker = rt.Rt('http://localhost/rt/REST/1.0/', 
http_auth=HTTPBasicAuth(os.environ['rtuser'], os.environ['rtpasswd']))
+    >>> tracker.default_queue = "my-queue"
+    >>> fifteen_minutes_ago = str(datetime.datetime.now() - 
datetime.timedelta(minutes=15))
+    >>> tickets = tracker.last_updated(since=fifteen_minutes_ago)
+    >>> for ticket in tickets:
+    >>>     id = ticket['id'][7:]
+    >>>     history = tracker.get_short_history(id)
+    >>>     last_update = list(reversed([h for h in history if 
h[1].startswith('Correspondence added') or h[1].startswith('Comments added')]))
+    >>>     hid = tracker.get_history(id, last_update[0][0] if last_update 
else history[0][0])[0]
+    >>>     print("http://localhost/rt/Ticket/Display.html?id=%s"; % id)
+    >>>     print(hid['Content'])
+    >>>     print("\n")
+               
+               
 Please use docstrings to see how to use different functions. They are written
 in ReStructuredText. You can also generate HTML documentation by running
 ``make html`` in doc directory (Sphinx required).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-2.0.0/rt/rt.py new/rt-2.0.1/rt/rt.py
--- old/rt-2.0.0/rt/rt.py       2020-02-12 17:16:12.000000000 +0100
+++ new/rt-2.0.1/rt/rt.py       2020-08-07 16:28:11.000000000 +0200
@@ -195,7 +195,7 @@
             self.logger.debug("Request method: %s", method)
             self.logger.debug("Respone status code: %s", 
str(response.status_code))
             self.logger.debug("Response content:")
-            self.logger.debug(response.content.decode())
+            self.logger.debug(response.content.decode(errors='ignore'))
 
             if response.status_code == 401:
                 raise AuthorizationError('Server could not verify that you are 
authorized to access the requested document.')
@@ -672,6 +672,8 @@
         """
         post_data = self.__ticket_post_data(kwargs)
         msg = self.__request('ticket/{}/edit'.format(str(ticket_id)), 
post_data={'content': post_data})
+        if "" == msg:  # Ticket not modified
+            return True
         state = msg.split('\n')[2]
         return self.RE_PATTERNS['update_pattern'].match(state) is not None
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-2.0.0/rt.egg-info/PKG-INFO 
new/rt-2.0.1/rt.egg-info/PKG-INFO
--- old/rt-2.0.0/rt.egg-info/PKG-INFO   2020-02-12 17:40:16.000000000 +0100
+++ new/rt-2.0.1/rt.egg-info/PKG-INFO   2020-08-07 16:28:20.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: rt
-Version: 2.0.0
+Version: 2.0.1
 Summary: Python interface to Request Tracker API
 Home-page: https://github.com/CZ-NIC/python-rt
 Author: Jiri Machalek
@@ -71,6 +71,23 @@
             >>> tracker.logout()
             True
         
+        Get the last important updates from a specific queue that have been 
updated recently::
+        
+            >>> import rt
+            >>> tracker = rt.Rt('http://localhost/rt/REST/1.0/', 
http_auth=HTTPBasicAuth(os.environ['rtuser'], os.environ['rtpasswd']))
+            >>> tracker.default_queue = "my-queue"
+            >>> fifteen_minutes_ago = str(datetime.datetime.now() - 
datetime.timedelta(minutes=15))
+            >>> tickets = tracker.last_updated(since=fifteen_minutes_ago)
+            >>> for ticket in tickets:
+            >>>     id = ticket['id'][7:]
+            >>>     history = tracker.get_short_history(id)
+            >>>     last_update = list(reversed([h for h in history if 
h[1].startswith('Correspondence added') or h[1].startswith('Comments added')]))
+            >>>     hid = tracker.get_history(id, last_update[0][0] if 
last_update else history[0][0])[0]
+            >>>     print("http://localhost/rt/Ticket/Display.html?id=%s"; % id)
+            >>>     print(hid['Content'])
+            >>>     print("\n")
+                       
+                       
         Please use docstrings to see how to use different functions. They are 
written
         in ReStructuredText. You can also generate HTML documentation by 
running
         ``make html`` in doc directory (Sphinx required).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rt-2.0.0/setup.py new/rt-2.0.1/setup.py
--- old/rt-2.0.0/setup.py       2020-02-12 17:16:12.000000000 +0100
+++ new/rt-2.0.1/setup.py       2020-08-07 16:28:11.000000000 +0200
@@ -6,7 +6,7 @@
 README = open(os.path.join(here, 'README.rst')).read()
 
 setup(name='rt',
-      version='2.0.0',
+      version='2.0.1',
       description='Python interface to Request Tracker API',
       long_description=README,
       license='GNU General Public License (GPL)',


Reply via email to