diff options
author | Craig Rodrigues <rodrigc@FreeBSD.org> | 2015-11-17 19:55:50 -0800 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2016-03-20 22:19:15 +0100 |
commit | 8b33fa718947fa508f59bb8461a65e2fcb3ca6fa (patch) | |
tree | 3d1640a5d4cd34e3fb45689fa9a450d82b319fa8 /tests/test_ssl.py | |
parent | 0aa30e5df1fc0c03f29e1a438123097dfdaee242 (diff) | |
download | m2crypto-8b33fa718947fa508f59bb8461a65e2fcb3ca6fa.tar.gz |
Use the new absolute import syntax to fix Python 3. [PEP 328]
I used the output of "2to3 -f import M2Crypto" to figure out
which imports needed to be fixed.
In addition, I added "from __future__ import absolute_import"
to all files that I touched. This brings in the new import behavior,
and works as far back as Python 2.5.0a1. See:
https://docs.python.org/3/library/__future__.html
https://www.python.org/dev/peps/pep-0328/
Diffstat (limited to 'tests/test_ssl.py')
-rw-r--r-- | tests/test_ssl.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/test_ssl.py b/tests/test_ssl.py index f9cabae..47130d5 100644 --- a/tests/test_ssl.py +++ b/tests/test_ssl.py @@ -1,6 +1,5 @@ #!/usr/bin/env python - -from __future__ import print_function +from __future__ import absolute_import, print_function """Unit tests for M2Crypto.SSL. @@ -1174,5 +1173,5 @@ if __name__ == '__main__': zap_servers() if report_leaks: - import alltests + from . import alltests alltests.dump_garbage() |