python3 support: pylint, W1651 (deprecated-itertools-function) Accessing a deprecated function on the itertools module
It's even 20% faster, than previous code. On python3 zip is even much more faster.
--- a/ProjectController.py Thu Oct 11 10:01:12 2018 +0300
+++ b/ProjectController.py Thu Oct 11 10:25:19 2018 +0300
@@ -40,7 +40,6 @@
from threading import Timer
from datetime import datetime
from weakref import WeakKeyDictionary
-from itertools import izip
from six.moves import xrange
import wx
@@ -1499,7 +1498,7 @@
debug_vars = UnpackDebugBuffer(
debug_buff, self.TracedIECTypes)
if debug_vars is not None and len(debug_vars) == len(self.TracedIECPath):
- for IECPath, values_buffer, value in izip(
+ for IECPath, values_buffer, value in zip(
self.TracedIECPath,
self.DebugValuesBuffers,
debug_vars):
@@ -1678,7 +1677,7 @@
debug_ticks, buffers = self.SnapshotAndResetDebugValuesBuffers()
start_time = time.time()
if len(self.TracedIECPath) == len(buffers):
- for IECPath, values in izip(self.TracedIECPath, buffers):
+ for IECPath, values in zip(self.TracedIECPath, buffers):
if len(values) > 0:
self.CallWeakcallables(
IECPath, "NewValues", debug_ticks, values)
--- a/tests/tools/check_source.sh Thu Oct 11 10:01:12 2018 +0300
+++ b/tests/tools/check_source.sh Thu Oct 11 10:25:19 2018 +0300
@@ -368,6 +368,7 @@
enable=$enable,W1646 # (invalid-str-codec) non-text encoding used in str.decode
enable=$enable,W1645 # (exception-message-attribute) Exception.message removed in Python 3
enable=$enable,W1649 # (deprecated-string-function) Accessing a deprecated function on the string module
+ enable=$enable,W1651 # (deprecated-itertools-function) Accessing a deprecated function on the itertools module
# enable=
options=