pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/net/py-dropbox
Module Name: pkgsrc
Committed By: joerg
Date: Thu Dec 27 15:04:42 UTC 2018
Modified Files:
pkgsrc/net/py-dropbox: Makefile distinfo
Added Files:
pkgsrc/net/py-dropbox/patches: patch-dropbox_datastore.py
patch-tests_test__datastore.py
Log Message:
async and await are keywords in Python 3.7, so rename them. Bump revision.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 pkgsrc/net/py-dropbox/Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/net/py-dropbox/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/net/py-dropbox/patches/patch-dropbox_datastore.py \
pkgsrc/net/py-dropbox/patches/patch-tests_test__datastore.py
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/net/py-dropbox/Makefile
diff -u pkgsrc/net/py-dropbox/Makefile:1.5 pkgsrc/net/py-dropbox/Makefile:1.6
--- pkgsrc/net/py-dropbox/Makefile:1.5 Sun Apr 5 22:07:31 2015
+++ pkgsrc/net/py-dropbox/Makefile Thu Dec 27 15:04:42 2018
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.5 2015/04/05 22:07:31 hiramatsu Exp $
+# $NetBSD: Makefile,v 1.6 2018/12/27 15:04:42 joerg Exp $
DISTNAME= dropbox-python-sdk-2.2.0
PKGNAME= ${PYPKGPREFIX}-dropbox-2.2.0
+PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= https://www.dropbox.com/developers/downloads/sdks/core/python/
EXTRACT_SUFX= .zip
Index: pkgsrc/net/py-dropbox/distinfo
diff -u pkgsrc/net/py-dropbox/distinfo:1.3 pkgsrc/net/py-dropbox/distinfo:1.4
--- pkgsrc/net/py-dropbox/distinfo:1.3 Wed Nov 4 00:35:30 2015
+++ pkgsrc/net/py-dropbox/distinfo Thu Dec 27 15:04:42 2018
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.3 2015/11/04 00:35:30 agc Exp $
+$NetBSD: distinfo,v 1.4 2018/12/27 15:04:42 joerg Exp $
SHA1 (dropbox-python-sdk-2.2.0.zip) = 16fc4f2c9e37f49a00cc23d1df4aea9c29ed83c0
RMD160 (dropbox-python-sdk-2.2.0.zip) = 84abbcc17b16ec0d2707e2ad45d94d9f80daf570
SHA512 (dropbox-python-sdk-2.2.0.zip) = 1b30d53c69cd2a79abbdca81956ddd90eae5180b98a4b62cf97590f3201e0b5a0a721909060578831809cdbfa2e31794229d530718ff55067c6545cde09f343e
Size (dropbox-python-sdk-2.2.0.zip) = 691948 bytes
+SHA1 (patch-dropbox_datastore.py) = 005aa34cfb446b1df2bcc7e45efaa7e0de906f24
+SHA1 (patch-tests_test__datastore.py) = 6f31e4312a7f5c9c0dc80abb4cbf21e7ea81112e
Added files:
Index: pkgsrc/net/py-dropbox/patches/patch-dropbox_datastore.py
diff -u /dev/null pkgsrc/net/py-dropbox/patches/patch-dropbox_datastore.py:1.1
--- /dev/null Thu Dec 27 15:04:42 2018
+++ pkgsrc/net/py-dropbox/patches/patch-dropbox_datastore.py Thu Dec 27 15:04:42 2018
@@ -0,0 +1,124 @@
+$NetBSD: patch-dropbox_datastore.py,v 1.1 2018/12/27 15:04:42 joerg Exp $
+
+--- dropbox/datastore.py.orig 2018-12-25 21:56:18.018562969 +0000
++++ dropbox/datastore.py
+@@ -266,7 +266,7 @@ class _DatastoreOperations(object):
+ resp = self._client.rest_client.POST(url, params, headers)
+ return self._check_conflict(resp)
+
+- def await(self, token=None, cursors=None):
++ def send_await(self, token=None, cursors=None):
+ params = {}
+ if token:
+ params['list_datastores'] = json.dumps({'token': token})
+@@ -407,7 +407,7 @@ class DatastoreManager(object):
+ resp = self._dsops.list_datastores()
+ return [_make_dsinfo(item) for item in resp['datastores']]
+
+- def await(self, token=None, datastores=None):
++ def send_await(self, token=None, datastores=None):
+ """Wait until certain changes occur.
+
+ This methods implements a flexible and efficient long-polling
+@@ -419,11 +419,11 @@ class DatastoreManager(object):
+ token
+ An optional token that represents a hash of the list of
+ datastores, computed by the server. If this parameter is
+- present and non-empty, ``await()`` will return when the
++ present and non-empty, ``send_await()`` will return when the
+ list of datastores has changed in a way that would cause a
+ different token to be computed, such as when a datastore
+ is created or deleted. The token should be obtained from
+- the previous ``await()`` call; as a special case, the
++ the previous ``send_await()`` call; as a special case, the
+ value ``'.'`` forces the call to return immediately with a
+ fresh token (as does any outdated token).
+
+@@ -434,7 +434,7 @@ class DatastoreManager(object):
+ interested in receiving updates. If this parameter is a
+ list of instances, the revision to compare is retrieved
+ from each instance using :meth:`Datastore.get_rev()`. If
+- this parameter is present and non-empty, ``await()`` will
++ this parameter is present and non-empty, ``send_await()`` will
+ return whenever a new revision is available for any of
+ those datastores.
+
+@@ -448,7 +448,7 @@ class DatastoreManager(object):
+ token
+ A new token, or the value of the ``token`` parameter if
+ there are no changes to the list of datastores. You
+- should pass this to the next ``await()`` call.
++ should pass this to the next ``send_await()`` call.
+
+ dsinfo
+ The full list of :class:`DatastoreInfo` objects (as
+@@ -465,7 +465,7 @@ class DatastoreManager(object):
+ not changed (and are still valid) will not be present.
+
+ Unlike :meth:`Datastore.load_deltas()` and
+- :meth:`Datastore.await_deltas()`, ``await()`` does not apply
++ :meth:`Datastore.await_deltas()`, ``send_await()`` does not apply
+ the deltas returned in ``deltamap`` to the respective
+ datastores; that is the caller's responsibility. For
+ example::
+@@ -485,7 +485,7 @@ class DatastoreManager(object):
+ else:
+ for ds in datastores:
+ cursors[ds._handle] = ds._rev
+- resp = self._dsops.await(token=token, cursors=cursors)
++ resp = self._dsops.send_await(token=token, cursors=cursors)
+ dsinfos = None
+ deltamap = None
+ if 'list_datastores' in resp:
+@@ -512,13 +512,13 @@ class DatastoreManager(object):
+
+ @staticmethod
+ def make_cursor_map(datastores, deltamap):
+- """Utility to construct a ``datastores`` argument for :meth:`await()`.
++ """Utility to construct a ``datastores`` argument for :meth:`send_await()`.
+
+ Parameters
+ datastores
+ A list of :class:`Datastore` objects.
+ deltamap
+- An data structure as returned by :meth:`await()` in its
++ An data structure as returned by :meth:`send_await()` in its
+ ``deltamap`` return value. This may be None or it may be
+ a dict mapping :class:`Datastore` objects to values that
+ are either lists of deltas or ``None``.
+@@ -526,7 +526,7 @@ class DatastoreManager(object):
+ Returns
+ A dict mapping :class:`Datastore` objects to revisions,
+ suitable to pass as the ``datastores`` parameter to
+- :meth:`await()`. This will normally just map the datastores
++ :meth:`send_await()`. This will normally just map the datastores
+ from the ``datastores`` parameter to their current revision;
+ however, datastores that are deleted or invalid according to
+ ``deltamap`` are excluded from the dict, and for datastores
+@@ -534,7 +534,7 @@ class DatastoreManager(object):
+ is set to one higher than the revision of the last delta.
+
+ Using this function will reduce redundant server roundtrips in
+- multi-threaded apps that call :meth:`await()` in a background
++ multi-threaded apps that call :meth:`send_await()` in a background
+ thread and then pass the received deltas to the main thread
+ through some kind of queue.
+ """
+@@ -1146,7 +1146,7 @@ class Datastore(object):
+ """
+ if self._changes:
+ raise DatastoreError('Cannot call await_deltas() with pending changes')
+- resp = self._manager._dsops.await(cursors={self._handle: self._rev})
++ resp = self._manager._dsops.send_await(cursors={self._handle: self._rev})
+ if 'get_deltas' not in resp:
+ return {}
+ subresp = resp['get_deltas']
+@@ -1203,7 +1203,7 @@ class Datastore(object):
+ :meth:`await_deltas()` or :meth:`load_deltas()`.
+
+ The deltas should be received from the server. Under certain
+- conditions (e.g. when :meth:`DatastoreManager.await()` is
++ conditions (e.g. when :meth:`DatastoreManager.send_await()` is
+ called in a background thread) it is possible that the server
+ sends a delta that has already been applied locally. Such
+ deltas are silently ignored.
Index: pkgsrc/net/py-dropbox/patches/patch-tests_test__datastore.py
diff -u /dev/null pkgsrc/net/py-dropbox/patches/patch-tests_test__datastore.py:1.1
--- /dev/null Thu Dec 27 15:04:42 2018
+++ pkgsrc/net/py-dropbox/patches/patch-tests_test__datastore.py Thu Dec 27 15:04:42 2018
@@ -0,0 +1,49 @@
+$NetBSD: patch-tests_test__datastore.py,v 1.1 2018/12/27 15:04:42 joerg Exp $
+
+--- tests/test_datastore.py.orig 2018-12-25 21:57:44.460130334 +0000
++++ tests/test_datastore.py
+@@ -226,7 +226,7 @@ class TestDatastoreManager(unittest.Test
+ }
+
+ # invoke code
+- token, dsinfos, deltamap = self.manager.await()
++ token, dsinfos, deltamap = self.manager.send_await()
+
+ # check code
+ self.assertEqual(token, 'notch')
+@@ -241,7 +241,7 @@ class TestDatastoreManager(unittest.Test
+ }
+
+ # invoke code
+- token, dsinfos, deltamap = self.manager.await('notch')
++ token, dsinfos, deltamap = self.manager.send_await('notch')
+
+ # check code
+ self.assertEqual(token, 'notch')
+@@ -262,7 +262,7 @@ class TestDatastoreManager(unittest.Test
+ }
+
+ # invoke code
+- token, dsinfos, deltamap = self.manager.await('notch', [ds])
++ token, dsinfos, deltamap = self.manager.send_await('notch', [ds])
+
+ # check code
+ self.assertEqual(token, 'notch')
+@@ -286,7 +286,7 @@ class TestDatastoreManager(unittest.Test
+ }
+
+ # invoke code
+- token, dsinfos, deltamap = self.manager.await('notch', {ds: 42})
++ token, dsinfos, deltamap = self.manager.send_await('notch', {ds: 42})
+
+ # check code
+ self.assertEqual(token, 'notch')
+@@ -310,7 +310,7 @@ class TestDatastoreManager(unittest.Test
+ }
+
+ # invoke code
+- token, dsinfos, deltamap = self.manager.await('notch', [ds])
++ token, dsinfos, deltamap = self.manager.send_await('notch', [ds])
+
+ # check code
+ self.assertEqual(token, 'notch')
Home |
Main Index |
Thread Index |
Old Index