fixed travis-ci checks failing issue
This commit is contained in:
parent
f67ffad69d
commit
b99c6fcf88
|
@ -3,11 +3,11 @@ Announce addresses as they are received from other hosts
|
|||
"""
|
||||
import Queue
|
||||
|
||||
import state
|
||||
from helper_random import randomshuffle
|
||||
from network.assemble import assemble_addr
|
||||
from network.connectionpool import BMConnectionPool
|
||||
from queues import addrQueue
|
||||
from assemble import assemble_addr
|
||||
from connectionpool import BMConnectionPool
|
||||
from pybitmessage import state
|
||||
from pybitmessage.helper_random import randomshuffle
|
||||
from pybitmessage.queues import addrQueue
|
||||
from threads import StoppableThread
|
||||
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ import socket
|
|||
import threading
|
||||
import time
|
||||
|
||||
import network.asyncore_pollchoose as asyncore
|
||||
import state
|
||||
import asyncore_pollchoose as asyncore
|
||||
from pybitmessage import state
|
||||
from threads import BusyError, nonBlocking
|
||||
|
||||
|
||||
|
|
|
@ -3,13 +3,13 @@ Announce myself (node address)
|
|||
"""
|
||||
import time
|
||||
|
||||
import state
|
||||
from bmconfigparser import BMConfigParser
|
||||
from network.assemble import assemble_addr
|
||||
from network.connectionpool import BMConnectionPool
|
||||
from network.udp import UDPSocket
|
||||
from assemble import assemble_addr
|
||||
from connectionpool import BMConnectionPool
|
||||
from node import Peer
|
||||
from pybitmessage import state
|
||||
from pybitmessage.bmconfigparser import BMConfigParser
|
||||
from threads import StoppableThread
|
||||
from udp import UDPSocket
|
||||
|
||||
|
||||
class AnnounceThread(StoppableThread):
|
||||
|
|
|
@ -3,10 +3,10 @@ Create bitmessage protocol command packets
|
|||
"""
|
||||
import struct
|
||||
|
||||
import addresses
|
||||
from network.constants import MAX_ADDR_COUNT
|
||||
from network.node import Peer
|
||||
from protocol import CreatePacket, encodeHost
|
||||
from pybitmessage import addresses
|
||||
from constants import MAX_ADDR_COUNT
|
||||
from node import Peer
|
||||
from pybitmessage.protocol import CreatePacket, encodeHost
|
||||
|
||||
|
||||
def assemble_addr(peerList):
|
||||
|
|
|
@ -17,9 +17,9 @@ from errno import (
|
|||
ECONNRESET, EHOSTUNREACH, EINPROGRESS, EINTR, EINVAL, EISCONN, ENETUNREACH,
|
||||
ENOTCONN, ENOTSOCK, EPIPE, ESHUTDOWN, ETIMEDOUT, EWOULDBLOCK, errorcode
|
||||
)
|
||||
from threading import current_thread
|
||||
from pybitmessage import helper_random
|
||||
|
||||
import helper_random
|
||||
from threading import current_thread
|
||||
|
||||
try:
|
||||
from errno import WSAEWOULDBLOCK
|
||||
|
|
|
@ -4,11 +4,11 @@ BMObject and it's exceptions.
|
|||
import logging
|
||||
import time
|
||||
|
||||
import protocol
|
||||
import state
|
||||
from addresses import calculateInventoryHash
|
||||
from inventory import Inventory
|
||||
from network.dandelion import Dandelion
|
||||
from dandelion import Dandelion
|
||||
from pybitmessage import protocol
|
||||
from pybitmessage import state
|
||||
from pybitmessage.addresses import calculateInventoryHash
|
||||
from pybitmessage.inventory import Inventory
|
||||
|
||||
logger = logging.getLogger('default')
|
||||
|
||||
|
|
|
@ -10,28 +10,28 @@ import struct
|
|||
import time
|
||||
from binascii import hexlify
|
||||
|
||||
import addresses
|
||||
import connectionpool
|
||||
import knownnodes
|
||||
import protocol
|
||||
import state
|
||||
from bmconfigparser import BMConfigParser
|
||||
from inventory import Inventory
|
||||
from network.advanceddispatcher import AdvancedDispatcher
|
||||
from network.bmobject import (
|
||||
from advanceddispatcher import AdvancedDispatcher
|
||||
from bmobject import (
|
||||
BMObject, BMObjectAlreadyHaveError, BMObjectExpiredError,
|
||||
BMObjectInsufficientPOWError, BMObjectInvalidDataError,
|
||||
BMObjectInvalidError, BMObjectUnwantedStreamError
|
||||
)
|
||||
from network.constants import (
|
||||
from constants import (
|
||||
ADDRESS_ALIVE, MAX_MESSAGE_SIZE, MAX_OBJECT_COUNT,
|
||||
MAX_OBJECT_PAYLOAD_SIZE, MAX_TIME_OFFSET
|
||||
)
|
||||
from network.dandelion import Dandelion
|
||||
from network.proxy import ProxyError
|
||||
from dandelion import Dandelion
|
||||
from proxy import ProxyError
|
||||
from node import Node, Peer
|
||||
from objectracker import ObjectTracker, missingObjects
|
||||
from queues import invQueue, objectProcessorQueue, portCheckerQueue
|
||||
from pybitmessage import addresses
|
||||
from pybitmessage import protocol
|
||||
from pybitmessage import state
|
||||
from pybitmessage.bmconfigparser import BMConfigParser
|
||||
from pybitmessage.inventory import Inventory
|
||||
from pybitmessage.queues import invQueue, objectProcessorQueue, portCheckerQueue
|
||||
from randomtrackingdict import RandomTrackingDict
|
||||
|
||||
logger = logging.getLogger('default')
|
||||
|
|
|
@ -6,10 +6,10 @@ import logging
|
|||
import random # nosec
|
||||
|
||||
import knownnodes
|
||||
import protocol
|
||||
import state
|
||||
from bmconfigparser import BMConfigParser
|
||||
from queues import Queue, portCheckerQueue
|
||||
from pybitmessage import protocol
|
||||
from pybitmessage import state
|
||||
from pybitmessage.bmconfigparser import BMConfigParser
|
||||
from pybitmessage.queues import Queue, portCheckerQueue
|
||||
|
||||
logger = logging.getLogger('default')
|
||||
|
||||
|
|
|
@ -9,15 +9,15 @@ import sys
|
|||
import time
|
||||
|
||||
import asyncore_pollchoose as asyncore
|
||||
import helper_random
|
||||
import knownnodes
|
||||
import protocol
|
||||
import state
|
||||
from bmconfigparser import BMConfigParser
|
||||
from connectionchooser import chooseConnection
|
||||
from node import Peer
|
||||
from proxy import Proxy
|
||||
from singleton import Singleton
|
||||
from pybitmessage import helper_random
|
||||
from pybitmessage import protocol
|
||||
from pybitmessage import state
|
||||
from pybitmessage.bmconfigparser import BMConfigParser
|
||||
from pybitmessage.singleton import Singleton
|
||||
from tcp import (
|
||||
bootstrap, Socks4aBMConnection, Socks5BMConnection,
|
||||
TCPConnection, TCPServer)
|
||||
|
|
|
@ -8,9 +8,9 @@ from threading import RLock
|
|||
from time import time
|
||||
|
||||
import connectionpool
|
||||
import state
|
||||
from queues import invQueue
|
||||
from singleton import Singleton
|
||||
from pybitmessage import state
|
||||
from pybitmessage.queues import invQueue
|
||||
from pybitmessage.singleton import Singleton
|
||||
|
||||
# randomise routes after 600 seconds
|
||||
REASSIGN_INTERVAL = 600
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
"""
|
||||
import time
|
||||
|
||||
import addresses
|
||||
import helper_random
|
||||
import protocol
|
||||
from dandelion import Dandelion
|
||||
from inventory import Inventory
|
||||
from network.connectionpool import BMConnectionPool
|
||||
from connectionpool import BMConnectionPool
|
||||
from objectracker import missingObjects
|
||||
from pybitmessage import addresses
|
||||
from pybitmessage import helper_random
|
||||
from pybitmessage import protocol
|
||||
from pybitmessage.inventory import Inventory
|
||||
from threads import StoppableThread
|
||||
|
||||
|
||||
|
|
|
@ -5,12 +5,12 @@ import Queue
|
|||
import random
|
||||
from time import time
|
||||
|
||||
import addresses
|
||||
import protocol
|
||||
import state
|
||||
from network.connectionpool import BMConnectionPool
|
||||
from network.dandelion import Dandelion
|
||||
from queues import invQueue
|
||||
from connectionpool import BMConnectionPool
|
||||
from dandelion import Dandelion
|
||||
from pybitmessage import addresses
|
||||
from pybitmessage import protocol
|
||||
from pybitmessage import state
|
||||
from pybitmessage.queues import invQueue
|
||||
from threads import StoppableThread
|
||||
|
||||
|
||||
|
|
|
@ -13,9 +13,9 @@ try:
|
|||
except ImportError:
|
||||
from collections import Iterable
|
||||
|
||||
import state
|
||||
from bmconfigparser import BMConfigParser
|
||||
from network.node import Peer
|
||||
from node import Peer
|
||||
from pybitmessage import state
|
||||
from pybitmessage.bmconfigparser import BMConfigParser
|
||||
|
||||
state.Peer = Peer
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
"""
|
||||
A thread to handle network concerns
|
||||
"""
|
||||
import network.asyncore_pollchoose as asyncore
|
||||
import state
|
||||
from network.connectionpool import BMConnectionPool
|
||||
from queues import excQueue
|
||||
import asyncore_pollchoose as asyncore
|
||||
from connectionpool import BMConnectionPool
|
||||
from pybitmessage import state
|
||||
from pybitmessage.queues import excQueue
|
||||
from threads import StoppableThread
|
||||
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ Module for tracking objects
|
|||
import time
|
||||
from threading import RLock
|
||||
|
||||
import network.connectionpool
|
||||
from network.dandelion import Dandelion
|
||||
import connectionpool
|
||||
from dandelion import Dandelion
|
||||
from randomtrackingdict import RandomTrackingDict
|
||||
|
||||
haveBloom = False
|
||||
|
@ -100,7 +100,7 @@ class ObjectTracker(object):
|
|||
|
||||
def handleReceivedObject(self, streamNumber, hashid):
|
||||
"""Handling received object"""
|
||||
for i in network.connectionpool.BMConnectionPool().connections():
|
||||
for i in connectionpool.BMConnectionPool().connections():
|
||||
if not i.fullyEstablished:
|
||||
continue
|
||||
try:
|
||||
|
|
|
@ -8,7 +8,7 @@ import time
|
|||
|
||||
import asyncore_pollchoose as asyncore
|
||||
from advanceddispatcher import AdvancedDispatcher
|
||||
from bmconfigparser import BMConfigParser
|
||||
from pybitmessage.bmconfigparser import BMConfigParser
|
||||
from node import Peer
|
||||
|
||||
logger = logging.getLogger('default')
|
||||
|
|
|
@ -4,7 +4,7 @@ Track randomize ordered dict
|
|||
from threading import RLock
|
||||
from time import time
|
||||
|
||||
import helper_random
|
||||
from pybitmessage import helper_random
|
||||
|
||||
|
||||
class RandomTrackingDict(object):
|
||||
|
|
|
@ -5,10 +5,10 @@ import errno
|
|||
import Queue
|
||||
import socket
|
||||
|
||||
import state
|
||||
from network.advanceddispatcher import UnknownStateError
|
||||
from network.connectionpool import BMConnectionPool
|
||||
from queues import receiveDataQueue
|
||||
from advanceddispatcher import UnknownStateError
|
||||
from connectionpool import BMConnectionPool
|
||||
from pybitmessage import state
|
||||
from pybitmessage.queues import receiveDataQueue
|
||||
from threads import StoppableThread
|
||||
|
||||
|
||||
|
|
|
@ -2,35 +2,35 @@
|
|||
TCP protocol handler
|
||||
"""
|
||||
# pylint: disable=too-many-ancestors
|
||||
import l10n
|
||||
import logging
|
||||
import math
|
||||
import random
|
||||
import socket
|
||||
import time
|
||||
|
||||
import addresses
|
||||
import asyncore_pollchoose as asyncore
|
||||
import connectionpool
|
||||
import helper_random
|
||||
import knownnodes
|
||||
import protocol
|
||||
import state
|
||||
from bmconfigparser import BMConfigParser
|
||||
from helper_random import randomBytes
|
||||
from inventory import Inventory
|
||||
from network.advanceddispatcher import AdvancedDispatcher
|
||||
from network.assemble import assemble_addr
|
||||
from network.bmproto import BMProto
|
||||
from network.constants import MAX_OBJECT_COUNT
|
||||
from network.dandelion import Dandelion
|
||||
from network.objectracker import ObjectTracker
|
||||
from network.socks4a import Socks4aConnection
|
||||
from network.socks5 import Socks5Connection
|
||||
from network.tls import TLSDispatcher
|
||||
from advanceddispatcher import AdvancedDispatcher
|
||||
from assemble import assemble_addr
|
||||
from bmproto import BMProto
|
||||
from constants import MAX_OBJECT_COUNT
|
||||
from dandelion import Dandelion
|
||||
from objectracker import ObjectTracker
|
||||
from socks4a import Socks4aConnection
|
||||
from socks5 import Socks5Connection
|
||||
from tls import TLSDispatcher
|
||||
from pybitmessage import addresses
|
||||
from pybitmessage import helper_random
|
||||
from pybitmessage import l10n
|
||||
from pybitmessage import protocol
|
||||
from pybitmessage import state
|
||||
from pybitmessage.bmconfigparser import BMConfigParser
|
||||
from pybitmessage.helper_random import randomBytes
|
||||
from pybitmessage.inventory import Inventory
|
||||
from pybitmessage.queues import invQueue, receiveDataQueue, UISignalQueue
|
||||
from pybitmessage.tr import _translate
|
||||
from node import Peer
|
||||
from queues import invQueue, receiveDataQueue, UISignalQueue
|
||||
from tr import _translate
|
||||
|
||||
logger = logging.getLogger('default')
|
||||
|
||||
|
|
|
@ -7,10 +7,10 @@ import socket
|
|||
import ssl
|
||||
import sys
|
||||
|
||||
import network.asyncore_pollchoose as asyncore
|
||||
import paths
|
||||
from network.advanceddispatcher import AdvancedDispatcher
|
||||
from queues import receiveDataQueue
|
||||
import asyncore_pollchoose as asyncore
|
||||
from advanceddispatcher import AdvancedDispatcher
|
||||
from pybitmessage import paths
|
||||
from pybitmessage.queues import receiveDataQueue
|
||||
|
||||
logger = logging.getLogger('default')
|
||||
|
||||
|
|
|
@ -5,12 +5,12 @@ import logging
|
|||
import socket
|
||||
import time
|
||||
|
||||
import protocol
|
||||
import state
|
||||
from bmproto import BMProto
|
||||
from node import Peer
|
||||
from objectracker import ObjectTracker
|
||||
from queues import receiveDataQueue
|
||||
from pybitmessage import protocol
|
||||
from pybitmessage import state
|
||||
from pybitmessage.queues import receiveDataQueue
|
||||
|
||||
logger = logging.getLogger('default')
|
||||
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
"""
|
||||
import time
|
||||
|
||||
import helper_random
|
||||
import protocol
|
||||
from inventory import Inventory
|
||||
from network.connectionpool import BMConnectionPool
|
||||
from network.dandelion import Dandelion
|
||||
from connectionpool import BMConnectionPool
|
||||
from dandelion import Dandelion
|
||||
from pybitmessage import helper_random
|
||||
from pybitmessage import protocol
|
||||
from pybitmessage.inventory import Inventory
|
||||
from randomtrackingdict import RandomTrackingDict
|
||||
from threads import StoppableThread
|
||||
|
||||
|
|
|
@ -4,11 +4,11 @@ Module for using filesystem (directory with files) for inventory storage
|
|||
import string
|
||||
import time
|
||||
from binascii import hexlify, unhexlify
|
||||
from debug import logger
|
||||
from os import listdir, makedirs, path, remove, rmdir
|
||||
from threading import RLock
|
||||
|
||||
from paths import lookupAppdataFolder
|
||||
from pybitmessage.debug import logger
|
||||
from pybitmessage.paths import lookupAppdataFolder
|
||||
from storage import InventoryItem, InventoryStorage
|
||||
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import sqlite3
|
|||
import time
|
||||
from threading import RLock
|
||||
|
||||
from helper_sql import SqlBulkExecute, sqlExecute, sqlQuery
|
||||
from pybitmessage.helper_sql import SqlBulkExecute, sqlExecute, sqlQuery
|
||||
from storage import InventoryItem, InventoryStorage
|
||||
|
||||
|
||||
|
|
|
@ -4,12 +4,13 @@ Tests for RandomTrackingDict class
|
|||
import random
|
||||
import unittest
|
||||
|
||||
from network import randomtrackingdict
|
||||
from time import time
|
||||
|
||||
|
||||
class TestRandomTrackingDict(unittest.TestCase):
|
||||
"""Main protocol test case"""
|
||||
"""
|
||||
Main protocol test case
|
||||
"""
|
||||
|
||||
@staticmethod
|
||||
def randString():
|
||||
|
@ -21,8 +22,12 @@ class TestRandomTrackingDict(unittest.TestCase):
|
|||
|
||||
def test_check_randomtrackingdict(self):
|
||||
"""Check the logic of RandomTrackingDict class"""
|
||||
# from network import RandomTrackingDict
|
||||
# from pybitmessage.network.randomtrackingdict import RandomTrackingDict
|
||||
# from network.randomtrackingdict import RandomTrackingDict
|
||||
from pybitmessage import network
|
||||
a = []
|
||||
k = randomtrackingdict.RandomTrackingDict()
|
||||
k = network.randomtrackingdict.RandomTrackingDict()
|
||||
|
||||
a.append(time())
|
||||
for i in range(50000):
|
Reference in New Issue
Block a user