Merge lp:~pedronis/u1db/cleanups into lp:u1db

Proposed by Samuele Pedroni
Status: Merged
Approved by: John A Meinel
Approved revision: 123
Merged at revision: 120
Proposed branch: lp:~pedronis/u1db/cleanups
Merge into: lp:u1db
Diff against target: 128 lines (+4/-22)
9 files modified
u1db/commandline/command.py (+1/-1)
u1db/errors.py (+1/-12)
u1db/tests/commandline/__init__.py (+1/-0)
u1db/tests/commandline/test_client.py (+0/-1)
u1db/tests/commandline/test_serve.py (+0/-1)
u1db/tests/test_http_client.py (+0/-2)
u1db/tests/test_http_database.py (+0/-3)
u1db/tests/test_server_state.py (+1/-1)
u1db/tests/test_sqlite_backend.py (+0/-1)
To merge this branch: bzr merge lp:~pedronis/u1db/cleanups
Reviewer Review Type Date Requested Status
Ubuntu One hackers Pending
Review via email: mp+83125@code.launchpad.net

Description of the change

some fixes of problems and unused imports found with pyflakes,

some leftovers from the raw socket sync removal

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'u1db/commandline/command.py'
2--- u1db/commandline/command.py 2011-11-03 21:48:45 +0000
3+++ u1db/commandline/command.py 2011-11-23 09:45:30 +0000
4@@ -75,7 +75,7 @@
5
6 Subclasses should implement this, requesting their specific arguments.
7 """
8- raise NotImplementedError(run)
9+ raise NotImplementedError(self.run)
10
11
12
13
14=== modified file 'u1db/errors.py'
15--- u1db/errors.py 2011-10-25 10:54:22 +0000
16+++ u1db/errors.py 2011-11-23 09:45:30 +0000
17@@ -14,6 +14,7 @@
18
19 """A list of errors that u1db can raise."""
20
21+
22 class U1DBError(Exception):
23 """Generic base class for U1DB errors."""
24
25@@ -36,15 +37,3 @@
26 Can also be raised if wildcard matches are not strictly at the tail of the
27 request.
28 """
29-
30-
31-class BadProtocolStream(U1DBError):
32- """Raised when part of the protocol stream is incorrectly formatted."""
33-
34-
35-class UnknownProtocolVersion(BadProtocolStream):
36- """Raised when the protocol header is unknown to us."""
37-
38-
39-class UnknownRequest(BadProtocolStream):
40- """Raised when an RPC comes in for a request we don't know about."""
41
42=== modified file 'u1db/tests/commandline/__init__.py'
43--- u1db/tests/commandline/__init__.py 2011-10-31 22:06:36 +0000
44+++ u1db/tests/commandline/__init__.py 2011-11-23 09:45:30 +0000
45@@ -12,6 +12,7 @@
46 # You should have received a copy of the GNU General Public License along
47 # with this program. If not, see <http://www.gnu.org/licenses/>.
48
49+import errno
50 import time
51
52
53
54=== modified file 'u1db/tests/commandline/test_client.py'
55--- u1db/tests/commandline/test_client.py 2011-11-21 14:31:33 +0000
56+++ u1db/tests/commandline/test_client.py 2011-11-23 09:45:30 +0000
57@@ -16,7 +16,6 @@
58 import os
59 import sys
60 import subprocess
61-import time
62
63 from u1db import (
64 __version__ as _u1db_version,
65
66=== modified file 'u1db/tests/commandline/test_serve.py'
67--- u1db/tests/commandline/test_serve.py 2011-11-21 14:24:59 +0000
68+++ u1db/tests/commandline/test_serve.py 2011-11-23 09:45:30 +0000
69@@ -12,7 +12,6 @@
70 # You should have received a copy of the GNU General Public License along
71 # with this program. If not, see <http://www.gnu.org/licenses/>.
72
73-import errno
74 import os
75 import socket
76 import subprocess
77
78=== modified file 'u1db/tests/test_http_client.py'
79--- u1db/tests/test_http_client.py 2011-11-21 14:24:59 +0000
80+++ u1db/tests/test_http_client.py 2011-11-23 09:45:30 +0000
81@@ -14,8 +14,6 @@
82
83 """Tests for HTTPDatabase"""
84
85-import inspect
86-import os
87 import simplejson
88 from wsgiref import simple_server
89
90
91=== modified file 'u1db/tests/test_http_database.py'
92--- u1db/tests/test_http_database.py 2011-11-18 15:27:06 +0000
93+++ u1db/tests/test_http_database.py 2011-11-23 09:45:30 +0000
94@@ -15,9 +15,6 @@
95 """Tests for HTTPDatabase"""
96
97 import inspect
98-import os
99-import simplejson
100-from wsgiref import simple_server
101
102 from u1db import (
103 Document,
104
105=== renamed file 'u1db/tests/test_remote_requests.py' => 'u1db/tests/test_server_state.py'
106--- u1db/tests/test_remote_requests.py 2011-11-22 11:09:00 +0000
107+++ u1db/tests/test_server_state.py 2011-11-23 09:45:30 +0000
108@@ -12,7 +12,7 @@
109 # You should have received a copy of the GNU General Public License along
110 # with this program. If not, see <http://www.gnu.org/licenses/>.
111
112-"""Tests for the remote request objects"""
113+"""Tests for server state object."""
114
115 import os
116
117
118=== modified file 'u1db/tests/test_sqlite_backend.py'
119--- u1db/tests/test_sqlite_backend.py 2011-11-22 16:06:25 +0000
120+++ u1db/tests/test_sqlite_backend.py 2011-11-23 09:45:30 +0000
121@@ -21,7 +21,6 @@
122 import shutil
123
124 from sqlite3 import dbapi2
125-import simplejson
126
127 from u1db import (
128 tests,

Subscribers

People subscribed via source and target branches