Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/requests-cache/
Date: Wed, 05 Aug 2020 05:43:21
Message-Id: 1596606191.168f3bc06dbfbf4f06b39a5707cf2b78b9b32296.sam@gentoo
1 commit: 168f3bc06dbfbf4f06b39a5707cf2b78b9b32296
2 Author: John Helmert III <jchelmertt3 <AT> gmail <DOT> com>
3 AuthorDate: Tue May 5 20:35:19 2020 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 5 05:43:11 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=168f3bc0
7
8 dev-python/requests-cache: Add 0.5.2
9
10 Signed-off-by: John Helmert III <jchelmert3 <AT> posteo.net>
11 Package-Manager: Portage-2.3.99, Repoman-2.3.22
12 Closes: https://github.com/gentoo/gentoo/pull/15661
13 Signed-off-by: Sam James <sam <AT> gentoo.org>
14
15 dev-python/requests-cache/Manifest | 1 +
16 .../requests-cache/requests-cache-0.5.2.ebuild | 71 ++++++++++++++++++++++
17 2 files changed, 72 insertions(+)
18
19 diff --git a/dev-python/requests-cache/Manifest b/dev-python/requests-cache/Manifest
20 index 06a5f924bc0..fa46d4c925e 100644
21 --- a/dev-python/requests-cache/Manifest
22 +++ b/dev-python/requests-cache/Manifest
23 @@ -1 +1,2 @@
24 DIST requests-cache-0.4.12.zip 44767 BLAKE2B f328d8ae8e3377af626030a6e3617c78e488024fa4ada9894576d339e571ba8ee6d905612ddc2802810bbeffbd8c94d90c743889e80fbf21418a7c67c5a005f6 SHA512 784d630eec99b607596d6ebcb7e51b0b4ed612b131437000391ecea6f3a684d1f61d169d57266ffc044a3939dcd4e7d6f85b9538165ae3613b1d3e55f18585fd
25 +DIST requests-cache-0.5.2.tar.gz 31159 BLAKE2B 4fca146a751064baf70954a71df64dbb7f8c9a4e27fec5dbea3620496ce78e7ccfb3785fb63705f513ff6fa938376b0c6acc4a2f584856060b1bc8388517df46 SHA512 355cc571a46b768615606a907a69ed065b3c4b5e74bb6c311abc7a28d9406f32fdea1db0dfd2b1c32dcdc82ed817ef7e0b30086c069de57307254617604c5177
26
27 diff --git a/dev-python/requests-cache/requests-cache-0.5.2.ebuild b/dev-python/requests-cache/requests-cache-0.5.2.ebuild
28 new file mode 100644
29 index 00000000000..ac500f4f68b
30 --- /dev/null
31 +++ b/dev-python/requests-cache/requests-cache-0.5.2.ebuild
32 @@ -0,0 +1,71 @@
33 +# Copyright 1999-2020 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +PYTHON_COMPAT=( python3_{6,7,8,9} )
39 +PYTHON_REQ_USE="sqlite"
40 +
41 +inherit distutils-r1
42 +
43 +HOMEPAGE="https://pypi.org/project/requests-cache/"
44 +DESCRIPTION="Persistent cache for requests library"
45 +SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
46 +
47 +LICENSE="BSD"
48 +SLOT="0"
49 +KEYWORDS="~amd64 ~x86"
50 +IUSE="test"
51 +RESTRICT="!test? ( test )"
52 +
53 +RDEPEND="dev-python/requests[${PYTHON_USEDEP}]"
54 +DEPEND="test? ( dev-python/pytest[${PYTHON_USEDEP}] )"
55 +
56 +distutils_enable_sphinx docs
57 +
58 +src_prepare() {
59 + # Ships with incorrect mock import
60 + sed -e 's/import mock/import unittest.mock as mock/' -i tests/test_cache.py || die
61 + default
62 +}
63 +
64 +python_test() {
65 + local skipped_tests=(
66 + # Slew of tests that violate network-sandbox
67 + tests/test_cache.py::CacheTestCase::test_attr_from_cache_in_hook
68 + tests/test_cache.py::CacheTestCase::test_cache_unpickle_errors
69 + tests/test_cache.py::CacheTestCase::test_close_response
70 + tests/test_cache.py::CacheTestCase::test_content_and_cookies
71 + tests/test_cache.py::CacheTestCase::test_delete_urls
72 + tests/test_cache.py::CacheTestCase::test_disabled
73 + tests/test_cache.py::CacheTestCase::test_enabled
74 + tests/test_cache.py::CacheTestCase::test_expire_cache
75 + tests/test_cache.py::CacheTestCase::test_from_cache_attribute
76 + tests/test_cache.py::CacheTestCase::test_get_parameters_normalization
77 + tests/test_cache.py::CacheTestCase::test_get_params_as_argument
78 + tests/test_cache.py::CacheTestCase::test_gzip_response
79 + tests/test_cache.py::CacheTestCase::test_headers_in_get_query
80 + tests/test_cache.py::CacheTestCase::test_hooks
81 + tests/test_cache.py::CacheTestCase::test_https_support
82 + tests/test_cache.py::CacheTestCase::test_ignore_parameters_get
83 + tests/test_cache.py::CacheTestCase::test_ignore_parameters_post
84 + tests/test_cache.py::CacheTestCase::test_ignore_parameters_post_json
85 + tests/test_cache.py::CacheTestCase::test_ignore_parameters_post_raw
86 + tests/test_cache.py::CacheTestCase::test_post
87 + tests/test_cache.py::CacheTestCase::test_post_data
88 + tests/test_cache.py::CacheTestCase::test_post_parameters_normalization
89 + tests/test_cache.py::CacheTestCase::test_post_params
90 + tests/test_cache.py::CacheTestCase::test_remove_expired_entries
91 + tests/test_cache.py::CacheTestCase::test_response_history
92 + tests/test_cache.py::CacheTestCase::test_response_history_simple
93 + tests/test_cache.py::CacheTestCase::test_return_old_data_on_error
94 + tests/test_cache.py::CacheTestCase::test_stream_requests_support
95 + tests/test_monkey_patch.py::MonkeyPatchTestCase::test_requests_from_cache
96 +
97 + # This throws many errors with network-sandbox, but doesn't fail the
98 + # build
99 + tests/test_thread_safety::test_thread_safety
100 + )
101 +
102 + pytest -vv --ignore tests/test_redistdict.py ${skipped_tests[@]/#/--deselect } || die "Tests fail with ${EPYTHON}"
103 +}