Imported packages sequencing and formatting
This commit is contained in:
parent
6139efc377
commit
6f35da4096
|
@ -8,7 +8,6 @@ from struct import pack, unpack
|
||||||
|
|
||||||
from debug import logger
|
from debug import logger
|
||||||
|
|
||||||
|
|
||||||
ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
|
ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,6 @@ from binascii import hexlify, unhexlify
|
||||||
from SimpleXMLRPCServer import SimpleXMLRPCRequestHandler, SimpleXMLRPCServer
|
from SimpleXMLRPCServer import SimpleXMLRPCRequestHandler, SimpleXMLRPCServer
|
||||||
from struct import pack
|
from struct import pack
|
||||||
|
|
||||||
from version import softwareVersion
|
|
||||||
|
|
||||||
import defaults
|
import defaults
|
||||||
import helper_inbox
|
import helper_inbox
|
||||||
import helper_sent
|
import helper_sent
|
||||||
|
@ -42,6 +40,7 @@ from helper_ackPayload import genAckPayload
|
||||||
from helper_sql import SqlBulkExecute, sqlExecute, sqlQuery, sqlStoredProcedure
|
from helper_sql import SqlBulkExecute, sqlExecute, sqlQuery, sqlStoredProcedure
|
||||||
from inventory import Inventory
|
from inventory import Inventory
|
||||||
from network.threads import StoppableThread
|
from network.threads import StoppableThread
|
||||||
|
from version import softwareVersion
|
||||||
|
|
||||||
str_chan = '[chan]'
|
str_chan = '[chan]'
|
||||||
|
|
||||||
|
|
|
@ -13,15 +13,15 @@ TODO: fix the following (currently ignored) violations:
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import xmlrpclib
|
|
||||||
import datetime
|
import datetime
|
||||||
import imghdr
|
import imghdr
|
||||||
import ntpath
|
|
||||||
import json
|
import json
|
||||||
import socket
|
import ntpath
|
||||||
import time
|
|
||||||
import sys
|
|
||||||
import os
|
import os
|
||||||
|
import socket
|
||||||
|
import sys
|
||||||
|
import time
|
||||||
|
import xmlrpclib
|
||||||
|
|
||||||
from bmconfigparser import BMConfigParser
|
from bmconfigparser import BMConfigParser
|
||||||
|
|
||||||
|
|
|
@ -33,8 +33,8 @@ from struct import pack
|
||||||
|
|
||||||
import defaults
|
import defaults
|
||||||
import shared
|
import shared
|
||||||
import state
|
|
||||||
import shutdown
|
import shutdown
|
||||||
|
import state
|
||||||
from bmconfigparser import BMConfigParser
|
from bmconfigparser import BMConfigParser
|
||||||
from debug import logger # this should go before any threads
|
from debug import logger # this should go before any threads
|
||||||
from helper_startup import (
|
from helper_startup import (
|
||||||
|
|
|
@ -3,8 +3,8 @@ BMConfigParser class definition and default configuration settings
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import ConfigParser
|
import ConfigParser
|
||||||
import shutil
|
|
||||||
import os
|
import os
|
||||||
|
import shutil
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
import state
|
import state
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
"""Building osx."""
|
"""Building osx."""
|
||||||
from glob import glob
|
|
||||||
import os
|
import os
|
||||||
|
from glob import glob
|
||||||
from PyQt4 import QtCore
|
from PyQt4 import QtCore
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
"""
|
"""
|
||||||
A thread for creating addresses
|
A thread for creating addresses
|
||||||
"""
|
"""
|
||||||
import time
|
|
||||||
import hashlib
|
import hashlib
|
||||||
|
import time
|
||||||
from binascii import hexlify
|
from binascii import hexlify
|
||||||
from pyelliptic import arithmetic
|
|
||||||
from pyelliptic.openssl import OpenSSL
|
|
||||||
|
|
||||||
import tr
|
|
||||||
import queues
|
|
||||||
import state
|
|
||||||
import shared
|
|
||||||
import defaults
|
import defaults
|
||||||
import highlevelcrypto
|
import highlevelcrypto
|
||||||
from bmconfigparser import BMConfigParser
|
import queues
|
||||||
|
import shared
|
||||||
|
import state
|
||||||
|
import tr
|
||||||
from addresses import decodeAddress, encodeAddress, encodeVarint
|
from addresses import decodeAddress, encodeAddress, encodeVarint
|
||||||
|
from bmconfigparser import BMConfigParser
|
||||||
from fallback import RIPEMD160Hash
|
from fallback import RIPEMD160Hash
|
||||||
from network import StoppableThread
|
from network import StoppableThread
|
||||||
|
from pyelliptic import arithmetic
|
||||||
|
from pyelliptic.openssl import OpenSSL
|
||||||
|
|
||||||
|
|
||||||
class addressGenerator(StoppableThread):
|
class addressGenerator(StoppableThread):
|
||||||
|
|
|
@ -12,31 +12,29 @@ import time
|
||||||
from binascii import hexlify
|
from binascii import hexlify
|
||||||
from subprocess import call # nosec
|
from subprocess import call # nosec
|
||||||
|
|
||||||
import highlevelcrypto
|
|
||||||
import knownnodes
|
|
||||||
import shared
|
|
||||||
from addresses import (
|
|
||||||
calculateInventoryHash, decodeAddress, decodeVarint, encodeAddress,
|
|
||||||
encodeVarint, varintDecodeError
|
|
||||||
)
|
|
||||||
from bmconfigparser import BMConfigParser
|
|
||||||
|
|
||||||
import helper_bitcoin
|
import helper_bitcoin
|
||||||
import helper_inbox
|
import helper_inbox
|
||||||
import helper_msgcoding
|
import helper_msgcoding
|
||||||
import helper_sent
|
import helper_sent
|
||||||
from helper_sql import SqlBulkExecute, sqlExecute, sqlQuery
|
import highlevelcrypto
|
||||||
from helper_ackPayload import genAckPayload
|
import knownnodes
|
||||||
from network import bmproto
|
import l10n
|
||||||
from network.node import Peer
|
|
||||||
|
|
||||||
import protocol
|
import protocol
|
||||||
import queues
|
import queues
|
||||||
|
import shared
|
||||||
import state
|
import state
|
||||||
import tr
|
import tr
|
||||||
|
from addresses import (
|
||||||
|
calculateInventoryHash, decodeAddress, decodeVarint,
|
||||||
|
encodeAddress, encodeVarint, varintDecodeError
|
||||||
|
)
|
||||||
|
from bmconfigparser import BMConfigParser
|
||||||
from fallback import RIPEMD160Hash
|
from fallback import RIPEMD160Hash
|
||||||
|
from helper_ackPayload import genAckPayload
|
||||||
import l10n
|
from helper_sql import SqlBulkExecute, sqlExecute, sqlQuery
|
||||||
|
from network import bmproto
|
||||||
|
from network.node import Peer
|
||||||
|
# pylint: disable=too-many-locals, too-many-return-statements, too-many-branches, too-many-statements
|
||||||
|
|
||||||
logger = logging.getLogger('default')
|
logger = logging.getLogger('default')
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ import shared
|
||||||
import state
|
import state
|
||||||
import tr
|
import tr
|
||||||
from bmconfigparser import BMConfigParser
|
from bmconfigparser import BMConfigParser
|
||||||
from helper_sql import sqlQuery, sqlExecute
|
from helper_sql import sqlExecute, sqlQuery
|
||||||
from inventory import Inventory
|
from inventory import Inventory
|
||||||
from network import BMConnectionPool, StoppableThread
|
from network import BMConnectionPool, StoppableThread
|
||||||
|
|
||||||
|
|
|
@ -2,15 +2,12 @@
|
||||||
sqlThread is defined here
|
sqlThread is defined here
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import threading
|
|
||||||
from bmconfigparser import BMConfigParser
|
|
||||||
|
|
||||||
import sqlite3
|
|
||||||
import time
|
|
||||||
import shutil # used for moving the messages.dat file
|
|
||||||
import sys
|
|
||||||
import os
|
import os
|
||||||
from debug import logger
|
import shutil # used for moving the messages.dat file
|
||||||
|
import sqlite3
|
||||||
|
import sys
|
||||||
|
import threading
|
||||||
|
import time
|
||||||
|
|
||||||
import helper_sql
|
import helper_sql
|
||||||
import helper_startup
|
import helper_startup
|
||||||
|
@ -18,6 +15,8 @@ import paths
|
||||||
import queues
|
import queues
|
||||||
import state
|
import state
|
||||||
import tr
|
import tr
|
||||||
|
from bmconfigparser import BMConfigParser
|
||||||
|
from debug import logger
|
||||||
# pylint: disable=attribute-defined-outside-init,protected-access
|
# pylint: disable=attribute-defined-outside-init,protected-access
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,8 @@ This module is for generating ack payload
|
||||||
from binascii import hexlify
|
from binascii import hexlify
|
||||||
from struct import pack
|
from struct import pack
|
||||||
|
|
||||||
import highlevelcrypto
|
|
||||||
import helper_random
|
import helper_random
|
||||||
|
import highlevelcrypto
|
||||||
from addresses import encodeVarint
|
from addresses import encodeVarint
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,11 @@ Message encoding end decoding functions
|
||||||
import string
|
import string
|
||||||
import zlib
|
import zlib
|
||||||
|
|
||||||
|
import messagetypes
|
||||||
|
from bmconfigparser import BMConfigParser
|
||||||
|
from debug import logger
|
||||||
|
from tr import _translate
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import msgpack
|
import msgpack
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
@ -13,11 +18,6 @@ except ImportError:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
import fallback.umsgpack.umsgpack as msgpack
|
import fallback.umsgpack.umsgpack as msgpack
|
||||||
|
|
||||||
import messagetypes
|
|
||||||
from bmconfigparser import BMConfigParser
|
|
||||||
from debug import logger
|
|
||||||
from tr import _translate
|
|
||||||
|
|
||||||
BITMESSAGE_ENCODING_IGNORE = 0
|
BITMESSAGE_ENCODING_IGNORE = 0
|
||||||
BITMESSAGE_ENCODING_TRIVIAL = 1
|
BITMESSAGE_ENCODING_TRIVIAL = 1
|
||||||
BITMESSAGE_ENCODING_SIMPLE = 2
|
BITMESSAGE_ENCODING_SIMPLE = 2
|
||||||
|
|
|
@ -2,7 +2,9 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
|
|
||||||
from pyelliptic.openssl import OpenSSL
|
from pyelliptic.openssl import OpenSSL
|
||||||
|
|
||||||
NoneType = type(None)
|
NoneType = type(None)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,8 @@ SQLite objects can only be used from one thread.
|
||||||
or isn't thread-safe.
|
or isn't thread-safe.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import threading
|
|
||||||
import Queue
|
import Queue
|
||||||
|
import threading
|
||||||
|
|
||||||
sqlSubmitQueue = Queue.Queue()
|
sqlSubmitQueue = Queue.Queue()
|
||||||
"""the queue for SQL"""
|
"""the queue for SQL"""
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
"""The Inventory singleton"""
|
"""The Inventory singleton"""
|
||||||
|
|
||||||
# TODO make this dynamic, and watch out for frozen, like with messagetypes
|
# TODO make this dynamic, and watch out for frozen, like with messagetypes
|
||||||
import storage.sqlite
|
|
||||||
import storage.filesystem
|
import storage.filesystem
|
||||||
|
import storage.sqlite
|
||||||
from bmconfigparser import BMConfigParser
|
from bmconfigparser import BMConfigParser
|
||||||
from singleton import Singleton
|
from singleton import Singleton
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@ import time
|
||||||
|
|
||||||
from bmconfigparser import BMConfigParser
|
from bmconfigparser import BMConfigParser
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger('default')
|
logger = logging.getLogger('default')
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
"""This module is for thread start."""
|
"""This module is for thread start."""
|
||||||
from bitmessagemain import main
|
|
||||||
import state
|
import state
|
||||||
|
from bitmessagemain import main
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
state.kivy = True
|
state.kivy = True
|
||||||
|
|
|
@ -10,11 +10,11 @@ import os
|
||||||
import socket
|
import socket
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from addresses import decodeAddress
|
|
||||||
from debug import logger
|
|
||||||
import defaults
|
import defaults
|
||||||
import tr # translate
|
import tr # translate
|
||||||
|
from addresses import decodeAddress
|
||||||
from bmconfigparser import BMConfigParser
|
from bmconfigparser import BMConfigParser
|
||||||
|
from debug import logger
|
||||||
|
|
||||||
|
|
||||||
configSection = "bitmessagesettings"
|
configSection = "bitmessagesettings"
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
"""
|
"""
|
||||||
Module for Proof of Work using OpenCL
|
Module for Proof of Work using OpenCL
|
||||||
"""
|
"""
|
||||||
from struct import pack, unpack
|
|
||||||
import hashlib
|
import hashlib
|
||||||
import os
|
import os
|
||||||
|
from struct import pack, unpack
|
||||||
|
|
||||||
from bmconfigparser import BMConfigParser
|
|
||||||
import paths
|
import paths
|
||||||
from state import shutdown
|
from bmconfigparser import BMConfigParser
|
||||||
from debug import logger
|
from debug import logger
|
||||||
|
from state import shutdown
|
||||||
|
|
||||||
libAvailable = True
|
libAvailable = True
|
||||||
ctx = False
|
ctx = False
|
||||||
|
|
|
@ -8,7 +8,6 @@ import sys
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from shutil import move
|
from shutil import move
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger('default')
|
logger = logging.getLogger('default')
|
||||||
|
|
||||||
# When using py2exe or py2app, the variable frozen is added to the sys
|
# When using py2exe or py2app, the variable frozen is added to the sys
|
||||||
|
|
|
@ -11,7 +11,7 @@ import socket
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
from binascii import hexlify
|
from binascii import hexlify
|
||||||
from struct import pack, unpack, Struct
|
from struct import Struct, pack, unpack
|
||||||
|
|
||||||
import defaults
|
import defaults
|
||||||
import highlevelcrypto
|
import highlevelcrypto
|
||||||
|
|
|
@ -11,8 +11,8 @@ Return a PIL Image class instance which have generated identicon image.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from PyQt4 import QtGui
|
from PyQt4 import QtGui
|
||||||
from PyQt4.QtCore import QSize, QPointF, Qt
|
from PyQt4.QtCore import QPointF, QSize, Qt
|
||||||
from PyQt4.QtGui import QPixmap, QPainter, QPolygonF
|
from PyQt4.QtGui import QPainter, QPixmap, QPolygonF
|
||||||
|
|
||||||
|
|
||||||
class IdenticonRendererBase(object):
|
class IdenticonRendererBase(object):
|
||||||
|
|
|
@ -10,12 +10,11 @@ from __future__ import division
|
||||||
# Libraries.
|
# Libraries.
|
||||||
import hashlib
|
import hashlib
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import stat
|
import stat
|
||||||
import threading
|
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import sys
|
||||||
|
import threading
|
||||||
from binascii import hexlify
|
from binascii import hexlify
|
||||||
from pyelliptic import arithmetic
|
|
||||||
|
|
||||||
# Project imports.
|
# Project imports.
|
||||||
import highlevelcrypto
|
import highlevelcrypto
|
||||||
|
@ -25,6 +24,8 @@ from bmconfigparser import BMConfigParser
|
||||||
from debug import logger
|
from debug import logger
|
||||||
from helper_sql import sqlQuery
|
from helper_sql import sqlQuery
|
||||||
|
|
||||||
|
from pyelliptic import arithmetic
|
||||||
|
|
||||||
|
|
||||||
verbose = 1
|
verbose = 1
|
||||||
# This is obsolete with the change to protocol v3
|
# This is obsolete with the change to protocol v3
|
||||||
|
|
|
@ -15,6 +15,12 @@ There are also other threads in the `.network` package.
|
||||||
|
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
|
from class_addressGenerator import addressGenerator
|
||||||
|
from class_objectProcessor import objectProcessor
|
||||||
|
from class_singleCleaner import singleCleaner
|
||||||
|
from class_singleWorker import singleWorker
|
||||||
|
from class_sqlThread import sqlThread
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import prctl
|
import prctl
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
@ -33,12 +39,6 @@ else:
|
||||||
threading.Thread.__bootstrap_original__ = threading.Thread._Thread__bootstrap
|
threading.Thread.__bootstrap_original__ = threading.Thread._Thread__bootstrap
|
||||||
threading.Thread._Thread__bootstrap = _thread_name_hack
|
threading.Thread._Thread__bootstrap = _thread_name_hack
|
||||||
|
|
||||||
from class_addressGenerator import addressGenerator
|
|
||||||
from class_objectProcessor import objectProcessor
|
|
||||||
from class_singleCleaner import singleCleaner
|
|
||||||
from class_singleWorker import singleWorker
|
|
||||||
from class_sqlThread import sqlThread
|
|
||||||
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"addressGenerator", "objectProcessor", "singleCleaner", "singleWorker",
|
"addressGenerator", "objectProcessor", "singleCleaner", "singleWorker",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user