[packages/python-httplib2] - updated to 0.20.4

qboosh qboosh at pld-linux.org
Thu Apr 28 16:53:49 CEST 2022


commit 16d55c0b8ff4db0789c5b6b89aab881cb79d227c
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Apr 28 16:54:06 2022 +0200

    - updated to 0.20.4

 python-httplib2-0.9-proxy-http.patch | 13 +++---
 python-httplib2-mock.patch           | 76 ------------------------------------
 python-httplib2.spec                 | 30 +++++++++-----
 3 files changed, 27 insertions(+), 92 deletions(-)
---
diff --git a/python-httplib2.spec b/python-httplib2.spec
index 620779d..d221aab 100644
--- a/python-httplib2.spec
+++ b/python-httplib2.spec
@@ -8,16 +8,15 @@
 Summary:	A comprehensive HTTP client library
 Summary(pl.UTF-8):	Obszerna biblioteka klienta HTTP
 Name:		python-httplib2
-Version:	0.18.1
-Release:	5
+Version:	0.20.4
+Release:	1
 License:	MIT
 Group:		Development/Languages/Python
 #Source0Download: https://github.com/httplib2/httplib2/releases
 Source0:	https://github.com/httplib2/httplib2/archive/v%{version}/httplib2-%{version}.tar.gz
-# Source0-md5:	883f17828619757836ff510c42a7cca8
+# Source0-md5:	f62908a43ea18cd81dd71e4380b869dd
 Patch0:		%{name}.certfile.patch
 Patch1:		%{name}-0.9-proxy-http.patch
-Patch2:		%{name}-mock.patch
 URL:		https://github.com/httplib2/httplib2
 %if %{with python2}
 BuildRequires:	python-modules >= 1:2.7
@@ -25,9 +24,14 @@ BuildRequires:	python-setuptools
 %if %{with tests}
 BuildRequires:	python-future >= 0.16.0
 BuildRequires:	python-mock >= 2.0.0
-BuildRequires:	python-pytest >= 3.2.1
+BuildRequires:	python-pyparsing >= 2.4.2
+BuildRequires:	python-pyparsing < 3
+BuildRequires:	python-pytest >= 4.6.11
 BuildRequires:	python-pytest-cov >= 2.5.1
-BuildRequires:	python-pytest-timeout >= 1.2.0
+BuildRequires:	python-pytest-forked >= 1.3.0
+# >= 2.12.1
+BuildRequires:	python-pytest-randomly >= 1.2.3
+BuildRequires:	python-pytest-timeout >= 1.4.2
 BuildRequires:	python-six >= 1.10.0
 %endif
 %endif
@@ -35,9 +39,14 @@ BuildRequires:	python-six >= 1.10.0
 BuildRequires:	python3-modules >= 1:3.4
 BuildRequires:	python3-setuptools
 %if %{with tests}
-BuildRequires:	python3-pytest >= 3.2.1
+BuildRequires:	python3-pyparsing >= 2.4.2
+BuildRequires:	python3-pyparsing < 4
+BuildRequires:	python3-pytest >= 6.1.2
 BuildRequires:	python3-pytest-cov >= 2.5.1
-BuildRequires:	python3-pytest-timeout >= 1.2.0
+# >= 2.12.1
+BuildRequires:	python3-pytest-forked >= 1.3.0
+BuildRequires:	python3-pytest-randomly >= 1.2.3
+BuildRequires:	python3-pytest-timeout >= 1.4.2
 BuildRequires:	python3-six >= 1.10.0
 %endif
 %endif
@@ -112,13 +121,14 @@ cech pomijanych przez inne biblioteki. Obsługuje:
 %setup -q -n httplib2-%{version}
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
 
 %build
 %if %{with python2}
 %py_build
 
 %if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTEST_PLUGINS=pytest_cov.plugin,pytest_timeout \
 PYTHONPATH=$(pwd)/build-2/lib \
 %{__python} -m pytest tests -k 'not test_certs_file_from_builtin and not test_certs_file_from_environment and not test_ipv6 and not test_with_certifi_removed_from_modules and not test_noproxy_star'
 %endif
@@ -129,6 +139,8 @@ PYTHONPATH=$(pwd)/build-2/lib \
 
 %if %{with tests}
 # in python3 implementation system socks module is preferred over httplib2.socks, and the first is incompatible with test_socks5_auth
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTEST_PLUGINS=pytest_cov.plugin,pytest_timeout \
 PYTHONPATH=$(pwd)/build-3/lib \
 %{__python3} -m pytest tests -k 'not test_certs_file_from_builtin and not test_certs_file_from_environment and not test_ipv6 and not test_with_certifi_removed_from_modules and not test_noproxy_star and not test_server_not_found_error_is_raised_for_invalid_hostname and not test_socks5_auth'
 %endif
