Skip to content
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

Remove all sys.version_info checks, presuming Python 3.5+ (Second try) #456

Merged
merged 5 commits into from
Nov 28, 2017

Conversation

miguel550
Copy link
Contributor

What was wrong?

It have python 2 and python 3.3 checks all over the places.

How was it fixed?

I remove them carefully.

Cute Animal Picture

Cute animal picture

@miguel550
Copy link
Contributor Author

@carver can give me a hint of why this is failing?

@carver
Copy link
Collaborator

carver commented Nov 22, 2017

Are you familiar with looking at the Travis logs? Click on Details next to "The Travis CI build failed", then you can click on a particular failing build to get the full logs.

I didn't look at all the failures, but one of them is because transaction_hash was added back into the return tuple in sign_transaction_dict. That suggests to me that you rebased onto master, which is a good idea. But then something went wrong during the conflict resolution. You can fix this particular issue by removing transaction_hash, but please review the full diff of this PR to make sure other conflicts got resolved correctly.

Also, all the version_info checks should be able to be completely deleted.

So if the original is:

if sys.version_info < (3, 3):
  do_something()
else:
  do_something_py2()

Then it should all be replaced with only:

do_something()

@miguel550
Copy link
Contributor Author

Thanks, I'll take a look!

@miguel550
Copy link
Contributor Author

miguel550 commented Nov 22, 2017

@carver I removed the remaining sys.version_info from the tests. I let only one sys.version_info and is in web3/init.py to let the user know that they need to use python 3.5 or above to use web3.py without problems.

@miguel550
Copy link
Contributor Author

Does this PR have something else to be done? @carver

Copy link
Collaborator

@carver carver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

if sys.version_info.major < 3:
raise EnvironmentError("Python 3 is required")
if sys.version_info < (3, 5):
raise EnvironmentError("Python 3.5 or above is required")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thanks for catching this.

@carver carver merged commit 6fa400f into ethereum:master Nov 28, 2017
This was referenced Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants