From d171e13fd376225695b45a02925952fe7c0aeefc Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Mon, 30 Apr 2012 10:09:16 +1200 Subject: [PATCH] Fix redundant imports, tweak TODO for 0.2 --- README.mkd | 4 +++- libpathod/rparse.py | 4 ++-- libpathod/utils.py | 2 +- test/test_rparse.py | 2 +- todo | 5 +++-- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/README.mkd b/README.mkd index bf5634ba6..43c447fe9 100644 --- a/README.mkd +++ b/README.mkd @@ -233,12 +233,14 @@ Supported data types are: ascii bytes + # API __pathod__ exposes a simple API, intended to make it possible to drive and inspect the daemon remotely for use in unit testing and the like. The next release will include a client-side library that makes this transparent. + ### /api/log Returns the current log buffer. At the moment the buffer size is 500 entries - @@ -287,6 +289,7 @@ Where each entry looks like this: You can preview the JSON data returned for a log entry through the built-in web interface. + ### /api/log/clear A POST to this URL clears the log buffer. @@ -302,4 +305,3 @@ system, installing __pathod__ and its dependencies is dead simple: The project uses the __pry__ unit testing framework, which you can get here: http://github.com/cortesi/pry - diff --git a/libpathod/rparse.py b/libpathod/rparse.py index d3b3dbb50..87eff563d 100644 --- a/libpathod/rparse.py +++ b/libpathod/rparse.py @@ -1,6 +1,6 @@ -import operator, string, random, sys, time, mmap, os, time +import operator, string, random, mmap, os, time import contrib.pyparsing as pp -import http, utils +import http import tornado.ioloop TESTING = False diff --git a/libpathod/utils.py b/libpathod/utils.py index 6d42c9b2e..46b252dd4 100644 --- a/libpathod/utils.py +++ b/libpathod/utils.py @@ -1,4 +1,4 @@ -import copy, os, re, StringIO +import os, re import rparse class AnchorError(Exception): pass diff --git a/test/test_rparse.py b/test/test_rparse.py index 621cf8a38..a2a83c617 100644 --- a/test/test_rparse.py +++ b/test/test_rparse.py @@ -1,4 +1,4 @@ -import sys, os +import os import libpry from libpathod import rparse, utils diff --git a/todo b/todo index fe9c2db37..98e4790c6 100644 --- a/todo +++ b/todo @@ -1,10 +1,11 @@ 0.2: - API - - Logs, log reset, log retrieval - Anchor management + - Client library + - Unit testing examples - Specify if server should add Server and Date headers - Shortcuts for cookies, auth - Various SSL errors (expired certs, etc.) - - Caching functions + - Muck with caching