summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorFrazer Clews <frazer.clews@codethink.co.uk>2020-01-16 16:55:18 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-19 13:31:05 +0000
commit0ac5174c7d39a3e49893df0d517d47bec1935555 (patch)
tree479496afb1da7814071e39e888e8926cd03bec57 /bitbake/lib/bb
parent444bcb6cb6be8d5205fc88790360d864e633a555 (diff)
downloadpoky-0ac5174c7d39a3e49893df0d517d47bec1935555.tar.gz
bitbake: lib: remove unused imports
removed unused imports which made the code harder to read, and slightly but less efficient (Bitbake rev: 4367692a932ac135c5aa4f9f2a4e4f0150f76697) Signed-off-by: Frazer Clews <frazer.clews@codethink.co.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/COW.py1
-rw-r--r--bitbake/lib/bb/build.py1
-rw-r--r--bitbake/lib/bb/cache.py1
-rw-r--r--bitbake/lib/bb/checksum.py1
-rw-r--r--bitbake/lib/bb/codeparser.py26
-rw-r--r--bitbake/lib/bb/cooker.py4
-rw-r--r--bitbake/lib/bb/event.py3
-rw-r--r--bitbake/lib/bb/fetch2/bzr.py2
-rw-r--r--bitbake/lib/bb/fetch2/clearcase.py1
-rw-r--r--bitbake/lib/bb/fetch2/cvs.py1
-rw-r--r--bitbake/lib/bb/fetch2/gitannex.py2
-rw-r--r--bitbake/lib/bb/fetch2/gitsm.py1
-rw-r--r--bitbake/lib/bb/fetch2/hg.py2
-rw-r--r--bitbake/lib/bb/fetch2/npm.py1
-rw-r--r--bitbake/lib/bb/fetch2/osc.py2
-rw-r--r--bitbake/lib/bb/fetch2/perforce.py1
-rw-r--r--bitbake/lib/bb/fetch2/ssh.py2
-rw-r--r--bitbake/lib/bb/fetch2/svn.py2
-rw-r--r--bitbake/lib/bb/fetch2/wget.py3
-rw-r--r--bitbake/lib/bb/monitordisk.py2
-rw-r--r--bitbake/lib/bb/msg.py2
-rw-r--r--bitbake/lib/bb/parse/ast.py4
-rw-r--r--bitbake/lib/bb/parse/parse_py/BBHandler.py2
-rw-r--r--bitbake/lib/bb/progress.py1
-rw-r--r--bitbake/lib/bb/runqueue.py4
-rw-r--r--bitbake/lib/bb/server/xmlrpcclient.py3
-rw-r--r--bitbake/lib/bb/server/xmlrpcserver.py3
-rw-r--r--bitbake/lib/bb/tests/cooker.py1
-rw-r--r--bitbake/lib/bb/tests/cow.py2
-rw-r--r--bitbake/lib/bb/tests/fetch.py1
-rw-r--r--bitbake/lib/bb/tests/runqueue.py1
-rw-r--r--bitbake/lib/bb/tinfoil.py4
-rw-r--r--bitbake/lib/bb/ui/knotty.py1
-rw-r--r--bitbake/lib/bb/ui/ncurses.py3
-rw-r--r--bitbake/lib/bb/ui/taskexp.py2
-rw-r--r--bitbake/lib/bb/utils.py1
36 files changed, 9 insertions, 85 deletions
diff --git a/bitbake/lib/bb/COW.py b/bitbake/lib/bb/COW.py
index d26e981951..bc20ce38e2 100644
--- a/bitbake/lib/bb/COW.py
+++ b/bitbake/lib/bb/COW.py
@@ -10,7 +10,6 @@
10 10
11 11
12import copy 12import copy
13import types
14ImmutableTypes = ( 13ImmutableTypes = (
15 bool, 14 bool,
16 complex, 15 complex,
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index 3d9cc10c8c..b6d23e6805 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -15,7 +15,6 @@
15import os 15import os
16import sys 16import sys
17import logging 17import logging
18import shlex
19import glob 18import glob
20import time 19import time
21import stat 20import stat
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index ead8abc5d8..a5aaf3b999 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -17,7 +17,6 @@
17# 17#
18 18
19import os 19import os
20import sys
21import logging 20import logging
22import pickle 21import pickle
23from collections import defaultdict 22from collections import defaultdict
diff --git a/bitbake/lib/bb/checksum.py b/bitbake/lib/bb/checksum.py
index 677020f497..1d50a26426 100644
--- a/bitbake/lib/bb/checksum.py
+++ b/bitbake/lib/bb/checksum.py
@@ -9,7 +9,6 @@ import glob
9import operator 9import operator
10import os 10import os
11import stat 11import stat
12import pickle
13import bb.utils 12import bb.utils
14import logging 13import logging
15from bb.cache import MultiProcessCache 14from bb.cache import MultiProcessCache
diff --git a/bitbake/lib/bb/codeparser.py b/bitbake/lib/bb/codeparser.py
index fd2c4734f0..25a7ac69d3 100644
--- a/bitbake/lib/bb/codeparser.py
+++ b/bitbake/lib/bb/codeparser.py
@@ -25,13 +25,11 @@ import ast
25import sys 25import sys
26import codegen 26import codegen
27import logging 27import logging
28import pickle
29import bb.pysh as pysh 28import bb.pysh as pysh
30import os.path
31import bb.utils, bb.data 29import bb.utils, bb.data
32import hashlib 30import hashlib
33from itertools import chain 31from itertools import chain
34from bb.pysh import pyshyacc, pyshlex, sherrors 32from bb.pysh import pyshyacc, pyshlex
35from bb.cache import MultiProcessCache 33from bb.cache import MultiProcessCache
36 34
37logger = logging.getLogger('BitBake.CodeParser') 35logger = logging.getLogger('BitBake.CodeParser')
@@ -58,30 +56,10 @@ def check_indent(codestr):
58 56
59 return codestr 57 return codestr
60 58
61
62# Basically pickle, in python 2.7.3 at least, does badly with data duplication
63# upon pickling and unpickling. Combine this with duplicate objects and things
64# are a mess.
65#
66# When the sets are originally created, python calls intern() on the set keys
67# which significantly improves memory usage. Sadly the pickle/unpickle process
68# doesn't call intern() on the keys and results in the same strings being duplicated
69# in memory. This also means pickle will save the same string multiple times in
70# the cache file.
71#
72# By having shell and python cacheline objects with setstate/getstate, we force
73# the object creation through our own routine where we can call intern (via internSet).
74#
75# We also use hashable frozensets and ensure we use references to these so that
76# duplicates can be removed, both in memory and in the resulting pickled data.
77#
78# By playing these games, the size of the cache file shrinks dramatically
79# meaning faster load times and the reloaded cache files also consume much less
80# memory. Smaller cache files, faster load times and lower memory usage is good.
81#
82# A custom getstate/setstate using tuples is actually worth 15% cachesize by 59# A custom getstate/setstate using tuples is actually worth 15% cachesize by
83# avoiding duplication of the attribute names! 60# avoiding duplication of the attribute names!
84 61
62
85class SetCache(object): 63class SetCache(object):
86 def __init__(self): 64 def __init__(self):
87 self.setcache = {} 65 self.setcache = {}
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index b74affa7ec..3d65b0cb74 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -10,7 +10,6 @@
10# 10#
11 11
12import sys, os, glob, os.path, re, time 12import sys, os, glob, os.path, re, time
13import atexit
14import itertools 13import itertools
15import logging 14import logging
16import multiprocessing 15import multiprocessing
@@ -18,14 +17,11 @@ import sre_constants
18import threading 17import threading
19from io import StringIO, UnsupportedOperation 18from io import StringIO, UnsupportedOperation
20from contextlib import closing 19from contextlib import closing
21from functools import wraps
22from collections import defaultdict, namedtuple 20from collections import defaultdict, namedtuple
23import bb, bb.exceptions, bb.command 21import bb, bb.exceptions, bb.command
24from bb import utils, data, parse, event, cache, providers, taskdata, runqueue, build 22from bb import utils, data, parse, event, cache, providers, taskdata, runqueue, build
25import queue 23import queue
26import signal 24import signal
27import subprocess
28import errno
29import prserv.serv 25import prserv.serv
30import pyinotify 26import pyinotify
31import json 27import json
diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py
index d44621edf4..42143e7407 100644
--- a/bitbake/lib/bb/event.py
+++ b/bitbake/lib/bb/event.py
@@ -10,8 +10,7 @@ BitBake build tools.
10# SPDX-License-Identifier: GPL-2.0-only 10# SPDX-License-Identifier: GPL-2.0-only
11# 11#
12 12
13import os, sys 13import sys
14import warnings
15import pickle 14import pickle
16import logging 15import logging
17import atexit 16import atexit
diff --git a/bitbake/lib/bb/fetch2/bzr.py b/bitbake/lib/bb/fetch2/bzr.py
index c56d875300..566ace9f05 100644
--- a/bitbake/lib/bb/fetch2/bzr.py
+++ b/bitbake/lib/bb/fetch2/bzr.py
@@ -14,8 +14,6 @@ BitBake 'Fetch' implementation for bzr.
14# 14#
15 15
16import os 16import os
17import sys
18import logging
19import bb 17import bb
20from bb.fetch2 import FetchMethod 18from bb.fetch2 import FetchMethod
21from bb.fetch2 import FetchError 19from bb.fetch2 import FetchError
diff --git a/bitbake/lib/bb/fetch2/clearcase.py b/bitbake/lib/bb/fetch2/clearcase.py
index ad2f3edc74..49d7ae1b09 100644
--- a/bitbake/lib/bb/fetch2/clearcase.py
+++ b/bitbake/lib/bb/fetch2/clearcase.py
@@ -49,7 +49,6 @@ User credentials:
49# 49#
50 50
51import os 51import os
52import sys
53import shutil 52import shutil
54import bb 53import bb
55from bb.fetch2 import FetchMethod 54from bb.fetch2 import FetchMethod
diff --git a/bitbake/lib/bb/fetch2/cvs.py b/bitbake/lib/bb/fetch2/cvs.py
index 1b35ba4cf0..29123a483c 100644
--- a/bitbake/lib/bb/fetch2/cvs.py
+++ b/bitbake/lib/bb/fetch2/cvs.py
@@ -14,7 +14,6 @@ BitBake build tools.
14# 14#
15 15
16import os 16import os
17import logging
18import bb 17import bb
19from bb.fetch2 import FetchMethod, FetchError, MissingParameterError, logger 18from bb.fetch2 import FetchMethod, FetchError, MissingParameterError, logger
20from bb.fetch2 import runfetchcmd 19from bb.fetch2 import runfetchcmd
diff --git a/bitbake/lib/bb/fetch2/gitannex.py b/bitbake/lib/bb/fetch2/gitannex.py
index 1d497dcb0f..80a808d88f 100644
--- a/bitbake/lib/bb/fetch2/gitannex.py
+++ b/bitbake/lib/bb/fetch2/gitannex.py
@@ -8,11 +8,9 @@ BitBake 'Fetch' git annex implementation
8# SPDX-License-Identifier: GPL-2.0-only 8# SPDX-License-Identifier: GPL-2.0-only
9# 9#
10 10
11import os
12import bb 11import bb
13from bb.fetch2.git import Git 12from bb.fetch2.git import Git
14from bb.fetch2 import runfetchcmd 13from bb.fetch2 import runfetchcmd
15from bb.fetch2 import logger
16 14
17class GitANNEX(Git): 15class GitANNEX(Git):
18 def supports(self, ud, d): 16 def supports(self, ud, d):
diff --git a/bitbake/lib/bb/fetch2/gitsm.py b/bitbake/lib/bb/fetch2/gitsm.py
index c622771d21..aa121cbee1 100644
--- a/bitbake/lib/bb/fetch2/gitsm.py
+++ b/bitbake/lib/bb/fetch2/gitsm.py
@@ -24,7 +24,6 @@ from bb.fetch2.git import Git
24from bb.fetch2 import runfetchcmd 24from bb.fetch2 import runfetchcmd
25from bb.fetch2 import logger 25from bb.fetch2 import logger
26from bb.fetch2 import Fetch 26from bb.fetch2 import Fetch
27from bb.fetch2 import BBFetchException
28 27
29class GitSM(Git): 28class GitSM(Git):
30 def supports(self, ud, d): 29 def supports(self, ud, d):
diff --git a/bitbake/lib/bb/fetch2/hg.py b/bitbake/lib/bb/fetch2/hg.py
index e21115debf..8f503701ed 100644
--- a/bitbake/lib/bb/fetch2/hg.py
+++ b/bitbake/lib/bb/fetch2/hg.py
@@ -13,8 +13,6 @@ BitBake 'Fetch' implementation for mercurial DRCS (hg).
13# 13#
14 14
15import os 15import os
16import sys
17import logging
18import bb 16import bb
19import errno 17import errno
20from bb.fetch2 import FetchMethod 18from bb.fetch2 import FetchMethod
diff --git a/bitbake/lib/bb/fetch2/npm.py b/bitbake/lib/bb/fetch2/npm.py
index 9700e61029..be21399e59 100644
--- a/bitbake/lib/bb/fetch2/npm.py
+++ b/bitbake/lib/bb/fetch2/npm.py
@@ -20,7 +20,6 @@ Usage in the recipe:
20""" 20"""
21 21
22import os 22import os
23import sys
24import urllib.request, urllib.parse, urllib.error 23import urllib.request, urllib.parse, urllib.error
25import json 24import json
26import subprocess 25import subprocess
diff --git a/bitbake/lib/bb/fetch2/osc.py b/bitbake/lib/bb/fetch2/osc.py
index 3e567155dc..f55db6f791 100644
--- a/bitbake/lib/bb/fetch2/osc.py
+++ b/bitbake/lib/bb/fetch2/osc.py
@@ -7,8 +7,6 @@ Based on the svn "Fetch" implementation.
7 7
8""" 8"""
9 9
10import os
11import sys
12import logging 10import logging
13import bb 11import bb
14from bb.fetch2 import FetchMethod 12from bb.fetch2 import FetchMethod
diff --git a/bitbake/lib/bb/fetch2/perforce.py b/bitbake/lib/bb/fetch2/perforce.py
index 54d001ec81..b2ac11ecab 100644
--- a/bitbake/lib/bb/fetch2/perforce.py
+++ b/bitbake/lib/bb/fetch2/perforce.py
@@ -11,7 +11,6 @@ BitBake 'Fetch' implementation for perforce
11# Based on functions from the base bb module, Copyright 2003 Holger Schurig 11# Based on functions from the base bb module, Copyright 2003 Holger Schurig
12 12
13import os 13import os
14import logging
15import bb 14import bb
16from bb.fetch2 import FetchMethod 15from bb.fetch2 import FetchMethod
17from bb.fetch2 import FetchError 16from bb.fetch2 import FetchError
diff --git a/bitbake/lib/bb/fetch2/ssh.py b/bitbake/lib/bb/fetch2/ssh.py
index f5be060c43..34debe399b 100644
--- a/bitbake/lib/bb/fetch2/ssh.py
+++ b/bitbake/lib/bb/fetch2/ssh.py
@@ -32,8 +32,6 @@ IETF secsh internet draft:
32 32
33import re, os 33import re, os
34from bb.fetch2 import FetchMethod 34from bb.fetch2 import FetchMethod
35from bb.fetch2 import FetchError
36from bb.fetch2 import logger
37from bb.fetch2 import runfetchcmd 35from bb.fetch2 import runfetchcmd
38 36
39 37
diff --git a/bitbake/lib/bb/fetch2/svn.py b/bitbake/lib/bb/fetch2/svn.py
index 96d666ba33..6c8caf5fb9 100644
--- a/bitbake/lib/bb/fetch2/svn.py
+++ b/bitbake/lib/bb/fetch2/svn.py
@@ -11,8 +11,6 @@ BitBake 'Fetch' implementation for svn.
11# Based on functions from the base bb module, Copyright 2003 Holger Schurig 11# Based on functions from the base bb module, Copyright 2003 Holger Schurig
12 12
13import os 13import os
14import sys
15import logging
16import bb 14import bb
17import re 15import re
18from bb.fetch2 import FetchMethod 16from bb.fetch2 import FetchMethod
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py
index 725586d2b5..72bc6c8f4d 100644
--- a/bitbake/lib/bb/fetch2/wget.py
+++ b/bitbake/lib/bb/fetch2/wget.py
@@ -14,9 +14,7 @@ BitBake build tools.
14 14
15import re 15import re
16import tempfile 16import tempfile
17import subprocess
18import os 17import os
19import logging
20import errno 18import errno
21import bb 19import bb
22import bb.progress 20import bb.progress
@@ -27,7 +25,6 @@ from bb.fetch2 import FetchMethod
27from bb.fetch2 import FetchError 25from bb.fetch2 import FetchError
28from bb.fetch2 import logger 26from bb.fetch2 import logger
29from bb.fetch2 import runfetchcmd 27from bb.fetch2 import runfetchcmd
30from bb.fetch2 import FetchConnectionCache
31from bb.utils import export_proxies 28from bb.utils import export_proxies
32from bs4 import BeautifulSoup 29from bs4 import BeautifulSoup
33from bs4 import SoupStrainer 30from bs4 import SoupStrainer
diff --git a/bitbake/lib/bb/monitordisk.py b/bitbake/lib/bb/monitordisk.py
index 1a25b0041f..e7c07264a8 100644
--- a/bitbake/lib/bb/monitordisk.py
+++ b/bitbake/lib/bb/monitordisk.py
@@ -4,7 +4,7 @@
4# SPDX-License-Identifier: GPL-2.0-only 4# SPDX-License-Identifier: GPL-2.0-only
5# 5#
6 6
7import os, logging, re, sys 7import os, logging, re
8import bb 8import bb
9logger = logging.getLogger("BitBake.Monitor") 9logger = logging.getLogger("BitBake.Monitor")
10 10
diff --git a/bitbake/lib/bb/msg.py b/bitbake/lib/bb/msg.py
index 6216eb3bc4..33c0e2fa19 100644
--- a/bitbake/lib/bb/msg.py
+++ b/bitbake/lib/bb/msg.py
@@ -13,9 +13,7 @@ Message handling infrastructure for bitbake
13import sys 13import sys
14import copy 14import copy
15import logging 15import logging
16import collections
17from itertools import groupby 16from itertools import groupby
18import warnings
19import bb 17import bb
20import bb.event 18import bb.event
21 19
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py
index f0911e6fb7..362c1a39ce 100644
--- a/bitbake/lib/bb/parse/ast.py
+++ b/bitbake/lib/bb/parse/ast.py
@@ -9,11 +9,7 @@
9# SPDX-License-Identifier: GPL-2.0-only 9# SPDX-License-Identifier: GPL-2.0-only
10# 10#
11 11
12import re
13import string
14import logging
15import bb 12import bb
16import itertools
17from bb import methodpool 13from bb import methodpool
18from bb.parse import logger 14from bb.parse import logger
19 15
diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py
index 6f7cf82b25..6e216effb8 100644
--- a/bitbake/lib/bb/parse/parse_py/BBHandler.py
+++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py
@@ -13,9 +13,7 @@
13# 13#
14 14
15import re, bb, os 15import re, bb, os
16import logging
17import bb.build, bb.utils 16import bb.build, bb.utils
18from bb import data
19 17
20from . import ConfHandler 18from . import ConfHandler
21from .. import resolve_file, ast, logger, ParseError 19from .. import resolve_file, ast, logger, ParseError
diff --git a/bitbake/lib/bb/progress.py b/bitbake/lib/bb/progress.py
index 4022caa717..9c755b7f73 100644
--- a/bitbake/lib/bb/progress.py
+++ b/bitbake/lib/bb/progress.py
@@ -7,7 +7,6 @@ BitBake progress handling code
7# SPDX-License-Identifier: GPL-2.0-only 7# SPDX-License-Identifier: GPL-2.0-only
8# 8#
9 9
10import sys
11import re 10import re
12import time 11import time
13import inspect 12import inspect
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index d7186e8516..71108eeed7 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -12,14 +12,12 @@ Handles preparation and execution of a queue of tasks
12import copy 12import copy
13import os 13import os
14import sys 14import sys
15import signal
16import stat 15import stat
17import fcntl
18import errno 16import errno
19import logging 17import logging
20import re 18import re
21import bb 19import bb
22from bb import msg, data, event 20from bb import msg, event
23from bb import monitordisk 21from bb import monitordisk
24import subprocess 22import subprocess
25import pickle 23import pickle
diff --git a/bitbake/lib/bb/server/xmlrpcclient.py b/bitbake/lib/bb/server/xmlrpcclient.py
index c054c3c89d..442ea7b264 100644
--- a/bitbake/lib/bb/server/xmlrpcclient.py
+++ b/bitbake/lib/bb/server/xmlrpcclient.py
@@ -7,9 +7,6 @@
7# SPDX-License-Identifier: GPL-2.0-only 7# SPDX-License-Identifier: GPL-2.0-only
8# 8#
9 9
10import os
11import sys
12
13import socket 10import socket
14import http.client 11import http.client
15import xmlrpc.client 12import xmlrpc.client
diff --git a/bitbake/lib/bb/server/xmlrpcserver.py b/bitbake/lib/bb/server/xmlrpcserver.py
index 54fa32f573..2fa71be667 100644
--- a/bitbake/lib/bb/server/xmlrpcserver.py
+++ b/bitbake/lib/bb/server/xmlrpcserver.py
@@ -7,9 +7,6 @@
7# SPDX-License-Identifier: GPL-2.0-only 7# SPDX-License-Identifier: GPL-2.0-only
8# 8#
9 9
10import os
11import sys
12
13import hashlib 10import hashlib
14import time 11import time
15import inspect 12import inspect
diff --git a/bitbake/lib/bb/tests/cooker.py b/bitbake/lib/bb/tests/cooker.py
index 090916e949..74c903f010 100644
--- a/bitbake/lib/bb/tests/cooker.py
+++ b/bitbake/lib/bb/tests/cooker.py
@@ -5,7 +5,6 @@
5# 5#
6 6
7import unittest 7import unittest
8import tempfile
9import os 8import os
10import bb, bb.cooker 9import bb, bb.cooker
11import re 10import re
diff --git a/bitbake/lib/bb/tests/cow.py b/bitbake/lib/bb/tests/cow.py
index b4af4bbcbf..bf6e79fcee 100644
--- a/bitbake/lib/bb/tests/cow.py
+++ b/bitbake/lib/bb/tests/cow.py
@@ -7,7 +7,7 @@
7# 7#
8 8
9import unittest 9import unittest
10import os 10
11 11
12class COWTestCase(unittest.TestCase): 12class COWTestCase(unittest.TestCase):
13 """ 13 """
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py
index 83fad3ff0d..4d347dead7 100644
--- a/bitbake/lib/bb/tests/fetch.py
+++ b/bitbake/lib/bb/tests/fetch.py
@@ -9,7 +9,6 @@
9import unittest 9import unittest
10import hashlib 10import hashlib
11import tempfile 11import tempfile
12import subprocess
13import collections 12import collections
14import os 13import os
15from bb.fetch2 import URI 14from bb.fetch2 import URI
diff --git a/bitbake/lib/bb/tests/runqueue.py b/bitbake/lib/bb/tests/runqueue.py
index 20c88ac3d5..4ba12a0772 100644
--- a/bitbake/lib/bb/tests/runqueue.py
+++ b/bitbake/lib/bb/tests/runqueue.py
@@ -7,7 +7,6 @@
7# 7#
8 8
9import unittest 9import unittest
10import bb
11import os 10import os
12import tempfile 11import tempfile
13import subprocess 12import subprocess
diff --git a/bitbake/lib/bb/tinfoil.py b/bitbake/lib/bb/tinfoil.py
index 0a1b913055..0bd7836323 100644
--- a/bitbake/lib/bb/tinfoil.py
+++ b/bitbake/lib/bb/tinfoil.py
@@ -21,8 +21,8 @@ import bb.taskdata
21import bb.utils 21import bb.utils
22import bb.command 22import bb.command
23import bb.remotedata 23import bb.remotedata
24from bb.cookerdata import CookerConfiguration, ConfigParameters 24from bb.cookerdata import CookerConfiguration
25from bb.main import setup_bitbake, BitBakeConfigParameters, BBMainException 25from bb.main import setup_bitbake, BitBakeConfigParameters
26import bb.fetch2 26import bb.fetch2
27 27
28 28
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index c6abb2a114..19008a4ead 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/lib/bb/ui/knotty.py
@@ -12,7 +12,6 @@ from __future__ import division
12 12
13import os 13import os
14import sys 14import sys
15import xmlrpc.client as xmlrpclib
16import logging 15import logging
17import progressbar 16import progressbar
18import signal 17import signal
diff --git a/bitbake/lib/bb/ui/ncurses.py b/bitbake/lib/bb/ui/ncurses.py
index c422732b26..49569e375b 100644
--- a/bitbake/lib/bb/ui/ncurses.py
+++ b/bitbake/lib/bb/ui/ncurses.py
@@ -37,7 +37,7 @@
37 37
38 38
39import logging 39import logging
40import os, sys, itertools, time, subprocess 40import os, sys, itertools, time
41 41
42try: 42try:
43 import curses 43 import curses
@@ -46,7 +46,6 @@ except ImportError:
46 46
47import bb 47import bb
48import xmlrpc.client 48import xmlrpc.client
49from bb import ui
50from bb.ui import uihelper 49from bb.ui import uihelper
51 50
52parsespin = itertools.cycle( r'|/-\\' ) 51parsespin = itertools.cycle( r'|/-\\' )
diff --git a/bitbake/lib/bb/ui/taskexp.py b/bitbake/lib/bb/ui/taskexp.py
index 50a943cd05..7895102b95 100644
--- a/bitbake/lib/bb/ui/taskexp.py
+++ b/bitbake/lib/bb/ui/taskexp.py
@@ -11,10 +11,8 @@ import sys
11import gi 11import gi
12gi.require_version('Gtk', '3.0') 12gi.require_version('Gtk', '3.0')
13from gi.repository import Gtk, Gdk, GObject 13from gi.repository import Gtk, Gdk, GObject
14from multiprocessing import Queue
15import threading 14import threading
16from xmlrpc import client 15from xmlrpc import client
17import time
18import bb 16import bb
19import bb.event 17import bb.event
20 18
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index d65265c461..06c8819d26 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -24,7 +24,6 @@ import fnmatch
24import traceback 24import traceback
25import errno 25import errno
26import signal 26import signal
27import ast
28import collections 27import collections
29import copy 28import copy
30from subprocess import getstatusoutput 29from subprocess import getstatusoutput