pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

py-rt: Update wip/py-rt to 1.0.11



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Sat Sep 15 12:33:12 2018 +0200
Changeset:	8a98b5b2da0793076d887c30a2300a081748a3d6

Modified Files:
	py-rt/Makefile
	py-rt/distinfo
Removed Files:
	py-rt/patches/patch-rt.py
	py-rt/patches/patch-setup.py

Log Message:
py-rt: Update wip/py-rt to 1.0.11

pkgsrc changes:
 - Remove all patches, all merged upstream/no longer needed

Changes:
1.0.11
------
 - Added parameter to set the content type in reply() and comment() (#12).
 - Added parameter Format to search() (#17).
 - Tests: Update to new demo instance, fixing tests.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=8a98b5b2da0793076d887c30a2300a081748a3d6

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 py-rt/Makefile               |   2 +-
 py-rt/distinfo               |  10 ++--
 py-rt/patches/patch-rt.py    | 119 -------------------------------------------
 py-rt/patches/patch-setup.py |  18 -------
 4 files changed, 5 insertions(+), 144 deletions(-)

diffs:
diff --git a/py-rt/Makefile b/py-rt/Makefile
index 677b108da5..4f3bbfcbaf 100644
--- a/py-rt/Makefile
+++ b/py-rt/Makefile
@@ -1,6 +1,6 @@
 # $NetBSD$
 
-DISTNAME=	rt-1.0.10
+DISTNAME=	rt-1.0.11
 PKGNAME=	${PYPKGPREFIX}-${DISTNAME}
 CATEGORIES=	net python
 MASTER_SITES=	${MASTER_SITE_PYPI:=r/rt/}
diff --git a/py-rt/distinfo b/py-rt/distinfo
index f813caa7cf..510480a1c0 100644
--- a/py-rt/distinfo
+++ b/py-rt/distinfo
@@ -1,8 +1,6 @@
 $NetBSD$
 
-SHA1 (py-rt/rt-1.0.10.tar.gz) = 84469322e28d6bb8cd3b6fb1c972014a6b011211
-RMD160 (py-rt/rt-1.0.10.tar.gz) = c33668195117608d33daf8a306f6385689dfd999
-SHA512 (py-rt/rt-1.0.10.tar.gz) = ef09818c927eb6b3c6a9b183f92a5ce2424f334dc62d098cc06cd63c5adc8d11e55f9356db6122d2dde0f841d2cfaa713161ba5ce7746e8f509fab89b832dc60
-Size (py-rt/rt-1.0.10.tar.gz) = 35402 bytes
-SHA1 (patch-rt.py) = 87d4c67fad913fbebf50356afc80e073f4c5d9fc
-SHA1 (patch-setup.py) = 8028e89a8a51e939fdb7ebfb9814518ee3173ad3
+SHA1 (py-rt/rt-1.0.11.tar.gz) = 2a919c9df7a7aec75aa9f1f19df9fbc81341e784
+RMD160 (py-rt/rt-1.0.11.tar.gz) = cd0ee2929ede3c878e21bf0750e4fe262550ded5
+SHA512 (py-rt/rt-1.0.11.tar.gz) = 00007710d152472bf25e656b6298502e0b571932c8c3f4c498074fe7a849d575fd2deaad91a4814a7aece4dbfa847c913045e927830a8e0a02d3d13876562696
+Size (py-rt/rt-1.0.11.tar.gz) = 35084 bytes
diff --git a/py-rt/patches/patch-rt.py b/py-rt/patches/patch-rt.py
deleted file mode 100644
index db9536fe8f..0000000000
--- a/py-rt/patches/patch-rt.py
+++ /dev/null
@@ -1,119 +0,0 @@
-$NetBSD$
-
-Permit to also pass possible `format' field to search().
-
-Merged upstream as part of https://github.com/CZ-NIC/python-rt/pull/17
-
---- rt.py.orig	2017-12-01 12:25:41.000000000 +0000
-+++ rt.py
-@@ -392,7 +392,7 @@ class Rt:
-         """
-         return self.search(Queue=queue, order='-LastUpdated', LastUpdatedBy__notexact=self.default_login, LastUpdated__gt=since)
- 
--    def search(self, Queue=None, order=None, raw_query=None, **kwargs):
-+    def search(self, Queue=None, order=None, raw_query=None, Format='l', **kwargs):
-         """ Search arbitrary needles in given fields and queue.
- 
-         Example::
-@@ -413,6 +413,10 @@ class Rt:
-                              kwargs, so use these instead of including them in
-                              the raw query. You can refer to the RT query builder.
-                              If passing raw_query, all other **kwargs will be ignored.
-+        :keyword Format:     Format of the query:
-+                               - i: only `id' fields are populated
-+                               - s: only `id' and `subject' fields are populated
-+                               - l: multi-line format
-         :keyword kwargs:     Other arguments possible to set if not passing raw_query:
- 
-                              Requestors, Subject, Cc, AdminCc, Owner, Status,
-@@ -471,7 +475,7 @@ class Rt:
-         get_params['query'] = ' AND '.join('(' + part + ')' for part in query)
-         if order:
-             get_params['orderby'] = order
--        get_params['format'] = 'l'
-+        get_params['format'] = Format
- 
-         msg = self.__request(url, get_params=get_params)
-         lines = msg.split('\n')
-@@ -481,37 +485,52 @@ class Rt:
-             if lines[2].startswith('No matching results.'):
-                 return []
- 
--        msgs = map(lambda x: x.split('\n'), msg.split('\n--\n'))
--        items = []
--        for msg in msgs:
--            pairs = {}
--            req_matching = [i for i, m in enumerate(msg) if self.RE_PATTERNS['requestors_pattern'].match(m)]
--            req_id = req_matching[0] if req_matching else None
--            if not req_id:
--                raise UnexpectedMessageFormat('Missing line starting with `Requestors:`.')
--            for i in range(req_id):
--                if ': ' in msg[i]:
--                    header, content = msg[i].split(': ', 1)
--                    pairs[header.strip()] = content.strip()
--            requestors = [msg[req_id][12:]]
--            req_id += 1
--            while (req_id < len(msg)) and (msg[req_id][:12] == ' ' * 12):
--                requestors.append(msg[req_id][12:])
-+        if Format == 'l':
-+            msgs = map(lambda x: x.split('\n'), msg.split('\n--\n'))
-+            items = []
-+            for msg in msgs:
-+                pairs = {}
-+                req_matching = [i for i, m in enumerate(msg) if self.RE_PATTERNS['requestors_pattern'].match(m)]
-+                req_id = req_matching[0] if req_matching else None
-+                if not req_id:
-+                    raise UnexpectedMessageFormat('Missing line starting with `Requestors:`.')
-+                for i in range(req_id):
-+                    if ': ' in msg[i]:
-+                        header, content = msg[i].split(': ', 1)
-+                        pairs[header.strip()] = content.strip()
-+                requestors = [msg[req_id][12:]]
-                 req_id += 1
--            pairs['Requestors'] = self.__normalize_list(requestors)
--            for i in range(req_id, len(msg)):
--                if ': ' in msg[i]:
--                    header, content = msg[i].split(': ', 1)
--                    pairs[header.strip()] = content.strip()
--            if pairs:
--                items.append(pairs)
-+                while (req_id < len(msg)) and (msg[req_id][:12] == ' ' * 12):
-+                    requestors.append(msg[req_id][12:])
-+                    req_id += 1
-+                pairs['Requestors'] = self.__normalize_list(requestors)
-+                for i in range(req_id, len(msg)):
-+                    if ': ' in msg[i]:
-+                        header, content = msg[i].split(': ', 1)
-+                        pairs[header.strip()] = content.strip()
-+                if pairs:
-+                    items.append(pairs)
-+
-+                if 'Cc' in pairs:
-+                    pairs['Cc'] = self.__normalize_list(pairs['Cc'])
-+                if 'AdminCc' in pairs:
-+                    pairs['AdminCc'] = self.__normalize_list(pairs['AdminCc'])
-+            return items
-+        elif Format == 's':
-+            items = []
-+            msgs = msg.splitlines()[2:]
-+            for msg in msgs:
-+                ticket_id, subject = msg.split(': ', 1)
-+                items.append({ 'id': 'ticket/' + ticket_id, 'Subject': subject })    
-+            return items
-+        elif Format == 'i':
-+            items = []
-+            msgs = msg.splitlines()[2:]
-+            for msg in msgs:
-+                _, ticket_id = msg.split('/', 1)
-+                items.append({ 'id': 'ticket/' + ticket_id })    
-+            return items
- 
--            if 'Cc' in pairs:
--                pairs['Cc'] = self.__normalize_list(pairs['Cc'])
--            if 'AdminCc' in pairs:
--                pairs['AdminCc'] = self.__normalize_list(pairs['AdminCc'])
--
--        return items
- 
-     def get_ticket(self, ticket_id):
-         """ Fetch ticket by its ID.
diff --git a/py-rt/patches/patch-setup.py b/py-rt/patches/patch-setup.py
deleted file mode 100644
index aac9b11013..0000000000
--- a/py-rt/patches/patch-setup.py
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD$
-
-Remove not needed dependency to `nose'.
-
-It is just a leftover needed for upstream CI, no part of code
-actually use it.
-
---- setup.py.orig	2017-12-01 15:48:56.000000000 +0000
-+++ setup.py
-@@ -17,7 +17,7 @@ setup(name='rt',
-     author='Jiri Machalek',
-     author_email='edvard.rejthar%nic.cz@localhost',
-     url='https://github.com/CZ-NIC/python-rt',
--    install_requires=['requests', 'six', 'nose'],
-+    install_requires=['requests', 'six'],
-     py_modules=['rt'],
-     classifiers=[
-         'Development Status :: 5 - Production/Stable',


Home | Main Index | Thread Index | Old Index