Index: 0001-Support-pytest-4.patch =================================================================== --- 0001-Support-pytest-4.patch (nonexistent) +++ 0001-Support-pytest-4.patch (working copy) @@ -0,0 +1,45 @@ +From e1eee5262b86d046358c2cc1ba1f4b47da0bbc6d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Mon, 8 Apr 2019 18:04:22 +0200 +Subject: [PATCH] Support pytest 4 + +Fixes https://github.com/kennethreitz/requests/issues/5048 + +See https://docs.pytest.org/en/latest/deprecations.html#marks-in-pytest-mark-parametrize + +(cherry picked from commit 7a33a8e523be6aa40c7e5435d3c5d92f2cc6e9a0) +--- + setup.py | 2 +- + tests/test_utils.py | 3 ++- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/setup.py b/setup.py +index 10ce2c62..c26616df 100755 +--- a/setup.py ++++ b/setup.py +@@ -54,7 +54,7 @@ test_requirements = [ + 'pytest-mock', + 'pytest-xdist', + 'PySocks>=1.5.6, !=1.5.7', +- 'pytest>=2.8.0' ++ 'pytest>=3' + ] + + about = {} +diff --git a/tests/test_utils.py b/tests/test_utils.py +index 59b0b0ef..62c51494 100644 +--- a/tests/test_utils.py ++++ b/tests/test_utils.py +@@ -33,7 +33,8 @@ class TestSuperLen: + 'stream, value', ( + (StringIO.StringIO, 'Test'), + (BytesIO, b'Test'), +- pytest.mark.skipif('cStringIO is None')((cStringIO, 'Test')), ++ pytest.param(cStringIO, 'Test', ++ marks=pytest.mark.skipif('cStringIO is None')), + )) + def test_io_streams(self, stream, value): + """Ensures that we properly deal with different kinds of IO streams.""" +-- +2.21.0 + Index: PKGBUILD =================================================================== --- PKGBUILD (revision 353149) +++ PKGBUILD (working copy) @@ -14,12 +14,20 @@ checkdepends=('python-pytest-httpbin' 'python2-pytest-httpbin' 'python-pytest-mock' 'python2-pytest-mock' 'python-pysocks' 'python2-pysocks') source=("$pkgbase-$pkgver.tar.gz::https://github.com/kennethreitz/requests/archive/v$pkgver.tar.gz" + "0001-Support-pytest-4.patch" + "https://github.com/kennethreitz/requests/commit/d6b5b401e8d6141bcefa4a70ff1c836aa085120b.patch" certs.patch) sha512sums=('934c329e6631ec6089577c49651b73265f0c3f0829b9151e1463dea905f35820a03ec3b0ee6a2ab2292d213b715f0b2348110392d60f55ea1cbe4b24fca4f890' + '333396811360bd73a1c6d0a37004a629e839eb77e6aa3ca5a72b50b905cd437f5aecdb81696d589cc0b703fcdfb6f8a1787b70dfc3cf31c0cbeca9a07cf28409' + '7a52e88706e742f0973fec2f4784b6b51ed9adc8c82bccdb9bec3e7fe102f9794a512a53ccb08cb7460727357103c1dd8687c06bffd48aaf2f2811fd2e184a61' '424a3bb01b23409284f6c9cd2bc22d92df31b85cfd96e1d1b16b5d68adeca670dfed4fff7977d8b10980102b0f780eacc465431021fcd661f3a17168a02a39a3') prepare() { cd "$srcdir"/requests-$pkgver + # pytest 4 support + patch -p1 -i ../0001-Support-pytest-4.patch + # urllib support + patch -p1 -i ../d6b5b401e8d6141bcefa4a70ff1c836aa085120b.patch sed -e '/certifi/d' \ -e "s/,<.*'/'/" \ -i setup.py