summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xauth/credentials/tests/bind.py1
-rw-r--r--lib/tdb/python/tdbdump.py1
-rw-r--r--python/samba/dbchecker.py1
-rw-r--r--python/samba/emulate/traffic.py2
-rw-r--r--python/samba/graph.py1
-rw-r--r--python/samba/join.py1
-rw-r--r--python/samba/kcc/graph_utils.py1
-rw-r--r--python/samba/kcc/kcc_utils.py1
-rw-r--r--python/samba/ms_display_specifiers.py1
-rw-r--r--python/samba/ms_forest_updates_markdown.py1
-rw-r--r--python/samba/ms_schema.py1
-rw-r--r--python/samba/ms_schema_markdown.py1
-rw-r--r--python/samba/netcmd/domain.py1
-rw-r--r--python/samba/netcmd/drs.py1
-rw-r--r--python/samba/netcmd/gpo.py1
-rw-r--r--python/samba/netcmd/sites.py1
-rw-r--r--python/samba/netcmd/visualize.py2
-rw-r--r--python/samba/ntacls.py2
-rw-r--r--python/samba/tests/__init__.py1
-rw-r--r--python/samba/tests/audit_log_base.py2
-rw-r--r--python/samba/tests/audit_log_dsdb.py1
-rw-r--r--python/samba/tests/audit_log_pass_change.py1
-rw-r--r--python/samba/tests/auth_log.py1
-rw-r--r--python/samba/tests/auth_log_base.py1
-rw-r--r--python/samba/tests/auth_log_pass_change.py1
-rw-r--r--python/samba/tests/blackbox/downgradedatabase.py1
-rw-r--r--python/samba/tests/blackbox/ndrdump.py1
-rw-r--r--python/samba/tests/blackbox/smbcacls.py1
-rw-r--r--python/samba/tests/blackbox/smbcacls_basic.py1
-rw-r--r--python/samba/tests/blackbox/smbcacls_dfs_propagate_inherit.py1
-rw-r--r--python/samba/tests/blackbox/smbcacls_propagate_inhertance.py1
-rw-r--r--python/samba/tests/blackbox/smbcontrol.py1
-rw-r--r--python/samba/tests/blackbox/smbcontrol_process.py1
-rw-r--r--python/samba/tests/complex_expressions.py1
-rw-r--r--python/samba/tests/dcerpc/dnsserver.py1
-rw-r--r--python/samba/tests/dcerpc/testrpc.py1
-rw-r--r--python/samba/tests/dns.py2
-rw-r--r--python/samba/tests/dns_base.py1
-rw-r--r--python/samba/tests/dns_forwarder.py1
-rw-r--r--python/samba/tests/dns_forwarder_helpers/server.py2
-rw-r--r--python/samba/tests/graph.py2
-rw-r--r--python/samba/tests/group_audit.py2
-rw-r--r--python/samba/tests/ldap_referrals.py1
-rw-r--r--python/samba/tests/prefork_restart.py2
-rw-r--r--python/samba/tests/process_limits.py2
-rw-r--r--python/samba/tests/samba3sam.py2
-rw-r--r--python/samba/tests/samba_tool/visualize.py1
-rw-r--r--python/samba/tests/samba_tool/visualize_drs.py1
-rw-r--r--python/samba/upgradehelpers.py1
-rw-r--r--python/samba/uptodateness.py1
-rwxr-xr-xscript/attr_count_read1
-rwxr-xr-xscript/autobuild.py1
-rwxr-xr-xscript/compare_cc_results.py1
-rwxr-xr-xscript/show_test_time1
-rwxr-xr-xscript/traffic_learner1
-rwxr-xr-xscript/traffic_replay1
-rw-r--r--selftest/format-subunit-json1
-rw-r--r--selftest/selftesthelpers.py1
-rw-r--r--selftest/subunithelper.py1
-rwxr-xr-xsource3/script/tests/test_wbinfo_sids2xids_int.py1
-rwxr-xr-xsource4/dsdb/samdb/ldb_modules/tests/possibleinferiors.py1
-rwxr-xr-xsource4/dsdb/tests/python/acl.py1
-rw-r--r--source4/dsdb/tests/python/ad_dc_medley_performance.py1
-rw-r--r--source4/dsdb/tests/python/ad_dc_performance.py1
-rw-r--r--source4/dsdb/tests/python/ad_dc_search_performance.py1
-rw-r--r--source4/dsdb/tests/python/attr_from_server.py1
-rwxr-xr-xsource4/dsdb/tests/python/deletetest.py1
-rwxr-xr-xsource4/dsdb/tests/python/dirsync.py1
-rw-r--r--source4/dsdb/tests/python/large_ldap.py1
-rwxr-xr-xsource4/dsdb/tests/python/ldap.py1
-rw-r--r--source4/dsdb/tests/python/ldap_modify_order.py1
-rwxr-xr-xsource4/dsdb/tests/python/ldap_schema.py1
-rw-r--r--source4/dsdb/tests/python/linked_attributes.py1
-rwxr-xr-xsource4/dsdb/tests/python/login_basics.py1
-rwxr-xr-xsource4/dsdb/tests/python/notification.py1
-rwxr-xr-xsource4/dsdb/tests/python/password_lockout.py1
-rw-r--r--source4/dsdb/tests/python/password_lockout_base.py1
-rwxr-xr-xsource4/dsdb/tests/python/passwords.py1
-rwxr-xr-xsource4/dsdb/tests/python/rodc.py1
-rw-r--r--source4/dsdb/tests/python/rodc_rwdc.py1
-rwxr-xr-xsource4/dsdb/tests/python/sam.py1
-rwxr-xr-xsource4/dsdb/tests/python/sec_descriptor.py1
-rwxr-xr-xsource4/dsdb/tests/python/sites.py1
-rw-r--r--source4/dsdb/tests/python/sort.py1
-rw-r--r--source4/dsdb/tests/python/subtree_rename.py1
-rwxr-xr-xsource4/dsdb/tests/python/token_group.py1
-rwxr-xr-xsource4/dsdb/tests/python/tombstone_reanimation.py1
-rwxr-xr-xsource4/dsdb/tests/python/urgent_replication.py1
-rwxr-xr-xsource4/dsdb/tests/python/user_account_control.py1
-rw-r--r--source4/dsdb/tests/python/vlv.py1
-rwxr-xr-xsource4/script/depfilter.py1
-rwxr-xr-xsource4/scripting/bin/gen_hresult.py1
-rwxr-xr-xsource4/scripting/bin/get-descriptors1
-rwxr-xr-xsource4/scripting/bin/rebuildextendeddn1
-rwxr-xr-xsource4/scripting/bin/samba_downgrade_db1
-rwxr-xr-xsource4/scripting/bin/samba_kcc1
-rw-r--r--source4/scripting/devel/addlotscontacts1
-rwxr-xr-xsource4/scripting/devel/crackname1
-rwxr-xr-xsource4/scripting/devel/demodirsync.py2
-rwxr-xr-xsource4/scripting/devel/getncchanges1
-rwxr-xr-xsource4/scripting/devel/pfm_verify.py1
-rwxr-xr-xsource4/scripting/devel/repl_cleartext_pwd.py1
-rwxr-xr-xsource4/scripting/devel/speedtest.py1
-rwxr-xr-xsource4/selftest/tests.py1
-rw-r--r--source4/torture/drs/python/delete_object.py1
-rw-r--r--source4/torture/drs/python/drs_base.py1
-rw-r--r--source4/torture/drs/python/fsmo.py1
-rw-r--r--source4/torture/drs/python/getncchanges.py1
-rw-r--r--source4/torture/drs/python/repl_move.py1
-rw-r--r--source4/torture/drs/python/replica_sync.py1
-rw-r--r--source4/torture/drs/python/samba_tool_drs_showrepl.py1
111 files changed, 2 insertions, 121 deletions
diff --git a/auth/credentials/tests/bind.py b/auth/credentials/tests/bind.py
index ad465e94968..a256a930a8a 100755
--- a/auth/credentials/tests/bind.py
+++ b/auth/credentials/tests/bind.py
@@ -2,7 +2,6 @@
# -*- coding: utf-8 -*-
# This is unit with tests for LDAP access checks
-from __future__ import print_function
import optparse
import sys
import base64
diff --git a/lib/tdb/python/tdbdump.py b/lib/tdb/python/tdbdump.py
index 306a950d28c..afc22d1d040 100644
--- a/lib/tdb/python/tdbdump.py
+++ b/lib/tdb/python/tdbdump.py
@@ -1,7 +1,6 @@
#!/usr/bin/env python3
# Trivial reimplementation of tdbdump in Python
-from __future__ import print_function
import tdb, sys
if len(sys.argv) < 2:
diff --git a/python/samba/dbchecker.py b/python/samba/dbchecker.py
index d10d765434c..b2d029db9f2 100644
--- a/python/samba/dbchecker.py
+++ b/python/samba/dbchecker.py
@@ -17,7 +17,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
import ldb
import samba
import time
diff --git a/python/samba/emulate/traffic.py b/python/samba/emulate/traffic.py
index 9b6bdb6af57..87efca61eca 100644
--- a/python/samba/emulate/traffic.py
+++ b/python/samba/emulate/traffic.py
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function, division
+from __future__ import division
import time
import os
diff --git a/python/samba/graph.py b/python/samba/graph.py
index c8d5f9230d0..0cfe951d7f7 100644
--- a/python/samba/graph.py
+++ b/python/samba/graph.py
@@ -18,7 +18,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from __future__ import print_function
from __future__ import division
from samba import colour
import sys
diff --git a/python/samba/join.py b/python/samba/join.py
index 97745a3901a..e7563ef9cb8 100644
--- a/python/samba/join.py
+++ b/python/samba/join.py
@@ -16,7 +16,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
"""Joining a domain."""
from samba.auth import system_session
diff --git a/python/samba/kcc/graph_utils.py b/python/samba/kcc/graph_utils.py
index 65f5ee67207..c89d06ad3b7 100644
--- a/python/samba/kcc/graph_utils.py
+++ b/python/samba/kcc/graph_utils.py
@@ -18,7 +18,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from __future__ import print_function
import os
import itertools
diff --git a/python/samba/kcc/kcc_utils.py b/python/samba/kcc/kcc_utils.py
index 9b4a894b743..bc2838e3933 100644
--- a/python/samba/kcc/kcc_utils.py
+++ b/python/samba/kcc/kcc_utils.py
@@ -19,7 +19,6 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from __future__ import print_function
import sys
import ldb
import uuid
diff --git a/python/samba/ms_display_specifiers.py b/python/samba/ms_display_specifiers.py
index 7488b197a4a..be9891d7437 100644
--- a/python/samba/ms_display_specifiers.py
+++ b/python/samba/ms_display_specifiers.py
@@ -17,7 +17,6 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from __future__ import print_function
import re
diff --git a/python/samba/ms_forest_updates_markdown.py b/python/samba/ms_forest_updates_markdown.py
index e219211d027..6d30576d37e 100644
--- a/python/samba/ms_forest_updates_markdown.py
+++ b/python/samba/ms_forest_updates_markdown.py
@@ -20,7 +20,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from __future__ import print_function
"""Generate LDIF from Github documentation."""
import re
diff --git a/python/samba/ms_schema.py b/python/samba/ms_schema.py
index 4b5c4a5df83..b9ca3c61b72 100644
--- a/python/samba/ms_schema.py
+++ b/python/samba/ms_schema.py
@@ -15,7 +15,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from __future__ import print_function
"""Generate LDIF from WSPP documentation."""
import re
diff --git a/python/samba/ms_schema_markdown.py b/python/samba/ms_schema_markdown.py
index ff1afb1a588..86c4b694405 100644
--- a/python/samba/ms_schema_markdown.py
+++ b/python/samba/ms_schema_markdown.py
@@ -18,7 +18,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from __future__ import print_function
"""Generate LDIF from Github documentation."""
import re
diff --git a/python/samba/netcmd/domain.py b/python/samba/netcmd/domain.py
index 3c1e8956982..841372de254 100644
--- a/python/samba/netcmd/domain.py
+++ b/python/samba/netcmd/domain.py
@@ -22,7 +22,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
from __future__ import division
import samba.getopt as options
import ldb
diff --git a/python/samba/netcmd/drs.py b/python/samba/netcmd/drs.py
index 5b439f8e6e1..52620090a64 100644
--- a/python/samba/netcmd/drs.py
+++ b/python/samba/netcmd/drs.py
@@ -18,7 +18,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
import samba.getopt as options
import ldb
diff --git a/python/samba/netcmd/gpo.py b/python/samba/netcmd/gpo.py
index bd2db9b1ab2..03a04b76074 100644
--- a/python/samba/netcmd/gpo.py
+++ b/python/samba/netcmd/gpo.py
@@ -18,7 +18,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
import os
import samba.getopt as options
import ldb
diff --git a/python/samba/netcmd/sites.py b/python/samba/netcmd/sites.py
index b5a2508ee3a..c85acc75813 100644
--- a/python/samba/netcmd/sites.py
+++ b/python/samba/netcmd/sites.py
@@ -16,7 +16,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
from samba import sites, subnets
from samba.samdb import SamDB
import samba.getopt as options
diff --git a/python/samba/netcmd/visualize.py b/python/samba/netcmd/visualize.py
index 45e62afbdc6..d81bafe52ba 100644
--- a/python/samba/netcmd/visualize.py
+++ b/python/samba/netcmd/visualize.py
@@ -17,8 +17,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from __future__ import print_function
-
import os
import sys
from collections import defaultdict
diff --git a/python/samba/ntacls.py b/python/samba/ntacls.py
index 1bcb755c952..89e64b7dc5a 100644
--- a/python/samba/ntacls.py
+++ b/python/samba/ntacls.py
@@ -15,8 +15,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-
-from __future__ import print_function
"""NT Acls."""
diff --git a/python/samba/tests/__init__.py b/python/samba/tests/__init__.py
index a5a8acdcc41..7efd7807a22 100644
--- a/python/samba/tests/__init__.py
+++ b/python/samba/tests/__init__.py
@@ -17,7 +17,6 @@
#
"""Samba Python tests."""
-from __future__ import print_function
import os
import tempfile
import warnings
diff --git a/python/samba/tests/audit_log_base.py b/python/samba/tests/audit_log_base.py
index f328b615df6..c791a1a8ca8 100644
--- a/python/samba/tests/audit_log_base.py
+++ b/python/samba/tests/audit_log_base.py
@@ -14,8 +14,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-
-from __future__ import print_function
"""Tests for DSDB audit logging.
"""
diff --git a/python/samba/tests/audit_log_dsdb.py b/python/samba/tests/audit_log_dsdb.py
index 5de25502087..33884bf5407 100644
--- a/python/samba/tests/audit_log_dsdb.py
+++ b/python/samba/tests/audit_log_dsdb.py
@@ -15,7 +15,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
"""Tests for the SamDb logging of password changes.
"""
diff --git a/python/samba/tests/audit_log_pass_change.py b/python/samba/tests/audit_log_pass_change.py
index 04bb850fa4f..7c3e622de99 100644
--- a/python/samba/tests/audit_log_pass_change.py
+++ b/python/samba/tests/audit_log_pass_change.py
@@ -15,7 +15,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
"""Tests for the SamDb logging of password changes.
"""
diff --git a/python/samba/tests/auth_log.py b/python/samba/tests/auth_log.py
index 3c56bc48e7f..d57d765a83a 100644
--- a/python/samba/tests/auth_log.py
+++ b/python/samba/tests/auth_log.py
@@ -15,7 +15,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
"""Tests for the Auth and AuthZ logging.
"""
import samba.tests
diff --git a/python/samba/tests/auth_log_base.py b/python/samba/tests/auth_log_base.py
index 09a8df0a4dc..58bc817440d 100644
--- a/python/samba/tests/auth_log_base.py
+++ b/python/samba/tests/auth_log_base.py
@@ -15,7 +15,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
"""Tests for the Auth and AuthZ logging.
"""
diff --git a/python/samba/tests/auth_log_pass_change.py b/python/samba/tests/auth_log_pass_change.py
index ee646722b20..f19512deaf8 100644
--- a/python/samba/tests/auth_log_pass_change.py
+++ b/python/samba/tests/auth_log_pass_change.py
@@ -15,7 +15,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
"""Tests for the Auth and AuthZ logging of password changes.
"""
diff --git a/python/samba/tests/blackbox/downgradedatabase.py b/python/samba/tests/blackbox/downgradedatabase.py
index 3d230609efc..bb45e32bae2 100644
--- a/python/samba/tests/blackbox/downgradedatabase.py
+++ b/python/samba/tests/blackbox/downgradedatabase.py
@@ -15,7 +15,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
from samba.tests import BlackboxTestCase
import os
import ldb
diff --git a/python/samba/tests/blackbox/ndrdump.py b/python/samba/tests/blackbox/ndrdump.py
index a33229e4740..91ac076fd3a 100644
--- a/python/samba/tests/blackbox/ndrdump.py
+++ b/python/samba/tests/blackbox/ndrdump.py
@@ -18,7 +18,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
"""Blackbox tests for ndrdump."""
import os
diff --git a/python/samba/tests/blackbox/smbcacls.py b/python/samba/tests/blackbox/smbcacls.py
index 3eca9602005..172cc56e73d 100644
--- a/python/samba/tests/blackbox/smbcacls.py
+++ b/python/samba/tests/blackbox/smbcacls.py
@@ -15,7 +15,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
from samba.tests import BlackboxTestCase, BlackboxProcessError
from samba.samba3 import param as s3param
diff --git a/python/samba/tests/blackbox/smbcacls_basic.py b/python/samba/tests/blackbox/smbcacls_basic.py
index 3562157e701..355ce86f42a 100644
--- a/python/samba/tests/blackbox/smbcacls_basic.py
+++ b/python/samba/tests/blackbox/smbcacls_basic.py
@@ -15,7 +15,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
from samba.tests.blackbox.smbcacls import SmbCaclsBlockboxTestBase
from samba.tests import BlackboxProcessError
diff --git a/python/samba/tests/blackbox/smbcacls_dfs_propagate_inherit.py b/python/samba/tests/blackbox/smbcacls_dfs_propagate_inherit.py
index 1df60149176..36c29c8ccca 100644
--- a/python/samba/tests/blackbox/smbcacls_dfs_propagate_inherit.py
+++ b/python/samba/tests/blackbox/smbcacls_dfs_propagate_inherit.py
@@ -15,7 +15,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
from samba.tests import BlackboxProcessError
import os
from samba.tests.blackbox.smbcacls_propagate_inhertance import InheritanceSmbCaclsTests
diff --git a/python/samba/tests/blackbox/smbcacls_propagate_inhertance.py b/python/samba/tests/blackbox/smbcacls_propagate_inhertance.py
index d4577805f4f..ed8455a6bf8 100644
--- a/python/samba/tests/blackbox/smbcacls_propagate_inhertance.py
+++ b/python/samba/tests/blackbox/smbcacls_propagate_inhertance.py
@@ -15,7 +15,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
from samba.tests.blackbox.smbcacls import SmbCaclsBlockboxTestBase
from samba.tests import BlackboxProcessError
import os
diff --git a/python/samba/tests/blackbox/smbcontrol.py b/python/samba/tests/blackbox/smbcontrol.py
index e923efb71a5..cfd9d4d77e2 100644
--- a/python/samba/tests/blackbox/smbcontrol.py
+++ b/python/samba/tests/blackbox/smbcontrol.py
@@ -15,7 +15,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
from samba.tests import BlackboxTestCase, BlackboxProcessError
from samba.messaging import Messaging
diff --git a/python/samba/tests/blackbox/smbcontrol_process.py b/python/samba/tests/blackbox/smbcontrol_process.py
index b4ccc4c455c..bff2e06adba 100644
--- a/python/samba/tests/blackbox/smbcontrol_process.py
+++ b/python/samba/tests/blackbox/smbcontrol_process.py
@@ -19,7 +19,6 @@
# in the preforkrestartdc test environment to prevent them impacting other
# tests.
#
-from __future__ import print_function
import time
from samba.tests import BlackboxTestCase, BlackboxProcessError
from samba.messaging import Messaging
diff --git a/python/samba/tests/complex_expressions.py b/python/samba/tests/complex_expressions.py
index 5657bf6b276..25be67c74d4 100644
--- a/python/samba/tests/complex_expressions.py
+++ b/python/samba/tests/complex_expressions.py
@@ -16,7 +16,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
import optparse
import samba
import samba.getopt as options
diff --git a/python/samba/tests/dcerpc/dnsserver.py b/python/samba/tests/dcerpc/dnsserver.py
index 5f7aa378575..340bb454324 100644
--- a/python/samba/tests/dcerpc/dnsserver.py
+++ b/python/samba/tests/dcerpc/dnsserver.py
@@ -15,7 +15,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
"""Tests for samba.dcerpc.dnsserver"""
import os
diff --git a/python/samba/tests/dcerpc/testrpc.py b/python/samba/tests/dcerpc/testrpc.py
index d4fc39e51f8..fcc3b0477dc 100644
--- a/python/samba/tests/dcerpc/testrpc.py
+++ b/python/samba/tests/dcerpc/testrpc.py
@@ -14,7 +14,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
import sys
sys.path.insert(0, "bin/python")
diff --git a/python/samba/tests/dns.py b/python/samba/tests/dns.py
index bb25b09d9f6..1a05634725a 100644
--- a/python/samba/tests/dns.py
+++ b/python/samba/tests/dns.py
@@ -15,8 +15,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
-
from samba import dsdb
from samba.ndr import ndr_unpack, ndr_pack
from samba.samdb import SamDB
diff --git a/python/samba/tests/dns_base.py b/python/samba/tests/dns_base.py
index 5c0d6201b06..e522120b932 100644
--- a/python/samba/tests/dns_base.py
+++ b/python/samba/tests/dns_base.py
@@ -16,7 +16,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
from samba.tests import TestCaseInTempDir
from samba.dcerpc import dns, dnsp
from samba import gensec, tests
diff --git a/python/samba/tests/dns_forwarder.py b/python/samba/tests/dns_forwarder.py
index 403b9623a73..52511033abd 100644
--- a/python/samba/tests/dns_forwarder.py
+++ b/python/samba/tests/dns_forwarder.py
@@ -15,7 +15,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
import os
import sys
import random
diff --git a/python/samba/tests/dns_forwarder_helpers/server.py b/python/samba/tests/dns_forwarder_helpers/server.py
index 803372f73c1..5637b42a37e 100644
--- a/python/samba/tests/dns_forwarder_helpers/server.py
+++ b/python/samba/tests/dns_forwarder_helpers/server.py
@@ -17,7 +17,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Based on the EchoServer example from python docs
-from __future__ import print_function
+
import socketserver as SocketServer
import sys
from threading import Timer
diff --git a/python/samba/tests/graph.py b/python/samba/tests/graph.py
index efbe75955a4..be1bf58e3c0 100644
--- a/python/samba/tests/graph.py
+++ b/python/samba/tests/graph.py
@@ -20,8 +20,6 @@
"""Tests for samba.graph"""
-from __future__ import print_function
-
import samba
import samba.tests
from samba import graph
diff --git a/python/samba/tests/group_audit.py b/python/samba/tests/group_audit.py
index 8af61340584..a032a8ecd70 100644
--- a/python/samba/tests/group_audit.py
+++ b/python/samba/tests/group_audit.py
@@ -14,8 +14,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-
-from __future__ import print_function
"""Tests for the SamDb logging of password changes.
"""
diff --git a/python/samba/tests/ldap_referrals.py b/python/samba/tests/ldap_referrals.py
index 86a39d4e602..b3f980e0301 100644
--- a/python/samba/tests/ldap_referrals.py
+++ b/python/samba/tests/ldap_referrals.py
@@ -18,7 +18,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from __future__ import print_function
import optparse
import os
import sys
diff --git a/python/samba/tests/prefork_restart.py b/python/samba/tests/prefork_restart.py
index 2acbcc9befc..7d762196b58 100644
--- a/python/samba/tests/prefork_restart.py
+++ b/python/samba/tests/prefork_restart.py
@@ -15,8 +15,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-
-from __future__ import print_function
"""Tests process restarting in the pre-fork process model.
NOTE: As this test kills samba processes it won't play nicely with other
tests, so needs to be run in it's own environment.
diff --git a/python/samba/tests/process_limits.py b/python/samba/tests/process_limits.py
index b62906e294f..b1997acad67 100644
--- a/python/samba/tests/process_limits.py
+++ b/python/samba/tests/process_limits.py
@@ -15,8 +15,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-
-from __future__ import print_function
"""Tests limits on processes forked by fork on accept in the standard process
model.
NOTE: This test runs in an environment with an artificially low setting for
diff --git a/python/samba/tests/samba3sam.py b/python/samba/tests/samba3sam.py
index 17bb4a7b7bc..01d274da7be 100644
--- a/python/samba/tests/samba3sam.py
+++ b/python/samba/tests/samba3sam.py
@@ -17,8 +17,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-
-from __future__ import print_function
"""Tests for the samba3sam LDB module, which maps Samba3 LDAP to AD LDAP."""
import os
diff --git a/python/samba/tests/samba_tool/visualize.py b/python/samba/tests/samba_tool/visualize.py
index bc1c91c9b56..03a29ffc1d0 100644
--- a/python/samba/tests/samba_tool/visualize.py
+++ b/python/samba/tests/samba_tool/visualize.py
@@ -24,7 +24,6 @@ We don't test samba-tool visualize reps here because repsTo and
repsFrom are not replicated, and there are actual remote servers to
query.
"""
-from __future__ import print_function
import samba
import os
import tempfile
diff --git a/python/samba/tests/samba_tool/visualize_drs.py b/python/samba/tests/samba_tool/visualize_drs.py
index 3eda02783f6..9a2ca25039b 100644
--- a/python/samba/tests/samba_tool/visualize_drs.py
+++ b/python/samba/tests/samba_tool/visualize_drs.py
@@ -24,7 +24,6 @@ others we try to grasp control of replication and make more specific
assertions.
"""
-from __future__ import print_function
import os
import re
import json
diff --git a/python/samba/upgradehelpers.py b/python/samba/upgradehelpers.py
index 69f6e3675e8..d012cea5bd2 100644
--- a/python/samba/upgradehelpers.py
+++ b/python/samba/upgradehelpers.py
@@ -19,7 +19,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from __future__ import print_function
from __future__ import division
"""Helpers used for upgrading between different database formats."""
diff --git a/python/samba/uptodateness.py b/python/samba/uptodateness.py
index 7914c47b845..db1ba53885b 100644
--- a/python/samba/uptodateness.py
+++ b/python/samba/uptodateness.py
@@ -16,7 +16,6 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from __future__ import print_function
import sys
import time
diff --git a/script/attr_count_read b/script/attr_count_read
index 4338b6bee10..eecdf57707b 100755
--- a/script/attr_count_read
+++ b/script/attr_count_read
@@ -16,7 +16,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
import sys
import argparse
import struct
diff --git a/script/autobuild.py b/script/autobuild.py
index d5aef614a42..a340160f20f 100755
--- a/script/autobuild.py
+++ b/script/autobuild.py
@@ -3,7 +3,6 @@
# Copyright Andrew Tridgell 2010
# released under GNU GPL v3 or later
-from __future__ import print_function
from subprocess import call, check_call, check_output, Popen, PIPE, CalledProcessError
import os
import tarfile
diff --git a/script/compare_cc_results.py b/script/compare_cc_results.py
index cc16751cf6e..9bf24adffec 100755
--- a/script/compare_cc_results.py
+++ b/script/compare_cc_results.py
@@ -6,7 +6,6 @@ bin/c4che/.
USAGE: compare_cc_results.py CONFIG_1 CONFIG_2 [CONFIG_3 [CONFIG_4 ...]]
"""
-from __future__ import print_function
import sys
import difflib
diff --git a/script/show_test_time b/script/show_test_time
index 5a84f19787c..70d29d72b5c 100755
--- a/script/show_test_time
+++ b/script/show_test_time
@@ -1,5 +1,4 @@
#!/usr/bin/python
-from __future__ import print_function
import optparse
import os.path
import subprocess
diff --git a/script/traffic_learner b/script/traffic_learner
index cad1a64a133..303956e7ab4 100755
--- a/script/traffic_learner
+++ b/script/traffic_learner
@@ -16,7 +16,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
import sys
import argparse
diff --git a/script/traffic_replay b/script/traffic_replay
index d29f0a9839c..e785e31babf 100755
--- a/script/traffic_replay
+++ b/script/traffic_replay
@@ -16,7 +16,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
import sys
import os
import optparse
diff --git a/selftest/format-subunit-json b/selftest/format-subunit-json
index a3ece648e3a..d9d912cd294 100644
--- a/selftest/format-subunit-json
+++ b/selftest/format-subunit-json
@@ -2,7 +2,6 @@
# Copyright (C) 2008-2010 Jelmer Vernooij <jelmer@samba.org>
# Copyright (C) 2016 Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
# Published under the GNU GPL, v3 or later
-from __future__ import print_function
import optparse
import os
import signal
diff --git a/selftest/selftesthelpers.py b/selftest/selftesthelpers.py
index 23f1b9ccd68..3358374cbca 100644
--- a/selftest/selftesthelpers.py
+++ b/selftest/selftesthelpers.py
@@ -17,7 +17,6 @@
# by the name of the test, the environment it needs and the command to run, all
# three separated by newlines. All other lines in the output are considered
# comments.
-from __future__ import print_function
import os
import subprocess
diff --git a/selftest/subunithelper.py b/selftest/subunithelper.py
index fd356d92156..61e3289080e 100644
--- a/selftest/subunithelper.py
+++ b/selftest/subunithelper.py
@@ -15,7 +15,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from __future__ import print_function
__all__ = ['parse_results']
import datetime
diff --git a/source3/script/tests/test_wbinfo_sids2xids_int.py b/source3/script/tests/test_wbinfo_sids2xids_int.py
index 748141949ed..759edbccd97 100755
--- a/source3/script/tests/test_wbinfo_sids2xids_int.py
+++ b/source3/script/tests/test_wbinfo_sids2xids_int.py
@@ -1,6 +1,5 @@
#!/usr/bin/env python3
-from __future__ import print_function
import sys
import os
import subprocess
diff --git a/source4/dsdb/samdb/ldb_modules/tests/possibleinferiors.py b/source4/dsdb/samdb/ldb_modules/tests/possibleinferiors.py
index ab13b14b3a8..d28be8f70d3 100755
--- a/source4/dsdb/samdb/ldb_modules/tests/possibleinferiors.py
+++ b/source4/dsdb/samdb/ldb_modules/tests/possibleinferiors.py
@@ -17,7 +17,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
"""Tests the possibleInferiors generation in the schema_fsmo ldb module"""
import optparse
diff --git a/source4/dsdb/tests/python/acl.py b/source4/dsdb/tests/python/acl.py
index a859196ee94..2cb6303dce3 100755
--- a/source4/dsdb/tests/python/acl.py
+++ b/source4/dsdb/tests/python/acl.py
@@ -2,7 +2,6 @@
# -*- coding: utf-8 -*-
# This is unit with tests for LDAP access checks
-from __future__ import print_function
import optparse
import sys
import base64
diff --git a/source4/dsdb/tests/python/ad_dc_medley_performance.py b/source4/dsdb/tests/python/ad_dc_medley_performance.py
index e0f0e19651a..ebd63136639 100644
--- a/source4/dsdb/tests/python/ad_dc_medley_performance.py
+++ b/source4/dsdb/tests/python/ad_dc_medley_performance.py
@@ -1,6 +1,5 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-from __future__ import print_function
import optparse
import sys
diff --git a/source4/dsdb/tests/python/ad_dc_performance.py b/source4/dsdb/tests/python/ad_dc_performance.py
index 595ea681409..6ff84e4389e 100644
--- a/source4/dsdb/tests/python/ad_dc_performance.py
+++ b/source4/dsdb/tests/python/ad_dc_performance.py
@@ -1,6 +1,5 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-from __future__ import print_function
import optparse
import sys
diff --git a/source4/dsdb/tests/python/ad_dc_search_performance.py b/source4/dsdb/tests/python/ad_dc_search_performance.py
index 2e36218fc48..27f6cb3545c 100644
--- a/source4/dsdb/tests/python/ad_dc_search_performance.py
+++ b/source4/dsdb/tests/python/ad_dc_search_performance.py
@@ -1,6 +1,5 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-from __future__ import print_function
import optparse
import sys
diff --git a/source4/dsdb/tests/python/attr_from_server.py b/source4/dsdb/tests/python/attr_from_server.py
index 1a0112d4ed5..aca356bd733 100644
--- a/source4/dsdb/tests/python/attr_from_server.py
+++ b/source4/dsdb/tests/python/attr_from_server.py
@@ -22,7 +22,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
import optparse
import sys
sys.path.insert(0, "bin/python")
diff --git a/source4/dsdb/tests/python/deletetest.py b/source4/dsdb/tests/python/deletetest.py
index 612396002d6..7375f26e895 100755
--- a/source4/dsdb/tests/python/deletetest.py
+++ b/source4/dsdb/tests/python/deletetest.py
@@ -1,7 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-from __future__ import print_function
import optparse
import sys
import os
diff --git a/source4/dsdb/tests/python/dirsync.py b/source4/dsdb/tests/python/dirsync.py
index 0ed0c7c9787..1ac719e4332 100755
--- a/source4/dsdb/tests/python/dirsync.py
+++ b/source4/dsdb/tests/python/dirsync.py
@@ -18,7 +18,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from __future__ import print_function
import optparse
import sys
sys.path.insert(0, "bin/python")
diff --git a/source4/dsdb/tests/python/large_ldap.py b/source4/dsdb/tests/python/large_ldap.py
index cce9d41862f..0bf73f988d8 100644
--- a/source4/dsdb/tests/python/large_ldap.py
+++ b/source4/dsdb/tests/python/large_ldap.py
@@ -19,7 +19,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from __future__ import print_function
import optparse
import sys
import os
diff --git a/source4/dsdb/tests/python/ldap.py b/source4/dsdb/tests/python/ldap.py
index 9c836c04267..0c90a0bbd79 100755
--- a/source4/dsdb/tests/python/ldap.py
+++ b/source4/dsdb/tests/python/ldap.py
@@ -17,7 +17,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from __future__ import print_function
import optparse
import sys
import time
diff --git a/source4/dsdb/tests/python/ldap_modify_order.py b/source4/dsdb/tests/python/ldap_modify_order.py
index 8b3f6c7be57..54f89597eab 100644
--- a/source4/dsdb/tests/python/ldap_modify_order.py
+++ b/source4/dsdb/tests/python/ldap_modify_order.py
@@ -16,7 +16,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from __future__ import print_function
import optparse
import sys
import os
diff --git a/source4/dsdb/tests/python/ldap_schema.py b/source4/dsdb/tests/python/ldap_schema.py
index 75115e1e251..b08aa7f6859 100755
--- a/source4/dsdb/tests/python/ldap_schema.py
+++ b/source4/dsdb/tests/python/ldap_schema.py
@@ -19,7 +19,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from __future__ import print_function
import optparse
import sys
import time
diff --git a/source4/dsdb/tests/python/linked_attributes.py b/source4/dsdb/tests/python/linked_attributes.py
index 533fa943736..e66a1fdd0d7 100644
--- a/source4/dsdb/tests/python/linked_attributes.py
+++ b/source4/dsdb/tests/python/linked_attributes.py
@@ -1,7 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Originally based on ./sam.py
-from __future__ import print_function
import optparse
import sys
import os
diff --git a/source4/dsdb/tests/python/login_basics.py b/source4/dsdb/tests/python/login_basics.py
index d265441826d..09f8ea36ec8 100755
--- a/source4/dsdb/tests/python/login_basics.py
+++ b/source4/dsdb/tests/python/login_basics.py
@@ -7,7 +7,6 @@
#
# Copyright Andrew Bartlett 2018
#
-from __future__ import print_function
import optparse
import sys
from samba.tests.subunitrun import TestProgram, SubunitOptions
diff --git a/source4/dsdb/tests/python/notification.py b/source4/dsdb/tests/python/notification.py
index 9d463eee258..b9e10324de5 100755
--- a/source4/dsdb/tests/python/notification.py
+++ b/source4/dsdb/tests/python/notification.py
@@ -16,7 +16,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from __future__ import print_function
import optparse
import sys
import os
diff --git a/source4/dsdb/tests/python/password_lockout.py b/source4/dsdb/tests/python/password_lockout.py
index 445944862b8..959c6489857 100755
--- a/source4/dsdb/tests/python/password_lockout.py
+++ b/source4/dsdb/tests/python/password_lockout.py
@@ -7,7 +7,6 @@
# Copyright Stefan Metzmacher 2014
#
-from __future__ import print_function
import optparse
import sys
import base64
diff --git a/source4/dsdb/tests/python/password_lockout_base.py b/source4/dsdb/tests/python/password_lockout_base.py
index 0f9617da1e6..ad2a2ad1602 100644
--- a/source4/dsdb/tests/python/password_lockout_base.py
+++ b/source4/dsdb/tests/python/password_lockout_base.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
import samba
from samba.auth import system_session
diff --git a/source4/dsdb/tests/python/passwords.py b/source4/dsdb/tests/python/passwords.py
index 5025962e6ea..27107f3d130 100755
--- a/source4/dsdb/tests/python/passwords.py
+++ b/source4/dsdb/tests/python/passwords.py
@@ -8,7 +8,6 @@
# secured enough (SASL with a minimum of 128 Bit encryption) - consider
# MS-ADTS 3.1.1.3.1.5
-from __future__ import print_function
import optparse
import sys
import base64
diff --git a/source4/dsdb/tests/python/rodc.py b/source4/dsdb/tests/python/rodc.py
index ec2c55d7957..1a4b0f9b7ee 100755
--- a/source4/dsdb/tests/python/rodc.py
+++ b/source4/dsdb/tests/python/rodc.py
@@ -1,7 +1,6 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
-from __future__ import print_function
import optparse
import sys
import os
diff --git a/source4/dsdb/tests/python/rodc_rwdc.py b/source4/dsdb/tests/python/rodc_rwdc.py
index a09d16a0163..d628c609d8c 100644
--- a/source4/dsdb/tests/python/rodc_rwdc.py
+++ b/source4/dsdb/tests/python/rodc_rwdc.py
@@ -1,6 +1,5 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
-from __future__ import print_function
"""Test communication of credentials etc, between an RODC and a RWDC.
How does it work when the password is changed on the RWDC?
diff --git a/source4/dsdb/tests/python/sam.py b/source4/dsdb/tests/python/sam.py
index 41c348bce5f..1417505c4f5 100755
--- a/source4/dsdb/tests/python/sam.py
+++ b/source4/dsdb/tests/python/sam.py
@@ -2,7 +2,6 @@
# -*- coding: utf-8 -*-
# This is a port of the original in testprogs/ejs/ldap.js
-from __future__ import print_function
import optparse
import sys
import os
diff --git a/source4/dsdb/tests/python/sec_descriptor.py b/source4/dsdb/tests/python/sec_descriptor.py
index 8edf5e092d7..b67bf33b5f7 100755
--- a/source4/dsdb/tests/python/sec_descriptor.py
+++ b/source4/dsdb/tests/python/sec_descriptor.py
@@ -1,7 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-from __future__ import print_function
import optparse
import sys
import os
diff --git a/source4/dsdb/tests/python/sites.py b/source4/dsdb/tests/python/sites.py
index 783b896caf9..f6efdaebc05 100755
--- a/source4/dsdb/tests/python/sites.py
+++ b/source4/dsdb/tests/python/sites.py
@@ -16,7 +16,6 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from __future__ import print_function
import optparse
import sys
diff --git a/source4/dsdb/tests/python/sort.py b/source4/dsdb/tests/python/sort.py
index 51d797af38d..a4d7b72f744 100644
--- a/source4/dsdb/tests/python/sort.py
+++ b/source4/dsdb/tests/python/sort.py
@@ -1,7 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Originally based on ./sam.py
-from __future__ import print_function
from unicodedata import normalize
import locale
locale.setlocale(locale.LC_ALL, ('en_US', 'UTF-8'))
diff --git a/source4/dsdb/tests/python/subtree_rename.py b/source4/dsdb/tests/python/subtree_rename.py
index c4f6bc7a160..df85d05eb4b 100644
--- a/source4/dsdb/tests/python/subtree_rename.py
+++ b/source4/dsdb/tests/python/subtree_rename.py
@@ -1,7 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Originally based on ./sam.py
-from __future__ import print_function
import optparse
import sys
import os
diff --git a/source4/dsdb/tests/python/token_group.py b/source4/dsdb/tests/python/token_group.py
index 7e314627a32..3a9e535a085 100755
--- a/source4/dsdb/tests/python/token_group.py
+++ b/source4/dsdb/tests/python/token_group.py
@@ -2,7 +2,6 @@
# -*- coding: utf-8 -*-
# test tokengroups attribute against internal token calculation
-from __future__ import print_function
import optparse
import sys
import os
diff --git a/source4/dsdb/tests/python/tombstone_reanimation.py b/source4/dsdb/tests/python/tombstone_reanimation.py
index ad2ef80c09e..453e378332b 100755
--- a/source4/dsdb/tests/python/tombstone_reanimation.py
+++ b/source4/dsdb/tests/python/tombstone_reanimation.py
@@ -18,7 +18,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from __future__ import print_function
import sys
import unittest
diff --git a/source4/dsdb/tests/python/urgent_replication.py b/source4/dsdb/tests/python/urgent_replication.py
index 6ec698d0bbb..485b1fd8df5 100755
--- a/source4/dsdb/tests/python/urgent_replication.py
+++ b/source4/dsdb/tests/python/urgent_replication.py
@@ -1,7 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-from __future__ import print_function
import optparse
import sys
sys.path.insert(0, "bin/python")
diff --git a/source4/dsdb/tests/python/user_account_control.py b/source4/dsdb/tests/python/user_account_control.py
index 2d62d4c32b1..02805ff3adc 100755
--- a/source4/dsdb/tests/python/user_account_control.py
+++ b/source4/dsdb/tests/python/user_account_control.py
@@ -8,7 +8,6 @@
# Licenced under the GPLv3
#
-from __future__ import print_function
import optparse
import sys
import unittest
diff --git a/source4/dsdb/tests/python/vlv.py b/source4/dsdb/tests/python/vlv.py
index c7578c6f04b..3d5782b02ec 100644
--- a/source4/dsdb/tests/python/vlv.py
+++ b/source4/dsdb/tests/python/vlv.py
@@ -1,7 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Originally based on ./sam.py
-from __future__ import print_function
import optparse
import sys
import os
diff --git a/source4/script/depfilter.py b/source4/script/depfilter.py
index 1f741f746e0..ee2ce9d706a 100755
--- a/source4/script/depfilter.py
+++ b/source4/script/depfilter.py
@@ -6,7 +6,6 @@
# Command line stuff
-from __future__ import print_function
import sys
import re
diff --git a/source4/scripting/bin/gen_hresult.py b/source4/scripting/bin/gen_hresult.py
index 5fbf419a547..9bde42911f5 100755
--- a/source4/scripting/bin/gen_hresult.py
+++ b/source4/scripting/bin/gen_hresult.py
@@ -22,7 +22,6 @@
#
-from __future__ import print_function
import sys, os.path, io, string
# parsed error data
diff --git a/source4/scripting/bin/get-descriptors b/source4/scripting/bin/get-descriptors
index bed01e7ceb3..f9b9cd7d170 100755
--- a/source4/scripting/bin/get-descriptors
+++ b/source4/scripting/bin/get-descriptors
@@ -26,7 +26,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
import optparse
import sys
diff --git a/source4/scripting/bin/rebuildextendeddn b/source4/scripting/bin/rebuildextendeddn
index 3c0e46d4fef..f5137f979d6 100755
--- a/source4/scripting/bin/rebuildextendeddn
+++ b/source4/scripting/bin/rebuildextendeddn
@@ -21,7 +21,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
import optparse
import os
import sys
diff --git a/source4/scripting/bin/samba_downgrade_db b/source4/scripting/bin/samba_downgrade_db
index 87a989bfd6a..43a803c4e82 100755
--- a/source4/scripting/bin/samba_downgrade_db
+++ b/source4/scripting/bin/samba_downgrade_db
@@ -19,7 +19,6 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from __future__ import print_function
import optparse
import sys
diff --git a/source4/scripting/bin/samba_kcc b/source4/scripting/bin/samba_kcc
index 122a5ed2c5e..67d801ea917 100755
--- a/source4/scripting/bin/samba_kcc
+++ b/source4/scripting/bin/samba_kcc
@@ -20,7 +20,6 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from __future__ import print_function
import os
import sys
diff --git a/source4/scripting/devel/addlotscontacts b/source4/scripting/devel/addlotscontacts
index aff14092021..8e6b27802ce 100644
--- a/source4/scripting/devel/addlotscontacts
+++ b/source4/scripting/devel/addlotscontacts
@@ -15,7 +15,6 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from __future__ import print_function
__docformat__ = "restructuredText"
diff --git a/source4/scripting/devel/crackname b/source4/scripting/devel/crackname
index 4dbe47227aa..021adfa0515 100755
--- a/source4/scripting/devel/crackname
+++ b/source4/scripting/devel/crackname
@@ -3,7 +3,6 @@
# Copyright Matthieu Patou <mat@matws.net> 2011
# script to call a DRSUAPI crackname
# this is useful for plugfest testing and replication debug
-from __future__ import print_function
import sys
from optparse import OptionParser
diff --git a/source4/scripting/devel/demodirsync.py b/source4/scripting/devel/demodirsync.py
index e615c0fb865..ec548ae2147 100755
--- a/source4/scripting/devel/demodirsync.py
+++ b/source4/scripting/devel/demodirsync.py
@@ -1,7 +1,5 @@
#!/usr/bin/python
-
-from __future__ import print_function
import optparse
import sys
import base64
diff --git a/source4/scripting/devel/getncchanges b/source4/scripting/devel/getncchanges
index 3c132f5f0d3..a1a4d14d621 100755
--- a/source4/scripting/devel/getncchanges
+++ b/source4/scripting/devel/getncchanges
@@ -2,7 +2,6 @@
# script to call a DRS GetNCChanges from the command line
# this is useful for plugfest testing
-from __future__ import print_function
import sys
from optparse import OptionParser
diff --git a/source4/scripting/devel/pfm_verify.py b/source4/scripting/devel/pfm_verify.py
index 496a7a97d4d..2fe2aca65bc 100755
--- a/source4/scripting/devel/pfm_verify.py
+++ b/source4/scripting/devel/pfm_verify.py
@@ -20,7 +20,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
import os
import sys
from optparse import OptionParser
diff --git a/source4/scripting/devel/repl_cleartext_pwd.py b/source4/scripting/devel/repl_cleartext_pwd.py
index 6fc1e162591..64392919f5b 100755
--- a/source4/scripting/devel/repl_cleartext_pwd.py
+++ b/source4/scripting/devel/repl_cleartext_pwd.py
@@ -36,7 +36,6 @@
# $
#
-from __future__ import print_function
import sys
# Find right direction when running from source tree
diff --git a/source4/scripting/devel/speedtest.py b/source4/scripting/devel/speedtest.py
index 8a6acfd0a72..8c044c47925 100755
--- a/source4/scripting/devel/speedtest.py
+++ b/source4/scripting/devel/speedtest.py
@@ -22,7 +22,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
import optparse
import sys
import time
diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py
index fa0f0043424..cdaced0e1c1 100755
--- a/source4/selftest/tests.py
+++ b/source4/selftest/tests.py
@@ -17,7 +17,6 @@
# by the name of the test, the environment it needs and the command to run, all
# three separated by newlines. All other lines in the output are considered
# comments.
-from __future__ import print_function
import os
import sys
diff --git a/source4/torture/drs/python/delete_object.py b/source4/torture/drs/python/delete_object.py
index 395877ad76a..3db0d0b51f3 100644
--- a/source4/torture/drs/python/delete_object.py
+++ b/source4/torture/drs/python/delete_object.py
@@ -26,7 +26,6 @@
# PYTHONPATH="$PYTHONPATH:$samba4srcdir/torture/drs/python" $SUBUNITRUN delete_object -U"$DOMAIN/$DC_USERNAME"%"$DC_PASSWORD"
#
-from __future__ import print_function
import time
diff --git a/source4/torture/drs/python/drs_base.py b/source4/torture/drs/python/drs_base.py
index 0046ae235f1..eea5a7ef907 100644
--- a/source4/torture/drs/python/drs_base.py
+++ b/source4/torture/drs/python/drs_base.py
@@ -20,7 +20,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
import sys
import time
import os
diff --git a/source4/torture/drs/python/fsmo.py b/source4/torture/drs/python/fsmo.py
index b548fbca26a..3562b4522f7 100644
--- a/source4/torture/drs/python/fsmo.py
+++ b/source4/torture/drs/python/fsmo.py
@@ -25,7 +25,6 @@
# PYTHONPATH="$PYTHONPATH:$samba4srcdir/torture/drs/python" $SUBUNITRUN fsmo -U"$DOMAIN/$DC_USERNAME"%"$DC_PASSWORD"
#
-from __future__ import print_function
import sys
import time
import os
diff --git a/source4/torture/drs/python/getncchanges.py b/source4/torture/drs/python/getncchanges.py
index 7bb6e4d14aa..a35e86088dc 100644
--- a/source4/torture/drs/python/getncchanges.py
+++ b/source4/torture/drs/python/getncchanges.py
@@ -28,7 +28,6 @@
# getncchanges -U"$DOMAIN/$DC_USERNAME"%"$DC_PASSWORD"
#
-from __future__ import print_function
import drs_base
import samba.tests
import ldb
diff --git a/source4/torture/drs/python/repl_move.py b/source4/torture/drs/python/repl_move.py
index 31dec3849a7..19389cdb8af 100644
--- a/source4/torture/drs/python/repl_move.py
+++ b/source4/torture/drs/python/repl_move.py
@@ -27,7 +27,6 @@
# PYTHONPATH="$PYTHONPATH:$samba4srcdir/torture/drs/python" $SUBUNITRUN repl_move -U"$DOMAIN/$DC_USERNAME"%"$DC_PASSWORD"
#
-from __future__ import print_function
import time
import uuid
import samba.tests
diff --git a/source4/torture/drs/python/replica_sync.py b/source4/torture/drs/python/replica_sync.py
index ad03d1b061e..b078e90cb3e 100644
--- a/source4/torture/drs/python/replica_sync.py
+++ b/source4/torture/drs/python/replica_sync.py
@@ -27,7 +27,6 @@
# PYTHONPATH="$PYTHONPATH:$samba4srcdir/torture/drs/python" $SUBUNITRUN replica_sync -U"$DOMAIN/$DC_USERNAME"%"$DC_PASSWORD"
#
-from __future__ import print_function
import drs_base
import samba.tests
import time
diff --git a/source4/torture/drs/python/samba_tool_drs_showrepl.py b/source4/torture/drs/python/samba_tool_drs_showrepl.py
index e77f15d2b54..707b1fb3a75 100644
--- a/source4/torture/drs/python/samba_tool_drs_showrepl.py
+++ b/source4/torture/drs/python/samba_tool_drs_showrepl.py
@@ -17,7 +17,6 @@
#
"""Blackbox tests for samba-tool drs showrepl."""
-from __future__ import print_function
import samba.tests
import drs_base
from samba.dcerpc import drsuapi