mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00:00
devlib: Remove "future"
Remove the "future" dependency as devlib does not support Python 2 anymore. Also remove the "from __future__ import division" as this is the default in Python 3.
This commit is contained in:
parent
111aa327ce
commit
93ada9762d
@ -13,7 +13,6 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
from __future__ import division
|
|
||||||
import re
|
import re
|
||||||
from itertools import takewhile
|
from itertools import takewhile
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
from __future__ import division
|
|
||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
import time
|
import time
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
from __future__ import division
|
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
|
||||||
from devlib.derived import DerivedMeasurements, DerivedMetric
|
from devlib.derived import DerivedMeasurements, DerivedMetric
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
from __future__ import division
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
from __future__ import division
|
|
||||||
import logging
|
import logging
|
||||||
import collections
|
import collections
|
||||||
|
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
#pylint: disable=attribute-defined-outside-init
|
#pylint: disable=attribute-defined-outside-init
|
||||||
from __future__ import division
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
|
@ -30,7 +30,6 @@
|
|||||||
|
|
||||||
|
|
||||||
# pylint: disable=W0613,E1101,access-member-before-definition,attribute-defined-outside-init
|
# pylint: disable=W0613,E1101,access-member-before-definition,attribute-defined-outside-init
|
||||||
from __future__ import division
|
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import signal
|
import signal
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
from __future__ import division
|
|
||||||
import os
|
import os
|
||||||
import signal
|
import signal
|
||||||
import tempfile
|
import tempfile
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
from __future__ import division
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from devlib.instrument import (Instrument, CONTINUOUS,
|
from devlib.instrument import (Instrument, CONTINUOUS,
|
||||||
|
@ -12,8 +12,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from __future__ import division
|
|
||||||
|
|
||||||
from devlib.platform.gem5 import Gem5SimulationPlatform
|
from devlib.platform.gem5 import Gem5SimulationPlatform
|
||||||
from devlib.instrument import Instrument, CONTINUOUS, MeasurementsCsv
|
from devlib.instrument import Instrument, CONTINUOUS, MeasurementsCsv
|
||||||
from devlib.exception import TargetStableError
|
from devlib.exception import TargetStableError
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
from __future__ import division
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from devlib.instrument import Instrument, Measurement, INSTANTANEOUS
|
from devlib.instrument import Instrument, Measurement, INSTANTANEOUS
|
||||||
|
@ -18,8 +18,7 @@ import re
|
|||||||
import tempfile
|
import tempfile
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
from itertools import zip_longest
|
||||||
from future.moves.itertools import zip_longest
|
|
||||||
|
|
||||||
from devlib.instrument import Instrument, MeasurementsCsv, CONTINUOUS
|
from devlib.instrument import Instrument, MeasurementsCsv, CONTINUOUS
|
||||||
from devlib.exception import TargetStableError, HostError
|
from devlib.exception import TargetStableError, HostError
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
from __future__ import division
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
Miscellaneous functions that don't fit anywhere else.
|
Miscellaneous functions that don't fit anywhere else.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
from __future__ import division
|
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
from functools import partial, reduce, wraps
|
from functools import partial, reduce, wraps
|
||||||
from itertools import groupby
|
from itertools import groupby
|
||||||
|
@ -32,7 +32,6 @@ import weakref
|
|||||||
import select
|
import select
|
||||||
import copy
|
import copy
|
||||||
import functools
|
import functools
|
||||||
from future.utils import raise_from
|
|
||||||
from shlex import quote
|
from shlex import quote
|
||||||
|
|
||||||
from paramiko.client import SSHClient, AutoAddPolicy, RejectPolicy
|
from paramiko.client import SSHClient, AutoAddPolicy, RejectPolicy
|
||||||
@ -848,8 +847,8 @@ class TelnetConnection(SshConnectionBase):
|
|||||||
try:
|
try:
|
||||||
check_output(command, timeout=timeout, shell=True)
|
check_output(command, timeout=timeout, shell=True)
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
raise_from(HostError("Failed to copy file with '{}'. Output:\n{}".format(
|
msg = f"Failed to copy file with '{command_redacted}'. Output:\n{e.output}"
|
||||||
command_redacted, e.output)), None)
|
raise HostError(msg) from None
|
||||||
except TimeoutError as e:
|
except TimeoutError as e:
|
||||||
raise TimeoutError(command_redacted, e.output)
|
raise TimeoutError(command_redacted, e.output)
|
||||||
|
|
||||||
|
1
setup.py
1
setup.py
@ -90,7 +90,6 @@ params = dict(
|
|||||||
'paramiko', # SSH connection
|
'paramiko', # SSH connection
|
||||||
'scp', # SSH connection file transfers
|
'scp', # SSH connection file transfers
|
||||||
'wrapt', # Basic for construction of decorator functions
|
'wrapt', # Basic for construction of decorator functions
|
||||||
'future', # Python 2-3 compatibility
|
|
||||||
'numpy',
|
'numpy',
|
||||||
'pandas',
|
'pandas',
|
||||||
'lxml', # More robust xml parsing
|
'lxml', # More robust xml parsing
|
||||||
|
Loading…
x
Reference in New Issue
Block a user