0

Initial Python 3 port

Many things work, some don't. Notably, genPOI doesn't work, and
there's some signedness comparison stuff going on in the C extension.

This also completely drops support for Python 2, as maintaining a C
extension for both Python 2 and 3 is a pain and not worth it for the
9 months that Python 2 is still going to be supported upstream.

The documentation needs to be adjusted as well.

All of the few tests we have pass, and rendering a map works, both
with a configuration file and without. We can also use optimizeimages.

Concerns #1528.
This commit is contained in:
Nicolas F
2019-03-16 20:43:25 +01:00
parent 99eebd5b69
commit e348a548b6
33 changed files with 369 additions and 625 deletions

View File

@@ -1,6 +1,6 @@
import unittest
from itertools import chain, izip
from itertools import chain
from overviewer_core.tileset import iterate_base4, RendertileSet
from overviewer_core.util import roundrobin
@@ -150,7 +150,7 @@ class RendertileSetTest(unittest.TestCase):
self.assertRaises(AssertionError, self.test_iterate)
def test_count(self):
self.assertEquals(self.tree.count(), len(self.tile_paths))
self.assertEqual(self.tree.count(), len(self.tile_paths))
def test_bool(self):
"Tests the boolean status of a node"
@@ -202,7 +202,7 @@ class RendertileSetTest(unittest.TestCase):
"""Test a post-traversal of the tree's dirty tiles"""
# Expect the results in this proper order.
iterator = iter(self.tree.posttraversal())
for expected, actual in izip(self.tile_paths_posttraversal, iterator):
for expected, actual in zip(self.tile_paths_posttraversal, iterator):
self.assertEqual(actual, expected)
self.assertRaises(StopIteration, next, iterator)
@@ -211,7 +211,7 @@ class RendertileSetTest(unittest.TestCase):
"""Test a round-robin post-traversal of the tree's dirty tiles"""
# Expect the results in this proper order.
iterator = iter(self.tree.posttraversal(robin=True))
for expected, actual in izip(self.tile_paths_posttraversal_robin, iterator):
for expected, actual in zip(self.tile_paths_posttraversal_robin, iterator):
self.assertEqual(actual, expected)
self.assertRaises(StopIteration, next, iterator)