summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Shyba <victor1984@riseup.net>2017-05-08 05:56:20 -0300
committerVictor Shyba <victor1984@riseup.net>2017-05-08 05:56:20 -0300
commit3ff522b687dcccd1ada5da5aba526057befec007 (patch)
tree4f3c9e2d2f4744cfeed4e82d780577bac79e4293
parentac0e01ccf4a7d372cddea03ae1982a01e28b9cd0 (diff)
[refactor] _database -> _db
-rw-r--r--client/src/leap/soledad/client/_db/__init__.py (renamed from client/src/leap/soledad/client/_database/__init__.py)0
-rw-r--r--client/src/leap/soledad/client/_db/adbapi.py (renamed from client/src/leap/soledad/client/_database/adbapi.py)0
-rw-r--r--client/src/leap/soledad/client/_db/blobs.py (renamed from client/src/leap/soledad/client/_database/blobs.py)0
-rw-r--r--client/src/leap/soledad/client/_db/dbschema.sql (renamed from client/src/leap/soledad/client/_database/dbschema.sql)0
-rw-r--r--client/src/leap/soledad/client/_db/pragmas.py (renamed from client/src/leap/soledad/client/_database/pragmas.py)0
-rw-r--r--client/src/leap/soledad/client/_db/sqlcipher.py (renamed from client/src/leap/soledad/client/_database/sqlcipher.py)0
-rw-r--r--client/src/leap/soledad/client/_db/sqlite.py (renamed from client/src/leap/soledad/client/_database/sqlite.py)0
-rw-r--r--client/src/leap/soledad/client/api.py6
-rw-r--r--client/src/leap/soledad/client/examples/benchmarks/measure_index_times.py2
-rw-r--r--client/src/leap/soledad/client/examples/benchmarks/measure_index_times_custom_docid.py2
-rw-r--r--client/src/leap/soledad/client/examples/use_adbapi.py2
-rw-r--r--common/src/leap/soledad/common/l2db/__init__.py2
-rw-r--r--common/src/leap/soledad/common/l2db/remote/server_state.py6
-rw-r--r--testing/test_soledad/u1db_tests/__init__.py2
-rw-r--r--testing/test_soledad/u1db_tests/test_open.py2
-rw-r--r--testing/test_soledad/util.py4
-rw-r--r--testing/tests/blobs/test_blob_manager.py4
-rw-r--r--testing/tests/blobs/test_decrypter_buffer.py6
-rw-r--r--testing/tests/blobs/test_sqlcipher_client_backend.py2
-rw-r--r--testing/tests/client/test_aux_methods.py2
-rw-r--r--testing/tests/server/test_blobs_server.py4
-rw-r--r--testing/tests/sqlcipher/test_async.py4
-rw-r--r--testing/tests/sqlcipher/test_backend.py8
-rw-r--r--testing/tests/sync/test_sync_target.py6
24 files changed, 32 insertions, 32 deletions
diff --git a/client/src/leap/soledad/client/_database/__init__.py b/client/src/leap/soledad/client/_db/__init__.py
index e69de29b..e69de29b 100644
--- a/client/src/leap/soledad/client/_database/__init__.py
+++ b/client/src/leap/soledad/client/_db/__init__.py
diff --git a/client/src/leap/soledad/client/_database/adbapi.py b/client/src/leap/soledad/client/_db/adbapi.py
index 5c28d108..5c28d108 100644
--- a/client/src/leap/soledad/client/_database/adbapi.py
+++ b/client/src/leap/soledad/client/_db/adbapi.py
diff --git a/client/src/leap/soledad/client/_database/blobs.py b/client/src/leap/soledad/client/_db/blobs.py
index 10b90c71..10b90c71 100644
--- a/client/src/leap/soledad/client/_database/blobs.py
+++ b/client/src/leap/soledad/client/_db/blobs.py
diff --git a/client/src/leap/soledad/client/_database/dbschema.sql b/client/src/leap/soledad/client/_db/dbschema.sql
index ae027fc5..ae027fc5 100644
--- a/client/src/leap/soledad/client/_database/dbschema.sql
+++ b/client/src/leap/soledad/client/_db/dbschema.sql
diff --git a/client/src/leap/soledad/client/_database/pragmas.py b/client/src/leap/soledad/client/_db/pragmas.py
index 870ed63e..870ed63e 100644
--- a/client/src/leap/soledad/client/_database/pragmas.py
+++ b/client/src/leap/soledad/client/_db/pragmas.py
diff --git a/client/src/leap/soledad/client/_database/sqlcipher.py b/client/src/leap/soledad/client/_db/sqlcipher.py
index d22017bd..d22017bd 100644
--- a/client/src/leap/soledad/client/_database/sqlcipher.py
+++ b/client/src/leap/soledad/client/_db/sqlcipher.py
diff --git a/client/src/leap/soledad/client/_database/sqlite.py b/client/src/leap/soledad/client/_db/sqlite.py
index 4f7b1259..4f7b1259 100644
--- a/client/src/leap/soledad/client/_database/sqlite.py
+++ b/client/src/leap/soledad/client/_db/sqlite.py
diff --git a/client/src/leap/soledad/client/api.py b/client/src/leap/soledad/client/api.py
index 3dd99227..c62b43f0 100644
--- a/client/src/leap/soledad/client/api.py
+++ b/client/src/leap/soledad/client/api.py
@@ -54,9 +54,9 @@ from leap.soledad.common.errors import DatabaseAccessError
from . import events as soledad_events
from . import interfaces as soledad_interfaces
from ._crypto import SoledadCrypto
-from ._database import adbapi
-from ._database import blobs
-from ._database import sqlcipher
+from ._db import adbapi
+from ._db import blobs
+from ._db import sqlcipher
from ._recovery_code import RecoveryCode
from ._secrets import Secrets
diff --git a/client/src/leap/soledad/client/examples/benchmarks/measure_index_times.py b/client/src/leap/soledad/client/examples/benchmarks/measure_index_times.py
index 276b1200..f9349758 100644
--- a/client/src/leap/soledad/client/examples/benchmarks/measure_index_times.py
+++ b/client/src/leap/soledad/client/examples/benchmarks/measure_index_times.py
@@ -28,7 +28,7 @@ from twisted.internet import defer, reactor
from leap.soledad.common import l2db
from leap.soledad.client import adbapi
-from leap.soledad.client._database.sqlcipher import SQLCipherOptions
+from leap.soledad.client._db.sqlcipher import SQLCipherOptions
folder = os.environ.get("TMPDIR", "tmp")
diff --git a/client/src/leap/soledad/client/examples/benchmarks/measure_index_times_custom_docid.py b/client/src/leap/soledad/client/examples/benchmarks/measure_index_times_custom_docid.py
index d288582b..4f273c64 100644
--- a/client/src/leap/soledad/client/examples/benchmarks/measure_index_times_custom_docid.py
+++ b/client/src/leap/soledad/client/examples/benchmarks/measure_index_times_custom_docid.py
@@ -27,7 +27,7 @@ import sys
from twisted.internet import defer, reactor
from leap.soledad.client import adbapi
-from leap.soledad.client._database.sqlcipher import SQLCipherOptions
+from leap.soledad.client._db.sqlcipher import SQLCipherOptions
from leap.soledad.common import l2db
diff --git a/client/src/leap/soledad/client/examples/use_adbapi.py b/client/src/leap/soledad/client/examples/use_adbapi.py
index 25b32307..ddb1eaae 100644
--- a/client/src/leap/soledad/client/examples/use_adbapi.py
+++ b/client/src/leap/soledad/client/examples/use_adbapi.py
@@ -24,7 +24,7 @@ import os
from twisted.internet import defer, reactor
from leap.soledad.client import adbapi
-from leap.soledad.client._database.sqlcipher import SQLCipherOptions
+from leap.soledad.client._db.sqlcipher import SQLCipherOptions
from leap.soledad.common import l2db
diff --git a/common/src/leap/soledad/common/l2db/__init__.py b/common/src/leap/soledad/common/l2db/__init__.py
index ebbf546a..43d61b1d 100644
--- a/common/src/leap/soledad/common/l2db/__init__.py
+++ b/common/src/leap/soledad/common/l2db/__init__.py
@@ -37,7 +37,7 @@ def open(path, create, document_factory=None):
parameters as Document.__init__.
:return: An instance of Database.
"""
- from leap.soledad.client._database import sqlite
+ from leap.soledad.client._db import sqlite
return sqlite.SQLiteDatabase.open_database(
path, create=create, document_factory=document_factory)
diff --git a/common/src/leap/soledad/common/l2db/remote/server_state.py b/common/src/leap/soledad/common/l2db/remote/server_state.py
index 89ac5742..d4c3c45f 100644
--- a/common/src/leap/soledad/common/l2db/remote/server_state.py
+++ b/common/src/leap/soledad/common/l2db/remote/server_state.py
@@ -42,7 +42,7 @@ class ServerState(object):
def open_database(self, path):
"""Open a database at the given location."""
- from leap.soledad.client._database import sqlite
+ from leap.soledad.client._db import sqlite
full_path = self._relpath(path)
return sqlite.SQLiteDatabase.open_database(full_path, create=False)
@@ -56,13 +56,13 @@ class ServerState(object):
def ensure_database(self, path):
"""Ensure database at the given location."""
- from leap.soledad.client._database import sqlite
+ from leap.soledad.client._db import sqlite
full_path = self._relpath(path)
db = sqlite.SQLiteDatabase.open_database(full_path, create=True)
return db, db._replica_uid
def delete_database(self, path):
"""Delete database at the given location."""
- from leap.soledad.client._database import sqlite
+ from leap.soledad.client._db import sqlite
full_path = self._relpath(path)
sqlite.SQLiteDatabase.delete_database(full_path)
diff --git a/testing/test_soledad/u1db_tests/__init__.py b/testing/test_soledad/u1db_tests/__init__.py
index ccbb6ca6..2a4415a6 100644
--- a/testing/test_soledad/u1db_tests/__init__.py
+++ b/testing/test_soledad/u1db_tests/__init__.py
@@ -41,7 +41,7 @@ from leap.soledad.common.l2db.remote import server_state
from leap.soledad.common.l2db.remote import http_app
from leap.soledad.common.l2db.remote import http_target
-from leap.soledad.client._database import sqlite
+from leap.soledad.client._db import sqlite
if sys.version_info[0] < 3:
from pysqlcipher import dbapi2
diff --git a/testing/test_soledad/u1db_tests/test_open.py b/testing/test_soledad/u1db_tests/test_open.py
index eaaee72f..4ca0c4a7 100644
--- a/testing/test_soledad/u1db_tests/test_open.py
+++ b/testing/test_soledad/u1db_tests/test_open.py
@@ -28,7 +28,7 @@ from test_soledad.u1db_tests.test_backends import TestAlternativeDocument
from leap.soledad.common.l2db import errors
from leap.soledad.common.l2db import open as u1db_open
-from leap.soledad.client._database import sqlite
+from leap.soledad.client._db import sqlite
@skip("Skiping tests imported from U1DB.")
diff --git a/testing/test_soledad/util.py b/testing/test_soledad/util.py
index 0335d544..b814d5ca 100644
--- a/testing/test_soledad/util.py
+++ b/testing/test_soledad/util.py
@@ -47,8 +47,8 @@ from leap.soledad.client import Soledad
from leap.soledad.client import http_target
from leap.soledad.client import auth
from leap.soledad.client._crypto import is_symmetrically_encrypted
-from leap.soledad.client._database.sqlcipher import SQLCipherDatabase
-from leap.soledad.client._database.sqlcipher import SQLCipherOptions
+from leap.soledad.client._db.sqlcipher import SQLCipherDatabase
+from leap.soledad.client._db.sqlcipher import SQLCipherOptions
from leap.soledad.server import SoledadApp
diff --git a/testing/tests/blobs/test_blob_manager.py b/testing/tests/blobs/test_blob_manager.py
index 85f08d1e..d0bd57fc 100644
--- a/testing/tests/blobs/test_blob_manager.py
+++ b/testing/tests/blobs/test_blob_manager.py
@@ -19,8 +19,8 @@ Tests for BlobManager.
"""
from twisted.trial import unittest
from twisted.internet import defer
-from leap.soledad.client._database.blobs import BlobManager, BlobDoc, FIXED_REV
-from leap.soledad.client._database.blobs import BlobAlreadyExistsError
+from leap.soledad.client._db.blobs import BlobManager, BlobDoc, FIXED_REV
+from leap.soledad.client._db.blobs import BlobAlreadyExistsError
from io import BytesIO
from mock import Mock
import pytest
diff --git a/testing/tests/blobs/test_decrypter_buffer.py b/testing/tests/blobs/test_decrypter_buffer.py
index edaa66e2..83fbaad3 100644
--- a/testing/tests/blobs/test_decrypter_buffer.py
+++ b/testing/tests/blobs/test_decrypter_buffer.py
@@ -24,9 +24,9 @@ from mock import Mock
from twisted.trial import unittest
from twisted.internet import defer
-from leap.soledad.client._database.blobs import DecrypterBuffer
-from leap.soledad.client._database.blobs import BlobManager
-from leap.soledad.client._database.blobs import FIXED_REV
+from leap.soledad.client._db.blobs import DecrypterBuffer
+from leap.soledad.client._db.blobs import BlobManager
+from leap.soledad.client._db.blobs import FIXED_REV
from leap.soledad.client import _crypto
diff --git a/testing/tests/blobs/test_sqlcipher_client_backend.py b/testing/tests/blobs/test_sqlcipher_client_backend.py
index 1ce0af77..b67215e8 100644
--- a/testing/tests/blobs/test_sqlcipher_client_backend.py
+++ b/testing/tests/blobs/test_sqlcipher_client_backend.py
@@ -19,7 +19,7 @@ Tests for sqlcipher backend on blobs client.
"""
from twisted.trial import unittest
from twisted.internet import defer
-from leap.soledad.client._database.blobs import SQLiteBlobBackend
+from leap.soledad.client._db.blobs import SQLiteBlobBackend
from io import BytesIO
import pytest
diff --git a/testing/tests/client/test_aux_methods.py b/testing/tests/client/test_aux_methods.py
index da33255c..1eb676c7 100644
--- a/testing/tests/client/test_aux_methods.py
+++ b/testing/tests/client/test_aux_methods.py
@@ -22,7 +22,7 @@ import os
from pytest import inlineCallbacks
from leap.soledad.client import Soledad
-from leap.soledad.client._database.adbapi import U1DBConnectionPool
+from leap.soledad.client._db.adbapi import U1DBConnectionPool
from leap.soledad.client._secrets.util import SecretsError
from test_soledad.util import BaseSoledadTest
diff --git a/testing/tests/server/test_blobs_server.py b/testing/tests/server/test_blobs_server.py
index 2fd66224..092a0524 100644
--- a/testing/tests/server/test_blobs_server.py
+++ b/testing/tests/server/test_blobs_server.py
@@ -26,8 +26,8 @@ from twisted.internet import defer
from treq._utils import set_global_pool
from leap.soledad.server import _blobs as server_blobs
-from leap.soledad.client._database.blobs import BlobManager
-from leap.soledad.client._database.blobs import BlobAlreadyExistsError
+from leap.soledad.client._db.blobs import BlobManager
+from leap.soledad.client._db.blobs import BlobAlreadyExistsError
class BlobServerTestCase(unittest.TestCase):
diff --git a/testing/tests/sqlcipher/test_async.py b/testing/tests/sqlcipher/test_async.py
index dac6c6b9..5c220cc4 100644
--- a/testing/tests/sqlcipher/test_async.py
+++ b/testing/tests/sqlcipher/test_async.py
@@ -20,8 +20,8 @@ import hashlib
from twisted.internet import defer
from test_soledad.util import BaseSoledadTest
-from leap.soledad.client._database import adbapi
-from leap.soledad.client._database import sqlcipher
+from leap.soledad.client._db import adbapi
+from leap.soledad.client._db import sqlcipher
class ASyncSQLCipherRetryTestCase(BaseSoledadTest):
diff --git a/testing/tests/sqlcipher/test_backend.py b/testing/tests/sqlcipher/test_backend.py
index 4f614fb3..68f8f9f2 100644
--- a/testing/tests/sqlcipher/test_backend.py
+++ b/testing/tests/sqlcipher/test_backend.py
@@ -29,10 +29,10 @@ from leap.soledad.common.l2db import query_parser
# soledad stuff.
from leap.soledad.common.document import SoledadDocument
-from leap.soledad.client._database.sqlite import SQLitePartialExpandDatabase
-from leap.soledad.client._database.sqlcipher import SQLCipherDatabase
-from leap.soledad.client._database.sqlcipher import SQLCipherOptions
-from leap.soledad.client._database.sqlcipher import DatabaseIsNotEncrypted
+from leap.soledad.client._db.sqlite import SQLitePartialExpandDatabase
+from leap.soledad.client._db.sqlcipher import SQLCipherDatabase
+from leap.soledad.client._db.sqlcipher import SQLCipherOptions
+from leap.soledad.client._db.sqlcipher import DatabaseIsNotEncrypted
# u1db tests stuff.
from test_soledad import u1db_tests as tests
diff --git a/testing/tests/sync/test_sync_target.py b/testing/tests/sync/test_sync_target.py
index e1bd7de1..bfa322dc 100644
--- a/testing/tests/sync/test_sync_target.py
+++ b/testing/tests/sync/test_sync_target.py
@@ -32,9 +32,9 @@ from twisted.internet import defer
from leap.soledad.client import http_target as target
from leap.soledad.client.http_target.fetch_protocol import DocStreamReceiver
-from leap.soledad.client._database.sqlcipher import SQLCipherU1DBSync
-from leap.soledad.client._database.sqlcipher import SQLCipherOptions
-from leap.soledad.client._database.sqlcipher import SQLCipherDatabase
+from leap.soledad.client._db.sqlcipher import SQLCipherU1DBSync
+from leap.soledad.client._db.sqlcipher import SQLCipherOptions
+from leap.soledad.client._db.sqlcipher import SQLCipherDatabase
from leap.soledad.client import _crypto
from leap.soledad.common import l2db