New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tools\Scripts\md5sum.py doesn't work in Python 3.x #66105
Comments
md5sum.py uses at least 1 undefined object in Python 3.4.1. I only tried this on Windows. I have no idea if it is a problem on any other OS. C:\>C:\Python27\python.exe --version C:\>C:\Python34\python.exe --version C:\>C:\Python34\python.exe C:\Python34\Tools\Scripts\md5sum.py C:\Python34\python.exe
Traceback (most recent call last):
File "C:\Python34\Tools\Scripts\md5sum.py", line 90, in <module>
sys.exit(main(sys.argv[1:], sys.stdout))
File "C:\Python34\Tools\Scripts\md5sum.py", line 87, in main
return sum(args, out)
File "C:\Python34\Tools\Scripts\md5sum.py", line 27, in sum
if files and isinstance(files[-1], file):
NameError: name 'file' is not defined Here is why . . . C:\>C:\Python27\python.exe -c "print(file)" C:\>C:\Python34\python.exe -c "print(file)"
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'file' is not defined So "file" is defined in 2.7.6 but not in 3.4.1. |
I guess it's only the evidence that it isn't being used. |
Well, at least one person *tried* to use it :) This is not a windows only problem, I can reproduce it on linux. Obviously we don't have tests for this tool. |
Here's a path with tests. |
Hmmm, I was just reloading the page to post a patch I'd worked up, and lo and behold there's already one here! Here's mine anyway; you can use any parts of it that you like, Berker. There are a couple of not-quite-related changes in test_tools that might be better split into a separate issue, but they're in there anyway. |
Thanks Zachary! Here's a combined patch. |
Thanks for the patch, Zachary. |
New changeset eafe4007c999 by Berker Peksag in branch '3.4': New changeset e1913d2780d7 by Berker Peksag in branch 'default': |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: