From ff8bb97b2fa88ba59333057d151abbb6d7d2d821 Mon Sep 17 00:00:00 2001 From: vvbragin Date: Mon, 29 Apr 2024 22:46:33 +0200 Subject: [PATCH] dropped python 2 support --- netpyne/analysis/csd.py | 9 --------- netpyne/analysis/dipole.py | 11 ----------- netpyne/analysis/filter.py | 5 ----- netpyne/analysis/info.py | 9 --------- netpyne/analysis/interactive.py | 8 -------- netpyne/analysis/lfp.py | 12 ------------ netpyne/analysis/lfp_orig.py | 12 ------------ netpyne/analysis/network.py | 15 --------------- netpyne/analysis/rxd.py | 8 -------- netpyne/analysis/spikes.py | 13 ------------- netpyne/analysis/spikes_legacy.py | 14 -------------- netpyne/analysis/tools.py | 13 ------------- netpyne/analysis/traces.py | 10 ---------- netpyne/analysis/utils.py | 12 ------------ netpyne/analysis/wrapper.py | 8 -------- netpyne/batch/__init__.py | 7 ------- netpyne/batch/asd_parallel.py | 14 -------------- netpyne/batch/batch.py | 14 -------------- netpyne/batch/evol.py | 13 ------------- netpyne/batch/grid.py | 14 -------------- netpyne/batch/optuna_parallel.py | 14 -------------- netpyne/batch/sbi_parallel.py | 12 ------------ netpyne/batch/utils.py | 8 -------- netpyne/cell/NML2Cell.py | 8 -------- netpyne/cell/NML2SpikeSource.py | 7 ------- netpyne/cell/__init__.py | 7 ------- netpyne/cell/cell.py | 12 ------------ netpyne/cell/compartCell.py | 16 ---------------- netpyne/cell/inputs.py | 8 -------- netpyne/cell/pointCell.py | 11 ----------- netpyne/conversion/__init__.py | 8 -------- netpyne/conversion/excel.py | 14 -------------- netpyne/conversion/neuromlFormat.py | 9 --------- netpyne/conversion/neuronPyHoc.py | 12 ------------ netpyne/conversion/pythonScript.py | 9 --------- netpyne/metadata/__init__.py | 7 ------- netpyne/metadata/api.py | 10 ---------- netpyne/metadata/metadata.py | 7 ------- netpyne/network/__init__.py | 7 ------- netpyne/network/conn.py | 12 ------------ netpyne/network/modify.py | 10 ---------- netpyne/network/netrxd.py | 12 ------------ netpyne/network/network.py | 8 -------- netpyne/network/pop.py | 10 ---------- netpyne/network/shape.py | 8 -------- netpyne/network/stim.py | 8 -------- netpyne/network/subconn.py | 14 -------------- netpyne/plotting/__init__.py | 8 -------- netpyne/plotting/plotShape.py | 15 --------------- netpyne/sim/__init__.py | 9 --------- netpyne/sim/gather.py | 8 -------- netpyne/sim/load.py | 12 ------------ netpyne/sim/run.py | 12 ------------ netpyne/sim/save.py | 11 ----------- netpyne/sim/setup.py | 10 ---------- netpyne/sim/utils.py | 13 ------------- netpyne/sim/wrappers.py | 8 -------- netpyne/specs/__init__.py | 8 -------- netpyne/specs/dicts.py | 11 ----------- netpyne/specs/netParams.py | 12 ------------ netpyne/specs/simConfig.py | 10 ---------- netpyne/specs/utils.py | 7 ------- netpyne/support/__init__.py | 8 -------- netpyne/support/bsmart.py | 9 +-------- netpyne/support/filter.py | 5 ----- netpyne/support/morlet.py | 5 ----- netpyne/support/morphology.py | 13 ------------- netpyne/support/recxelectrode.py | 9 --------- netpyne/support/scalebar.py | 7 ------- netpyne/support/stackedBarGraph.py | 11 ----------- netpyne/tests/checks.py | 12 ------------ netpyne/tests/tests.py | 9 --------- netpyne/tests/validate_tests.py | 9 --------- 73 files changed, 1 insertion(+), 739 deletions(-) diff --git a/netpyne/analysis/csd.py b/netpyne/analysis/csd.py index ba61f7100..25cbb0ffb 100644 --- a/netpyne/analysis/csd.py +++ b/netpyne/analysis/csd.py @@ -3,15 +3,6 @@ """ -from __future__ import print_function -from __future__ import division -from __future__ import unicode_literals -from __future__ import absolute_import - -from future import standard_library - -standard_library.install_aliases() - try: basestring except NameError: diff --git a/netpyne/analysis/dipole.py b/netpyne/analysis/dipole.py index 165467d4b..46c9da25c 100644 --- a/netpyne/analysis/dipole.py +++ b/netpyne/analysis/dipole.py @@ -3,24 +3,13 @@ """ -from __future__ import print_function -from __future__ import division -from __future__ import unicode_literals -from __future__ import absolute_import - import os -from builtins import range -from builtins import round -from builtins import str try: basestring except NameError: basestring = str -from future import standard_library - -standard_library.install_aliases() from netpyne import __gui__ if __gui__: diff --git a/netpyne/analysis/filter.py b/netpyne/analysis/filter.py index 6e907cd85..2f812fc00 100644 --- a/netpyne/analysis/filter.py +++ b/netpyne/analysis/filter.py @@ -21,11 +21,6 @@ """ -from __future__ import print_function -from __future__ import division -from __future__ import unicode_literals -from __future__ import absolute_import - import warnings import numpy as np diff --git a/netpyne/analysis/info.py b/netpyne/analysis/info.py index 76ef99d29..2871dc920 100644 --- a/netpyne/analysis/info.py +++ b/netpyne/analysis/info.py @@ -3,20 +3,11 @@ """ -from __future__ import print_function -from __future__ import division -from __future__ import unicode_literals -from __future__ import absolute_import - try: basestring except NameError: basestring = str -from builtins import zip -from future import standard_library - -standard_library.install_aliases() from netpyne import __gui__ if __gui__: diff --git a/netpyne/analysis/interactive.py b/netpyne/analysis/interactive.py index cf2b478b8..3079d3cf1 100644 --- a/netpyne/analysis/interactive.py +++ b/netpyne/analysis/interactive.py @@ -3,14 +3,6 @@ """ -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division -from __future__ import absolute_import - -from future import standard_library - -standard_library.install_aliases() from netpyne import __gui__ try: diff --git a/netpyne/analysis/lfp.py b/netpyne/analysis/lfp.py index 56dd2b7e6..8f2c43fe4 100644 --- a/netpyne/analysis/lfp.py +++ b/netpyne/analysis/lfp.py @@ -3,23 +3,11 @@ """ -from __future__ import print_function -from __future__ import division -from __future__ import unicode_literals -from __future__ import absolute_import - -from builtins import range -from builtins import round -from builtins import str - try: basestring except NameError: basestring = str -from future import standard_library - -standard_library.install_aliases() from netpyne import __gui__ if __gui__: diff --git a/netpyne/analysis/lfp_orig.py b/netpyne/analysis/lfp_orig.py index e68ab66cd..d124ebc25 100644 --- a/netpyne/analysis/lfp_orig.py +++ b/netpyne/analysis/lfp_orig.py @@ -3,23 +3,11 @@ """ -from __future__ import print_function -from __future__ import division -from __future__ import unicode_literals -from __future__ import absolute_import - -from builtins import range -from builtins import round -from builtins import str - try: basestring except NameError: basestring = str -from future import standard_library - -standard_library.install_aliases() from netpyne import __gui__ if __gui__: diff --git a/netpyne/analysis/network.py b/netpyne/analysis/network.py index 068451b7f..8426feafe 100644 --- a/netpyne/analysis/network.py +++ b/netpyne/analysis/network.py @@ -3,26 +3,11 @@ """ -from __future__ import print_function -from __future__ import division -from __future__ import unicode_literals -from __future__ import absolute_import - -from builtins import open -from builtins import next -from builtins import range -from builtins import str - try: basestring except NameError: basestring = str -from builtins import zip - -from builtins import round -from future import standard_library -standard_library.install_aliases() from netpyne import __gui__ if __gui__: diff --git a/netpyne/analysis/rxd.py b/netpyne/analysis/rxd.py index 3678d6171..75e0fcfbf 100644 --- a/netpyne/analysis/rxd.py +++ b/netpyne/analysis/rxd.py @@ -3,19 +3,11 @@ """ -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division -from __future__ import absolute_import - try: basestring except NameError: basestring = str -from future import standard_library - -standard_library.install_aliases() from netpyne import __gui__ if __gui__: diff --git a/netpyne/analysis/spikes.py b/netpyne/analysis/spikes.py index 98fc65297..5235bc00b 100644 --- a/netpyne/analysis/spikes.py +++ b/netpyne/analysis/spikes.py @@ -3,19 +3,6 @@ """ -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division -from __future__ import absolute_import - -from future import standard_library - -standard_library.install_aliases() - -from builtins import round -from builtins import open -from builtins import range - try: to_unicode = unicode except NameError: diff --git a/netpyne/analysis/spikes_legacy.py b/netpyne/analysis/spikes_legacy.py index 66e92bc2f..e35c2c0e8 100755 --- a/netpyne/analysis/spikes_legacy.py +++ b/netpyne/analysis/spikes_legacy.py @@ -3,25 +3,11 @@ """ -from __future__ import print_function -from __future__ import division -from __future__ import unicode_literals -from __future__ import absolute_import - -from builtins import dict -from builtins import round -from builtins import str - try: basestring except NameError: basestring = str -from builtins import range -from builtins import zip - -from future import standard_library -standard_library.install_aliases() from netpyne import __gui__ if __gui__: diff --git a/netpyne/analysis/tools.py b/netpyne/analysis/tools.py index 9d68db49f..0a11e507e 100644 --- a/netpyne/analysis/tools.py +++ b/netpyne/analysis/tools.py @@ -3,19 +3,6 @@ """ -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division -from __future__ import absolute_import - -from future import standard_library - -standard_library.install_aliases() - -from builtins import round -from builtins import open -from builtins import range - try: to_unicode = unicode except NameError: diff --git a/netpyne/analysis/traces.py b/netpyne/analysis/traces.py index 517428287..0c4b9f38f 100644 --- a/netpyne/analysis/traces.py +++ b/netpyne/analysis/traces.py @@ -3,21 +3,11 @@ """ -from __future__ import print_function -from __future__ import division -from __future__ import unicode_literals -from __future__ import absolute_import - -from builtins import range -from builtins import str - try: basestring except NameError: basestring = str -from future import standard_library -standard_library.install_aliases() from netpyne import __gui__ if __gui__: diff --git a/netpyne/analysis/utils.py b/netpyne/analysis/utils.py index 2b49515f0..bfc666d27 100644 --- a/netpyne/analysis/utils.py +++ b/netpyne/analysis/utils.py @@ -3,15 +3,6 @@ """ -from __future__ import print_function -from __future__ import division -from __future__ import unicode_literals -from __future__ import absolute_import - -from builtins import round -from builtins import open -from builtins import range - # required to make json saving work in Python 2/3 try: to_unicode = unicode @@ -22,9 +13,6 @@ except NameError: basestring = str -from future import standard_library - -standard_library.install_aliases() from netpyne import __gui__ if __gui__: diff --git a/netpyne/analysis/wrapper.py b/netpyne/analysis/wrapper.py index 701b0ffd2..93626d4cf 100644 --- a/netpyne/analysis/wrapper.py +++ b/netpyne/analysis/wrapper.py @@ -3,14 +3,6 @@ """ -from __future__ import print_function -from __future__ import unicode_literals -from __future__ import division -from __future__ import absolute_import - -from future import standard_library - -standard_library.install_aliases() from netpyne import __gui__ try: diff --git a/netpyne/batch/__init__.py b/netpyne/batch/__init__.py index 74580c1ae..62da2bb9b 100644 --- a/netpyne/batch/__init__.py +++ b/netpyne/batch/__init__.py @@ -3,11 +3,4 @@ """ -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division -from __future__ import absolute_import -from future import standard_library - -standard_library.install_aliases() from .batch import Batch diff --git a/netpyne/batch/asd_parallel.py b/netpyne/batch/asd_parallel.py index 8e7ccdbdd..45ef1e9a1 100644 --- a/netpyne/batch/asd_parallel.py +++ b/netpyne/batch/asd_parallel.py @@ -3,20 +3,6 @@ """ -from __future__ import print_function -from __future__ import unicode_literals -from __future__ import division -from __future__ import absolute_import - -from builtins import zip - -from builtins import range -from builtins import open -from builtins import str -from future import standard_library - -standard_library.install_aliases() - # required to make json saving work in Python 2/3 try: to_unicode = unicode diff --git a/netpyne/batch/batch.py b/netpyne/batch/batch.py index a3eac6b41..9a5de9210 100644 --- a/netpyne/batch/batch.py +++ b/netpyne/batch/batch.py @@ -3,20 +3,6 @@ """ -from __future__ import print_function -from __future__ import unicode_literals -from __future__ import division -from __future__ import absolute_import - -from builtins import zip - -from builtins import range -from builtins import open -from builtins import str -from future import standard_library - -standard_library.install_aliases() - # required to make json saving work in Python 2/3 try: to_unicode = unicode diff --git a/netpyne/batch/evol.py b/netpyne/batch/evol.py index e74521fce..f9622d246 100644 --- a/netpyne/batch/evol.py +++ b/netpyne/batch/evol.py @@ -3,20 +3,7 @@ """ -from __future__ import print_function -from __future__ import unicode_literals -from __future__ import division -from __future__ import absolute_import - -from builtins import zip - -from builtins import range -from builtins import open -from builtins import str from ctypes import util -from future import standard_library - -standard_library.install_aliases() # required to make json saving work in Python 2/3 try: diff --git a/netpyne/batch/grid.py b/netpyne/batch/grid.py index 9d214142c..dee221e96 100644 --- a/netpyne/batch/grid.py +++ b/netpyne/batch/grid.py @@ -3,20 +3,6 @@ """ -from __future__ import print_function -from __future__ import unicode_literals -from __future__ import division -from __future__ import absolute_import - -from builtins import zip - -from builtins import range -from builtins import open -from builtins import str -from future import standard_library - -standard_library.install_aliases() - # required to make json saving work in Python 2/3 try: to_unicode = unicode diff --git a/netpyne/batch/optuna_parallel.py b/netpyne/batch/optuna_parallel.py index a0abee973..7af3793d2 100644 --- a/netpyne/batch/optuna_parallel.py +++ b/netpyne/batch/optuna_parallel.py @@ -3,20 +3,6 @@ """ -from __future__ import print_function -from __future__ import unicode_literals -from __future__ import division -from __future__ import absolute_import - -from builtins import zip - -from builtins import range -from builtins import open -from builtins import str -from future import standard_library - -standard_library.install_aliases() - # required to make json saving work in Python 2/3 try: to_unicode = unicode diff --git a/netpyne/batch/sbi_parallel.py b/netpyne/batch/sbi_parallel.py index 5700548da..888c797e2 100644 --- a/netpyne/batch/sbi_parallel.py +++ b/netpyne/batch/sbi_parallel.py @@ -2,20 +2,8 @@ Module for SBI optimization """ -from __future__ import print_function -from __future__ import unicode_literals -from __future__ import division -from __future__ import absolute_import - -from builtins import zip - -from builtins import range -from builtins import open -from builtins import str from lib2to3.pytree import NegatedPattern -from future import standard_library -standard_library.install_aliases() # required to make json saving work in Python 2/3 try: diff --git a/netpyne/batch/utils.py b/netpyne/batch/utils.py index 3ddfdc514..c77e26ea1 100644 --- a/netpyne/batch/utils.py +++ b/netpyne/batch/utils.py @@ -3,16 +3,8 @@ """ -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division -from __future__ import absolute_import import builtins -from future import standard_library - -standard_library.install_aliases() - import numpy as np import json import pickle diff --git a/netpyne/cell/NML2Cell.py b/netpyne/cell/NML2Cell.py index a63eb2fa3..92150a696 100644 --- a/netpyne/cell/NML2Cell.py +++ b/netpyne/cell/NML2Cell.py @@ -3,14 +3,6 @@ """ -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division -from __future__ import absolute_import - -from future import standard_library - -standard_library.install_aliases() from copy import deepcopy from neuron import h # Import NEURON import numpy as np diff --git a/netpyne/cell/NML2SpikeSource.py b/netpyne/cell/NML2SpikeSource.py index b257cb687..567870c34 100644 --- a/netpyne/cell/NML2SpikeSource.py +++ b/netpyne/cell/NML2SpikeSource.py @@ -3,13 +3,6 @@ """ -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division -from __future__ import absolute_import -from future import standard_library - -standard_library.install_aliases() from neuron import h # Import NEURON from .compartCell import CompartCell from ..specs import Dict diff --git a/netpyne/cell/__init__.py b/netpyne/cell/__init__.py index 9731ff6b1..74a6d1ed2 100644 --- a/netpyne/cell/__init__.py +++ b/netpyne/cell/__init__.py @@ -3,13 +3,6 @@ """ -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division -from __future__ import absolute_import -from future import standard_library - -standard_library.install_aliases() from .compartCell import CompartCell from .pointCell import PointCell from .NML2Cell import NML2Cell diff --git a/netpyne/cell/cell.py b/netpyne/cell/cell.py index de12a5923..0f85b66c2 100644 --- a/netpyne/cell/cell.py +++ b/netpyne/cell/cell.py @@ -3,23 +3,11 @@ """ -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals -from __future__ import absolute_import - - -from builtins import zip -from builtins import next -from builtins import str - try: basestring except NameError: basestring = str -from future import standard_library -standard_library.install_aliases() from numbers import Number from copy import deepcopy from neuron import h # Import NEURON diff --git a/netpyne/cell/compartCell.py b/netpyne/cell/compartCell.py index 2d01956ea..eeaeecca7 100644 --- a/netpyne/cell/compartCell.py +++ b/netpyne/cell/compartCell.py @@ -3,19 +3,6 @@ """ -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals -from __future__ import absolute_import - -from builtins import super -from builtins import next -from builtins import zip -from builtins import range - -from builtins import round -from builtins import str - from netpyne.specs.netParams import CellParams, SynMechParams try: @@ -23,9 +10,6 @@ except NameError: basestring = str -from future import standard_library - -standard_library.install_aliases() from numbers import Number from copy import deepcopy from neuron import h # Import NEURON diff --git a/netpyne/cell/inputs.py b/netpyne/cell/inputs.py index 8c525666b..6ea1dcd99 100644 --- a/netpyne/cell/inputs.py +++ b/netpyne/cell/inputs.py @@ -3,14 +3,6 @@ """ -from __future__ import print_function -from __future__ import unicode_literals -from __future__ import division -from __future__ import absolute_import - -from future import standard_library - -standard_library.install_aliases() from numbers import Number try: diff --git a/netpyne/cell/pointCell.py b/netpyne/cell/pointCell.py index 86a921b5a..5d6dcd84a 100644 --- a/netpyne/cell/pointCell.py +++ b/netpyne/cell/pointCell.py @@ -7,23 +7,12 @@ Contributors: salvadordura@gmail.com, samnemo@gmail.com """ -from __future__ import print_function -from __future__ import division -from __future__ import unicode_literals -from __future__ import absolute_import - -from builtins import super -from builtins import zip -from builtins import range try: basestring except NameError: basestring = str -from future import standard_library - -standard_library.install_aliases() from copy import deepcopy from neuron import h # Import NEURON import numpy as np diff --git a/netpyne/conversion/__init__.py b/netpyne/conversion/__init__.py index ec3c4a5b9..1c3149ace 100644 --- a/netpyne/conversion/__init__.py +++ b/netpyne/conversion/__init__.py @@ -3,14 +3,6 @@ """ -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division -from __future__ import absolute_import -from future import standard_library - -standard_library.install_aliases() - from .neuronPyHoc import importCell, importCellsFromNet, mechVarList, getSecName from .pythonScript import createPythonScript, createPythonNetParams, createPythonSimConfig from .excel import importConnFromExcel diff --git a/netpyne/conversion/excel.py b/netpyne/conversion/excel.py index 6bdffa029..86e2da5f5 100644 --- a/netpyne/conversion/excel.py +++ b/netpyne/conversion/excel.py @@ -3,20 +3,6 @@ """ -from __future__ import print_function -from __future__ import unicode_literals -from __future__ import division -from __future__ import absolute_import - - -from builtins import open -from builtins import range -from builtins import str -from future import standard_library - -standard_library.install_aliases() - - def importConnFromExcel(fileName, sheetName): """ Function for/to diff --git a/netpyne/conversion/neuromlFormat.py b/netpyne/conversion/neuromlFormat.py index 1df0d12ab..8a4b2e053 100644 --- a/netpyne/conversion/neuromlFormat.py +++ b/netpyne/conversion/neuromlFormat.py @@ -3,15 +3,6 @@ """ -from __future__ import print_function -from __future__ import division -from __future__ import absolute_import - - -from builtins import str - -from builtins import range - try: import neuroml from pyneuroml import pynml diff --git a/netpyne/conversion/neuronPyHoc.py b/netpyne/conversion/neuronPyHoc.py index 737c5f3ac..6f10a70ca 100644 --- a/netpyne/conversion/neuronPyHoc.py +++ b/netpyne/conversion/neuronPyHoc.py @@ -3,18 +3,6 @@ """ -from __future__ import print_function -from __future__ import unicode_literals -from __future__ import division -from __future__ import absolute_import -from builtins import range -from builtins import dict - -from builtins import zip -from builtins import str -from future import standard_library - -standard_library.install_aliases() import os, sys, signal from numbers import Number from neuron import h diff --git a/netpyne/conversion/pythonScript.py b/netpyne/conversion/pythonScript.py index 462e29d99..9e4ec6ab0 100644 --- a/netpyne/conversion/pythonScript.py +++ b/netpyne/conversion/pythonScript.py @@ -3,15 +3,6 @@ """ -from __future__ import print_function -from __future__ import unicode_literals -from __future__ import division -from __future__ import absolute_import - -from builtins import open -from future import standard_library - -standard_library.install_aliases() from netpyne import __version__ diff --git a/netpyne/metadata/__init__.py b/netpyne/metadata/__init__.py index 7034d7f5a..8508d053c 100644 --- a/netpyne/metadata/__init__.py +++ b/netpyne/metadata/__init__.py @@ -3,11 +3,4 @@ """ -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division -from __future__ import absolute_import -from future import standard_library - -standard_library.install_aliases() from .metadata import metadata diff --git a/netpyne/metadata/api.py b/netpyne/metadata/api.py index 86ce34571..caf63ef55 100644 --- a/netpyne/metadata/api.py +++ b/netpyne/metadata/api.py @@ -3,16 +3,6 @@ """ - -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division -from __future__ import absolute_import -from future import standard_library - -standard_library.install_aliases() - - def merge(source, destination): for key, value in list(source.items()): if isinstance(value, dict): diff --git a/netpyne/metadata/metadata.py b/netpyne/metadata/metadata.py index e4bc4d9c5..92d63a691 100644 --- a/netpyne/metadata/metadata.py +++ b/netpyne/metadata/metadata.py @@ -3,13 +3,6 @@ """ -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division -from __future__ import absolute_import -from future import standard_library - -standard_library.install_aliases() metadata = { # --------------------------------------------------------------------------------------------------------------------- # netParams diff --git a/netpyne/network/__init__.py b/netpyne/network/__init__.py index dee2888a3..288114749 100644 --- a/netpyne/network/__init__.py +++ b/netpyne/network/__init__.py @@ -3,12 +3,5 @@ """ -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division -from __future__ import absolute_import -from future import standard_library - -standard_library.install_aliases() from .network import Network from .pop import Pop diff --git a/netpyne/network/conn.py b/netpyne/network/conn.py index 16dee7130..4c78d2f3f 100644 --- a/netpyne/network/conn.py +++ b/netpyne/network/conn.py @@ -3,23 +3,11 @@ """ -from __future__ import print_function -from __future__ import division -from __future__ import unicode_literals -from __future__ import absolute_import - -from builtins import dict -from builtins import range - -from builtins import round - try: basestring except NameError: basestring = str -from future import standard_library -standard_library.install_aliases() import numpy as np from array import array as arrayFast from numbers import Number diff --git a/netpyne/network/modify.py b/netpyne/network/modify.py index f9c793c03..684204315 100644 --- a/netpyne/network/modify.py +++ b/netpyne/network/modify.py @@ -3,19 +3,9 @@ """ -from __future__ import print_function -from __future__ import unicode_literals -from __future__ import division -from __future__ import absolute_import - - # ----------------------------------------------------------------------------- # Modify cell params # ----------------------------------------------------------------------------- -from future import standard_library - -standard_library.install_aliases() - def modifyCells(self, params, updateMasterAllCells=False): """ diff --git a/netpyne/network/netrxd.py b/netpyne/network/netrxd.py index 57c5bddeb..38e04ea66 100644 --- a/netpyne/network/netrxd.py +++ b/netpyne/network/netrxd.py @@ -3,23 +3,11 @@ """ -from __future__ import print_function -from __future__ import division -from __future__ import unicode_literals -from __future__ import absolute_import - -from builtins import dict -from builtins import range - -from builtins import round - try: basestring except NameError: basestring = str -from future import standard_library -standard_library.install_aliases() import copy try: diff --git a/netpyne/network/network.py b/netpyne/network/network.py index bf3b9ad5f..9a87e579b 100644 --- a/netpyne/network/network.py +++ b/netpyne/network/network.py @@ -3,14 +3,6 @@ """ -from __future__ import print_function -from __future__ import unicode_literals -from __future__ import division -from __future__ import absolute_import - -from future import standard_library - -standard_library.install_aliases() from ..specs import ODict from neuron import h # import NEURON diff --git a/netpyne/network/pop.py b/netpyne/network/pop.py index be868610e..f20e4416d 100644 --- a/netpyne/network/pop.py +++ b/netpyne/network/pop.py @@ -3,21 +3,11 @@ """ -from __future__ import print_function -from __future__ import division -from __future__ import unicode_literals -from __future__ import absolute_import - -from builtins import map -from builtins import range - try: basestring except NameError: basestring = str -from future import standard_library -standard_library.install_aliases() from numpy import pi, sqrt, sin, cos, arccos import numpy as np from neuron import h # Import NEURON diff --git a/netpyne/network/shape.py b/netpyne/network/shape.py index f09f2a1cc..8f8f1920c 100644 --- a/netpyne/network/shape.py +++ b/netpyne/network/shape.py @@ -3,14 +3,6 @@ """ -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division -from __future__ import absolute_import - -from future import standard_library - -standard_library.install_aliases() from neuron import h # ----------------------------------------------------------------------------- diff --git a/netpyne/network/stim.py b/netpyne/network/stim.py index 20d002304..242bb4931 100644 --- a/netpyne/network/stim.py +++ b/netpyne/network/stim.py @@ -3,14 +3,6 @@ """ -from __future__ import print_function -from __future__ import unicode_literals -from __future__ import division -from __future__ import absolute_import - -from future import standard_library - -standard_library.install_aliases() from numbers import Number try: diff --git a/netpyne/network/subconn.py b/netpyne/network/subconn.py index f91b0cc07..e9b21ce8f 100644 --- a/netpyne/network/subconn.py +++ b/netpyne/network/subconn.py @@ -3,20 +3,6 @@ """ -from __future__ import print_function -from __future__ import division -from __future__ import unicode_literals -from __future__ import absolute_import - -from builtins import zip -from builtins import range - -from builtins import round -from builtins import next -from builtins import str -from future import standard_library - -standard_library.install_aliases() import numpy as np from neuron import h diff --git a/netpyne/plotting/__init__.py b/netpyne/plotting/__init__.py index 3576f367d..4f90ab992 100644 --- a/netpyne/plotting/__init__.py +++ b/netpyne/plotting/__init__.py @@ -3,14 +3,6 @@ """ -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division -from __future__ import absolute_import - -from future import standard_library - -standard_library.install_aliases() import warnings warnings.filterwarnings("ignore") diff --git a/netpyne/plotting/plotShape.py b/netpyne/plotting/plotShape.py index 3ed443c2b..60aac3a1f 100644 --- a/netpyne/plotting/plotShape.py +++ b/netpyne/plotting/plotShape.py @@ -3,26 +3,11 @@ """ -from __future__ import print_function -from __future__ import division -from __future__ import unicode_literals -from __future__ import absolute_import - -from builtins import open -from builtins import next -from builtins import range -from builtins import str - try: basestring except NameError: basestring = str -from builtins import zip - -from builtins import round -from future import standard_library -standard_library.install_aliases() from netpyne import __gui__ if __gui__: diff --git a/netpyne/sim/__init__.py b/netpyne/sim/__init__.py index d77b648f7..d43f0f007 100644 --- a/netpyne/sim/__init__.py +++ b/netpyne/sim/__init__.py @@ -5,17 +5,8 @@ """ -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division -from __future__ import absolute_import - # check for -nogui option -from future import standard_library - -standard_library.install_aliases() import sys - if '-nogui' in sys.argv: import netpyne diff --git a/netpyne/sim/gather.py b/netpyne/sim/gather.py index 14411678c..e5872147a 100644 --- a/netpyne/sim/gather.py +++ b/netpyne/sim/gather.py @@ -3,18 +3,10 @@ """ -from __future__ import print_function -from __future__ import division -from __future__ import unicode_literals -from __future__ import absolute_import - import os, pickle -from builtins import zip -from future import standard_library from netpyne.support.recxelectrode import RecXElectrode -standard_library.install_aliases() import numpy as np from ..specs import Dict, ODict from . import setup diff --git a/netpyne/sim/load.py b/netpyne/sim/load.py index 6c7a76ad9..6753ff181 100644 --- a/netpyne/sim/load.py +++ b/netpyne/sim/load.py @@ -3,15 +3,6 @@ """ -from __future__ import print_function -from __future__ import unicode_literals -from __future__ import division -from __future__ import absolute_import - -from builtins import open -from builtins import range - -# required to make json saving work in Python 2/3 try: to_unicode = unicode except NameError: @@ -21,9 +12,6 @@ except NameError: basestring = str -from future import standard_library - -standard_library.install_aliases() import sys from collections import OrderedDict from ..specs import Dict, ODict diff --git a/netpyne/sim/run.py b/netpyne/sim/run.py index cd3d9ced0..88544d066 100644 --- a/netpyne/sim/run.py +++ b/netpyne/sim/run.py @@ -3,18 +3,6 @@ """ -from __future__ import print_function -from __future__ import division -from __future__ import unicode_literals -from __future__ import absolute_import - -from builtins import round -from builtins import range - -from builtins import str -from future import standard_library - -standard_library.install_aliases() import numpy as np from neuron import h, init # Import NEURON from . import utils diff --git a/netpyne/sim/save.py b/netpyne/sim/save.py index 05e31ee9f..3bae90a9c 100644 --- a/netpyne/sim/save.py +++ b/netpyne/sim/save.py @@ -3,17 +3,6 @@ """ -from __future__ import print_function -from __future__ import division -from __future__ import unicode_literals -from __future__ import absolute_import - -from builtins import range -from builtins import open -from future import standard_library - -standard_library.install_aliases() - # required to make json saving work in Python 2/3 try: to_unicode = unicode diff --git a/netpyne/sim/setup.py b/netpyne/sim/setup.py index ea7879f2f..4c1094cdc 100644 --- a/netpyne/sim/setup.py +++ b/netpyne/sim/setup.py @@ -3,16 +3,6 @@ """ -from __future__ import print_function -from __future__ import division -from __future__ import unicode_literals -from __future__ import absolute_import - -# -from builtins import str -from future import standard_library - -standard_library.install_aliases() import sys import os import numpy as np diff --git a/netpyne/sim/utils.py b/netpyne/sim/utils.py index c8af8108f..e233a4adc 100644 --- a/netpyne/sim/utils.py +++ b/netpyne/sim/utils.py @@ -3,26 +3,13 @@ """ -from __future__ import print_function -from __future__ import unicode_literals -from __future__ import division -from __future__ import absolute_import - - -from builtins import next -from builtins import dict -from builtins import map -from builtins import str - from netpyne.support.recxelectrode import RecXElectrode try: basestring except NameError: basestring = str -from future import standard_library -standard_library.install_aliases() from time import time import hashlib import array diff --git a/netpyne/sim/wrappers.py b/netpyne/sim/wrappers.py index c1b4b7712..ed90c680c 100644 --- a/netpyne/sim/wrappers.py +++ b/netpyne/sim/wrappers.py @@ -3,14 +3,6 @@ """ -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division -from __future__ import absolute_import -from future import standard_library - -standard_library.install_aliases() - # ------------------------------------------------------------------------------ # Wrapper to create network # ------------------------------------------------------------------------------ diff --git a/netpyne/specs/__init__.py b/netpyne/specs/__init__.py index 464e7b367..6064f40e0 100644 --- a/netpyne/specs/__init__.py +++ b/netpyne/specs/__init__.py @@ -3,14 +3,6 @@ """ -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division -from __future__ import absolute_import - -from future import standard_library - -standard_library.install_aliases() from .dicts import Dict, ODict from .netParams import NetParams, CellParams from .simConfig import SimConfig diff --git a/netpyne/specs/dicts.py b/netpyne/specs/dicts.py index ac6ae1763..f610f9f4a 100644 --- a/netpyne/specs/dicts.py +++ b/netpyne/specs/dicts.py @@ -5,17 +5,6 @@ """ -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division -from __future__ import absolute_import - -from builtins import range -from builtins import dict -from builtins import super -from future import standard_library - -standard_library.install_aliases() from collections import OrderedDict # ---------------------------------------------------------------------------- diff --git a/netpyne/specs/netParams.py b/netpyne/specs/netParams.py index 9a21854db..72643fe50 100644 --- a/netpyne/specs/netParams.py +++ b/netpyne/specs/netParams.py @@ -3,15 +3,6 @@ """ -from __future__ import print_function -from __future__ import division -from __future__ import unicode_literals -from __future__ import absolute_import - -from builtins import next -from builtins import open -from builtins import range - # required to make json saving work in Python 2/3 try: to_unicode = unicode @@ -23,9 +14,6 @@ except NameError: basestring = str -from future import standard_library - -standard_library.install_aliases() from collections import OrderedDict from .dicts import Dict, ODict from .. import conversion diff --git a/netpyne/specs/simConfig.py b/netpyne/specs/simConfig.py index 5024c43f5..45a1c475a 100644 --- a/netpyne/specs/simConfig.py +++ b/netpyne/specs/simConfig.py @@ -3,22 +3,12 @@ """ -from __future__ import print_function -from __future__ import unicode_literals -from __future__ import division -from __future__ import absolute_import - # required to make json saving work in Python 2/3 try: to_unicode = unicode except NameError: to_unicode = str -from builtins import open -from future import standard_library - -standard_library.install_aliases() - from collections import OrderedDict from .dicts import Dict, ODict diff --git a/netpyne/specs/utils.py b/netpyne/specs/utils.py index 3107da6d8..1488dfed1 100644 --- a/netpyne/specs/utils.py +++ b/netpyne/specs/utils.py @@ -3,13 +3,6 @@ """ -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division -from __future__ import absolute_import -from future import standard_library - -standard_library.install_aliases() from numbers import Number from neuron import h from numpy import array, sin, cos, tan, exp, remainder, sqrt, arctan2, pi, mean, inf, dstack, unravel_index, argsort, zeros, ceil, copy, log, log10 diff --git a/netpyne/support/__init__.py b/netpyne/support/__init__.py index 4985f96a3..b28ac292c 100644 --- a/netpyne/support/__init__.py +++ b/netpyne/support/__init__.py @@ -4,11 +4,3 @@ This subpackage contains external modules or packages required by NetPyNE which are either not available via pip or have been slightly modified. """ - -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division -from __future__ import absolute_import -from future import standard_library - -standard_library.install_aliases() diff --git a/netpyne/support/bsmart.py b/netpyne/support/bsmart.py index 10a9dedcb..caa99f64c 100644 --- a/netpyne/support/bsmart.py +++ b/netpyne/support/bsmart.py @@ -42,15 +42,8 @@ Version: 2019jun17 by Cliff Kerr (cliff@thekerrlab.com) """ -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals -from __future__ import absolute_import -import numpy as np -from builtins import range -from future import standard_library -standard_library.install_aliases() +import numpy as np # ARMORF -- AR parameter estimation via LWR method modified by Morf. # diff --git a/netpyne/support/filter.py b/netpyne/support/filter.py index 237801179..93cc97f18 100644 --- a/netpyne/support/filter.py +++ b/netpyne/support/filter.py @@ -21,11 +21,6 @@ """ -from __future__ import print_function -from __future__ import division -from __future__ import unicode_literals -from __future__ import absolute_import - import warnings import numpy as np diff --git a/netpyne/support/morlet.py b/netpyne/support/morlet.py index a58b1b793..abbbf911d 100644 --- a/netpyne/support/morlet.py +++ b/netpyne/support/morlet.py @@ -10,11 +10,6 @@ subtract mean from time series within the wavelet class) """ -from __future__ import print_function -from __future__ import division -from __future__ import unicode_literals -from __future__ import absolute_import - from netpyne import __gui__ if __gui__: import matplotlib.pyplot as plt diff --git a/netpyne/support/morphology.py b/netpyne/support/morphology.py index 4b2025625..67ec1bccc 100644 --- a/netpyne/support/morphology.py +++ b/netpyne/support/morphology.py @@ -3,21 +3,8 @@ """ -from __future__ import division -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import absolute_import - # Code adapted from https://github.com/ahwillia/PyNeuron-Toolbox under MIT license - -from builtins import zip -from builtins import range - -from future import standard_library - -standard_library.install_aliases() -from builtins import object import numpy as np import pylab as plt from netpyne import __gui__ diff --git a/netpyne/support/recxelectrode.py b/netpyne/support/recxelectrode.py index 7c2a87746..42b1c2605 100644 --- a/netpyne/support/recxelectrode.py +++ b/netpyne/support/recxelectrode.py @@ -3,11 +3,6 @@ """ -from __future__ import print_function -from __future__ import division -from __future__ import unicode_literals -from __future__ import absolute_import - # Allen Institute Software License - This software license is the 2-clause BSD license plus clause a third # clause that prohibits redistribution for commercial purposes without further permission. # @@ -38,10 +33,6 @@ # Adapted to NetPyNE by salvadordura@gmail.com # -from builtins import range -from future import standard_library - -standard_library.install_aliases() import numpy as np import math diff --git a/netpyne/support/scalebar.py b/netpyne/support/scalebar.py index 786835f04..fe71441cd 100644 --- a/netpyne/support/scalebar.py +++ b/netpyne/support/scalebar.py @@ -9,13 +9,6 @@ # Adapted from mpl_toolkits.axes_grid1 # LICENSE: Python Software Foundation (http://docs.python.org/license.html) -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division -from __future__ import absolute_import -from future import standard_library - -standard_library.install_aliases() from netpyne import __gui__ if __gui__: diff --git a/netpyne/support/stackedBarGraph.py b/netpyne/support/stackedBarGraph.py index 176c85bf2..b6a865f97 100644 --- a/netpyne/support/stackedBarGraph.py +++ b/netpyne/support/stackedBarGraph.py @@ -25,17 +25,6 @@ # # ############################################################################### -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals -from __future__ import absolute_import -from builtins import range -from builtins import str -from future import standard_library - -standard_library.install_aliases() -from builtins import object - __author__ = "Michael Imelfort; modified by salvadordura@gmail.com" __copyright__ = "Copyright 2014" __credits__ = ["Michael Imelfort"] diff --git a/netpyne/tests/checks.py b/netpyne/tests/checks.py index d02d40a0b..edd788b91 100644 --- a/netpyne/tests/checks.py +++ b/netpyne/tests/checks.py @@ -3,18 +3,6 @@ """ -from __future__ import print_function -from __future__ import unicode_literals -from __future__ import division -from __future__ import absolute_import - -# checks.py - -from future import standard_library - -standard_library.install_aliases() - - def checkOutput(modelName, verbose=False): """ Function to compare the output of tutorials and examples with their expected output diff --git a/netpyne/tests/tests.py b/netpyne/tests/tests.py index 4ee255196..c78679014 100644 --- a/netpyne/tests/tests.py +++ b/netpyne/tests/tests.py @@ -3,20 +3,11 @@ """ -from __future__ import print_function -from __future__ import unicode_literals -from __future__ import division -from __future__ import absolute_import - -from builtins import str - try: basestring except NameError: basestring = str -from future import standard_library -standard_library.install_aliases() import unittest import numbers import sys diff --git a/netpyne/tests/validate_tests.py b/netpyne/tests/validate_tests.py index c2678abe0..63cc3edb0 100644 --- a/netpyne/tests/validate_tests.py +++ b/netpyne/tests/validate_tests.py @@ -3,15 +3,6 @@ """ -from __future__ import unicode_literals -from __future__ import print_function -from __future__ import division -from __future__ import absolute_import - -from future import standard_library - -standard_library.install_aliases() -from builtins import object from .tests import * import netpyne.specs as specs