[arch-commits] Commit in python-requests/trunk (PKGBUILD)

Felix Yan felixonmars at archlinux.org
Thu Feb 13 08:57:14 UTC 2020


    Date: Thursday, February 13, 2020 @ 08:57:14
  Author: felixonmars
Revision: 375522

upgpkg: python-requests 2.22.0-4

- fix tests for pytest 5
- disable tests for python2
- deselect tests in a better way

Modified:
  python-requests/trunk/PKGBUILD

----------+
 PKGBUILD |   22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-02-13 08:45:37 UTC (rev 375521)
+++ PKGBUILD	2020-02-13 08:57:14 UTC (rev 375522)
@@ -4,7 +4,7 @@
 pkgbase=python-requests
 pkgname=('python-requests' 'python2-requests')
 pkgver=2.22.0
-pkgrel=3
+pkgrel=4
 pkgdesc="Python HTTP for Humans"
 arch=('any')
 url="http://python-requests.org"
@@ -11,20 +11,21 @@
 license=('Apache')
 makedepends=('python-setuptools' 'python2-setuptools' 'python-chardet' 'python2-chardet'
              'python-urllib3' 'python2-urllib3' 'python-idna' 'python2-idna')
-checkdepends=('python-pytest-httpbin' 'python2-pytest-httpbin' 'python-pytest-mock'
-              'python2-pytest-mock' 'python-pysocks' 'python2-pysocks' 'python-pyopenssl'
-              'python2-pyopenssl')
-source=("$pkgbase-$pkgver.tar.gz::https://github.com/kennethreitz/requests/archive/v$pkgver.tar.gz"
+checkdepends=('python-pytest-httpbin' 'python-pytest-mock' 'python-pysocks' 'python-pyopenssl')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/psf/requests/archive/v$pkgver.tar.gz"
         "0001-Support-pytest-4.patch"
-        certs.patch)
+        certs.patch
+        "requests-pytest-5.patch::https://github.com/psf/requests/pull/5305.patch")
 sha512sums=('1259c270e343fc860322b105904232226f26b3b363e9d102d599020fcc7b6e1d524dc6c650181ce3152caebe11d2c60045ddd9c9fc04560294caa284e209c386'
             '36ac0f06bbeb893e4cc4108e7421de5b9c5e5bff82d5f0e227a1ebde0a5df4ca57236762b45e5025aea4724f1fc320f9f32665a57c77b958e9c05efbe317ccc1'
-            '424a3bb01b23409284f6c9cd2bc22d92df31b85cfd96e1d1b16b5d68adeca670dfed4fff7977d8b10980102b0f780eacc465431021fcd661f3a17168a02a39a3')
+            '424a3bb01b23409284f6c9cd2bc22d92df31b85cfd96e1d1b16b5d68adeca670dfed4fff7977d8b10980102b0f780eacc465431021fcd661f3a17168a02a39a3'
+            '560aa7d31b51ca2b59cf93cf41c2dcaa648950119653f09ebcd9be2475f5719bf6116c7043d6eb5b317da37bc9893774d46fbc22a14623314f3fd30bc8f62092')
 
 prepare() {
   cd "$srcdir"/requests-$pkgver
   # pytest 4 support
   patch -p1 -i ../0001-Support-pytest-4.patch
+  patch -p1 -i ../requests-pytest-5.patch
   sed -e '/certifi/d' \
       -e "s/,<.*'/'/" \
       -i setup.py
@@ -46,11 +47,8 @@
 check() {
   # Seems to be a problem about pytest-httpbin
 
-  cd "$srcdir"/requests-$pkgver
-  py.test tests -k "not test_https_warnings"
-
-  cd "$srcdir"/requests-$pkgver-py2
-  py.test2 tests -k "not test_https_warnings"
+  cd requests-$pkgver
+  pytest tests --deselect tests/test_requests.py::TestRequests::test_https_warnings
 }
 
 package_python-requests() {



More information about the arch-commits mailing list