<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="NO-BOK" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Hi Anna and others,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Sorry for the mistake and thanks for the heads up! Good to see that experienced devs are on the watch!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Fixed in r74361<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">For the record, there is still:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">lib/python/imaging/images2swf.py:87:PY3 = sys.version_info[0] == 3<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">which I did not touch.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Cheers<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Stefan<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> grass-dev <grass-dev-bounces@lists.osgeo.org>
<b>On Behalf Of </b>Anna Petrášová<br>
<b>Sent:</b> onsdag 10. april 2019 04:37<br>
<b>To:</b> GRASS-dev <grass-dev@lists.osgeo.org><br>
<b>Cc:</b> grass-commit@lists.osgeo.org<br>
<b>Subject:</b> Re: [GRASS-dev] [GRASS-SVN] r74358 - grass/trunk/lib/python/temporal<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<p class="MsoNormal">Documented here:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><a href="https://trac.osgeo.org/grass/wiki/Python3Support#HowtowritePython3compatiblecode">https://trac.osgeo.org/grass/wiki/Python3Support#HowtowritePython3compatiblecode</a><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Tue, Apr 9, 2019 at 10:34 PM Anna Petrášová <<a href="mailto:kratochanna@gmail.com">kratochanna@gmail.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal">Hi,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">it should really be >= 3 to avoid failing for future Python versions:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><a href="http://astrofrog.github.io/blog/2016/01/12/stop-writing-python-4-incompatible-code/" target="_blank">http://astrofrog.github.io/blog/2016/01/12/stop-writing-python-4-incompatible-code/</a><o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Tue, Apr 9, 2019 at 5:07 AM <<a href="mailto:svn_grass@osgeo.org" target="_blank">svn_grass@osgeo.org</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">Author: sbl<br>
Date: 2019-04-09 02:07:30 -0700 (Tue, 09 Apr 2019)<br>
New Revision: 74358<br>
<br>
Modified:<br>
   grass/trunk/lib/python/temporal/datetime_math.py<br>
   grass/trunk/lib/python/temporal/temporal_algebra.py<br>
Log:<br>
fix python version check<br>
<br>
Modified: grass/trunk/lib/python/temporal/datetime_math.py<br>
===================================================================<br>
--- grass/trunk/lib/python/temporal/datetime_math.py    2019-04-08 19:50:21 UTC (rev 74357)<br>
+++ grass/trunk/lib/python/temporal/datetime_math.py    2019-04-09 09:07:30 UTC (rev 74358)<br>
@@ -19,7 +19,7 @@<br>
 except:<br>
     has_dateutil = False<br>
<br>
-if sys.version_info[0]:<br>
+if sys.version_info[0] == 3:<br>
     unicode = str<br>
<br>
 DAY_IN_SECONDS = 86400<br>
<br>
Modified: grass/trunk/lib/python/temporal/temporal_algebra.py<br>
===================================================================<br>
--- grass/trunk/lib/python/temporal/temporal_algebra.py 2019-04-08 19:50:21 UTC (rev 74357)<br>
+++ grass/trunk/lib/python/temporal/temporal_algebra.py 2019-04-09 09:07:30 UTC (rev 74358)<br>
@@ -470,7 +470,7 @@<br>
 from .datetime_math import create_time_suffix<br>
 from .datetime_math import create_numeric_suffix<br>
<br>
-if sys.version_info[0]:<br>
+if sys.version_info[0] == 3:<br>
     unicode = str<br>
<br>
 ##############################################################################<br>
<br>
_______________________________________________<br>
grass-commit mailing list<br>
<a href="mailto:grass-commit@lists.osgeo.org" target="_blank">grass-commit@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/grass-commit" target="_blank">https://lists.osgeo.org/mailman/listinfo/grass-commit</a><o:p></o:p></p>
</blockquote>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</body>
</html>