-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Compat #33
Conversation
…alls, updated the use of range to reflect python 3 changes, and updated use of map to reflect python 3 changes. Conflicts: quantecon/__init__.py quantecon/quadsums.py
…ct the new syntax.
…lowed 2to3 -w filename.py
…sts in both versions.
Will reinstate when we write real tests
I just pushed one more commit to make examples/wb_download.py work on both versions ;) |
import matplotlib.pyplot as plt | ||
from pandas.io.excel import ExcelFile | ||
import urllib | ||
|
||
if sys.version_info[0] == 2: |
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 had to add these lines to make it compatible with python 2 and python 3.
This obfuscates the example a bit. I think it is probably worth it so that this isn't the only file we have that doesn't run on python 3, but I wanted to get other thoughts.
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.
This is fine, thanks.
Hey guys. Great work, thank you. Just to clarify, everything runs on both 2 and 3? I thought I'd see more |
Ahh, we haven't run through the solutions notebooks yet. I'll do that now and let you know when I have finished. Other than that I am pretty sure everything is working Also I realize that the line comment I made above doesn't show the context very well. the line I marked was the first of 4 that I added. You may have to go to the diff to see clearly. |
Just finished running through all the solutions notebooks. They all work on both languages. |
Great work on solutions notebooks, many thanks. It seems the Travis CI build failed --- I'll wait on merging this branch until that's fixed or you let me know otherwise. |
scipy.optimize.fmin_slsqp doesn't work the same in python 2 and 3 I switched to using the COBYLA method and it works on both versions. Also there was an ImportError in odu_plot_densities
We have now confirmed that all the programs in the examples, solutions, and quantecon directories work on both python 2 and 3. I think this is ready to close. John, don't worry about travis messages right now. We need to wait until we get the tests branch merged before those messages will be totally useful. |
Great work, many thanks. |
All files in the
quantecon
package should be python 3 compatible now. All files exceptwb_download.py
should be python 3 compatible in the examples directory. The filewb_download.py
wasn't as clear how to go about fixing as the others because of changes in the structure of urllib and urllib2. I think that is a minor thing that can be taken care of in the near future though. Submitting PR.Note: Using this one instead of other PR because I had pulled some of the tests branch and deleted those files which would have caused issues with pulling the tests branch later. Spencer did some git voodoo (cherry-pick) to fix it.