Hello community,

here is the log from the commit of package python-pytest-check-links for 
openSUSE:Leap:15.2 checked in at 2020-04-12 15:39:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-pytest-check-links (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.python-pytest-check-links.new.3248 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pytest-check-links"

Sun Apr 12 15:39:41 2020 rev:2 rq:793353 version:0.3.2

Changes:
--------
--- 
/work/SRC/openSUSE:Leap:15.2/python-pytest-check-links/python-pytest-check-links.changes
    2020-02-19 18:44:19.666550151 +0100
+++ 
/work/SRC/openSUSE:Leap:15.2/.python-pytest-check-links.new.3248/python-pytest-check-links.changes
  2020-04-12 15:39:42.574072005 +0200
@@ -1,0 +2,6 @@
+Fri Apr  3 09:47:03 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Update to 0.3.2:
+  * no upstream changelog
+
+-------------------------------------------------------------------

Old:
----
  pytest_check_links-0.3.0.tar.gz

New:
----
  pytest_check_links-0.3.2.tar.gz

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

Other differences:
------------------
++++++ python-pytest-check-links.spec ++++++
--- /var/tmp/diff_new_pack.1dcc7a/_old  2020-04-12 15:39:42.846072211 +0200
+++ /var/tmp/diff_new_pack.1dcc7a/_new  2020-04-12 15:39:42.846072211 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pytest-check-links
 #
-# 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
@@ -20,11 +20,10 @@
 # Tests natually require internet
 %bcond_with test
 Name:           python-pytest-check-links
-Version:        0.3.0
+Version:        0.3.2
 Release:        0
 Summary:        Pytest plugin for checking links in files
 License:        BSD-3-Clause
-Group:          Development/Languages/Python
 URL:            https://github.com/minrk/pytest-check-links
 Source:         
https://files.pythonhosted.org/packages/source/p/pytest_check_links/pytest_check_links-%{version}.tar.gz
 BuildRequires:  %{python_module devel}

++++++ pytest_check_links-0.3.0.tar.gz -> pytest_check_links-0.3.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest_check_links-0.3.0/AUTHORS 
new/pytest_check_links-0.3.2/AUTHORS
--- old/pytest_check_links-0.3.0/AUTHORS        2019-03-21 14:36:01.000000000 
+0100
+++ new/pytest_check_links-0.3.2/AUTHORS        2020-03-30 11:50:04.000000000 
+0200
@@ -1,4 +1,5 @@
 Ian Rose <[email protected]>
 Min RK <[email protected]>
 Steven Silvester <[email protected]>
+Steven Silvester <[email protected]>
 Vidar Tonaas Fauske <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest_check_links-0.3.0/ChangeLog 
new/pytest_check_links-0.3.2/ChangeLog
--- old/pytest_check_links-0.3.0/ChangeLog      2019-03-21 14:36:01.000000000 
+0100
+++ new/pytest_check_links-0.3.2/ChangeLog      2020-03-30 11:50:04.000000000 
+0200
@@ -1,6 +1,17 @@
 CHANGES
 =======
 
+0.3.2
+-----
+
+* Add note about pbr
+
+0.3.1
+-----
+
+* remove redundant check
+* Honor Retry-After header
+
 0.3.0
 -----
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest_check_links-0.3.0/PKG-INFO 
new/pytest_check_links-0.3.2/PKG-INFO
--- old/pytest_check_links-0.3.0/PKG-INFO       2019-03-21 14:36:02.000000000 
+0100
+++ new/pytest_check_links-0.3.2/PKG-INFO       2020-03-30 11:50:04.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pytest_check_links
-Version: 0.3.0
+Version: 0.3.2
 Summary: Check links in files
 Home-page: https://github.com/minrk/pytest-check-links
 Author: Min RK
@@ -34,8 +34,7 @@
         - test myself, obvs!
         
         
-Keywords: setup
-distutils
+Keywords: setup,distutils
 Platform: UNKNOWN
 Classifier: Intended Audience :: Developers
 Classifier: License :: OSI Approved :: BSD License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pytest_check_links-0.3.0/pytest_check_links/plugin.py 
new/pytest_check_links-0.3.2/pytest_check_links/plugin.py
--- old/pytest_check_links-0.3.0/pytest_check_links/plugin.py   2019-01-09 
09:39:50.000000000 +0100
+++ new/pytest_check_links-0.3.2/pytest_check_links/plugin.py   2020-03-30 
11:40:43.000000000 +0200
@@ -1,6 +1,7 @@
 from docutils.core import publish_parts
 import io
 import os
+import time
 import warnings
 from six.moves.urllib.request import urlopen, Request
 from six.moves.urllib.parse import unquote
@@ -150,6 +151,7 @@
     def __init__(self, name, parent, target, description=''):
         super(LinkItem, self).__init__(name, parent)
         self.target = target
+        self.retry_attempts = 0
         self.description = description or '{}: {}'.format(self.fspath, target)
 
     def repr_failure(self, excinfo):
@@ -162,6 +164,25 @@
     def reportinfo(self):
         return self.fspath, 0, self.description
 
+    def handle_retry(self, obj):
+        """Handle responses with a Retry-After header.
+
+        https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.37
+        """
+        if self.retry_attempts < 3:
+            try:
+                sleep_time = int(obj.headers['Retry-After'])
+            except ValueError:
+                sleep_time = 10
+            # Github uses this non-conforming Retry-After
+            if obj.headers['Retry-After'] == '1m0s':
+                sleep_time = 60
+            self.retry_attempts += 1
+            time.sleep(sleep_time)
+            return self.runtest()
+
+        raise BrokenLinkError(self.target, "%s %s" % (obj.code, obj.reason))
+
     def runtest(self):
         if ':' in self.target:
             # external reference, download
@@ -170,11 +191,15 @@
             try:
                 f = urlopen(req)
             except Exception as e:
+                if hasattr(e, 'headers') and 'Retry-After' in e.headers:
+                    return self.handle_retry(e)
                 raise BrokenLinkError(self.target, str(e))
             else:
                 code = f.getcode()
                 f.close()
                 if code >= 400:
+                    if 'Retry-After' in f.headers:
+                        return self.handle_retry(e)
                     raise BrokenLinkError(self.target, str(code))
         else:
             if self.target.startswith('/'):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pytest_check_links-0.3.0/pytest_check_links.egg-info/PKG-INFO 
new/pytest_check_links-0.3.2/pytest_check_links.egg-info/PKG-INFO
--- old/pytest_check_links-0.3.0/pytest_check_links.egg-info/PKG-INFO   
2019-03-21 14:36:02.000000000 +0100
+++ new/pytest_check_links-0.3.2/pytest_check_links.egg-info/PKG-INFO   
2020-03-30 11:50:04.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pytest-check-links
-Version: 0.3.0
+Version: 0.3.2
 Summary: Check links in files
 Home-page: https://github.com/minrk/pytest-check-links
 Author: Min RK
@@ -34,8 +34,7 @@
         - test myself, obvs!
         
         
-Keywords: setup
-distutils
+Keywords: setup,distutils
 Platform: UNKNOWN
 Classifier: Intended Audience :: Developers
 Classifier: License :: OSI Approved :: BSD License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pytest_check_links-0.3.0/pytest_check_links.egg-info/pbr.json 
new/pytest_check_links-0.3.2/pytest_check_links.egg-info/pbr.json
--- old/pytest_check_links-0.3.0/pytest_check_links.egg-info/pbr.json   
2019-03-21 14:36:02.000000000 +0100
+++ new/pytest_check_links-0.3.2/pytest_check_links.egg-info/pbr.json   
2020-03-30 11:50:04.000000000 +0200
@@ -1 +1 @@
-{"git_version": "972f17e", "is_release": true}
\ No newline at end of file
+{"git_version": "9d4396b", "is_release": false}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest_check_links-0.3.0/setup.py 
new/pytest_check_links-0.3.2/setup.py
--- old/pytest_check_links-0.3.0/setup.py       2017-02-09 14:02:55.000000000 
+0100
+++ new/pytest_check_links-0.3.2/setup.py       2020-03-30 11:49:31.000000000 
+0200
@@ -2,6 +2,8 @@
 
 from setuptools import setup
 
+# This repository uses pbr - Python Build Reasonableness
+# The version is set by the current git tag + describe status.
 setup(
     setup_requires=['pbr>=1.9', 'setuptools>=17.1'],
     pbr=True,


Reply via email to