2to3 is a nice tool! The only thing it didn't cover was the 'division' operations in the file. Python2 vs Python3 handle division differently. So, I want to think about whether to force floor division with '//' or not in the couple places division is used. The answer should be pretty clear; I just haven't had the uninterrupted time to think about it in these 2 cases.
-Joel On Monday, February 17, 2020 at 8:18:36 AM UTC-8, Vince Skahan wrote: > > On Monday, February 17, 2020 at 7:23:26 AM UTC-8, Joel Bion wrote: > >> Most of my time was spent scanning through the weewx-purpleair extension. >> Since it had been written to support only Python2, I didn't want to make >> just the syntactic changes, but convince myself that the rest of the script >> would actually do what was intended. >> > > I run that one too. Works fine in both python versions after running it > through "2to3 -w" to clean up the syntax. > > What I did was a little simpler than how you battled it, I think: > > - ran python3 setup.py (to get a python3 based installation of weewx) > - installed all the extensions I use > - checked each of the extensions with "2to3" which so far has done a > great job finding python3 edits needed > - ran "2to3 -w" for the extensions needing tweaking > - restarted weewx and verified everything worked (or at least didn't > crash out due to python3) > - provided pull requests upstream for anything I found that didn't > work as-is in both python2+3 > > So far the only thing I can't get to do anything is the forecast > extension. I got it to not blow up, but it isn't downloading the forecasts > successfully. This one was a low enough priority for me that I'm just > going to wait until the official version catches up someday. > > > -- You received this message because you are subscribed to the Google Groups "weewx-development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/16417925-807a-4cd8-aafe-b8fd758e599e%40googlegroups.com.
