From e249c72fd7fb5b6205db13413741c481deb63e54 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Fri, 7 Jun 2024 09:19:47 -0700 Subject: [PATCH] Drop Python 2 compatibility --- examples/display_slab.py | 1 - examples/make_cfg.py | 1 - examples/slab.py | 1 - patch_protoc.py | 5 +---- pyext/src/_configuration.py | 1 - test/expensive_test_harmonic_spring_score_from_protobuf.py | 1 - test/expensive_test_hdf5_statistics.py | 1 - test/expensive_test_statistics_from_simulation_data.py | 1 - test/medium_test_fg_anchoring_from_protobuf.py | 1 - test/medium_test_init_from_output.py | 1 - test/medium_test_init_from_rmf.py | 1 - test/medium_test_sites_from_simulation_data.py | 1 - test/medium_test_slab_with_cylindrical_pore_ss.py | 1 - test/test_automatic_parameters.py | 3 --- test/test_avro_reader.py | 1 - test/test_exclude_zrange_score.py | 1 - test/test_fg_copy.py | 1 - test/test_get_fg_chain_roots.py | 1 - test/test_harmonic_spring_score.py | 2 -- test/test_interactions.py | 2 -- test/test_linear.py | 1 - test/test_linear_scores.py | 1 - test/test_protobufs.py | 3 --- test/test_remove_particle_type.py | 1 - test/test_rmf_sites.py | 1 - test/test_sites.py | 1 - test/test_sites_pairs_score.py | 1 - test/test_slab_with_toroidal_pore_ss.py | 1 - test/test_statistics.py | 1 - test/test_transporting.py | 1 - test/test_util.py | 1 - test/test_well.py | 1 - test/test_z_bias_score.py | 1 - utility/add_cylinder.py | 1 - 34 files changed, 1 insertion(+), 43 deletions(-) diff --git a/examples/display_slab.py b/examples/display_slab.py index 409970e5..93b0f52f 100644 --- a/examples/display_slab.py +++ b/examples/display_slab.py @@ -1,4 +1,3 @@ -from __future__ import print_function import IMP.npctransport import IMP import RMF diff --git a/examples/make_cfg.py b/examples/make_cfg.py index ae6d7bbf..28db755f 100755 --- a/examples/make_cfg.py +++ b/examples/make_cfg.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -from __future__ import print_function import IMP from IMP.npctransport import create_range, Configuration import sys diff --git a/examples/slab.py b/examples/slab.py index 79aeb734..66ec473c 100644 --- a/examples/slab.py +++ b/examples/slab.py @@ -1,4 +1,3 @@ -from __future__ import print_function import IMP.npctransport import IMP import RMF diff --git a/patch_protoc.py b/patch_protoc.py index e9a88458..95cbe108 100644 --- a/patch_protoc.py +++ b/patch_protoc.py @@ -7,10 +7,7 @@ header_fn = sys.argv[1] link_header_fn = sys.argv[2] -if sys.version_info[0] == 2: - linesep = os.linesep -else: - linesep = bytes(os.linesep, 'ascii') +linesep = bytes(os.linesep, 'ascii') with open(header_fn, 'rb') as fh: contents = fh.read() diff --git a/pyext/src/_configuration.py b/pyext/src/_configuration.py index f911cf2a..e8cc6ab2 100644 --- a/pyext/src/_configuration.py +++ b/pyext/src/_configuration.py @@ -1,4 +1,3 @@ -from __future__ import print_function import argparse diff --git a/test/expensive_test_harmonic_spring_score_from_protobuf.py b/test/expensive_test_harmonic_spring_score_from_protobuf.py index e8980892..7db1914d 100644 --- a/test/expensive_test_harmonic_spring_score_from_protobuf.py +++ b/test/expensive_test_harmonic_spring_score_from_protobuf.py @@ -1,4 +1,3 @@ -from __future__ import print_function import IMP.npctransport import IMP.core import IMP.algebra diff --git a/test/expensive_test_hdf5_statistics.py b/test/expensive_test_hdf5_statistics.py index 4d1409c0..ff91ab45 100644 --- a/test/expensive_test_hdf5_statistics.py +++ b/test/expensive_test_hdf5_statistics.py @@ -1,4 +1,3 @@ -from __future__ import print_function import IMP import IMP.test import IMP.npctransport diff --git a/test/expensive_test_statistics_from_simulation_data.py b/test/expensive_test_statistics_from_simulation_data.py index 8319ff38..20d1e118 100644 --- a/test/expensive_test_statistics_from_simulation_data.py +++ b/test/expensive_test_statistics_from_simulation_data.py @@ -1,4 +1,3 @@ -from __future__ import print_function import IMP import IMP.test import IMP.npctransport diff --git a/test/medium_test_fg_anchoring_from_protobuf.py b/test/medium_test_fg_anchoring_from_protobuf.py index f2a7e981..30d57174 100644 --- a/test/medium_test_fg_anchoring_from_protobuf.py +++ b/test/medium_test_fg_anchoring_from_protobuf.py @@ -1,4 +1,3 @@ -from __future__ import print_function import IMP.npctransport import IMP.test import sys diff --git a/test/medium_test_init_from_output.py b/test/medium_test_init_from_output.py index 2ab5b9a5..818892a0 100644 --- a/test/medium_test_init_from_output.py +++ b/test/medium_test_init_from_output.py @@ -1,4 +1,3 @@ -from __future__ import print_function import IMP import IMP.test import RMF diff --git a/test/medium_test_init_from_rmf.py b/test/medium_test_init_from_rmf.py index a29126cc..3bf704ba 100644 --- a/test/medium_test_init_from_rmf.py +++ b/test/medium_test_init_from_rmf.py @@ -1,4 +1,3 @@ -from __future__ import print_function import IMP import IMP.test import RMF diff --git a/test/medium_test_sites_from_simulation_data.py b/test/medium_test_sites_from_simulation_data.py index 476f10a6..92fe851a 100644 --- a/test/medium_test_sites_from_simulation_data.py +++ b/test/medium_test_sites_from_simulation_data.py @@ -1,4 +1,3 @@ -from __future__ import print_function from IMP.npctransport import * import IMP import IMP.test diff --git a/test/medium_test_slab_with_cylindrical_pore_ss.py b/test/medium_test_slab_with_cylindrical_pore_ss.py index 2d77b659..e8da4cb8 100644 --- a/test/medium_test_slab_with_cylindrical_pore_ss.py +++ b/test/medium_test_slab_with_cylindrical_pore_ss.py @@ -1,4 +1,3 @@ -from __future__ import print_function import IMP import IMP.test import IMP.npctransport diff --git a/test/test_automatic_parameters.py b/test/test_automatic_parameters.py index f1d5f630..acd77a30 100644 --- a/test/test_automatic_parameters.py +++ b/test/test_automatic_parameters.py @@ -1,6 +1,3 @@ -from __future__ import print_function - - import IMP import IMP.test import IMP.npctransport diff --git a/test/test_avro_reader.py b/test/test_avro_reader.py index 48670487..8aa61508 100644 --- a/test/test_avro_reader.py +++ b/test/test_avro_reader.py @@ -1,4 +1,3 @@ -from __future__ import print_function import IMP.npctransport import IMP.test import sys diff --git a/test/test_exclude_zrange_score.py b/test/test_exclude_zrange_score.py index 5c23026e..c3e28f14 100644 --- a/test/test_exclude_zrange_score.py +++ b/test/test_exclude_zrange_score.py @@ -1,4 +1,3 @@ -from __future__ import print_function import IMP import IMP.test import IMP.npctransport diff --git a/test/test_fg_copy.py b/test/test_fg_copy.py index 4b5b47bb..c58a9643 100644 --- a/test/test_fg_copy.py +++ b/test/test_fg_copy.py @@ -1,4 +1,3 @@ -from __future__ import print_function import IMP import IMP.test import IMP.algebra diff --git a/test/test_get_fg_chain_roots.py b/test/test_get_fg_chain_roots.py index ad4fcf56..12416819 100644 --- a/test/test_get_fg_chain_roots.py +++ b/test/test_get_fg_chain_roots.py @@ -1,4 +1,3 @@ -from __future__ import print_function from IMP.npctransport import * import IMP import IMP.test diff --git a/test/test_harmonic_spring_score.py b/test/test_harmonic_spring_score.py index e8ede0ff..4dc8c155 100644 --- a/test/test_harmonic_spring_score.py +++ b/test/test_harmonic_spring_score.py @@ -1,5 +1,3 @@ -from __future__ import print_function - try: import pandas except ImportError: diff --git a/test/test_interactions.py b/test/test_interactions.py index 46c13190..ea9a5617 100644 --- a/test/test_interactions.py +++ b/test/test_interactions.py @@ -1,5 +1,3 @@ -from __future__ import print_function - import IMP import IMP.test import IMP.npctransport diff --git a/test/test_linear.py b/test/test_linear.py index 7046e35d..3e780577 100644 --- a/test/test_linear.py +++ b/test/test_linear.py @@ -1,4 +1,3 @@ -from __future__ import print_function import IMP import IMP.test import IMP.npctransport diff --git a/test/test_linear_scores.py b/test/test_linear_scores.py index f9108b4d..ce9de765 100644 --- a/test/test_linear_scores.py +++ b/test/test_linear_scores.py @@ -1,4 +1,3 @@ -from __future__ import print_function import IMP import IMP.test import IMP.npctransport diff --git a/test/test_protobufs.py b/test/test_protobufs.py index a1ed954e..9b4f9c08 100644 --- a/test/test_protobufs.py +++ b/test/test_protobufs.py @@ -1,6 +1,3 @@ -from __future__ import print_function - - import IMP import IMP.test import IMP.npctransport diff --git a/test/test_remove_particle_type.py b/test/test_remove_particle_type.py index 5f9c4f3e..0f572ac8 100644 --- a/test/test_remove_particle_type.py +++ b/test/test_remove_particle_type.py @@ -1,4 +1,3 @@ -from __future__ import print_function import IMP import IMP.test import IMP.npctransport diff --git a/test/test_rmf_sites.py b/test/test_rmf_sites.py index a80dee43..8afc4846 100644 --- a/test/test_rmf_sites.py +++ b/test/test_rmf_sites.py @@ -1,4 +1,3 @@ -from __future__ import print_function import IMP import IMP.test import IMP.npctransport diff --git a/test/test_sites.py b/test/test_sites.py index 43512963..a8d30057 100644 --- a/test/test_sites.py +++ b/test/test_sites.py @@ -1,4 +1,3 @@ -from __future__ import print_function import IMP import IMP.test import IMP.npctransport diff --git a/test/test_sites_pairs_score.py b/test/test_sites_pairs_score.py index 065d43bf..e0544397 100644 --- a/test/test_sites_pairs_score.py +++ b/test/test_sites_pairs_score.py @@ -1,4 +1,3 @@ -from __future__ import print_function import IMP import IMP.test import IMP.npctransport diff --git a/test/test_slab_with_toroidal_pore_ss.py b/test/test_slab_with_toroidal_pore_ss.py index e0baa8eb..7be2e261 100644 --- a/test/test_slab_with_toroidal_pore_ss.py +++ b/test/test_slab_with_toroidal_pore_ss.py @@ -1,4 +1,3 @@ -from __future__ import print_function import IMP import IMP.test import IMP.algebra diff --git a/test/test_statistics.py b/test/test_statistics.py index edd8ce10..f7f44f54 100644 --- a/test/test_statistics.py +++ b/test/test_statistics.py @@ -1,4 +1,3 @@ -from __future__ import print_function import IMP import IMP.test import IMP.npctransport diff --git a/test/test_transporting.py b/test/test_transporting.py index f215c2ec..d18bcfc3 100644 --- a/test/test_transporting.py +++ b/test/test_transporting.py @@ -1,4 +1,3 @@ -from __future__ import print_function import IMP import IMP.test import IMP.npctransport diff --git a/test/test_util.py b/test/test_util.py index a11055e9..4779b32a 100644 --- a/test/test_util.py +++ b/test/test_util.py @@ -1,4 +1,3 @@ -from __future__ import print_function from IMP.npctransport import * import sys import math diff --git a/test/test_well.py b/test/test_well.py index 694bda91..3644afb2 100644 --- a/test/test_well.py +++ b/test/test_well.py @@ -1,4 +1,3 @@ -from __future__ import print_function import IMP import IMP.test import IMP.npctransport diff --git a/test/test_z_bias_score.py b/test/test_z_bias_score.py index c1c62a20..8bf93900 100644 --- a/test/test_z_bias_score.py +++ b/test/test_z_bias_score.py @@ -1,4 +1,3 @@ -from __future__ import print_function import IMP import IMP.test import IMP.npctransport diff --git a/utility/add_cylinder.py b/utility/add_cylinder.py index b3ba56bb..bae793ca 100755 --- a/utility/add_cylinder.py +++ b/utility/add_cylinder.py @@ -1,6 +1,5 @@ #!/usr/bin/env python """Add cylinders of a given radius to the passed file.""" -from __future__ import print_function import IMP import RMF import IMP.rmf