On Sun, Jan 29, 2012 at 2:07 AM, Jeffrey Van Voorst <[email protected]> wrote: > As usual, chalk it up to pebkac. > > I have pushed a download.sh file in examples/jsonrpc and removed the > pee aitch pee dirs (in 4 places).
:) you're a star. the cleanup continues... > However, this does nothing for the repository size (of course). *sigh* i know. that's a secondary concern. > I am not a git wizard and don't know how > to remove all existence of such files (pee aitch pee) for all time > from pyjamas. Nor do I know if you actually want this. no, you don't. it causes people to have to do "git reset --hard" or a complete new checkout, because removing files requires re-writing of history. > In a similar vein, I haven't removed simplejson as it isn't installed > by default (at least on Mac OS 10.6.8) and is required by the jsonrpc > code (used by the python echos -- cgi and mod_python). that's what should have that try/except block placed around it. if you have python 2.6 then "import json" works out-of-the-box. hence, yes, i think now it can go. .... whooops, i found simplejson being used (as-is, without any try/except import block) - i've sorted that. jsonrpc and the two flask examples. > If my thoughts > are correct, the jsonrpc is some version of old jsonrpc > (http://json-rpc.org/wiki/python-json-rpc-old). We could have a > download script for jsonrpc. yeahhh... i think, given that python 2.6 now has a json module built-in, simply doing "try: import json except: import simplejson as json" is good enough. i've looked through the code in the services/ directory - there's not even a mention of simplejson in it, so i'm deleting those directories. we're not the maintainer of the simplejson library, so its inclusion in pyjamas is inappropriate. people can download and install simplejson - if in fact it is needed at all - from external sources. > As you know, I am partial to jsonrpclib (only because it subclassed > the XMLRPC stuff in the standard python distribution). This allows > those who are familiar with > http://docs.python.org/library/simplexmlrpcserver.html to use the same > approach (maybe just copy & paste) to support both XML and JSON RPC > from the server side without writing much code twice. yeah that's a different matter. "import jsonrpclib" != "import json". one is a client/server implementation of JSONRPC that *uses* the JSON formatting. > I personally, don't care enough to change it from jsonrpc to > jsonrcplib or the "new" jsonrpc. However, I don't know how long the > "old" jsonrpc svn server will stay up. it's a different story, there. apart from anything, i have _no_ idea where the code actually came from! yes it say Copyright (C) Jan but there's no README, no documentation, nothing. it would be good to get rid of that code - if practical - and replace it with something that can use the download trick. l.

