You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rh...@apache.org on 2010/04/09 14:12:50 UTC

svn commit: r932375 - in /qpid/trunk/qpid/python/qpid: messaging/driver.py messaging/message.py tests/messaging/__init__.py tests/messaging/message.py

Author: rhs
Date: Fri Apr  9 12:12:50 2010
New Revision: 932375

URL: http://svn.apache.org/viewvc?rev=932375&view=rev
Log:
removed Message.to

Modified:
    qpid/trunk/qpid/python/qpid/messaging/driver.py
    qpid/trunk/qpid/python/qpid/messaging/message.py
    qpid/trunk/qpid/python/qpid/tests/messaging/__init__.py
    qpid/trunk/qpid/python/qpid/tests/messaging/message.py

Modified: qpid/trunk/qpid/python/qpid/messaging/driver.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/messaging/driver.py?rev=932375&r1=932374&r2=932375&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/messaging/driver.py (original)
+++ qpid/trunk/qpid/python/qpid/messaging/driver.py Fri Apr  9 12:12:50 2010
@@ -307,7 +307,6 @@ EMPTY_DP = DeliveryProperties()
 EMPTY_MP = MessageProperties()
 
 SUBJECT = "qpid.subject"
-TO = "qpid.to"
 
 CLOSED = "CLOSED"
 READ_ONLY = "READ_ONLY"
@@ -1120,10 +1119,6 @@ class Engine:
       if mp.application_headers is None:
         mp.application_headers = {}
       mp.application_headers[SUBJECT] = subject
-    if msg.to is not None:
-      if mp.application_headers is None:
-        mp.application_headers = {}
-      mp.application_headers[TO] = msg.to
     if msg.durable is not None:
       if msg.durable:
         dp.delivery_mode = delivery_mode.persistent
@@ -1175,7 +1170,6 @@ class Engine:
     msg = Message(content)
     msg.id = mp.message_id
     if ap is not None:
-      msg.to = ap.get(TO)
       msg.subject = ap.get(SUBJECT)
     msg.user_id = mp.user_id
     if mp.reply_to is not None:

Modified: qpid/trunk/qpid/python/qpid/messaging/message.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/messaging/message.py?rev=932375&r1=932374&r2=932375&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/messaging/message.py (original)
+++ qpid/trunk/qpid/python/qpid/messaging/message.py Fri Apr  9 12:12:50 2010
@@ -76,8 +76,6 @@ class Message:
   @ivar id: the message id
   @type user_id: str
   @ivar user_id: the user-id of the message producer
-  @type to: str
-  @ivar to: the destination address
   @type reply_to: str
   @ivar reply_to: the address to send replies
   @type correlation_id: str
@@ -91,9 +89,8 @@ class Message:
   """
 
   def __init__(self, content=None, content_type=UNSPECIFIED, id=None,
-               subject=None, to=None, user_id=None, reply_to=None,
-               correlation_id=None, durable=None, priority=None, ttl=None,
-               properties=None):
+               subject=None, user_id=None, reply_to=None, correlation_id=None,
+               durable=None, priority=None, ttl=None, properties=None):
     """
     Construct a new message with the supplied content. The
     content-type of the message will be automatically inferred from
@@ -107,7 +104,6 @@ class Message:
     """
     self.id = id
     self.subject = subject
-    self.to = to
     self.user_id = user_id
     self.reply_to = reply_to
     self.correlation_id = correlation_id
@@ -127,8 +123,8 @@ class Message:
 
   def __repr__(self):
     args = []
-    for name in ["id", "subject", "to", "user_id", "reply_to",
-                 "correlation_id", "priority", "ttl"]:
+    for name in ["id", "subject", "user_id", "reply_to", "correlation_id",
+                 "priority", "ttl"]:
       value = self.__dict__[name]
       if value is not None: args.append("%s=%r" % (name, value))
     for name in ["durable", "redelivered", "properties"]:

Modified: qpid/trunk/qpid/python/qpid/tests/messaging/__init__.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/tests/messaging/__init__.py?rev=932375&r1=932374&r2=932375&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/tests/messaging/__init__.py (original)
+++ qpid/trunk/qpid/python/qpid/tests/messaging/__init__.py Fri Apr  9 12:12:50 2010
@@ -86,7 +86,7 @@ class Base(Test):
 
   def diff(self, m1, m2):
     result = {}
-    for attr in ("id", "subject", "user_id", "to", "reply_to",
+    for attr in ("id", "subject", "user_id", "reply_to",
                  "correlation_id", "durable", "priority", "ttl",
                  "redelivered", "properties", "content_type",
                  "content"):

Modified: qpid/trunk/qpid/python/qpid/tests/messaging/message.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/tests/messaging/message.py?rev=932375&r1=932374&r2=932375&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/tests/messaging/message.py (original)
+++ qpid/trunk/qpid/python/qpid/tests/messaging/message.py Fri Apr  9 12:12:50 2010
@@ -97,7 +97,6 @@ class MessageEchoTests(Base):
 
   def testProperties(self):
     msg = Message()
-    msg.to = "to-address"
     msg.subject = "subject"
     msg.correlation_id = str(self.test_id)
     msg.durable = True



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org