launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #06308
[Merge] lp:~james-w/python-oops-amqp/bson-compat into lp:python-oops-amqp
James Westby has proposed merging lp:~james-w/python-oops-amqp/bson-compat into lp:python-oops-amqp.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~james-w/python-oops-amqp/bson-compat/+merge/92389
Hi,
The world has two bson libraries with incompatible APIs. This is unfortunate.
However, we can make the world bright again if we support either API. This
is my attempt to do that.
Have a nice day!
James
--
https://code.launchpad.net/~james-w/python-oops-amqp/bson-compat/+merge/92389
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~james-w/python-oops-amqp/bson-compat into lp:python-oops-amqp.
=== modified file 'oops_amqp/publisher.py'
--- oops_amqp/publisher.py 2011-12-08 09:29:35 +0000
+++ oops_amqp/publisher.py 2012-02-09 23:17:22 +0000
@@ -21,7 +21,7 @@
from threading import local
from amqplib import client_0_8 as amqp
-from bson import dumps
+from anybson import dumps
from utils import (
amqplib_error_types,
=== modified file 'oops_amqp/receiver.py'
--- oops_amqp/receiver.py 2011-12-08 10:15:23 +0000
+++ oops_amqp/receiver.py 2012-02-09 23:17:22 +0000
@@ -19,8 +19,7 @@
import time
-import bson
-
+import anybson as bson
from utils import (
amqplib_error_types,
close_ignoring_connection_errors,
=== modified file 'oops_amqp/tests/test_publisher.py'
--- oops_amqp/tests/test_publisher.py 2011-12-08 10:15:23 +0000
+++ oops_amqp/tests/test_publisher.py 2012-02-09 23:17:22 +0000
@@ -17,10 +17,10 @@
from hashlib import md5
-import bson
-
-from oops_amqp import Publisher
-from oops_amqp.utils import close_ignoring_connection_errors
+from oops_amqp import (
+ anybson as bson,
+ Publisher,
+ )
from oops_amqp.tests import (
ChannelFixture,
QueueFixture,
=== modified file 'oops_amqp/tests/test_receiver.py'
--- oops_amqp/tests/test_receiver.py 2011-12-08 09:29:35 +0000
+++ oops_amqp/tests/test_receiver.py 2012-02-09 23:17:22 +0000
@@ -19,10 +19,12 @@
import socket
from amqplib import client_0_8 as amqp
-import bson
from oops import Config
-from oops_amqp import Receiver
+from oops_amqp import (
+ anybson as bson,
+ Receiver,
+ )
from oops_amqp.tests import (
ChannelFixture,
QueueFixture,