diff options
author | Frazer Clews <frazer.clews@codethink.co.uk> | 2020-01-16 16:55:18 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-01-19 13:31:05 +0000 |
commit | 0ac5174c7d39a3e49893df0d517d47bec1935555 (patch) | |
tree | 479496afb1da7814071e39e888e8926cd03bec57 /bitbake/lib/bb | |
parent | 444bcb6cb6be8d5205fc88790360d864e633a555 (diff) | |
download | poky-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')
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 | ||
12 | import copy | 12 | import copy |
13 | import types | ||
14 | ImmutableTypes = ( | 13 | ImmutableTypes = ( |
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 @@ | |||
15 | import os | 15 | import os |
16 | import sys | 16 | import sys |
17 | import logging | 17 | import logging |
18 | import shlex | ||
19 | import glob | 18 | import glob |
20 | import time | 19 | import time |
21 | import stat | 20 | import 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 | ||
19 | import os | 19 | import os |
20 | import sys | ||
21 | import logging | 20 | import logging |
22 | import pickle | 21 | import pickle |
23 | from collections import defaultdict | 22 | from 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 | |||
9 | import operator | 9 | import operator |
10 | import os | 10 | import os |
11 | import stat | 11 | import stat |
12 | import pickle | ||
13 | import bb.utils | 12 | import bb.utils |
14 | import logging | 13 | import logging |
15 | from bb.cache import MultiProcessCache | 14 | from 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 | |||
25 | import sys | 25 | import sys |
26 | import codegen | 26 | import codegen |
27 | import logging | 27 | import logging |
28 | import pickle | ||
29 | import bb.pysh as pysh | 28 | import bb.pysh as pysh |
30 | import os.path | ||
31 | import bb.utils, bb.data | 29 | import bb.utils, bb.data |
32 | import hashlib | 30 | import hashlib |
33 | from itertools import chain | 31 | from itertools import chain |
34 | from bb.pysh import pyshyacc, pyshlex, sherrors | 32 | from bb.pysh import pyshyacc, pyshlex |
35 | from bb.cache import MultiProcessCache | 33 | from bb.cache import MultiProcessCache |
36 | 34 | ||
37 | logger = logging.getLogger('BitBake.CodeParser') | 35 | logger = 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 | |||
85 | class SetCache(object): | 63 | class 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 | ||
12 | import sys, os, glob, os.path, re, time | 12 | import sys, os, glob, os.path, re, time |
13 | import atexit | ||
14 | import itertools | 13 | import itertools |
15 | import logging | 14 | import logging |
16 | import multiprocessing | 15 | import multiprocessing |
@@ -18,14 +17,11 @@ import sre_constants | |||
18 | import threading | 17 | import threading |
19 | from io import StringIO, UnsupportedOperation | 18 | from io import StringIO, UnsupportedOperation |
20 | from contextlib import closing | 19 | from contextlib import closing |
21 | from functools import wraps | ||
22 | from collections import defaultdict, namedtuple | 20 | from collections import defaultdict, namedtuple |
23 | import bb, bb.exceptions, bb.command | 21 | import bb, bb.exceptions, bb.command |
24 | from bb import utils, data, parse, event, cache, providers, taskdata, runqueue, build | 22 | from bb import utils, data, parse, event, cache, providers, taskdata, runqueue, build |
25 | import queue | 23 | import queue |
26 | import signal | 24 | import signal |
27 | import subprocess | ||
28 | import errno | ||
29 | import prserv.serv | 25 | import prserv.serv |
30 | import pyinotify | 26 | import pyinotify |
31 | import json | 27 | import 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 | ||
13 | import os, sys | 13 | import sys |
14 | import warnings | ||
15 | import pickle | 14 | import pickle |
16 | import logging | 15 | import logging |
17 | import atexit | 16 | import 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 | ||
16 | import os | 16 | import os |
17 | import sys | ||
18 | import logging | ||
19 | import bb | 17 | import bb |
20 | from bb.fetch2 import FetchMethod | 18 | from bb.fetch2 import FetchMethod |
21 | from bb.fetch2 import FetchError | 19 | from 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 | ||
51 | import os | 51 | import os |
52 | import sys | ||
53 | import shutil | 52 | import shutil |
54 | import bb | 53 | import bb |
55 | from bb.fetch2 import FetchMethod | 54 | from 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 | ||
16 | import os | 16 | import os |
17 | import logging | ||
18 | import bb | 17 | import bb |
19 | from bb.fetch2 import FetchMethod, FetchError, MissingParameterError, logger | 18 | from bb.fetch2 import FetchMethod, FetchError, MissingParameterError, logger |
20 | from bb.fetch2 import runfetchcmd | 19 | from 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 | ||
11 | import os | ||
12 | import bb | 11 | import bb |
13 | from bb.fetch2.git import Git | 12 | from bb.fetch2.git import Git |
14 | from bb.fetch2 import runfetchcmd | 13 | from bb.fetch2 import runfetchcmd |
15 | from bb.fetch2 import logger | ||
16 | 14 | ||
17 | class GitANNEX(Git): | 15 | class 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 | |||
24 | from bb.fetch2 import runfetchcmd | 24 | from bb.fetch2 import runfetchcmd |
25 | from bb.fetch2 import logger | 25 | from bb.fetch2 import logger |
26 | from bb.fetch2 import Fetch | 26 | from bb.fetch2 import Fetch |
27 | from bb.fetch2 import BBFetchException | ||
28 | 27 | ||
29 | class GitSM(Git): | 28 | class 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 | ||
15 | import os | 15 | import os |
16 | import sys | ||
17 | import logging | ||
18 | import bb | 16 | import bb |
19 | import errno | 17 | import errno |
20 | from bb.fetch2 import FetchMethod | 18 | from 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 | ||
22 | import os | 22 | import os |
23 | import sys | ||
24 | import urllib.request, urllib.parse, urllib.error | 23 | import urllib.request, urllib.parse, urllib.error |
25 | import json | 24 | import json |
26 | import subprocess | 25 | import 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 | ||
10 | import os | ||
11 | import sys | ||
12 | import logging | 10 | import logging |
13 | import bb | 11 | import bb |
14 | from bb.fetch2 import FetchMethod | 12 | from 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 | ||
13 | import os | 13 | import os |
14 | import logging | ||
15 | import bb | 14 | import bb |
16 | from bb.fetch2 import FetchMethod | 15 | from bb.fetch2 import FetchMethod |
17 | from bb.fetch2 import FetchError | 16 | from 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 | ||
33 | import re, os | 33 | import re, os |
34 | from bb.fetch2 import FetchMethod | 34 | from bb.fetch2 import FetchMethod |
35 | from bb.fetch2 import FetchError | ||
36 | from bb.fetch2 import logger | ||
37 | from bb.fetch2 import runfetchcmd | 35 | from 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 | ||
13 | import os | 13 | import os |
14 | import sys | ||
15 | import logging | ||
16 | import bb | 14 | import bb |
17 | import re | 15 | import re |
18 | from bb.fetch2 import FetchMethod | 16 | from 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 | ||
15 | import re | 15 | import re |
16 | import tempfile | 16 | import tempfile |
17 | import subprocess | ||
18 | import os | 17 | import os |
19 | import logging | ||
20 | import errno | 18 | import errno |
21 | import bb | 19 | import bb |
22 | import bb.progress | 20 | import bb.progress |
@@ -27,7 +25,6 @@ from bb.fetch2 import FetchMethod | |||
27 | from bb.fetch2 import FetchError | 25 | from bb.fetch2 import FetchError |
28 | from bb.fetch2 import logger | 26 | from bb.fetch2 import logger |
29 | from bb.fetch2 import runfetchcmd | 27 | from bb.fetch2 import runfetchcmd |
30 | from bb.fetch2 import FetchConnectionCache | ||
31 | from bb.utils import export_proxies | 28 | from bb.utils import export_proxies |
32 | from bs4 import BeautifulSoup | 29 | from bs4 import BeautifulSoup |
33 | from bs4 import SoupStrainer | 30 | from 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 | ||
7 | import os, logging, re, sys | 7 | import os, logging, re |
8 | import bb | 8 | import bb |
9 | logger = logging.getLogger("BitBake.Monitor") | 9 | logger = 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 | |||
13 | import sys | 13 | import sys |
14 | import copy | 14 | import copy |
15 | import logging | 15 | import logging |
16 | import collections | ||
17 | from itertools import groupby | 16 | from itertools import groupby |
18 | import warnings | ||
19 | import bb | 17 | import bb |
20 | import bb.event | 18 | import 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 | ||
12 | import re | ||
13 | import string | ||
14 | import logging | ||
15 | import bb | 12 | import bb |
16 | import itertools | ||
17 | from bb import methodpool | 13 | from bb import methodpool |
18 | from bb.parse import logger | 14 | from 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 | ||
15 | import re, bb, os | 15 | import re, bb, os |
16 | import logging | ||
17 | import bb.build, bb.utils | 16 | import bb.build, bb.utils |
18 | from bb import data | ||
19 | 17 | ||
20 | from . import ConfHandler | 18 | from . import ConfHandler |
21 | from .. import resolve_file, ast, logger, ParseError | 19 | from .. 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 | ||
10 | import sys | ||
11 | import re | 10 | import re |
12 | import time | 11 | import time |
13 | import inspect | 12 | import 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 | |||
12 | import copy | 12 | import copy |
13 | import os | 13 | import os |
14 | import sys | 14 | import sys |
15 | import signal | ||
16 | import stat | 15 | import stat |
17 | import fcntl | ||
18 | import errno | 16 | import errno |
19 | import logging | 17 | import logging |
20 | import re | 18 | import re |
21 | import bb | 19 | import bb |
22 | from bb import msg, data, event | 20 | from bb import msg, event |
23 | from bb import monitordisk | 21 | from bb import monitordisk |
24 | import subprocess | 22 | import subprocess |
25 | import pickle | 23 | import 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 | ||
10 | import os | ||
11 | import sys | ||
12 | |||
13 | import socket | 10 | import socket |
14 | import http.client | 11 | import http.client |
15 | import xmlrpc.client | 12 | import 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 | ||
10 | import os | ||
11 | import sys | ||
12 | |||
13 | import hashlib | 10 | import hashlib |
14 | import time | 11 | import time |
15 | import inspect | 12 | import 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 | ||
7 | import unittest | 7 | import unittest |
8 | import tempfile | ||
9 | import os | 8 | import os |
10 | import bb, bb.cooker | 9 | import bb, bb.cooker |
11 | import re | 10 | import 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 | ||
9 | import unittest | 9 | import unittest |
10 | import os | 10 | |
11 | 11 | ||
12 | class COWTestCase(unittest.TestCase): | 12 | class 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 @@ | |||
9 | import unittest | 9 | import unittest |
10 | import hashlib | 10 | import hashlib |
11 | import tempfile | 11 | import tempfile |
12 | import subprocess | ||
13 | import collections | 12 | import collections |
14 | import os | 13 | import os |
15 | from bb.fetch2 import URI | 14 | from 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 | ||
9 | import unittest | 9 | import unittest |
10 | import bb | ||
11 | import os | 10 | import os |
12 | import tempfile | 11 | import tempfile |
13 | import subprocess | 12 | import 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 | |||
21 | import bb.utils | 21 | import bb.utils |
22 | import bb.command | 22 | import bb.command |
23 | import bb.remotedata | 23 | import bb.remotedata |
24 | from bb.cookerdata import CookerConfiguration, ConfigParameters | 24 | from bb.cookerdata import CookerConfiguration |
25 | from bb.main import setup_bitbake, BitBakeConfigParameters, BBMainException | 25 | from bb.main import setup_bitbake, BitBakeConfigParameters |
26 | import bb.fetch2 | 26 | import 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 | ||
13 | import os | 13 | import os |
14 | import sys | 14 | import sys |
15 | import xmlrpc.client as xmlrpclib | ||
16 | import logging | 15 | import logging |
17 | import progressbar | 16 | import progressbar |
18 | import signal | 17 | import 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 | ||
39 | import logging | 39 | import logging |
40 | import os, sys, itertools, time, subprocess | 40 | import os, sys, itertools, time |
41 | 41 | ||
42 | try: | 42 | try: |
43 | import curses | 43 | import curses |
@@ -46,7 +46,6 @@ except ImportError: | |||
46 | 46 | ||
47 | import bb | 47 | import bb |
48 | import xmlrpc.client | 48 | import xmlrpc.client |
49 | from bb import ui | ||
50 | from bb.ui import uihelper | 49 | from bb.ui import uihelper |
51 | 50 | ||
52 | parsespin = itertools.cycle( r'|/-\\' ) | 51 | parsespin = 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 | |||
11 | import gi | 11 | import gi |
12 | gi.require_version('Gtk', '3.0') | 12 | gi.require_version('Gtk', '3.0') |
13 | from gi.repository import Gtk, Gdk, GObject | 13 | from gi.repository import Gtk, Gdk, GObject |
14 | from multiprocessing import Queue | ||
15 | import threading | 14 | import threading |
16 | from xmlrpc import client | 15 | from xmlrpc import client |
17 | import time | ||
18 | import bb | 16 | import bb |
19 | import bb.event | 17 | import 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 | |||
24 | import traceback | 24 | import traceback |
25 | import errno | 25 | import errno |
26 | import signal | 26 | import signal |
27 | import ast | ||
28 | import collections | 27 | import collections |
29 | import copy | 28 | import copy |
30 | from subprocess import getstatusoutput | 29 | from subprocess import getstatusoutput |