Source

trac-rpc-mq / t5437 / t5437-protocol_api_v2-r7194.diff

Diff from to

File t5437/t5437-protocol_api_v2-r7194.diff

 RPC Protocol API version 2
 
-diff -r de4ed975fd30 trunk/setup.py
---- a/trunk/setup.py	Fri Apr 09 09:01:40 2010 -0500
-+++ b/trunk/setup.py	Tue Apr 13 12:38:15 2010 -0500
+diff -r 1f87dee9169c trunk/setup.py
+--- a/trunk/setup.py	Thu Apr 15 09:30:33 2010 -0500
++++ b/trunk/setup.py	Thu Apr 15 09:42:15 2010 -0500
 @@ -28,7 +28,7 @@
      url='http://trac-hacks.org/wiki/XmlRpcPlugin',
      description='RPC interface to Trac',
      tests_require = test_deps,
      packages=find_packages(exclude=['*.tests']),
      package_data={
-diff -r de4ed975fd30 trunk/tracrpc/api.py
---- a/trunk/tracrpc/api.py	Fri Apr 09 09:01:40 2010 -0500
-+++ b/trunk/tracrpc/api.py	Tue Apr 13 12:38:15 2010 -0500
+diff -r 1f87dee9169c trunk/tracrpc/api.py
+--- a/trunk/tracrpc/api.py	Thu Apr 15 09:30:33 2010 -0500
++++ b/trunk/tracrpc/api.py	Thu Apr 15 09:42:15 2010 -0500
 @@ -15,19 +15,41 @@
  from trac.perm import IPermissionRequestor
  
  
  class IXMLRPCHandler(Interface):
  
-diff -r de4ed975fd30 trunk/tracrpc/json_rpc.py
---- a/trunk/tracrpc/json_rpc.py	Fri Apr 09 09:01:40 2010 -0500
-+++ b/trunk/tracrpc/json_rpc.py	Tue Apr 13 12:38:15 2010 -0500
+diff -r 1f87dee9169c trunk/tracrpc/json_rpc.py
+--- a/trunk/tracrpc/json_rpc.py	Thu Apr 15 09:30:33 2010 -0500
++++ b/trunk/tracrpc/json_rpc.py	Thu Apr 15 09:42:15 2010 -0500
 @@ -5,8 +5,9 @@
  (c) 2009      ::: www.CodeResort.com - BV Network AS (simon-code@bvnetwork.no)
  """
  
      def _json_error(self, e, c=None, r_id=None):
          """ Makes a response dictionary that is an error. """
-diff -r de4ed975fd30 trunk/tracrpc/tests/__init__.py
---- a/trunk/tracrpc/tests/__init__.py	Fri Apr 09 09:01:40 2010 -0500
-+++ b/trunk/tracrpc/tests/__init__.py	Tue Apr 13 12:38:15 2010 -0500
+diff -r 1f87dee9169c trunk/tracrpc/tests/__init__.py
+--- a/trunk/tracrpc/tests/__init__.py	Thu Apr 15 09:30:33 2010 -0500
++++ b/trunk/tracrpc/tests/__init__.py	Thu Apr 15 09:42:15 2010 -0500
 @@ -35,6 +35,7 @@
              print "Enabling RPC plugin and permissions..."
              env.config.set('components', 'tracrpc.*', 'enabled')
 +                raise self.failureException, "Expected %s\n\nNothing raised" % excName
 +
 +        assertRaises = failUnlessRaises
-diff -r de4ed975fd30 trunk/tracrpc/tests/api.py
---- a/trunk/tracrpc/tests/api.py	Fri Apr 09 09:01:40 2010 -0500
-+++ b/trunk/tracrpc/tests/api.py	Tue Apr 13 12:38:15 2010 -0500
+diff -r 1f87dee9169c trunk/tracrpc/tests/api.py
+--- a/trunk/tracrpc/tests/api.py	Thu Apr 15 09:30:33 2010 -0500
++++ b/trunk/tracrpc/tests/api.py	Thu Apr 15 09:42:15 2010 -0500
 @@ -100,8 +100,8 @@
              os.unlink(provider)
              rpc_testenv.restart()
  if __name__ == '__main__':
 -    unittest.main(defaultTest='suite')
 +    unittest.main(defaultTest='test_suite')
-diff -r de4ed975fd30 trunk/tracrpc/tests/json_rpc.py
---- a/trunk/tracrpc/tests/json_rpc.py	Fri Apr 09 09:01:40 2010 -0500
-+++ b/trunk/tracrpc/tests/json_rpc.py	Tue Apr 13 12:38:15 2010 -0500
+diff -r 1f87dee9169c trunk/tracrpc/tests/json_rpc.py
+--- a/trunk/tracrpc/tests/json_rpc.py	Thu Apr 15 09:30:33 2010 -0500
++++ b/trunk/tracrpc/tests/json_rpc.py	Thu Apr 15 09:42:15 2010 -0500
 @@ -14,10 +14,10 @@
  from tracrpc.util import StringIO
  
  if __name__ == '__main__':
 -    unittest.main(defaultTest='suite')
 +    unittest.main(defaultTest='test_suite')
-diff -r de4ed975fd30 trunk/tracrpc/tests/ticket.py
---- a/trunk/tracrpc/tests/ticket.py	Fri Apr 09 09:01:40 2010 -0500
-+++ b/trunk/tracrpc/tests/ticket.py	Tue Apr 13 12:38:15 2010 -0500
+diff -r 1f87dee9169c trunk/tracrpc/tests/ticket.py
+--- a/trunk/tracrpc/tests/ticket.py	Thu Apr 15 09:30:33 2010 -0500
++++ b/trunk/tracrpc/tests/ticket.py	Thu Apr 15 09:42:15 2010 -0500
 @@ -12,9 +12,9 @@
  import shutil
  import time
  if __name__ == '__main__':
 -    unittest.main(defaultTest='suite')
 +    unittest.main(defaultTest='test_suite')
-diff -r de4ed975fd30 trunk/tracrpc/tests/wiki.py
---- a/trunk/tracrpc/tests/wiki.py	Fri Apr 09 09:01:40 2010 -0500
-+++ b/trunk/tracrpc/tests/wiki.py	Tue Apr 13 12:38:15 2010 -0500
+diff -r 1f87dee9169c trunk/tracrpc/tests/wiki.py
+--- a/trunk/tracrpc/tests/wiki.py	Thu Apr 15 09:30:33 2010 -0500
++++ b/trunk/tracrpc/tests/wiki.py	Thu Apr 15 09:42:15 2010 -0500
 @@ -13,10 +13,10 @@
  
  from trac.util.compat import sorted
  if __name__ == '__main__':
 -    unittest.main(defaultTest='suite')
 +    unittest.main(defaultTest='test_suite')
-diff -r de4ed975fd30 trunk/tracrpc/tests/xml_rpc.py
---- a/trunk/tracrpc/tests/xml_rpc.py	Fri Apr 09 09:01:40 2010 -0500
-+++ b/trunk/tracrpc/tests/xml_rpc.py	Tue Apr 13 12:38:15 2010 -0500
+diff -r 1f87dee9169c trunk/tracrpc/tests/xml_rpc.py
+--- a/trunk/tracrpc/tests/xml_rpc.py	Thu Apr 15 09:30:33 2010 -0500
++++ b/trunk/tracrpc/tests/xml_rpc.py	Thu Apr 15 09:42:15 2010 -0500
 @@ -9,9 +9,9 @@
  
  import xmlrpclib
  if __name__ == '__main__':
 -    unittest.main(defaultTest='suite')
 +    unittest.main(defaultTest='test_suite')
-diff -r de4ed975fd30 trunk/tracrpc/web_ui.py
---- a/trunk/tracrpc/web_ui.py	Fri Apr 09 09:01:40 2010 -0500
-+++ b/trunk/tracrpc/web_ui.py	Tue Apr 13 12:38:15 2010 -0500
+diff -r 1f87dee9169c trunk/tracrpc/web_ui.py
+--- a/trunk/tracrpc/web_ui.py	Thu Apr 15 09:30:33 2010 -0500
++++ b/trunk/tracrpc/web_ui.py	Thu Apr 15 09:42:15 2010 -0500
 @@ -6,6 +6,10 @@
  (c) 2009      ::: www.CodeResort.com - BV Network AS (simon-code@bvnetwork.no)
  """
      # ITemplateProvider methods
  
      def get_htdocs_dirs(self):
-diff -r de4ed975fd30 trunk/tracrpc/xml_rpc.py
---- a/trunk/tracrpc/xml_rpc.py	Fri Apr 09 09:01:40 2010 -0500
-+++ b/trunk/tracrpc/xml_rpc.py	Tue Apr 13 12:38:15 2010 -0500
+diff -r 1f87dee9169c trunk/tracrpc/xml_rpc.py
+--- a/trunk/tracrpc/xml_rpc.py	Thu Apr 15 09:30:33 2010 -0500
++++ b/trunk/tracrpc/xml_rpc.py	Thu Apr 15 09:42:15 2010 -0500
 @@ -19,7 +19,7 @@
  from trac.util.text import to_unicode
  
  from tracrpc.util import empty, prepare_docs
  
  __all__ = ['XmlRpcProtocol']
-@@ -81,41 +81,48 @@
-         yield ('xmlrpc', 'application/xml')
+@@ -82,41 +82,48 @@
+         yield ('rpc', 'text/xml')
          yield ('xmlrpc', 'text/xml')
  
 -    def rpc_process(self, req, content_type):
              self.log.error(e)
              import traceback
              from tracrpc.util import StringIO
-@@ -123,6 +130,7 @@
+@@ -124,6 +131,7 @@
              traceback.print_exc(file = out)
              self.log.error(out.getvalue())
              err_code = hasattr(e, 'code') and e.code or 1