diff --git a/python-httplib2-0.9-proxy-http.patch b/python-httplib2-0.9-proxy-http.patch
index 0375dfc..7f050e6 100644
--- a/python-httplib2-0.9-proxy-http.patch
+++ b/python-httplib2-0.9-proxy-http.patch
@@ -1,9 +1,8 @@
-diff -urNp -x '*.orig' httplib2-0.18.1.org/python2/httplib2/__init__.py httplib2-0.18.1/python2/httplib2/__init__.py
---- httplib2-0.18.1.org/python2/httplib2/__init__.py	2020-05-20 21:56:40.000000000 +0200
-+++ httplib2-0.18.1/python2/httplib2/__init__.py	2021-03-04 20:42:47.647805415 +0100
-@@ -1122,7 +1122,10 @@ def proxy_info_from_url(url, method="htt
-     else:
-         port = dict(https=443, http=80)[method]
+--- httplib2-0.20.4/python2/httplib2/__init__.py.orig	2022-04-28 06:26:39.115490769 +0200
++++ httplib2-0.20.4/python2/httplib2/__init__.py	2022-04-28 06:29:49.124461403 +0200
+@@ -962,7 +962,10 @@ def proxy_info_from_url(url, method="htt
+     """
+     url = urlparse.urlparse(url)
  
 -    proxy_type = 3  # socks.PROXY_TYPE_HTTP
 +    if method == 'http':
@@ -12,4 +11,4 @@ diff -urNp -x '*.orig' httplib2-0.18.1.org/python2/httplib2/__init__.py httplib2
 +        proxy_type = 3  # socks.PROXY_TYPE_HTTP
      pi = ProxyInfo(
          proxy_type=proxy_type,
-         proxy_host=host,
+         proxy_host=url.hostname,
diff --git a/python-httplib2-mock.patch b/python-httplib2-mock.patch
deleted file mode 100644
index 09cd57b..0000000
--- a/python-httplib2-mock.patch
+++ /dev/null
@@ -1,76 +0,0 @@
---- httplib2-0.17.0/tests/test_cacerts_from_env.py.orig	2020-01-24 14:57:26.000000000 +0100
-+++ httplib2-0.17.0/tests/test_cacerts_from_env.py	2020-03-23 20:44:34.443627324 +0100
-@@ -1,10 +1,12 @@
- import os
- import sys
--import mock
- import pytest
- import tempfile
- import httplib2
--
-+try:
-+    import mock
-+except ImportError:
-+    from unittest import mock
- 
- CA_CERTS_BUILTIN = os.path.join(os.path.dirname(httplib2.__file__), "cacerts.txt")
- CERTIFI_CERTS_FILE = "unittest_certifi_file"
---- httplib2-0.17.0/tests/test_http.py.orig	2020-01-24 14:57:26.000000000 +0100
-+++ httplib2-0.17.0/tests/test_http.py	2020-03-23 20:45:02.520141887 +0100
-@@ -5,13 +5,15 @@
- import email.utils
- import errno
- import httplib2
--import mock
- import os
- import pytest
- from six.moves import http_client, urllib
- import socket
- import tests
--
-+try:
-+    import mock
-+except ImportError:
-+    from unittest import mock
- 
- def _raise_connection_refused_exception(*args, **kwargs):
-     raise socket.error(errno.ECONNREFUSED, "Connection refused.")
---- httplib2-0.17.0/tests/test_other.py.orig	2020-01-24 14:57:26.000000000 +0100
-+++ httplib2-0.17.0/tests/test_other.py	2020-03-23 20:45:22.020036247 +0100
-@@ -1,5 +1,4 @@
- import httplib2
--import mock
- import os
- import pickle
- import pytest
-@@ -8,7 +7,10 @@
- import tests
- import time
- from six.moves import urllib
--
-+try:
-+    import mock
-+except ImportError:
-+    from unittest import mock
- 
- @pytest.mark.skipif(
-     sys.version_info <= (3,),
---- httplib2-0.17.0/tests/test_proxy.py.orig	2020-01-24 14:57:26.000000000 +0100
-+++ httplib2-0.17.0/tests/test_proxy.py	2020-03-23 20:45:42.219926815 +0100
-@@ -9,12 +9,15 @@
- from __future__ import print_function
- 
- import httplib2
--import mock
- import os
- import pytest
- import socket
- import tests
- from six.moves import urllib
-+try:
-+    import mock
-+except ImportError:
-+    from unittest import mock
- 
- 
- def _raise_name_not_known_error(*args, **kwargs):
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-httplib2.git/commitdiff/16d55c0b8ff4db0789c5b6b89aab881cb79d227c



More information about the pld-cvs-commit mailing list