-
Notifications
You must be signed in to change notification settings - Fork 397
Drop 2to3 in setup.py #400
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
Conversation
@@ -4325,17 +4330,17 @@ def wmsimage(self,server,\ | |||
# ypixels not given, find by scaling xpixels by the map aspect ratio. | |||
if ypixels is None: | |||
ypixels = int(self.aspect*xpixels) | |||
if verbose: print server | |||
if verbose: print(server) |
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.
We should add a from __future__ import print_function
to the top
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'm actually inclined to add
from __future__ import (absolute_import, division, print_function)
at the top of all .py
files. What do you think?
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 wouldn't hurt. Don't forget about the examples in the docs. They can also be used as a form of unit test (mostly, somewhat, kinda...).
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 wouldn't hurt.
👍
Don't forget about the examples in the docs. They can also be used as a form of unit test (mostly, somewhat, kinda...).
Working on that in a separate PR b/c most of the issues there are not Python 3 compat code but services that are down and API changes in modern numpy
and matplotlib
. See https://github.com/ocefpaf/basemap/tree/update_examples for my progress so far. (PR soon...)
lib/mpl_toolkits/basemap/__init__.py
Outdated
@@ -4347,7 +4352,7 @@ def wmsimage(self,server,\ | |||
return self.imshow(imread(io.BytesIO(img.read()), | |||
format=format),origin='upper',alpha=alpha,ax=ax) | |||
# this works for png, but not jpeg | |||
#return self.imshow(imread(urllib2.urlopen(img.url),format=format),origin='upper') | |||
#return self.imshow(imread(urlopen(img.url),format=format),origin='upper') |
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.
Just get rid of these lines.
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.
Done.
@WeatherGod anything left to do here? I sent #401 to update the example, following this one, and I have another PR to update |
@efiring I'm not sure of the tests are comprehensive enough to give us 100% confidence on this PR but it was actually quite simple and not a lot of code change to eliminate
2to3
.Closes #399