This made Python 2's print behave like Python 3's print().
In some cases, where we had:
from __future__ import print_function
"""Intended module documentation..."""
this will have the side effect of making the intended module documentation
work as the actual module documentation (i.e. becoming __doc__), because
it is once again the first statement in the module.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
# -*- coding: utf-8 -*-
# This is unit with tests for LDAP access checks
-from __future__ import print_function
import optparse
import sys
import base64
#!/usr/bin/env python3
# Trivial reimplementation of tdbdump in Python
-from __future__ import print_function
import tdb, sys
if len(sys.argv) < 2:
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
import ldb
import samba
import time
# 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
# 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
# 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
# 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
#
# 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
#
# 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
# 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
# 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
# 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
# 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
# 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
# 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
# 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
# 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
# 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."""
#
"""Samba Python tests."""
-from __future__ import print_function
import os
import tempfile
import warnings
# 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.
"""
# 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.
"""
# 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.
"""
# 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
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
"""Tests for the Auth and AuthZ logging.
"""
# 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.
"""
# 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
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
"""Blackbox tests for ndrdump."""
import os
# 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
# 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
# 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
# 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
# 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
# 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
# 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
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
"""Tests for samba.dcerpc.dnsserver"""
import os
# 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")
# 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
# 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
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
import os
import sys
import random
# 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
"""Tests for samba.graph"""
-from __future__ import print_function
-
import samba
import samba.tests
from samba import graph
# 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.
"""
# 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
# 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.
# 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
# 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
repsFrom are not replicated, and there are actual remote servers to
query.
"""
-from __future__ import print_function
import samba
import os
import tempfile
assertions.
"""
-from __future__ import print_function
import os
import re
import json
# 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."""
#
# 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
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
import sys
import argparse
import struct
# 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
USAGE: compare_cc_results.py CONFIG_1 CONFIG_2 [CONFIG_3 [CONFIG_4 ...]]
"""
-from __future__ import print_function
import sys
import difflib
#!/usr/bin/python
-from __future__ import print_function
import optparse
import os.path
import subprocess
# 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
# 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
# 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
# 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
# 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
#!/usr/bin/env python3
-from __future__ import print_function
import sys
import os
import subprocess
# 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
# -*- coding: utf-8 -*-
# This is unit with tests for LDAP access checks
-from __future__ import print_function
import optparse
import sys
import base64
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-from __future__ import print_function
import optparse
import sys
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-from __future__ import print_function
import optparse
import sys
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-from __future__ import print_function
import optparse
import sys
# 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")
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-from __future__ import print_function
import optparse
import sys
import os
# 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")
# 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
# 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
# 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
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from __future__ import print_function
import optparse
import sys
import time
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Originally based on ./sam.py
-from __future__ import print_function
import optparse
import sys
import os
#
# Copyright Andrew Bartlett 2018
#
-from __future__ import print_function
import optparse
import sys
from samba.tests.subunitrun import TestProgram, SubunitOptions
# 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
# Copyright Stefan Metzmacher 2014
#
-from __future__ import print_function
import optparse
import sys
import base64
-from __future__ import print_function
import samba
from samba.auth import system_session
# 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
#!/usr/bin/python
# -*- coding: utf-8 -*-
-from __future__ import print_function
import optparse
import sys
import os
#!/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?
# -*- 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
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-from __future__ import print_function
import optparse
import sys
import os
#
# 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
#!/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'))
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Originally based on ./sam.py
-from __future__ import print_function
import optparse
import sys
import os
# -*- coding: utf-8 -*-
# test tokengroups attribute against internal token calculation
-from __future__ import print_function
import optparse
import sys
import os
# 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
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-from __future__ import print_function
import optparse
import sys
sys.path.insert(0, "bin/python")
# Licenced under the GPLv3
#
-from __future__ import print_function
import optparse
import sys
import unittest
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Originally based on ./sam.py
-from __future__ import print_function
import optparse
import sys
import os
# Command line stuff
-from __future__ import print_function
import sys
import re
#
-from __future__ import print_function
import sys, os.path, io, string
# parsed error data
# 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
# 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
#
# 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
#
# 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
#
# 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"
# 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
#!/usr/bin/python
-
-from __future__ import print_function
import optparse
import sys
import base64
# 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
# 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
# $
#
-from __future__ import print_function
import sys
# Find right direction when running from source tree
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
import optparse
import sys
import time
# 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
# PYTHONPATH="$PYTHONPATH:$samba4srcdir/torture/drs/python" $SUBUNITRUN delete_object -U"$DOMAIN/$DC_USERNAME"%"$DC_PASSWORD"
#
-from __future__ import print_function
import time
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from __future__ import print_function
import sys
import time
import os
# 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
# getncchanges -U"$DOMAIN/$DC_USERNAME"%"$DC_PASSWORD"
#
-from __future__ import print_function
import drs_base
import samba.tests
import ldb
# 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
# 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
#
"""Blackbox tests for samba-tool drs showrepl."""
-from __future__ import print_function
import samba.tests
import drs_base
from samba.dcerpc import drsuapi