Mercurial > hg-stable
diff tests/md5sum.py @ 29485:6a98f9408a50
py3: make files use absolute_import and print_function
This patch includes addition of absolute_import and print_function to the
files where they are missing. The modern importing conventions are also followed.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sun, 03 Jul 2016 22:28:24 +0530 |
parents | 328739ea70c3 |
children | 8d1cdee372e6 |
line wrap: on
line diff
--- a/tests/md5sum.py Fri Jul 01 19:17:45 2016 -0700 +++ b/tests/md5sum.py Sun Jul 03 22:28:24 2016 +0530 @@ -6,12 +6,17 @@ # of the PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2, which is # GPL-compatible. -import sys, os +from __future__ import absolute_import + +import os +import sys try: - from hashlib import md5 + import hashlib + md5 = hashlib.md5 except ImportError: - from md5 import md5 + import md5 + md5 = md5.md5 try: import msvcrt