public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Johann Schmitz" <ercpe@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/requests-oauthlib/files/, dev-python/requests-oauthlib/
Date: Sat, 13 Aug 2016 05:08:01 +0000 (UTC)	[thread overview]
Message-ID: <1471064871.b4da8d5f73eb06e9f7738ed0f759049e40ed6ae6.ercpe@gentoo> (raw)

commit:     b4da8d5f73eb06e9f7738ed0f759049e40ed6ae6
Author:     Johann Schmitz <ercpe <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 13 05:07:51 2016 +0000
Commit:     Johann Schmitz <ercpe <AT> gentoo <DOT> org>
CommitDate: Sat Aug 13 05:07:51 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4da8d5f

dev-python/requests-oauthlib: Version bump to 0.6.2 (bug #565590)

Package-Manager: portage-2.2.28

 dev-python/requests-oauthlib/Manifest              |  1 +
 .../files/requests-oauthlib-0.4.0-expires_at.patch | 61 ----------------------
 .../requests-oauthlib-0.6.2.ebuild                 | 35 +++++++++++++
 3 files changed, 36 insertions(+), 61 deletions(-)

diff --git a/dev-python/requests-oauthlib/Manifest b/dev-python/requests-oauthlib/Manifest
index 3851474..d637eda 100644
--- a/dev-python/requests-oauthlib/Manifest
+++ b/dev-python/requests-oauthlib/Manifest
@@ -1 +1,2 @@
 DIST requests-oauthlib-0.4.1.tar.gz 34945 SHA256 446e44c937bdb1ff9d62b8892c8df04614a910bc825b9e57aa0916fcad28a26f SHA512 ac4b33757ba1f8eea152ce7fe63bdb1b7b56c741e6743f740b9470b1b27244975d4ff7d5dea3dce3b59136e4eec825d538c6085545837d8433b395b500b425c1 WHIRLPOOL dec0b688910d404cc10e8554ebc2e58038e49386c6cf7c64a2e89c65dba4bda88d21dd2cefa57ffee3da90fb01746fa89b161a0e6768ff4215e29dd82f3e88cb
+DIST requests-oauthlib-0.6.2.tar.gz 40307 SHA256 29ad3c4cb1e880713a54bee17c6345ccf8be047544429ee62237843f5ec73323 SHA512 da188c6a6449ffa201fae6e2f0a0e5474b140efc55a00dfc31483726cfd860fc22cad654c4af0a4b81144100678ddf4c082f54fc9098a6a99e0a4857f22aae62 WHIRLPOOL 7d2cba69eb5be9205fb0f18fdc696e26cc223e09765dd31f6ba402e498471678baafde067c2f1d709b4d38b90e4957549c714752d658e00abe9f2203ab7d189c

diff --git a/dev-python/requests-oauthlib/files/requests-oauthlib-0.4.0-expires_at.patch b/dev-python/requests-oauthlib/files/requests-oauthlib-0.4.0-expires_at.patch
deleted file mode 100644
index 517e4a2..0000000
--- a/dev-python/requests-oauthlib/files/requests-oauthlib-0.4.0-expires_at.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-https://github.com/requests/requests-oauthlib/commit/7057cbee773c1dff1856730ca661cc71abb2506e.diff
-https://github.com/requests/requests-oauthlib/commit/8c2c96c4bb45803df2779cfde90868445977ab96.diff
-diff --git a/tests/test_oauth2_session.py b/tests/test_oauth2_session.py
-index 305241a..cf095a5 100644
---- a/tests/test_oauth2_session.py
-+++ b/tests/test_oauth2_session.py
-@@ -1,6 +1,7 @@
- from __future__ import unicode_literals
- import json
- import mock
-+import time
- import unittest
- 
- from oauthlib.common import urlencode
-@@ -11,6 +11,9 @@
- from requests_oauthlib import OAuth2Session, TokenUpdated
- 
- 
-+fake_time = time.time()
-+
-+
- class OAuth2SessionTest(unittest.TestCase):
- 
-     def setUp(self):
-@@ -22,7 +25,8 @@ def setUp(self):
-             'token_type': 'Bearer',
-             'access_token': 'asdfoiw37850234lkjsdfsdf',
-             'refresh_token': 'sldvafkjw34509s8dfsdf',
--            'expires_in': '3600'
-+            'expires_in': '3600',
-+            'expires_at': fake_time + 3600,
-         }
-         self.client_id = 'foo'
-         self.clients = [
-@@ -66,9 +70,11 @@ def test_authorization_url(self):
-         self.assertIn(self.client_id, auth_url)
-         self.assertIn('response_type=token', auth_url)
- 
-+    @mock.patch("time.time", new=lambda: fake_time)
-     def test_refresh_token_request(self):
-         self.expired_token = dict(self.token)
-         self.expired_token['expires_in'] = '-1'
-+        del self.expired_token['expires_at']
- 
-         def fake_refresh(r, **kwargs):
-             resp = mock.MagicMock()
-@@ -98,12 +104,14 @@ def token_updater(token):
-             auth.send = fake_refresh
-             auth.get('https://i.b')
- 
-+    @mock.patch("time.time", new=lambda: fake_time)
-     def test_token_from_fragment(self):
-         mobile = MobileApplicationClient(self.client_id)
-         response_url = 'https://i.b/callback#' + urlencode(self.token.items())
-         auth = OAuth2Session(client=mobile)
-         self.assertEqual(auth.token_from_fragment(response_url), self.token)
- 
-+    @mock.patch("time.time", new=lambda: fake_time)
-     def test_fetch_token(self):
-         def fake_token(token):
-             def fake_send(r, **kwargs):

diff --git a/dev-python/requests-oauthlib/requests-oauthlib-0.6.2.ebuild b/dev-python/requests-oauthlib/requests-oauthlib-0.6.2.ebuild
new file mode 100644
index 0000000..d994bbc
--- /dev/null
+++ b/dev-python/requests-oauthlib/requests-oauthlib-0.6.2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit distutils-r1
+
+DESCRIPTION="This project provides first-class OAuth library support for Requests"
+HOMEPAGE="https://github.com/requests/requests-oauthlib"
+SRC_URI="https://github.com/requests/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+SLOT="0"
+LICENSE="ISC"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+DEPEND="test? (
+			dev-python/mock[${PYTHON_USEDEP}]
+			dev-python/requests-mock[${PYTHON_USEDEP}]
+		)"
+RDEPEND="
+	>=dev-python/requests-2.0.0[${PYTHON_USEDEP}]
+	>=dev-python/oauthlib-0.6.2[${PYTHON_USEDEP}]"
+
+#Refrain from a doc build for now
+#python_compile_all() {
+#	use doc && emake -C docs html
+#}
+
+python_test() {
+	esetup.py test
+}


                 reply	other threads:[~2016-08-13  8:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1471064871.b4da8d5f73eb06e9f7738ed0f759049e40ed6ae6.ercpe@gentoo \
    --to=ercpe@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox