Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-openqa_review for
openSUSE:Factory checked in at 2021-06-23 17:38:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-openqa_review (Old)
and /work/SRC/openSUSE:Factory/.python-openqa_review.new.2625 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-openqa_review"
Wed Jun 23 17:38:16 2021 rev:38 rq:901431 version:1.21.2
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-openqa_review/python-openqa_review.changes
2021-06-21 20:36:29.782685642 +0200
+++
/work/SRC/openSUSE:Factory/.python-openqa_review.new.2625/python-openqa_review.changes
2021-06-23 17:38:20.396480390 +0200
@@ -1,0 +2,6 @@
+Wed Jun 23 09:14:36 UTC 2021 - [email protected]
+
+- Update to version 1.21.2:
+ * Replace retry loop with Retry from urllib3
+
+-------------------------------------------------------------------
Old:
----
python-openqa_review-1.21.1.obscpio
New:
----
python-openqa_review-1.21.2.obscpio
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-openqa_review.spec ++++++
--- /var/tmp/diff_new_pack.LFwR3D/_old 2021-06-23 17:38:21.096481354 +0200
+++ /var/tmp/diff_new_pack.LFwR3D/_new 2021-06-23 17:38:21.100481359 +0200
@@ -31,7 +31,7 @@
%define binaries openqa-review openqa-review-daily-email
openqa-review-sles-ha tumblesle-release openqa-review-functional_yast_concise
%define oldpython python
Name: python-%{short_name}%{?name_ext}
-Version: 1.21.1
+Version: 1.21.2
Release: 0
Summary: A review helper script for openQA
License: MIT
++++++ python-openqa_review-1.21.1.obscpio ->
python-openqa_review-1.21.2.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-openqa_review-1.21.1/openqa_review/browser.py
new/python-openqa_review-1.21.2/openqa_review/browser.py
--- old/python-openqa_review-1.21.1/openqa_review/browser.py 2021-06-21
11:35:26.000000000 +0200
+++ new/python-openqa_review-1.21.2/openqa_review/browser.py 2021-06-23
11:11:22.000000000 +0200
@@ -14,6 +14,8 @@
import ssl
import requests
+from requests.adapters import HTTPAdapter
+from requests.packages.urllib3.util.retry import Retry
from bs4 import BeautifulSoup
from sortedcontainers import SortedDict
@@ -112,52 +114,41 @@
return content
def _get(self, url, as_json=False): # pragma: no cover
- last_error = ""
- for i in range(1, 7):
+ retries = Retry(total=7, backoff_factor=2, status_forcelist=[429, 500,
502, 503, 504])
+ http = requests.Session()
+ parsed_url = urlparse(url)
+ http.mount("{}://".format(parsed_url.scheme),
HTTPAdapter(max_retries=retries))
+
+ try:
+ r = http.get(url, auth=self.auth, timeout=2.5)
+ except requests.exceptions.SSLError as e:
try:
- r = requests.get(url, auth=self.auth)
- except requests.exceptions.SSLError as e:
- try:
- import OpenSSL
- except ImportError:
- raise e
- # as we go one layer deeper from http now, we're just
interested in the hostname
- server_name = urlparse(url).netloc
- cert = ssl.get_server_certificate((server_name, 443))
- x509 =
OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM, cert)
- issuer_components = x509.get_issuer().get_components()
- # we're only interested in the b'O'rganizational unit
- issuers = filter(lambda component: component[0] == b"O",
issuer_components)
- issuer = next(issuers)[1].decode("utf-8", "ignore")
- sha1digest = x509.digest("sha1").decode("utf-8", "ignore")
- sha256digest = x509.digest("sha256").decode("utf-8", "ignore")
- msg = 'Certificate for "%s" from "%s" (sha1: %s, sha256 %s) is
not trusted by the system' % (
- server_name,
- issuer,
- sha1digest,
- sha256digest,
- )
- log.error(msg)
- raise DownloadError(msg)
- except requests.exceptions.ConnectionError as e:
- # Save the status code for the for/else branch
- last_error = ": {}".format(str(e))
- log.info("Connection error encountered accessing %s, retrying
try %s" % (url, i))
- continue
- # Save the status code for the for/else branch
- last_error = ": Request failed with status
{}".format(r.status_code)
- if r.status_code in {502, 503, 504}:
- log.info("Request to %s failed with status code %s, retrying
try %s" % (url, r.status_code, i))
- continue
- if r.status_code != 200:
- msg = "Request to %s was not successful, status code: %s" %
(url, r.status_code)
- log.info(msg)
- raise DownloadError(msg)
- break
- else:
- msg = "Request to {} was not successful after {}
retries{}".format(url, i, last_error)
+ import OpenSSL
+ except ImportError:
+ raise e
+ # as we go one layer deeper from http now, we're just interested
in the hostname
+ server_name = parsed_url.netloc
+ cert = ssl.get_server_certificate((server_name, 443))
+ x509 =
OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM, cert)
+ issuer_components = x509.get_issuer().get_components()
+ # we're only interested in the b'O'rganizational unit
+ issuers = filter(lambda component: component[0] == b"O",
issuer_components)
+ issuer = next(issuers)[1].decode("utf-8", "ignore")
+ sha1digest = x509.digest("sha1").decode("utf-8", "ignore")
+ sha256digest = x509.digest("sha256").decode("utf-8", "ignore")
+ msg = 'Certificate for "%s" from "%s" (sha1: %s, sha256 %s) is not
trusted by the system' % (
+ server_name,
+ issuer,
+ sha1digest,
+ sha256digest,
+ )
+ log.error(msg)
+ raise DownloadError(msg)
+ except requests.exceptions.ConnectionError as e:
+ msg = "Request to {} was not successful after {} retries:
{}".format(url, retries.total, str(e))
log.warn(msg)
raise DownloadError(msg)
+
content = r.json() if as_json else r.content.decode("utf8")
return content
++++++ python-openqa_review.obsinfo ++++++
--- /var/tmp/diff_new_pack.LFwR3D/_old 2021-06-23 17:38:21.556481987 +0200
+++ /var/tmp/diff_new_pack.LFwR3D/_new 2021-06-23 17:38:21.556481987 +0200
@@ -1,5 +1,5 @@
name: python-openqa_review
-version: 1.21.1
-mtime: 1624268126
-commit: 517239d5b13af0b3cade59c49eb34beb21d7a750
+version: 1.21.2
+mtime: 1624439482
+commit: a478590cb222c60bef066a542116df38f46ec823