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

converted to py3 using 2to3 #28

Closed
wants to merge 1 commit into from

Conversation

rsignell-usgs
Copy link

@rsignell-usgs rsignell-usgs commented Sep 13, 2017

fixes #26

All I did was:

2to3 -w seedlink_plotter

@megies
Copy link
Collaborator

megies commented Sep 13, 2017

..but then it's not Py2 compatible any more, I guess?

@rsignell-usgs
Copy link
Author

Good point. Yes, that's true.

Could look at this as tough love: folks really shouldn't be using py2 anyway these days -- it's too embarrassing! 😸

@megies
Copy link
Collaborator

megies commented Sep 13, 2017

Well, it's only so few instances, would be easy to accommodate with a couple of if/else/import-as at the top..

@rsignell-usgs
Copy link
Author

maybe import six would handle most of these.

@megies
Copy link
Collaborator

megies commented Sep 13, 2017

I haven't used six a lot, but we have our experiences with future (and they are painful in the long run). These conenience modules just always might introduce obscure magic that can bite you when you least expect it.

In general, if it's only a couple of instances like here, just doing a conditional import at the top with renaming some imported items is by far the simplest solution. KISS.

megies added a commit that referenced this pull request Mar 20, 2018
@megies megies mentioned this pull request Mar 20, 2018
@megies megies closed this in #29 Mar 20, 2018
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.

URLerror
2 participants