Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-httplib2 for openSUSE:Factory 
checked in at 2021-05-20 19:23:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-httplib2 (Old)
 and      /work/SRC/openSUSE:Factory/.python-httplib2.new.2988 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-httplib2"

Thu May 20 19:23:24 2021 rev:50 rq:894163 version:0.19.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-httplib2/python-httplib2.changes  
2021-03-10 08:49:42.202421282 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-httplib2.new.2988/python-httplib2.changes    
    2021-05-20 19:23:49.286251400 +0200
@@ -1,0 +2,7 @@
+Tue May 18 21:47:33 UTC 2021 - Dirk M??ller <[email protected]>
+
+- update to 0.19.1:
+  * auth header parsing performance optimizations; Thanks to Paul McGuire
+  * Use mock from the standard library on Python>=3.3
+
+-------------------------------------------------------------------
@@ -16 +23 @@
-- update to 0.18.1:
+- update to 0.18.1: (bsc#1171998, CVE-2020-11078)

Old:
----
  httplib2-0.19.0.tar.gz

New:
----
  httplib2-0.19.1.tar.gz

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

Other differences:
------------------
++++++ python-httplib2.spec ++++++
--- /var/tmp/diff_new_pack.hDIgP6/_old  2021-05-20 19:23:49.810249183 +0200
+++ /var/tmp/diff_new_pack.hDIgP6/_new  2021-05-20 19:23:49.810249183 +0200
@@ -20,10 +20,10 @@
 # Tests require network connection
 %bcond_with tests
 Name:           python-httplib2
-Version:        0.19.0
+Version:        0.19.1
 Release:        0
 Summary:        A Python HTTP client library
-License:        MIT AND Apache-2.0 AND (MPL-1.1 OR GPL-2.0-or-later OR 
LGPL-2.1-or-later)
+License:        Apache-2.0 AND MIT AND (GPL-2.0-or-later OR MPL-1.1 OR 
LGPL-2.1-or-later)
 URL:            https://github.com/httplib2/httplib2
 Source:         
https://files.pythonhosted.org/packages/source/h/httplib2/httplib2-%{version}.tar.gz
 BuildRequires:  %{python_module setuptools}

++++++ httplib2-0.19.0.tar.gz -> httplib2-0.19.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/httplib2-0.19.0/CHANGELOG 
new/httplib2-0.19.1/CHANGELOG
--- old/httplib2-0.19.0/CHANGELOG       2021-02-07 21:07:21.000000000 +0100
+++ new/httplib2-0.19.1/CHANGELOG       2021-03-30 18:29:47.000000000 +0200
@@ -1,3 +1,9 @@
+0.19.1
+
+  auth header parsing performance optimizations; Thanks to Paul McGuire
+
+  Use mock from the standard library on Python>=3.3
+
 0.19.0
 
   auth: parse headers using pyparsing instead of regexp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/httplib2-0.19.0/PKG-INFO new/httplib2-0.19.1/PKG-INFO
--- old/httplib2-0.19.0/PKG-INFO        2021-02-07 21:07:45.000000000 +0100
+++ new/httplib2-0.19.1/PKG-INFO        2021-03-30 18:30:11.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: httplib2
-Version: 0.19.0
+Version: 0.19.1
 Summary: A comprehensive HTTP client library.
 Home-page: https://github.com/httplib2/httplib2
 Author: Joe Gregorio
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/httplib2-0.19.0/python2/httplib2/__init__.py 
new/httplib2-0.19.1/python2/httplib2/__init__.py
--- old/httplib2-0.19.0/python2/httplib2/__init__.py    2021-02-07 
21:07:21.000000000 +0100
+++ new/httplib2-0.19.1/python2/httplib2/__init__.py    2021-03-30 
18:29:47.000000000 +0200
@@ -19,7 +19,7 @@
     "Alex Yu",
 ]
 __license__ = "MIT"
-__version__ = "0.19.0"
+__version__ = "0.19.1"
 
 import base64
 import calendar
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/httplib2-0.19.0/python2/httplib2/auth.py 
new/httplib2-0.19.1/python2/httplib2/auth.py
--- old/httplib2-0.19.0/python2/httplib2/auth.py        2021-02-07 
21:07:21.000000000 +0100
+++ new/httplib2-0.19.1/python2/httplib2/auth.py        2021-03-30 
18:29:47.000000000 +0200
@@ -12,15 +12,17 @@
 # https://tools.ietf.org/html/rfc7235#appendix-B
 tchar = "!#$%&'*+-.^_`|~" + pp.nums + pp.alphas
 token = pp.Word(tchar).setName("token")
-token68 = pp.Combine(pp.Word("-._~+/" + pp.nums + pp.alphas) + 
pp.ZeroOrMore("=")).setName("token68")
+token68 = pp.Combine(pp.Word("-._~+/" + pp.nums + pp.alphas) + 
pp.Optional(pp.Word("=").leaveWhitespace())).setName(
+    "token68"
+)
 
 quoted_string = 
pp.dblQuotedString.copy().setName("quoted-string").setParseAction(unquote)
 auth_param_name = 
token.copy().setName("auth-param-name").addParseAction(pp.downcaseTokens)
-auth_param = auth_param_name + pp.Suppress("=") + (token ^ quoted_string)
+auth_param = auth_param_name + pp.Suppress("=") + (quoted_string | token)
 params = pp.Dict(pp.delimitedList(pp.Group(auth_param)))
 
 scheme = token("scheme")
-challenge = scheme + (token68("token") ^ params("params"))
+challenge = scheme + (params("params") | token68("token"))
 
 authentication_info = params.copy()
 www_authenticate = pp.delimitedList(pp.Group(challenge))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/httplib2-0.19.0/python3/httplib2/__init__.py 
new/httplib2-0.19.1/python3/httplib2/__init__.py
--- old/httplib2-0.19.0/python3/httplib2/__init__.py    2021-02-07 
21:07:21.000000000 +0100
+++ new/httplib2-0.19.1/python3/httplib2/__init__.py    2021-03-30 
18:29:47.000000000 +0200
@@ -15,7 +15,7 @@
     "Alex Yu",
 ]
 __license__ = "MIT"
-__version__ = "0.19.0"
+__version__ = "0.19.1"
 
 import base64
 import calendar
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/httplib2-0.19.0/python3/httplib2/auth.py 
new/httplib2-0.19.1/python3/httplib2/auth.py
--- old/httplib2-0.19.0/python3/httplib2/auth.py        2021-02-07 
21:07:21.000000000 +0100
+++ new/httplib2-0.19.1/python3/httplib2/auth.py        2021-03-30 
18:29:47.000000000 +0200
@@ -12,15 +12,17 @@
 # https://tools.ietf.org/html/rfc7235#appendix-B
 tchar = "!#$%&'*+-.^_`|~" + pp.nums + pp.alphas
 token = pp.Word(tchar).setName("token")
-token68 = pp.Combine(pp.Word("-._~+/" + pp.nums + pp.alphas) + 
pp.ZeroOrMore("=")).setName("token68")
+token68 = pp.Combine(pp.Word("-._~+/" + pp.nums + pp.alphas) + 
pp.Optional(pp.Word("=").leaveWhitespace())).setName(
+    "token68"
+)
 
 quoted_string = 
pp.dblQuotedString.copy().setName("quoted-string").setParseAction(unquote)
 auth_param_name = 
token.copy().setName("auth-param-name").addParseAction(pp.downcaseTokens)
-auth_param = auth_param_name + pp.Suppress("=") + (token ^ quoted_string)
+auth_param = auth_param_name + pp.Suppress("=") + (quoted_string | token)
 params = pp.Dict(pp.delimitedList(pp.Group(auth_param)))
 
 scheme = token("scheme")
-challenge = scheme + (token68("token") ^ params("params"))
+challenge = scheme + (params("params") | token68("token"))
 
 authentication_info = params.copy()
 www_authenticate = pp.delimitedList(pp.Group(challenge))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/httplib2-0.19.0/python3/httplib2.egg-info/PKG-INFO 
new/httplib2-0.19.1/python3/httplib2.egg-info/PKG-INFO
--- old/httplib2-0.19.0/python3/httplib2.egg-info/PKG-INFO      2021-02-07 
21:07:45.000000000 +0100
+++ new/httplib2-0.19.1/python3/httplib2.egg-info/PKG-INFO      2021-03-30 
18:30:11.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: httplib2
-Version: 0.19.0
+Version: 0.19.1
 Summary: A comprehensive HTTP client library.
 Home-page: https://github.com/httplib2/httplib2
 Author: Joe Gregorio
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/httplib2-0.19.0/requirements-test.txt 
new/httplib2-0.19.1/requirements-test.txt
--- old/httplib2-0.19.0/requirements-test.txt   2021-02-07 21:07:21.000000000 
+0100
+++ new/httplib2-0.19.1/requirements-test.txt   2021-03-30 18:29:47.000000000 
+0200
@@ -1,6 +1,6 @@
 flake8==3.4.1
 future==0.16.0
-mock==2.0.0
+mock==2.0.0;python_version<"3.3"
 pytest-cov==2.5.1
 pytest-forked==0.2
 pytest-randomly==1.2.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/httplib2-0.19.0/setup.py new/httplib2-0.19.1/setup.py
--- old/httplib2-0.19.0/setup.py        2021-02-07 21:07:21.000000000 +0100
+++ new/httplib2-0.19.1/setup.py        2021-03-30 18:29:47.000000000 +0200
@@ -4,7 +4,7 @@
 import sys
 
 pkgdir = {"": "python%s" % sys.version_info[0]}
-VERSION = "0.19.0"
+VERSION = "0.19.1"
 
 
 # `python setup.py test` uses existing Python environment, no virtualenv, no 
pip.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/httplib2-0.19.0/tests/__init__.py 
new/httplib2-0.19.1/tests/__init__.py
--- old/httplib2-0.19.0/tests/__init__.py       2021-02-07 21:07:21.000000000 
+0100
+++ new/httplib2-0.19.1/tests/__init__.py       2021-03-30 18:29:47.000000000 
+0200
@@ -7,12 +7,10 @@
 import functools
 import gzip
 import hashlib
-import httplib2
 import os
 import random
 import re
 import shutil
-import six
 import socket
 import ssl
 import struct
@@ -21,8 +19,11 @@
 import time
 import traceback
 import zlib
-from six.moves import http_client, queue
 
+import httplib2
+import pytest
+import six
+from six.moves import http_client, queue
 
 DUMMY_URL = "http://127.0.0.1:1";
 DUMMY_HTTPS_URL = "https://127.0.0.1:2";
@@ -34,6 +35,9 @@
 CLIENT_ENCRYPTED_PEM = os.path.join(tls_dir, "client_encrypted.pem")
 SERVER_PEM = os.path.join(tls_dir, "server.pem")
 SERVER_CHAIN = os.path.join(tls_dir, "server_chain.pem")
+skip_benchmark = pytest.mark.skipif(
+    os.getenv("httplib2_test_bench", "") != "1", reason="benchmark disabled by 
default, set env httplib2_test_bench=1",
+)
 
 
 @contextlib.contextmanager
@@ -629,14 +633,17 @@
                     # do we need to save nc only on success?
                     glastnc[0] = client_nc
                     allow_headers = {
-                        "authentication-info": ", ".join(filter(None,
-                            (
-                                'nextnonce="{}"'.format(nextnonce) if 
nextnonce else "",
-                                "qop={}".format(client_qop),
-                                'rspauth="{}"'.format(rspauth),
-                                'cnonce="{}"'.format(client_cnonce),
-                                "nc={}".format(client_nc),
-                            ))
+                        "authentication-info": ", ".join(
+                            filter(
+                                None,
+                                (
+                                    'nextnonce="{}"'.format(nextnonce) if 
nextnonce else "",
+                                    "qop={}".format(client_qop),
+                                    'rspauth="{}"'.format(rspauth),
+                                    'cnonce="{}"'.format(client_cnonce),
+                                    "nc={}".format(client_nc),
+                                ),
+                            )
                         ).strip()
                     }
                     return make_http_reflect(headers=allow_headers)(request)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/httplib2-0.19.0/tests/test_auth.py 
new/httplib2-0.19.1/tests/test_auth.py
--- old/httplib2-0.19.0/tests/test_auth.py      2021-02-07 21:07:21.000000000 
+0100
+++ new/httplib2-0.19.1/tests/test_auth.py      2021-03-30 18:29:47.000000000 
+0200
@@ -246,6 +246,49 @@
     assert error < 2, "_parse_www_authenticate scales too fast"
 
 
[email protected]_benchmark
[email protected](
+    "data",
+    (
+        'Basic realm="me", algorithm="MD5"',
+        'Digest realm="digest1", qop="auth,auth-int", nonce="7102dd2", 
opaque="e9517f"',
+        'Digest realm="2-comma-d", qop="auth-int", nonce="c0c8ff1", Basic 
realm="2-comma-b"',
+        "Bearer 0b79bab50daca910b000d4f1a2b675d604257e42",
+    ),
+)
+def test_benchmark_parse_www_authenticate(data):
+    # TODO just use time.process_time() after python2 support is removed
+    process_time = getattr(time, "process_time", time.time)
+
+    def measure(header, loop):
+        tbegin = process_time()
+        for _ in range(loop):
+            httplib2.auth._parse_www_authenticate(header)
+        tend = process_time()
+        elapsed_us = round((tend * 1e6) - (tbegin * 1e6), 0)
+        return elapsed_us
+
+    header = {"www-authenticate": data}
+    min_time = 1e6
+    repeat = 7
+
+    # timeit.autorange
+    loop = 1
+    while True:
+        elapsed_us = measure(header, loop)
+        if elapsed_us >= min_time:
+            break
+        elif elapsed_us < min_time / 10:
+            k = 10.0
+        else:
+            k = 1.2
+        loop = int(loop * k) + 1
+
+    fastest = min(measure(header, loop) for _ in range(repeat))
+    speed = int(fastest / loop)
+    print("x{} time={}us speed={} us/op".format(loop, fastest, speed))
+
+
 def test_digest_object():
     credentials = ("joe", "password")
     host = None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/httplib2-0.19.0/tests/test_cacerts_from_env.py 
new/httplib2-0.19.1/tests/test_cacerts_from_env.py
--- old/httplib2-0.19.0/tests/test_cacerts_from_env.py  2021-02-07 
21:07:21.000000000 +0100
+++ new/httplib2-0.19.1/tests/test_cacerts_from_env.py  2021-03-30 
18:29:47.000000000 +0200
@@ -1,6 +1,9 @@
 import os
 import sys
-import mock
+try:
+    from unittest import mock
+except ImportError:
+    import mock
 import pytest
 import tempfile
 import httplib2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/httplib2-0.19.0/tests/test_http.py 
new/httplib2-0.19.1/tests/test_http.py
--- old/httplib2-0.19.0/tests/test_http.py      2021-02-07 21:07:21.000000000 
+0100
+++ new/httplib2-0.19.1/tests/test_http.py      2021-03-30 18:29:47.000000000 
+0200
@@ -5,7 +5,10 @@
 import email.utils
 import errno
 import httplib2
-import mock
+try:
+    from unittest import mock
+except ImportError:
+    import mock
 import os
 import pytest
 from six.moves import http_client, urllib
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/httplib2-0.19.0/tests/test_other.py 
new/httplib2-0.19.1/tests/test_other.py
--- old/httplib2-0.19.0/tests/test_other.py     2021-02-07 21:07:21.000000000 
+0100
+++ new/httplib2-0.19.1/tests/test_other.py     2021-03-30 18:29:47.000000000 
+0200
@@ -1,5 +1,8 @@
 import httplib2
-import mock
+try:
+    from unittest import mock
+except ImportError:
+    import mock
 import os
 import pickle
 import pytest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/httplib2-0.19.0/tests/test_proxy.py 
new/httplib2-0.19.1/tests/test_proxy.py
--- old/httplib2-0.19.0/tests/test_proxy.py     2021-02-07 21:07:21.000000000 
+0100
+++ new/httplib2-0.19.1/tests/test_proxy.py     2021-03-30 18:29:47.000000000 
+0200
@@ -9,7 +9,10 @@
 from __future__ import print_function
 
 import httplib2
-import mock
+try:
+    from unittest import mock
+except ImportError:
+    import mock
 import os
 import pytest
 import socket

Reply via email to