-
Notifications
You must be signed in to change notification settings - Fork 121
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
deps(python): Python 2 -> 3 by hand #27
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And the rest should be only print.
blockchain/chain.py
Outdated
return hashlib.sha256(hashData).hexdigest() | ||
return hashlib.sha256(hashData.encode("utf8")).hexdigest() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be ok.
dataFile = file("chain.txt", "w") | ||
dataFile = open("chain.txt", "w") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cmd = raw_input("[BlockShell] $ ") | ||
cmd = input("[BlockShell] $ ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#18 did the work (work for py2 and py3) and was rejected. Maybe for raw_input hack. I followed official recommandation so I hope it will be merged. Also python2 is really old and even Debian install python3 as default and python2 as option. |
|
||
def mineBlock(self, difficulty): | ||
""" | ||
Method for Proof of Work | ||
""" | ||
print Back.RED + "\n[Status] Mining block (" + str(self.index) + ") with PoW ..." | ||
print(Back.RED + "\n[Status] Mining block (" + str(self.index) + ") with PoW ...") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably use fstrings. Since this is cli we should use click and show messages with click.echo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I opted for minimal change. If we are ok about putting 3.6 as lower bound why not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but I agree this doesn't block your PR
fix #17