[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet-python] 06/12: Use relative imports.
From: |
gnunet |
Subject: |
[gnunet-python] 06/12: Use relative imports. |
Date: |
Sun, 12 Apr 2020 23:22:24 +0200 |
This is an automated email from the git hooks/post-receive script.
htgoebel pushed a commit to branch master
in repository gnunet-python.
commit 87ecb652bf4abaac99b104a3dcbb49721d758ff3
Author: Hartmut Goebel <address@hidden>
AuthorDate: Sat Jan 19 20:45:39 2019 +0100
Use relative imports.
---
gnunet/__init__.py | 2 +-
gnunet/_dbus_utils.py | 6 ++++--
gnunet/crypto.py | 4 +---
gnunet/dht.py | 7 +++----
gnunet/gns.py | 8 ++++----
gnunet/strings.py | 2 +-
6 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/gnunet/__init__.py b/gnunet/__init__.py
index 4ba5bd7..eb43c56 100644
--- a/gnunet/__init__.py
+++ b/gnunet/__init__.py
@@ -1,4 +1,4 @@
-import gnunet.strings as strings
+from . import strings
class GNUNetDaemonError(Exception):
diff --git a/gnunet/_dbus_utils.py b/gnunet/_dbus_utils.py
index 803f8bb..2eb317f 100644
--- a/gnunet/_dbus_utils.py
+++ b/gnunet/_dbus_utils.py
@@ -1,8 +1,10 @@
-from gnunet import _Key, GNUNetDaemonError
-import gnunet.strings as strings
+from . import _Key, GNUNetDaemonError
+from . import strings
+
import dbus
import threading
import datetime
+
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
diff --git a/gnunet/crypto.py b/gnunet/crypto.py
index 5a82c0d..c4841d5 100644
--- a/gnunet/crypto.py
+++ b/gnunet/crypto.py
@@ -1,6 +1,4 @@
-from gnunet import _Key
-import gnunet.strings as strings
-
+from . import _Key
class EcdsaPublicKey(_Key):
__bits__ = 256
diff --git a/gnunet/dht.py b/gnunet/dht.py
index fc86e22..8e4ae85 100644
--- a/gnunet/dht.py
+++ b/gnunet/dht.py
@@ -2,10 +2,9 @@ import dbus
import datetime
-from gnunet import *
-from gnunet._dbus_utils import *
-
-import gnunet.block as block
+from . import *
+from . import block
+from ._dbus_utils import *
get_requests = {}
requests_lock = threading.Lock()
diff --git a/gnunet/gns.py b/gnunet/gns.py
index b2d5e64..f60fe63 100644
--- a/gnunet/gns.py
+++ b/gnunet/gns.py
@@ -1,10 +1,10 @@
import dbus
-from gnunet._dbus_utils import *
+from . import *
+from . import crypto
+from . import gnsrecord
-from gnunet import *
-import gnunet.crypto as crypto
-import gnunet.gnsrecord as gnsrecord
+from ._dbus_utils import *
def lookup(name, zone, record_type, only_cached):
diff --git a/gnunet/strings.py b/gnunet/strings.py
index 595c450..c84e32c 100644
--- a/gnunet/strings.py
+++ b/gnunet/strings.py
@@ -1,6 +1,6 @@
import datetime
-from gnunet import *
+from . import *
encTable = "0123456789ABCDEFGHIJKLMNOPQRSTUV"
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnunet-python] branch master updated (bda184f -> a3707a2), gnunet, 2020/04/12
- [gnunet-python] 01/12: Add a small test-suite., gnunet, 2020/04/12
- [gnunet-python] 04/12: Avoid "During handling of the above exception" when re-raising., gnunet, 2020/04/12
- [gnunet-python] 02/12: Extend .gitignore., gnunet, 2020/04/12
- [gnunet-python] 03/12: Simplify initiation of `_Key` and subclasses., gnunet, 2020/04/12
- [gnunet-python] 07/12: Add test-cases for strings.string_to_absolute_time., gnunet, 2020/04/12
- [gnunet-python] 06/12: Use relative imports.,
gnunet <=
- [gnunet-python] 05/12: Add '_Key.__repr__()' to eliminate redundant code in subclasses., gnunet, 2020/04/12
- [gnunet-python] 08/12: Replace spaghetti code by loops., gnunet, 2020/04/12
- [gnunet-python] 09/12: Add test-cases for strings.data_to_string and string_to_data., gnunet, 2020/04/12
- [gnunet-python] 10/12: Mark strings.encTable as private., gnunet, 2020/04/12
- [gnunet-python] 11/12: Use upper-case names for global constant values., gnunet, 2020/04/12
- [gnunet-python] 12/12: Break some very long lines and some other minor code-cleanup., gnunet, 2020/04/12