Raising severity to serious for some Python 2 leaf packages with no Python 3
I have seen multiple people post to Ycombinator claiming that porting to Python3 is always trivial and easily done.  And, yeah, sure, for a 380-line script written after Python3 came out, porting the code so it runs the same both in Python2 and Python3 is trivial.<p>However, for an over 6000-line script written in the mid-2000s, before Python3 even existed, porting to Python3 is non trivial.  Trust me, I tried.<p>First, the syntax sugar stuff was easy enough to fix: Do a simple search and replace so that all cases of stuff like<p><pre><code>    print &quot;foo&quot;
</code></pre>
Become<p><pre><code>    print(&quot;foo&quot;)
</code></pre>
I had to do something similar with the way this script calls raise().  Not to mention adding a hack so Python2 uses “xrange” while Python3 uses “range”.  After doing all of this, the code still does not run in Python3.  As far as I can tell, the issue is that Python3 does implicit float-to-int conversions differently than Python2; the code will not raise an error in Python3, but it will silently run differently, until the state is different enough that the Python3 version raises an error while the Python2 version works as expected.<p>At this point, I just threw my hands in the air and gave up.<p>For reference, the offending code is here:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;samboy&#x2F;misc-civ4-mapscripts&#x2F;blob&#x2F;master&#x2F;TotestraRG32.py" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;samboy&#x2F;misc-civ4-mapscripts&#x2F;blob&#x2F;master&#x2F;T...</a>