[arch-commits] Commit in python-vcrpy/repos/community-any (3 files)

Felix Yan felixonmars at gemini.archlinux.org
Fri Jul 1 18:29:17 UTC 2022


    Date: Friday, July 1, 2022 @ 18:29:17
  Author: felixonmars
Revision: 1243275

archrelease: copy trunk to community-any

Added:
  python-vcrpy/repos/community-any/PKGBUILD
    (from rev 1243274, python-vcrpy/trunk/PKGBUILD)
Deleted:
  python-vcrpy/repos/community-any/PKGBUILD
  python-vcrpy/repos/community-any/fix-urllib-redirect-tests.patch

---------------------------------+
 PKGBUILD                        |   67 +++++++++++++++++---------------------
 fix-urllib-redirect-tests.patch |   60 ----------------------------------
 2 files changed, 30 insertions(+), 97 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2022-07-01 18:28:59 UTC (rev 1243274)
+++ PKGBUILD	2022-07-01 18:29:17 UTC (rev 1243275)
@@ -1,37 +0,0 @@
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-
-pkgname=python-vcrpy
-pkgver=4.1.1
-pkgrel=5
-pkgdesc='Automatically mock your HTTP interactions to simplify and speed up testing'
-arch=('any')
-license=('MIT')
-url='https://github.com/kevin1024/vcrpy'
-depends=('python-yaml' 'python-wrapt' 'python-six' 'python-yarl')
-makedepends=('python-setuptools')
-checkdepends=('python-pytest-runner' 'python-pytest-httpbin' 'python-mock')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/kevin1024/vcrpy/archive/v$pkgver.tar.gz"
-        fix-urllib-redirect-tests.patch)
-sha512sums=('afa1904bff37bfd2d278ed49fa3982a357eb6bb113818b532044da0f11a9dd877cc152d7f0d81d88bdc0f870521b1241f6aecf959f668211904e3c6c7cea4ad8'
-            'abe9cbb99e83e8bc521ec7e744f52580b410ed88c1dfaa441174ced526460389ffba0decccc4483e50fd9ec68c94388ec5cc1abd668abd88ce057db25a8e9b8d')
-
-prepare() {
-  cd vcrpy-$pkgver
-  patch -Np1 -i ../fix-urllib-redirect-tests.patch
-}
-
-build() {
-  cd vcrpy-$pkgver
-  python setup.py build
-}
-
-check() {
-  cd vcrpy-$pkgver
-  python setup.py pytest
-}
-
-package() {
-  cd vcrpy-$pkgver
-  python setup.py install --root="$pkgdir" --optimize=1
-  install -D -m644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
-}

Copied: python-vcrpy/repos/community-any/PKGBUILD (from rev 1243274, python-vcrpy/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2022-07-01 18:29:17 UTC (rev 1243275)
@@ -0,0 +1,30 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgname=python-vcrpy
+pkgver=4.2.0
+pkgrel=1
+pkgdesc='Automatically mock your HTTP interactions to simplify and speed up testing'
+arch=('any')
+license=('MIT')
+url='https://github.com/kevin1024/vcrpy'
+depends=('python-yaml' 'python-wrapt' 'python-six' 'python-yarl')
+makedepends=('python-setuptools')
+checkdepends=('python-pytest-runner' 'python-pytest-httpbin' 'python-mock')
+source=("https://github.com/kevin1024/vcrpy/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
+sha512sums=('61eeec585fc78be1ae6d4f9047123c9680611e436bb5980fb7c6b885e16b2ef9bd5ce921efff7e87a222b3662c7009dbf0a8df24cdb9849d09deb24957ba4889')
+
+build() {
+  cd vcrpy-$pkgver
+  python setup.py build
+}
+
+check() {
+  cd vcrpy-$pkgver
+  python setup.py pytest
+}
+
+package() {
+  cd vcrpy-$pkgver
+  python setup.py install --root="$pkgdir" --optimize=1
+  install -D -m644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
+}

Deleted: fix-urllib-redirect-tests.patch
===================================================================
--- fix-urllib-redirect-tests.patch	2022-07-01 18:28:59 UTC (rev 1243274)
+++ fix-urllib-redirect-tests.patch	2022-07-01 18:29:17 UTC (rev 1243275)
@@ -1,60 +0,0 @@
-From cd722780620dfcd6d3cec813ff45c30ce7892342 Mon Sep 17 00:00:00 2001
-From: Jair Henrique <jair.henrique at gmail.com>
-Date: Tue, 2 Nov 2021 16:15:04 -0300
-Subject: [PATCH] Fix urllib redirect tests
-
----
- tests/integration/test_urllib2.py |  7 ++++---
- tests/integration/test_urllib3.py | 10 ++++++----
- 2 files changed, 10 insertions(+), 7 deletions(-)
-
-diff --git a/tests/integration/test_urllib2.py b/tests/integration/test_urllib2.py
-index 2582e0cb..dd74bd58 100644
---- a/tests/integration/test_urllib2.py
-+++ b/tests/integration/test_urllib2.py
-@@ -56,12 +56,13 @@ def test_response_headers(httpbin_both, tmpdir):
-         assert sorted(open1) == sorted(open2)
- 
- 
--def test_effective_url(httpbin_both, tmpdir):
-+def test_effective_url(tmpdir):
-     """Ensure that the effective_url is captured"""
--    url = httpbin_both.url + "/redirect-to?url=/html"
-+    url = "http://mockbin.org/redirect/301"
-+
-     with vcr.use_cassette(str(tmpdir.join("headers.yaml"))):
-         effective_url = urlopen_with_cafile(url).geturl()
--        assert effective_url == httpbin_both.url + "/html"
-+        assert effective_url == "http://mockbin.org/redirect/301/0"
- 
-     with vcr.use_cassette(str(tmpdir.join("headers.yaml"))):
-         assert effective_url == urlopen_with_cafile(url).geturl()
-diff --git a/tests/integration/test_urllib3.py b/tests/integration/test_urllib3.py
-index 110c05af..01de5a85 100644
---- a/tests/integration/test_urllib3.py
-+++ b/tests/integration/test_urllib3.py
-@@ -94,9 +94,10 @@ def test_post(tmpdir, httpbin_both, verify_pool_mgr):
-     assert req1 == req2
- 
- 
--def test_redirects(tmpdir, httpbin_both, verify_pool_mgr):
-+def test_redirects(tmpdir, verify_pool_mgr):
-     """Ensure that we can handle redirects"""
--    url = httpbin_both.url + "/redirect-to?url=bytes/1024"
-+    url = "http://mockbin.org/redirect/301"
-+
-     with vcr.use_cassette(str(tmpdir.join("verify_pool_mgr.yaml"))):
-         content = verify_pool_mgr.request("GET", url).data
- 
-@@ -104,8 +105,9 @@ def test_redirects(tmpdir, httpbin_both, verify_pool_mgr):
-         assert content == verify_pool_mgr.request("GET", url).data
-         # Ensure that we've now cached *two* responses. One for the redirect
-         # and one for the final fetch
--        assert len(cass) == 2
--        assert cass.play_count == 2
-+
-+    assert len(cass) == 2
-+    assert cass.play_count == 2
- 
- 
- def test_cross_scheme(tmpdir, httpbin, httpbin_secure, verify_pool_mgr):



More information about the arch-commits mailing list