aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2016-09-14 09:39:00 +0000
committerJustus Winter <[email protected]>2016-09-14 10:15:57 +0000
commitdc23fdf55561659f9e9cff51668ac9c6c027c885 (patch)
tree61aeb795d2b6fa92eadde043581340c7172f0ea8
parentpython: Use more generic shebang. (diff)
downloadgpgme-dc23fdf55561659f9e9cff51668ac9c6c027c885.tar.gz
gpgme-dc23fdf55561659f9e9cff51668ac9c6c027c885.zip
python: Import from __future__ to align behavior of Python 2.7.
-- Signed-off-by: Justus Winter <[email protected]>
-rw-r--r--lang/python/examples/assuan.py3
-rw-r--r--lang/python/examples/decryption-filter.py3
-rwxr-xr-xlang/python/examples/delkey.py3
-rwxr-xr-xlang/python/examples/encrypt-to-all.py3
-rwxr-xr-xlang/python/examples/exportimport.py3
-rwxr-xr-xlang/python/examples/genkey.py3
-rw-r--r--lang/python/examples/inter-edit.py3
-rwxr-xr-xlang/python/examples/sign.py3
-rwxr-xr-xlang/python/examples/signverify.py3
-rwxr-xr-xlang/python/examples/simple.py3
-rw-r--r--lang/python/examples/testCMSgetkey.py3
-rwxr-xr-xlang/python/examples/verifydetails.py3
-rwxr-xr-xlang/python/gpgme-h-clean.py3
-rw-r--r--lang/python/pyme/__init__.py3
-rw-r--r--lang/python/pyme/callbacks.py3
-rw-r--r--lang/python/pyme/constants/__init__.py3
-rw-r--r--lang/python/pyme/constants/data/__init__.py3
-rw-r--r--lang/python/pyme/constants/data/encoding.py3
-rw-r--r--lang/python/pyme/constants/event.py3
-rw-r--r--lang/python/pyme/constants/import.py3
-rw-r--r--lang/python/pyme/constants/keylist/__init__.py3
-rw-r--r--lang/python/pyme/constants/keylist/mode.py3
-rw-r--r--lang/python/pyme/constants/md.py3
-rw-r--r--lang/python/pyme/constants/pk.py3
-rw-r--r--lang/python/pyme/constants/protocol.py3
-rw-r--r--lang/python/pyme/constants/sig/__init__.py3
-rw-r--r--lang/python/pyme/constants/sig/mode.py3
-rw-r--r--lang/python/pyme/constants/sigsum.py3
-rw-r--r--lang/python/pyme/constants/status.py3
-rw-r--r--lang/python/pyme/constants/validity.py3
-rw-r--r--lang/python/pyme/core.py3
-rw-r--r--lang/python/pyme/errors.py3
-rw-r--r--lang/python/pyme/results.py3
-rw-r--r--lang/python/pyme/util.py3
-rw-r--r--lang/python/pyme/version.py.in3
-rwxr-xr-xlang/python/tests/final.py3
-rwxr-xr-xlang/python/tests/initial.py3
-rw-r--r--lang/python/tests/support.py3
-rwxr-xr-xlang/python/tests/t-callbacks.py3
-rwxr-xr-xlang/python/tests/t-data.py3
-rwxr-xr-xlang/python/tests/t-decrypt-verify.py3
-rwxr-xr-xlang/python/tests/t-decrypt.py3
-rwxr-xr-xlang/python/tests/t-edit.py3
-rwxr-xr-xlang/python/tests/t-encrypt-large.py3
-rwxr-xr-xlang/python/tests/t-encrypt-sign.py3
-rwxr-xr-xlang/python/tests/t-encrypt-sym.py3
-rwxr-xr-xlang/python/tests/t-encrypt.py3
-rwxr-xr-xlang/python/tests/t-export.py3
-rwxr-xr-xlang/python/tests/t-file-name.py3
-rwxr-xr-xlang/python/tests/t-idiomatic.py3
-rwxr-xr-xlang/python/tests/t-import.py3
-rwxr-xr-xlang/python/tests/t-keylist.py3
-rwxr-xr-xlang/python/tests/t-protocol-assuan.py3
-rwxr-xr-xlang/python/tests/t-sig-notation.py3
-rwxr-xr-xlang/python/tests/t-sign.py3
-rwxr-xr-xlang/python/tests/t-signers.py3
-rwxr-xr-xlang/python/tests/t-trustlist.py3
-rwxr-xr-xlang/python/tests/t-verify.py3
-rwxr-xr-xlang/python/tests/t-wait.py3
59 files changed, 177 insertions, 0 deletions
diff --git a/lang/python/examples/assuan.py b/lang/python/examples/assuan.py
index e4822b72..22960d31 100644
--- a/lang/python/examples/assuan.py
+++ b/lang/python/examples/assuan.py
@@ -17,6 +17,9 @@
"""Demonstrate the use of the Assuan protocol engine"""
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import pyme
with pyme.Context(protocol=pyme.constants.PROTOCOL_ASSUAN) as c:
diff --git a/lang/python/examples/decryption-filter.py b/lang/python/examples/decryption-filter.py
index dbd66fc3..3007c2b0 100644
--- a/lang/python/examples/decryption-filter.py
+++ b/lang/python/examples/decryption-filter.py
@@ -24,6 +24,9 @@ be used like this:
"""
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import sys
import pyme
pyme.Context().decrypt(sys.stdin, sink=sys.stdout)
diff --git a/lang/python/examples/delkey.py b/lang/python/examples/delkey.py
index 491f38a1..a02f4129 100755
--- a/lang/python/examples/delkey.py
+++ b/lang/python/examples/delkey.py
@@ -19,6 +19,9 @@
# Sample of key deletion
# It deletes keys for [email protected] generated by genkey.py script
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import pyme
with pyme.Context() as c:
diff --git a/lang/python/examples/encrypt-to-all.py b/lang/python/examples/encrypt-to-all.py
index 304b4747..bb8225b0 100755
--- a/lang/python/examples/encrypt-to-all.py
+++ b/lang/python/examples/encrypt-to-all.py
@@ -22,6 +22,9 @@ This program will try to encrypt a simple message to each key on your
keyring. If your keyring has any invalid keys on it, those keys will
be skipped and it will re-try the encryption."""
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import sys
import os
import pyme
diff --git a/lang/python/examples/exportimport.py b/lang/python/examples/exportimport.py
index 8d76fa13..bc946bc4 100755
--- a/lang/python/examples/exportimport.py
+++ b/lang/python/examples/exportimport.py
@@ -19,6 +19,9 @@
# Sample of export and import of keys
# It uses keys for [email protected] generated by genkey.py script
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import sys
import os
import pyme
diff --git a/lang/python/examples/genkey.py b/lang/python/examples/genkey.py
index 972fed79..ee70303d 100755
--- a/lang/python/examples/genkey.py
+++ b/lang/python/examples/genkey.py
@@ -17,6 +17,9 @@
# 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 absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import pyme
# This is the example from the GPGME manual.
diff --git a/lang/python/examples/inter-edit.py b/lang/python/examples/inter-edit.py
index 2f8e4efe..459df114 100644
--- a/lang/python/examples/inter-edit.py
+++ b/lang/python/examples/inter-edit.py
@@ -18,6 +18,9 @@
"""Simple interactive editor to test editor scripts"""
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import sys
import pyme
import pyme.constants.status
diff --git a/lang/python/examples/sign.py b/lang/python/examples/sign.py
index d3766833..2f235baf 100755
--- a/lang/python/examples/sign.py
+++ b/lang/python/examples/sign.py
@@ -16,6 +16,9 @@
# 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 absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import sys
import pyme
from pyme.constants.sig import mode
diff --git a/lang/python/examples/signverify.py b/lang/python/examples/signverify.py
index e7bf0c94..f12e0657 100755
--- a/lang/python/examples/signverify.py
+++ b/lang/python/examples/signverify.py
@@ -19,6 +19,9 @@
# Sample of unattended signing/verifying of a message.
# It uses keys for [email protected] generated by genkey.py script
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import sys
import os
import pyme
diff --git a/lang/python/examples/simple.py b/lang/python/examples/simple.py
index ca72cf11..ccd7cb49 100755
--- a/lang/python/examples/simple.py
+++ b/lang/python/examples/simple.py
@@ -17,6 +17,9 @@
# 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 absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import sys
import os
import pyme
diff --git a/lang/python/examples/testCMSgetkey.py b/lang/python/examples/testCMSgetkey.py
index fbaa042b..4467b6cc 100644
--- a/lang/python/examples/testCMSgetkey.py
+++ b/lang/python/examples/testCMSgetkey.py
@@ -18,6 +18,9 @@
"""A test applicaton for the CMS protocol."""
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import sys
import pyme
diff --git a/lang/python/examples/verifydetails.py b/lang/python/examples/verifydetails.py
index 1cd538c7..63f40c14 100755
--- a/lang/python/examples/verifydetails.py
+++ b/lang/python/examples/verifydetails.py
@@ -17,6 +17,9 @@
# 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 absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import sys
import os
from pyme import core
diff --git a/lang/python/gpgme-h-clean.py b/lang/python/gpgme-h-clean.py
index ce368f04..0ec7ab58 100755
--- a/lang/python/gpgme-h-clean.py
+++ b/lang/python/gpgme-h-clean.py
@@ -17,6 +17,9 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import sys, re
if len(sys.argv) != 2:
diff --git a/lang/python/pyme/__init__.py b/lang/python/pyme/__init__.py
index f9e12d02..12c96c28 100644
--- a/lang/python/pyme/__init__.py
+++ b/lang/python/pyme/__init__.py
@@ -99,6 +99,9 @@ GPGME documentation: https://www.gnupg.org/documentation/manuals/gpgme/
"""
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
from . import core
from . import errors
from . import constants
diff --git a/lang/python/pyme/callbacks.py b/lang/python/pyme/callbacks.py
index 09f8226d..b25a9a74 100644
--- a/lang/python/pyme/callbacks.py
+++ b/lang/python/pyme/callbacks.py
@@ -15,6 +15,9 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
from getpass import getpass
def passphrase_stdin(hint, desc, prev_bad, hook=None):
diff --git a/lang/python/pyme/constants/__init__.py b/lang/python/pyme/constants/__init__.py
index 2e91d769..96465de5 100644
--- a/lang/python/pyme/constants/__init__.py
+++ b/lang/python/pyme/constants/__init__.py
@@ -1,4 +1,7 @@
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
from pyme import util
util.process_constants('GPGME_', globals())
diff --git a/lang/python/pyme/constants/data/__init__.py b/lang/python/pyme/constants/data/__init__.py
index ed7b67b9..8274ab91 100644
--- a/lang/python/pyme/constants/data/__init__.py
+++ b/lang/python/pyme/constants/data/__init__.py
@@ -1,3 +1,6 @@
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
from . import encoding
__all__ = ['encoding']
diff --git a/lang/python/pyme/constants/data/encoding.py b/lang/python/pyme/constants/data/encoding.py
index ac6079c9..a05dbb42 100644
--- a/lang/python/pyme/constants/data/encoding.py
+++ b/lang/python/pyme/constants/data/encoding.py
@@ -15,5 +15,8 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
from pyme import util
util.process_constants('GPGME_DATA_ENCODING_', globals())
diff --git a/lang/python/pyme/constants/event.py b/lang/python/pyme/constants/event.py
index 3ce234ef..2e30c5e1 100644
--- a/lang/python/pyme/constants/event.py
+++ b/lang/python/pyme/constants/event.py
@@ -15,5 +15,8 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
from pyme import util
util.process_constants('GPGME_EVENT_', globals())
diff --git a/lang/python/pyme/constants/import.py b/lang/python/pyme/constants/import.py
index a824f7bb..10e7d3c0 100644
--- a/lang/python/pyme/constants/import.py
+++ b/lang/python/pyme/constants/import.py
@@ -15,5 +15,8 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
from pyme import util
util.process_constants('GPGME_IMPORT_', globals())
diff --git a/lang/python/pyme/constants/keylist/__init__.py b/lang/python/pyme/constants/keylist/__init__.py
index 8752bb28..2ce0edfd 100644
--- a/lang/python/pyme/constants/keylist/__init__.py
+++ b/lang/python/pyme/constants/keylist/__init__.py
@@ -1,3 +1,6 @@
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
from . import mode
__all__ = ['mode']
diff --git a/lang/python/pyme/constants/keylist/mode.py b/lang/python/pyme/constants/keylist/mode.py
index 7c3cd091..000dd791 100644
--- a/lang/python/pyme/constants/keylist/mode.py
+++ b/lang/python/pyme/constants/keylist/mode.py
@@ -15,5 +15,8 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
from pyme import util
util.process_constants('GPGME_KEYLIST_MODE_', globals())
diff --git a/lang/python/pyme/constants/md.py b/lang/python/pyme/constants/md.py
index 700d872e..dbd762ce 100644
--- a/lang/python/pyme/constants/md.py
+++ b/lang/python/pyme/constants/md.py
@@ -15,5 +15,8 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
from pyme import util
util.process_constants('GPGME_MD_', globals())
diff --git a/lang/python/pyme/constants/pk.py b/lang/python/pyme/constants/pk.py
index f0e3937d..cfc53095 100644
--- a/lang/python/pyme/constants/pk.py
+++ b/lang/python/pyme/constants/pk.py
@@ -15,5 +15,8 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
from pyme import util
util.process_constants('GPGME_PK_', globals())
diff --git a/lang/python/pyme/constants/protocol.py b/lang/python/pyme/constants/protocol.py
index e9f9a48d..a4b6583a 100644
--- a/lang/python/pyme/constants/protocol.py
+++ b/lang/python/pyme/constants/protocol.py
@@ -15,5 +15,8 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
from pyme import util
util.process_constants('GPGME_PROTOCOL_', globals())
diff --git a/lang/python/pyme/constants/sig/__init__.py b/lang/python/pyme/constants/sig/__init__.py
index 8752bb28..2ce0edfd 100644
--- a/lang/python/pyme/constants/sig/__init__.py
+++ b/lang/python/pyme/constants/sig/__init__.py
@@ -1,3 +1,6 @@
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
from . import mode
__all__ = ['mode']
diff --git a/lang/python/pyme/constants/sig/mode.py b/lang/python/pyme/constants/sig/mode.py
index 631bd7cb..fb534bc5 100644
--- a/lang/python/pyme/constants/sig/mode.py
+++ b/lang/python/pyme/constants/sig/mode.py
@@ -15,5 +15,8 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
from pyme import util
util.process_constants('GPGME_SIG_MODE_', globals())
diff --git a/lang/python/pyme/constants/sigsum.py b/lang/python/pyme/constants/sigsum.py
index 51643472..3d947456 100644
--- a/lang/python/pyme/constants/sigsum.py
+++ b/lang/python/pyme/constants/sigsum.py
@@ -15,5 +15,8 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
from pyme import util
util.process_constants('GPGME_SIGSUM_', globals())
diff --git a/lang/python/pyme/constants/status.py b/lang/python/pyme/constants/status.py
index c1859b2b..ee522591 100644
--- a/lang/python/pyme/constants/status.py
+++ b/lang/python/pyme/constants/status.py
@@ -15,5 +15,8 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
from pyme import util
util.process_constants('GPGME_STATUS_', globals())
diff --git a/lang/python/pyme/constants/validity.py b/lang/python/pyme/constants/validity.py
index fde2eee8..4ecd4d3e 100644
--- a/lang/python/pyme/constants/validity.py
+++ b/lang/python/pyme/constants/validity.py
@@ -15,5 +15,8 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
from pyme import util
util.process_constants('GPGME_VALIDITY_', globals())
diff --git a/lang/python/pyme/core.py b/lang/python/pyme/core.py
index a71426b9..55e86872 100644
--- a/lang/python/pyme/core.py
+++ b/lang/python/pyme/core.py
@@ -24,6 +24,9 @@ and the 'Data' class describing buffers of data.
"""
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import re
import os
import weakref
diff --git a/lang/python/pyme/errors.py b/lang/python/pyme/errors.py
index 9c582073..e26c7476 100644
--- a/lang/python/pyme/errors.py
+++ b/lang/python/pyme/errors.py
@@ -15,6 +15,9 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
from . import gpgme
from . import util
diff --git a/lang/python/pyme/results.py b/lang/python/pyme/results.py
index 374d982a..bfc26cce 100644
--- a/lang/python/pyme/results.py
+++ b/lang/python/pyme/results.py
@@ -17,6 +17,9 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
"""Robust result objects
Results returned by the underlying library are fragile, i.e. they are
diff --git a/lang/python/pyme/util.py b/lang/python/pyme/util.py
index bf25ccb0..e4fca4c1 100644
--- a/lang/python/pyme/util.py
+++ b/lang/python/pyme/util.py
@@ -16,6 +16,9 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import sys
def process_constants(prefix, scope):
diff --git a/lang/python/pyme/version.py.in b/lang/python/pyme/version.py.in
index e4a5a27b..5fd9ce2b 100644
--- a/lang/python/pyme/version.py.in
+++ b/lang/python/pyme/version.py.in
@@ -16,6 +16,9 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+from __future__ import absolute_import, print_function
+del absolute_import, print_function
+
from . import gpgme
productname = 'pyme'
diff --git a/lang/python/tests/final.py b/lang/python/tests/final.py
index 15010aff..8e7ab339 100755
--- a/lang/python/tests/final.py
+++ b/lang/python/tests/final.py
@@ -17,6 +17,9 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import os
import subprocess
diff --git a/lang/python/tests/initial.py b/lang/python/tests/initial.py
index 7adaa919..2d4827a0 100755
--- a/lang/python/tests/initial.py
+++ b/lang/python/tests/initial.py
@@ -17,6 +17,9 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import os
import subprocess
import pyme
diff --git a/lang/python/tests/support.py b/lang/python/tests/support.py
index f42fc2ec..4d7135e9 100644
--- a/lang/python/tests/support.py
+++ b/lang/python/tests/support.py
@@ -15,6 +15,9 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import sys
import os
from pyme import core
diff --git a/lang/python/tests/t-callbacks.py b/lang/python/tests/t-callbacks.py
index fc586831..b3b43497 100755
--- a/lang/python/tests/t-callbacks.py
+++ b/lang/python/tests/t-callbacks.py
@@ -17,6 +17,9 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import os
from pyme import core, constants
import support
diff --git a/lang/python/tests/t-data.py b/lang/python/tests/t-data.py
index 6e05d130..4812a2e7 100755
--- a/lang/python/tests/t-data.py
+++ b/lang/python/tests/t-data.py
@@ -17,6 +17,9 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import io
import os
import tempfile
diff --git a/lang/python/tests/t-decrypt-verify.py b/lang/python/tests/t-decrypt-verify.py
index 6518d792..a38a965b 100755
--- a/lang/python/tests/t-decrypt-verify.py
+++ b/lang/python/tests/t-decrypt-verify.py
@@ -17,6 +17,9 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import pyme
from pyme import core, constants, errors
import support
diff --git a/lang/python/tests/t-decrypt.py b/lang/python/tests/t-decrypt.py
index 3b0c484d..2d85bc2b 100755
--- a/lang/python/tests/t-decrypt.py
+++ b/lang/python/tests/t-decrypt.py
@@ -17,6 +17,9 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import pyme
from pyme import core, constants
import support
diff --git a/lang/python/tests/t-edit.py b/lang/python/tests/t-edit.py
index 8bebe67f..9ba187d5 100755
--- a/lang/python/tests/t-edit.py
+++ b/lang/python/tests/t-edit.py
@@ -18,6 +18,9 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import sys
import os
from pyme import core, constants
diff --git a/lang/python/tests/t-encrypt-large.py b/lang/python/tests/t-encrypt-large.py
index d5b9dc90..b9cc3b57 100755
--- a/lang/python/tests/t-encrypt-large.py
+++ b/lang/python/tests/t-encrypt-large.py
@@ -17,6 +17,9 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import sys
import random
from pyme import core, constants
diff --git a/lang/python/tests/t-encrypt-sign.py b/lang/python/tests/t-encrypt-sign.py
index 8c4b5d93..a453f796 100755
--- a/lang/python/tests/t-encrypt-sign.py
+++ b/lang/python/tests/t-encrypt-sign.py
@@ -17,6 +17,9 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import sys
import pyme
from pyme import core, constants
diff --git a/lang/python/tests/t-encrypt-sym.py b/lang/python/tests/t-encrypt-sym.py
index c279d6a8..d5771845 100755
--- a/lang/python/tests/t-encrypt-sym.py
+++ b/lang/python/tests/t-encrypt-sym.py
@@ -17,6 +17,9 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import os
import pyme
from pyme import core, constants
diff --git a/lang/python/tests/t-encrypt.py b/lang/python/tests/t-encrypt.py
index 456f2c1a..65e7d248 100755
--- a/lang/python/tests/t-encrypt.py
+++ b/lang/python/tests/t-encrypt.py
@@ -17,6 +17,9 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import pyme
from pyme import core, constants
import support
diff --git a/lang/python/tests/t-export.py b/lang/python/tests/t-export.py
index f8d02f2f..db36b989 100755
--- a/lang/python/tests/t-export.py
+++ b/lang/python/tests/t-export.py
@@ -17,6 +17,9 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
from pyme import core, constants
import support
diff --git a/lang/python/tests/t-file-name.py b/lang/python/tests/t-file-name.py
index 09eb1f98..e93b1200 100755
--- a/lang/python/tests/t-file-name.py
+++ b/lang/python/tests/t-file-name.py
@@ -17,6 +17,9 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import os
from pyme import core, constants
import support
diff --git a/lang/python/tests/t-idiomatic.py b/lang/python/tests/t-idiomatic.py
index 6dbe6209..f0632064 100755
--- a/lang/python/tests/t-idiomatic.py
+++ b/lang/python/tests/t-idiomatic.py
@@ -17,6 +17,9 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import sys
import io
import os
diff --git a/lang/python/tests/t-import.py b/lang/python/tests/t-import.py
index b267fc85..0b50d027 100755
--- a/lang/python/tests/t-import.py
+++ b/lang/python/tests/t-import.py
@@ -17,6 +17,9 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
from pyme import core, constants
import support
diff --git a/lang/python/tests/t-keylist.py b/lang/python/tests/t-keylist.py
index 7b7bbaec..5e8b3336 100755
--- a/lang/python/tests/t-keylist.py
+++ b/lang/python/tests/t-keylist.py
@@ -17,6 +17,9 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
from pyme import core, constants
import support
diff --git a/lang/python/tests/t-protocol-assuan.py b/lang/python/tests/t-protocol-assuan.py
index a86146b7..172c7d0c 100755
--- a/lang/python/tests/t-protocol-assuan.py
+++ b/lang/python/tests/t-protocol-assuan.py
@@ -17,6 +17,9 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import pyme
with pyme.Context(protocol=pyme.constants.PROTOCOL_ASSUAN) as c:
diff --git a/lang/python/tests/t-sig-notation.py b/lang/python/tests/t-sig-notation.py
index c5230065..777bc0b5 100755
--- a/lang/python/tests/t-sig-notation.py
+++ b/lang/python/tests/t-sig-notation.py
@@ -17,6 +17,9 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import os
from pyme import core, constants
import support
diff --git a/lang/python/tests/t-sign.py b/lang/python/tests/t-sign.py
index 5f26ff35..b0e211a1 100755
--- a/lang/python/tests/t-sign.py
+++ b/lang/python/tests/t-sign.py
@@ -17,6 +17,9 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import os
import pyme
from pyme import core, constants
diff --git a/lang/python/tests/t-signers.py b/lang/python/tests/t-signers.py
index 7b064c93..11403aff 100755
--- a/lang/python/tests/t-signers.py
+++ b/lang/python/tests/t-signers.py
@@ -17,6 +17,9 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import pyme
from pyme import core, constants
import support
diff --git a/lang/python/tests/t-trustlist.py b/lang/python/tests/t-trustlist.py
index a33e35e6..4253bd7e 100755
--- a/lang/python/tests/t-trustlist.py
+++ b/lang/python/tests/t-trustlist.py
@@ -17,6 +17,9 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
from pyme import core, constants
import support
diff --git a/lang/python/tests/t-verify.py b/lang/python/tests/t-verify.py
index 25c8c0c1..39f6176d 100755
--- a/lang/python/tests/t-verify.py
+++ b/lang/python/tests/t-verify.py
@@ -17,6 +17,9 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import sys
import os
import pyme
diff --git a/lang/python/tests/t-wait.py b/lang/python/tests/t-wait.py
index 9f3a7edd..b7d9a34b 100755
--- a/lang/python/tests/t-wait.py
+++ b/lang/python/tests/t-wait.py
@@ -17,6 +17,9 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
import time
from pyme import core, constants, errors
import support