14
0

Accepting request 855327 from home:mcepl:branches:devel:tools:scm

- Add remove_mock.patch to remove dependency on the external mock
  package (gh#urllib3/urllib3#2108).

OBS-URL: https://build.opensuse.org/request/show/855327
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=107
This commit is contained in:
2020-12-12 11:58:21 +00:00
committed by Git OBS Bridge
parent 36a5e3eac9
commit 27a1b50886
3 changed files with 193 additions and 4 deletions

View File

@@ -37,6 +37,9 @@ URL: https://urllib3.readthedocs.org/
Source: https://files.pythonhosted.org/packages/source/u/urllib3/urllib3-%{version}.tar.gz
# Wrapper for ssl to unbundle ssl_match_hostname
Source1: ssl_match_hostname_py3.py
# PATCH-FIX-UPSTREAM remove_mock.patch gh#urllib3/urllib3#2108 mcepl@suse.com
# remove dependency on the external module mock
Patch0: remove_mock.patch
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
BuildRequires: fdupes
@@ -58,7 +61,6 @@ BuildRequires: %{oldpython}
%if %{with test}
BuildRequires: %{python_module PySocks >= 1.5.6}
BuildRequires: %{python_module brotlipy >= 0.6.0}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module psutil}
BuildRequires: %{python_module pytest-freezegun}
BuildRequires: %{python_module pytest-timeout}
@@ -87,7 +89,8 @@ Highlights
Requests which is also powered by urllib3.
%prep
%setup -q -n urllib3-%{version}
%autosetup -p1 -n urllib3-%{version}
find . -type f -exec chmod a-x '{}' \;
find . -name __pycache__ -type d -exec rm -fr {} +
@@ -131,8 +134,8 @@ ln -sf %{python3_sitelib}/__pycache__/six.cpython-%{python3_version_nodots}.pyc
skiplist='test_import_urllib3'
# skip some randomly failing tests (mostly on i586, but sometimes they fail on other architectures)
skiplist="$skiplist or test_ssl_read_timeout or test_ssl_failed_fingerprint_verification or test_ssl_custom_validation_failure_terminates"
export PYTHONDONTWRITEBYTECODE=1
export LANG="en_US.UTF8"
# gh#urllib3/urllib3#2109
skiplist="$skiplist or test_timeout_errors_cause_retries"
%pytest -k "not (${skiplist})"
%endif