Merge lp:~lifeless/python-oops-amqp/misc into lp:python-oops-amqp
- misc
- Merge into trunk
Proposed by
Robert Collins
Status: | Merged |
---|---|
Approved by: | William Grant |
Approved revision: | 16 |
Merged at revision: | 18 |
Proposed branch: | lp:~lifeless/python-oops-amqp/misc |
Merge into: | lp:python-oops-amqp |
Diff against target: |
367 lines (+132/-28) 10 files modified
Makefile (+13/-0) NEWS (+12/-0) README (+6/-6) oops_amqp/__init__.py (+1/-1) oops_amqp/publisher.py (+3/-3) oops_amqp/tests/test_publisher.py (+9/-9) oops_amqp/tests/test_receiver.py (+6/-6) oops_amqp/trace.py (+74/-0) setup.py (+6/-2) versions.cfg (+2/-1) |
To merge this branch: | bzr merge lp:~lifeless/python-oops-amqp/misc |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
William Grant | code | Approve | |
James Westby (community) | Approve | ||
Review via email: mp+119076@code.launchpad.net |
Commit message
Description of the change
This updates the API to match current oops releases, and adds a useful trace helper.
To post a comment you must log in.
- 16. By Robert Collins
-
Release 0.0.7.
Revision history for this message
James Westby (james-w) wrote : | # |
Revision history for this message
James Westby (james-w) : | # |
review:
Approve
- 17. By Robert Collins
-
Fix bad trace description.
- 18. By Robert Collins
-
Encode the version constraint for oops in setup.py.
Revision history for this message
William Grant (wgrant) : | # |
review:
Approve
(code)
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === added file 'Makefile' | |||
2 | --- Makefile 1970-01-01 00:00:00 +0000 | |||
3 | +++ Makefile 2012-08-10 03:02:19 +0000 | |||
4 | @@ -0,0 +1,13 @@ | |||
5 | 1 | all: | ||
6 | 2 | |||
7 | 3 | bin/buildout: buildout.cfg versions.cfg setup.py download-cache eggs | ||
8 | 4 | ./bootstrap.py \ | ||
9 | 5 | --setup-source=download-cache/ez_setup.py \ | ||
10 | 6 | --download-base=download-cache/dist --eggs=eggs | ||
11 | 7 | |||
12 | 8 | |||
13 | 9 | download-cache: | ||
14 | 10 | bzr checkout --lightweight lp:lp-source-dependencies download-cache | ||
15 | 11 | |||
16 | 12 | eggs: | ||
17 | 13 | mkdir eggs | ||
18 | 0 | 14 | ||
19 | === modified file 'NEWS' | |||
20 | --- NEWS 2012-02-10 14:47:11 +0000 | |||
21 | +++ NEWS 2012-08-10 03:02:19 +0000 | |||
22 | @@ -3,6 +3,18 @@ | |||
23 | 3 | 3 | ||
24 | 4 | Changes and improvements to oops-amqp, grouped by release. | 4 | Changes and improvements to oops-amqp, grouped by release. |
25 | 5 | 5 | ||
26 | 6 | NEXT | ||
27 | 7 | ---- | ||
28 | 8 | |||
29 | 9 | 0.0.7 | ||
30 | 10 | ----- | ||
31 | 11 | |||
32 | 12 | * New script 'oops-amqp-trace' which will trace oops reports received on an | ||
33 | 13 | AMQP exchange. (Robert Collins) | ||
34 | 14 | |||
35 | 15 | * Updated to support the new publisher API in oops 0.0.11 and above. This is | ||
36 | 16 | incompatible with older versions of oops. (Robert Collins) | ||
37 | 17 | |||
38 | 6 | 0.0.6 | 18 | 0.0.6 |
39 | 7 | ----- | 19 | ----- |
40 | 8 | 20 | ||
41 | 9 | 21 | ||
42 | === modified file 'README' | |||
43 | --- README 2011-12-08 10:52:36 +0000 | |||
44 | +++ README 2012-08-10 03:02:19 +0000 | |||
45 | @@ -29,7 +29,7 @@ | |||
46 | 29 | 29 | ||
47 | 30 | * bson | 30 | * bson |
48 | 31 | 31 | ||
50 | 32 | * oops (http://pypi.python.org/pypi/oops) | 32 | * oops (http://pypi.python.org/pypi/oops) 0.0.11 or newer. |
51 | 33 | 33 | ||
52 | 34 | * amqplib | 34 | * amqplib |
53 | 35 | 35 | ||
54 | @@ -63,7 +63,7 @@ | |||
55 | 63 | Provide the publisher to your OOPS config:: | 63 | Provide the publisher to your OOPS config:: |
56 | 64 | 64 | ||
57 | 65 | >>> config = oops.Config() | 65 | >>> config = oops.Config() |
59 | 66 | >>> config.publishers.append(publisher) | 66 | >>> config.publisher = publisher |
60 | 67 | 67 | ||
61 | 68 | Any oops published via that config will now be sent via amqp. | 68 | Any oops published via that config will now be sent via amqp. |
62 | 69 | 69 | ||
63 | @@ -82,14 +82,14 @@ | |||
64 | 82 | the publication failed. To prevent losing the OOPS its a good idea to have a | 82 | the publication failed. To prevent losing the OOPS its a good idea to have a |
65 | 83 | fallback publisher - either another AMQP publisher (to a different server) or | 83 | fallback publisher - either another AMQP publisher (to a different server) or |
66 | 84 | one that spools locally (where you can pick up the OOPSes via rsync or some | 84 | one that spools locally (where you can pick up the OOPSes via rsync or some |
69 | 85 | other mechanism. Using the oops standard helper publish_new_only will let you | 85 | other mechanism. Using the oops standard helper publish_with_fallback will let |
70 | 86 | wrap the fallback publisher so that it only gets invoked if the primary | 86 | you wrap the fallback publisher so that it only gets invoked if the primary |
71 | 87 | method failed:: | 87 | method failed:: |
72 | 88 | 88 | ||
73 | 89 | >>> fallback_factory = partial(amqp.Connection, host="otherserver:5672", | 89 | >>> fallback_factory = partial(amqp.Connection, host="otherserver:5672", |
74 | 90 | ... userid="guest", password="guest", virtual_host="/", insist=False) | 90 | ... userid="guest", password="guest", virtual_host="/", insist=False) |
75 | 91 | >>> fallback_publisher = oops_amqp.Publisher(fallback_factory, "oopses", "") | 91 | >>> fallback_publisher = oops_amqp.Publisher(fallback_factory, "oopses", "") |
77 | 92 | >>> config.publishers.append(publish_new_only(fallback_publisher)) | 92 | >>> config.publisher = publish_with_fallback(publisher, fallback_publisher) |
78 | 93 | 93 | ||
79 | 94 | Receiving from AMQP | 94 | Receiving from AMQP |
80 | 95 | +++++++++++++++++++ | 95 | +++++++++++++++++++ |
81 | @@ -106,7 +106,7 @@ | |||
82 | 106 | 106 | ||
83 | 107 | >>> publisher = oops_datedir_repo.DateDirRepo('.', inherit_id=True) | 107 | >>> publisher = oops_datedir_repo.DateDirRepo('.', inherit_id=True) |
84 | 108 | >>> config = oops.Config() | 108 | >>> config = oops.Config() |
86 | 109 | >>> config.publishers.append(publisher.publish) | 109 | >>> config.publisher = publisher.publish |
87 | 110 | >>> receiver = oops_amqp.Receiver(config, factory, "my queue") | 110 | >>> receiver = oops_amqp.Receiver(config, factory, "my queue") |
88 | 111 | >>> receiver.run_forever() | 111 | >>> receiver.run_forever() |
89 | 112 | 112 | ||
90 | 113 | 113 | ||
91 | === modified file 'oops_amqp/__init__.py' | |||
92 | --- oops_amqp/__init__.py 2012-02-13 00:03:12 +0000 | |||
93 | +++ oops_amqp/__init__.py 2012-08-10 03:02:19 +0000 | |||
94 | @@ -97,7 +97,7 @@ | |||
95 | 97 | # established at this point, and setup.py will use a version of next-$(revno). | 97 | # established at this point, and setup.py will use a version of next-$(revno). |
96 | 98 | # If the releaselevel is 'final', then the tarball will be major.minor.micro. | 98 | # If the releaselevel is 'final', then the tarball will be major.minor.micro. |
97 | 99 | # Otherwise it is major.minor.micro~$(revno). | 99 | # Otherwise it is major.minor.micro~$(revno). |
99 | 100 | __version__ = (0, 0, 6, 'beta', 0) | 100 | __version__ = (0, 0, 7, 'final', 0) |
100 | 101 | 101 | ||
101 | 102 | __all__ = [ | 102 | __all__ = [ |
102 | 103 | 'Publisher', | 103 | 'Publisher', |
103 | 104 | 104 | ||
104 | === modified file 'oops_amqp/publisher.py' | |||
105 | --- oops_amqp/publisher.py 2012-02-09 23:13:45 +0000 | |||
106 | +++ oops_amqp/publisher.py 2012-08-10 03:02:19 +0000 | |||
107 | @@ -88,7 +88,7 @@ | |||
108 | 88 | message.properties["delivery_mode"] = 2 | 88 | message.properties["delivery_mode"] = 2 |
109 | 89 | channel = self.get_channel() | 89 | channel = self.get_channel() |
110 | 90 | if channel is None: | 90 | if channel is None: |
112 | 91 | return None | 91 | return [] |
113 | 92 | try: | 92 | try: |
114 | 93 | channel.basic_publish( | 93 | channel.basic_publish( |
115 | 94 | message, self.exchange_name, routing_key=self.routing_key) | 94 | message, self.exchange_name, routing_key=self.routing_key) |
116 | @@ -96,7 +96,7 @@ | |||
117 | 96 | self.channels.channel = None | 96 | self.channels.channel = None |
118 | 97 | if is_amqplib_connection_error(e): | 97 | if is_amqplib_connection_error(e): |
119 | 98 | # Could not connect / interrupted connection | 98 | # Could not connect / interrupted connection |
121 | 99 | return None | 99 | return [] |
122 | 100 | # Unknown error mode : don't hide it. | 100 | # Unknown error mode : don't hide it. |
123 | 101 | raise | 101 | raise |
125 | 102 | return report['id'] | 102 | return [report['id']] |
126 | 103 | 103 | ||
127 | === modified file 'oops_amqp/tests/test_publisher.py' | |||
128 | --- oops_amqp/tests/test_publisher.py 2012-02-09 23:13:45 +0000 | |||
129 | +++ oops_amqp/tests/test_publisher.py 2012-08-10 03:02:19 +0000 | |||
130 | @@ -40,9 +40,9 @@ | |||
131 | 40 | reference_oops = {'id': 'kept', 'akey': 'avalue'} | 40 | reference_oops = {'id': 'kept', 'akey': 'avalue'} |
132 | 41 | oops = dict(reference_oops) | 41 | oops = dict(reference_oops) |
133 | 42 | expected_id = 'kept' | 42 | expected_id = 'kept' |
135 | 43 | oops_id = publisher(oops) | 43 | oops_ids = publisher(oops) |
136 | 44 | # Publication returns the oops ID allocated. | 44 | # Publication returns the oops ID allocated. |
138 | 45 | self.assertEqual(expected_id, oops_id) | 45 | self.assertEqual([expected_id], oops_ids) |
139 | 46 | # The oops should not be altered by publication. | 46 | # The oops should not be altered by publication. |
140 | 47 | self.assertEqual(reference_oops, oops) | 47 | self.assertEqual(reference_oops, oops) |
141 | 48 | # The received OOPS should have the ID embedded and be a bson dict. | 48 | # The received OOPS should have the ID embedded and be a bson dict. |
142 | @@ -66,14 +66,14 @@ | |||
143 | 66 | oops = dict(reference_oops) | 66 | oops = dict(reference_oops) |
144 | 67 | id_bson = md5(bson.dumps(oops)).hexdigest() | 67 | id_bson = md5(bson.dumps(oops)).hexdigest() |
145 | 68 | expected_id = "OOPS-%s" % id_bson | 68 | expected_id = "OOPS-%s" % id_bson |
147 | 69 | oops_id = publisher(oops) | 69 | oops_ids = publisher(oops) |
148 | 70 | # Publication returns the oops ID allocated. | 70 | # Publication returns the oops ID allocated. |
150 | 71 | self.assertEqual(expected_id, oops_id) | 71 | self.assertEqual([expected_id], oops_ids) |
151 | 72 | # The oops should not be altered by publication. | 72 | # The oops should not be altered by publication. |
152 | 73 | self.assertEqual(reference_oops, oops) | 73 | self.assertEqual(reference_oops, oops) |
153 | 74 | # The received OOPS should have the ID embedded and be a bson dict. | 74 | # The received OOPS should have the ID embedded and be a bson dict. |
154 | 75 | expected_oops = dict(reference_oops) | 75 | expected_oops = dict(reference_oops) |
156 | 76 | expected_oops['id'] = oops_id | 76 | expected_oops['id'] = oops_ids[0] |
157 | 77 | def check_oops(msg): | 77 | def check_oops(msg): |
158 | 78 | self.assertEqual(expected_oops, bson.loads(msg.body)) | 78 | self.assertEqual(expected_oops, bson.loads(msg.body)) |
159 | 79 | channel.basic_ack(msg.delivery_tag) | 79 | channel.basic_ack(msg.delivery_tag) |
160 | @@ -98,11 +98,11 @@ | |||
161 | 98 | publisher = Publisher( | 98 | publisher = Publisher( |
162 | 99 | self.connection_factory, queue.exchange_name, "") | 99 | self.connection_factory, queue.exchange_name, "") |
163 | 100 | oops = {'akey': 42} | 100 | oops = {'akey': 42} |
165 | 101 | self.assertEqual(None, publisher(oops)) | 101 | self.assertEqual([], publisher(oops)) |
166 | 102 | finally: | 102 | finally: |
167 | 103 | self.rabbit.runner._start() | 103 | self.rabbit.runner._start() |
168 | 104 | queue.channel = self.connection_factory().channel() | 104 | queue.channel = self.connection_factory().channel() |
170 | 105 | self.assertNotEqual(None, publisher(oops)) | 105 | self.assertNotEqual([], publisher(oops)) |
171 | 106 | 106 | ||
172 | 107 | def test_publish_amqp_down_after_use(self): | 107 | def test_publish_amqp_down_after_use(self): |
173 | 108 | # If amqp goes down after its been successfully used, None is returned | 108 | # If amqp goes down after its been successfully used, None is returned |
174 | @@ -119,9 +119,9 @@ | |||
175 | 119 | # release. | 119 | # release. |
176 | 120 | self.rabbit.runner._stop() | 120 | self.rabbit.runner._stop() |
177 | 121 | try: | 121 | try: |
179 | 122 | self.assertEqual(None, publisher(oops)) | 122 | self.assertEqual([], publisher(oops)) |
180 | 123 | finally: | 123 | finally: |
181 | 124 | self.rabbit.runner._start() | 124 | self.rabbit.runner._start() |
182 | 125 | queue.channel = self.connection_factory().channel() | 125 | queue.channel = self.connection_factory().channel() |
184 | 126 | self.assertNotEqual(None, publisher(oops)) | 126 | self.assertNotEqual([], publisher(oops)) |
185 | 127 | 127 | ||
186 | 128 | 128 | ||
187 | === modified file 'oops_amqp/tests/test_receiver.py' | |||
188 | --- oops_amqp/tests/test_receiver.py 2012-02-09 23:13:45 +0000 | |||
189 | +++ oops_amqp/tests/test_receiver.py 2012-08-10 03:02:19 +0000 | |||
190 | @@ -39,7 +39,7 @@ | |||
191 | 39 | reports = [] | 39 | reports = [] |
192 | 40 | def capture(report): | 40 | def capture(report): |
193 | 41 | reports.append(report) | 41 | reports.append(report) |
195 | 42 | return report['id'] | 42 | return [report['id']] |
196 | 43 | expected_report = {'id': 'foo', 'otherkey': 42} | 43 | expected_report = {'id': 'foo', 'otherkey': 42} |
197 | 44 | message = amqp.Message(bson.dumps(expected_report)) | 44 | message = amqp.Message(bson.dumps(expected_report)) |
198 | 45 | channel = self.useFixture( | 45 | channel = self.useFixture( |
199 | @@ -51,7 +51,7 @@ | |||
200 | 51 | channel.basic_publish( | 51 | channel.basic_publish( |
201 | 52 | amqp.Message(sentinel), queue.exchange_name, routing_key="") | 52 | amqp.Message(sentinel), queue.exchange_name, routing_key="") |
202 | 53 | config = Config() | 53 | config = Config() |
204 | 54 | config.publishers.append(capture) | 54 | config.publisher = capture |
205 | 55 | receiver = Receiver(config, self.connection_factory, queue.queue_name) | 55 | receiver = Receiver(config, self.connection_factory, queue.queue_name) |
206 | 56 | receiver.sentinel = sentinel | 56 | receiver.sentinel = sentinel |
207 | 57 | receiver.run_forever() | 57 | receiver.run_forever() |
208 | @@ -62,7 +62,7 @@ | |||
209 | 62 | reports = [] | 62 | reports = [] |
210 | 63 | def capture(report): | 63 | def capture(report): |
211 | 64 | reports.append(report) | 64 | reports.append(report) |
213 | 65 | return report['id'] | 65 | return [report['id']] |
214 | 66 | expected_report = {'id': 'foo', 'otherkey': 42} | 66 | expected_report = {'id': 'foo', 'otherkey': 42} |
215 | 67 | message = amqp.Message(bson.dumps(expected_report)) | 67 | message = amqp.Message(bson.dumps(expected_report)) |
216 | 68 | channel = self.useFixture( | 68 | channel = self.useFixture( |
217 | @@ -71,7 +71,7 @@ | |||
218 | 71 | channel.basic_publish( | 71 | channel.basic_publish( |
219 | 72 | message, queue.exchange_name, routing_key="") | 72 | message, queue.exchange_name, routing_key="") |
220 | 73 | config = Config() | 73 | config = Config() |
222 | 74 | config.publishers.append(capture) | 74 | config.publisher = capture |
223 | 75 | # We don't want to loop forever: patch the channel so that after one | 75 | # We don't want to loop forever: patch the channel so that after one |
224 | 76 | # call to wait (which will get our injected message) the loop will shut | 76 | # call to wait (which will get our injected message) the loop will shut |
225 | 77 | # down. | 77 | # down. |
226 | @@ -134,7 +134,7 @@ | |||
227 | 134 | reports = [] | 134 | reports = [] |
228 | 135 | def capture(report): | 135 | def capture(report): |
229 | 136 | reports.append(report) | 136 | reports.append(report) |
231 | 137 | return report['id'] | 137 | return [report['id']] |
232 | 138 | expected_report = {'id': 'foo', 'otherkey': 42} | 138 | expected_report = {'id': 'foo', 'otherkey': 42} |
233 | 139 | message = amqp.Message(bson.dumps(expected_report)) | 139 | message = amqp.Message(bson.dumps(expected_report)) |
234 | 140 | channel = self.useFixture( | 140 | channel = self.useFixture( |
235 | @@ -142,7 +142,7 @@ | |||
236 | 142 | queue = self.useFixture(QueueFixture(channel, self.getUniqueString)) | 142 | queue = self.useFixture(QueueFixture(channel, self.getUniqueString)) |
237 | 143 | channel.basic_publish(message, queue.exchange_name, routing_key="") | 143 | channel.basic_publish(message, queue.exchange_name, routing_key="") |
238 | 144 | config = Config() | 144 | config = Config() |
240 | 145 | config.publishers.append(capture) | 145 | config.publisher = capture |
241 | 146 | state = {} | 146 | state = {} |
242 | 147 | def error_once(func): | 147 | def error_once(func): |
243 | 148 | def wrapped(*args, **kwargs): | 148 | def wrapped(*args, **kwargs): |
244 | 149 | 149 | ||
245 | === added file 'oops_amqp/trace.py' | |||
246 | --- oops_amqp/trace.py 1970-01-01 00:00:00 +0000 | |||
247 | +++ oops_amqp/trace.py 2012-08-10 03:02:19 +0000 | |||
248 | @@ -0,0 +1,74 @@ | |||
249 | 1 | # Copyright (c) 2012, Canonical Ltd | ||
250 | 2 | # | ||
251 | 3 | # This program is free software: you can redistribute it and/or modify | ||
252 | 4 | # it under the terms of the GNU Lesser General Public License as published by | ||
253 | 5 | # the Free Software Foundation, version 3 only. | ||
254 | 6 | # | ||
255 | 7 | # This program is distributed in the hope that it will be useful, | ||
256 | 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
257 | 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
258 | 10 | # GNU Lesser General Public License for more details. | ||
259 | 11 | # | ||
260 | 12 | # You should have received a copy of the GNU Lesser General Public License | ||
261 | 13 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
262 | 14 | # GNU Lesser General Public License version 3 (see the file LICENSE). | ||
263 | 15 | |||
264 | 16 | """Trace OOPS reports coming from an AMQP queue.""" | ||
265 | 17 | |||
266 | 18 | from functools import partial | ||
267 | 19 | import sys | ||
268 | 20 | import optparse | ||
269 | 21 | from textwrap import dedent | ||
270 | 22 | |||
271 | 23 | import amqplib.client_0_8 as amqp | ||
272 | 24 | import oops | ||
273 | 25 | import oops_amqp | ||
274 | 26 | |||
275 | 27 | import anybson as bson | ||
276 | 28 | |||
277 | 29 | |||
278 | 30 | def main(argv=None): | ||
279 | 31 | if argv is None: | ||
280 | 32 | argv=sys.argv | ||
281 | 33 | usage = dedent("""\ | ||
282 | 34 | %prog [options] | ||
283 | 35 | |||
284 | 36 | The following options must be supplied: | ||
285 | 37 | --host | ||
286 | 38 | |||
287 | 39 | e.g. | ||
288 | 40 | oops-amqp-trace --host "localhost:3472" | ||
289 | 41 | |||
290 | 42 | If you do not have a persistent queue, you should run this script | ||
291 | 43 | before generating oopses, as AMQP will discard messages with no | ||
292 | 44 | consumers. | ||
293 | 45 | """) | ||
294 | 46 | description = "Trace OOPS reports coming from an AMQP queue." | ||
295 | 47 | parser = optparse.OptionParser( | ||
296 | 48 | description=description, usage=usage) | ||
297 | 49 | parser.add_option('--host', help="AQMP host / host:port.") | ||
298 | 50 | parser.add_option('--username', help="AQMP username.", default="guest") | ||
299 | 51 | parser.add_option('--password', help="AQMP password.", default="guest") | ||
300 | 52 | parser.add_option('--vhost', help="AMQP vhost.", default="/") | ||
301 | 53 | parser.add_option('--exchange', help="AMQP exchange name.", default="oopses") | ||
302 | 54 | options, args = parser.parse_args(argv[1:]) | ||
303 | 55 | def needed(optname): | ||
304 | 56 | if getattr(options, optname, None) is None: | ||
305 | 57 | raise ValueError('option "%s" must be supplied' % optname) | ||
306 | 58 | needed('host') | ||
307 | 59 | factory = partial( | ||
308 | 60 | amqp.Connection, host=options.host, userid=options.username, | ||
309 | 61 | password=options.password, virtual_host=options.vhost) | ||
310 | 62 | connection = factory() | ||
311 | 63 | channel = connection.channel() | ||
312 | 64 | channel.exchange_declare(options.exchange, type="fanout", durable=False, | ||
313 | 65 | auto_delete=True) | ||
314 | 66 | queue = channel.queue_declare(durable=False, auto_delete=True)[0] | ||
315 | 67 | channel.queue_bind(queue, options.exchange) | ||
316 | 68 | config = oops.Config() | ||
317 | 69 | config.publisher = oops.pprint_to_stream(sys.stdout) | ||
318 | 70 | receiver = oops_amqp.Receiver(config, factory, queue) | ||
319 | 71 | try: | ||
320 | 72 | receiver.run_forever() | ||
321 | 73 | except KeyboardInterrupt: | ||
322 | 74 | pass | ||
323 | 0 | 75 | ||
324 | === modified file 'setup.py' | |||
325 | --- setup.py 2012-02-10 14:47:11 +0000 | |||
326 | +++ setup.py 2012-08-10 03:02:19 +0000 | |||
327 | @@ -23,7 +23,7 @@ | |||
328 | 23 | os.path.join(os.path.dirname(__file__), 'README'), 'rb').read() | 23 | os.path.join(os.path.dirname(__file__), 'README'), 'rb').read() |
329 | 24 | 24 | ||
330 | 25 | setup(name="oops_amqp", | 25 | setup(name="oops_amqp", |
332 | 26 | version="0.0.6", | 26 | version="0.0.7", |
333 | 27 | description=\ | 27 | description=\ |
334 | 28 | "OOPS AMQP transport.", | 28 | "OOPS AMQP transport.", |
335 | 29 | long_description=description, | 29 | long_description=description, |
336 | @@ -41,7 +41,7 @@ | |||
337 | 41 | ], | 41 | ], |
338 | 42 | install_requires = [ | 42 | install_requires = [ |
339 | 43 | 'pymongo', | 43 | 'pymongo', |
341 | 44 | 'oops', | 44 | 'oops>=0.0.11', |
342 | 45 | 'amqplib', | 45 | 'amqplib', |
343 | 46 | ], | 46 | ], |
344 | 47 | extras_require = dict( | 47 | extras_require = dict( |
345 | @@ -51,4 +51,8 @@ | |||
346 | 51 | 'testtools', | 51 | 'testtools', |
347 | 52 | ] | 52 | ] |
348 | 53 | ), | 53 | ), |
349 | 54 | entry_points=dict( | ||
350 | 55 | console_scripts=[ # `console_scripts` is a magic name to setuptools | ||
351 | 56 | 'oops-amqp-trace = oops_amqp.trace:main', | ||
352 | 57 | ]), | ||
353 | 54 | ) | 58 | ) |
354 | 55 | 59 | ||
355 | === modified file 'versions.cfg' | |||
356 | --- versions.cfg 2011-10-10 21:49:50 +0000 | |||
357 | +++ versions.cfg 2012-08-10 03:02:19 +0000 | |||
358 | @@ -6,7 +6,8 @@ | |||
359 | 6 | bson = 0.3.2 | 6 | bson = 0.3.2 |
360 | 7 | fixtures = 0.3.6 | 7 | fixtures = 0.3.6 |
361 | 8 | iso8601 = 0.1.4 | 8 | iso8601 = 0.1.4 |
363 | 9 | oops = 0.0.6 | 9 | oops = 0.0.13 |
364 | 10 | pymongo = 2.1.1 | ||
365 | 10 | pytz = 2010o | 11 | pytz = 2010o |
366 | 11 | rabbitfixture = 0.3.2 | 12 | rabbitfixture = 0.3.2 |
367 | 12 | setuptools = 0.6c11 | 13 | setuptools = 0.6c11 |
281 + description = "Load OOPS reports into oops-tools from AMQP."
Also, I think setup.py should change the requirement to oops>=0.0.11.
Otherwise I think this is ok.
Thanks,
James