Browse Source

Use absolute imports everywhere.

Jelmer Vernooij 14 years ago
parent
commit
aebc355dd9

+ 1 - 5
dulwich/__init__.py

@@ -21,10 +21,6 @@
 
 """Python implementation of the Git file formats and protocols."""
 
-
-import client
-import protocol
-import repo
-import server
+from dulwich import (client, protocol, repo, server)
 
 __version__ = (0, 7, 0)

+ 1 - 1
dulwich/pack.py

@@ -33,7 +33,7 @@ a pointer in to the corresponding packfile.
 try:
     from collections import defaultdict
 except ImportError:
-    from _compat import defaultdict
+    from dulwich._compat import defaultdict
 
 from cStringIO import (
     StringIO,

+ 1 - 1
dulwich/tests/compat/server_utils.py

@@ -30,7 +30,7 @@ from dulwich.server import (
 from dulwich.tests.utils import (
     tear_down_repo,
     )
-from utils import (
+from dulwich.tests.compat.utils import (
     import_repo,
     run_git_or_fail,
     )

+ 10 - 8
dulwich/tests/compat/test_client.py

@@ -25,18 +25,20 @@ import signal
 import subprocess
 import tempfile
 
-from dulwich import client
-from dulwich import errors
-from dulwich import file
-from dulwich import index
-from dulwich import protocol
-from dulwich import objects
-from dulwich import repo
+from dulwich import (
+    client,
+    errors,
+    file,
+    index,
+    protocol,
+    objects,
+    repo,
+    )
 from dulwich.tests import (
     TestSkipped,
     )
 
-from utils import (
+from dulwich.tests.compat.utils import (
     CompatTestCase,
     check_for_daemon,
     import_repo_to_dir,

+ 1 - 1
dulwich/tests/compat/test_pack.py

@@ -32,7 +32,7 @@ from dulwich.tests.test_pack import (
     pack1_sha,
     PackTests,
     )
-from utils import (
+from dulwich.tests.compat.utils import (
     require_git_version,
     run_git_or_fail,
     )

+ 1 - 1
dulwich/tests/compat/test_repository.py

@@ -34,7 +34,7 @@ from dulwich.tests.utils import (
     tear_down_repo,
     )
 
-from utils import (
+from dulwich.tests.compat.utils import (
     run_git_or_fail,
     import_repo,
     CompatTestCase,

+ 2 - 2
dulwich/tests/compat/test_server.py

@@ -30,12 +30,12 @@ from dulwich.server import (
     DictBackend,
     TCPGitServer,
     )
-from server_utils import (
+from dulwich.tests.compat.server_utils import (
     ServerTests,
     ShutdownServerMixIn,
     NoSideBand64kReceivePackHandler,
     )
-from utils import (
+from dulwich.tests.compat.utils import (
     CompatTestCase,
     )
 

+ 1 - 1
dulwich/tests/compat/test_utils.py

@@ -23,7 +23,7 @@ from dulwich.tests import (
     TestCase,
     TestSkipped,
     )
-import utils
+from dulwich.tests.compat import utils
 
 
 class GitVersionTests(TestCase):

+ 2 - 2
dulwich/tests/compat/test_web.py

@@ -38,12 +38,12 @@ from dulwich.web import (
     HTTPGitRequestHandler,
     )
 
-from server_utils import (
+from dulwich.tests.compat.server_utils import (
     ServerTests,
     ShutdownServerMixIn,
     NoSideBand64kReceivePackHandler,
     )
-from utils import (
+from dulwich.utils import (
     CompatTestCase,
     )
 

+ 1 - 1
dulwich/tests/test_object_store.py

@@ -47,7 +47,7 @@ from dulwich.pack import (
 from dulwich.tests import (
     TestCase,
     )
-from utils import (
+from dulwich.tests.utils import (
     make_object,
     )
 

+ 1 - 1
dulwich/tests/test_server.py

@@ -46,7 +46,7 @@ from dulwich.server import (
     UploadPackHandler,
     )
 from dulwich.tests import TestCase
-from utils import (
+from dulwich.tests.utils import (
     make_commit,
     )
 

+ 3 - 1
dulwich/tests/test_web.py

@@ -56,7 +56,9 @@ from dulwich.web import (
     HTTPGitApplication,
     )
 
-from utils import make_object
+from dulwich.tests.utils import (
+    make_object,
+    )
 
 
 class TestHTTPGitRequest(HTTPGitRequest):