At Sat, 20 Jun 2015 00:10:22 +0900,
IWAMOTO Toshihiro wrote:
> 
> OpenStack is gaining momentum for python3 adoption and rejecting
> non-python3-compatible libraries.  So, let's make ryu python3
> compatible for better OpenStack integration.
> 
> This patchset is a only start of the effort.  More will come.
> 
> IWAMOTO Toshihiro (5):
>   tox.ini: Be able to run python3 unit tests
>   ofproto: Fix ImportError on python3
>   python3: Fix starndard library imports
>   python3: Adapt to new iterator names
>   python3: Use bytes type for binary data

FYI, with these patches applied, tox -e py34 generates following
errors.

As some errors are masked by other errors, the actual number of errors
would be somewhat larger.

$ tox -e py34 2>&1 >/tmp/err.log
$ python /tmp/a.py |sort |uniq -c|sort -nr
    139 TypeError: 'str' does not support the buffer interface
     79 NameError: name 'unicode' is not defined
     59 TypeError: cannot use a str to initialize an array with typecode 'H'
     29 TypeError: can't concat bytes to str
     19 NameError: name 'buffer' is not defined
     18 TypeError: string argument without an encoding
     17 struct.error: required argument is not an integer
     14 TypeError: an integer is required
     10 TypeError: unsupported operand type(s) for +: 'range' and 'range'
      9 TypeError: can't concat str to bytearray
      6 --------------------- >> end captured logging << ---------------------
      4 TypeError: Can't convert 'bytes' object to str implicitly
      4 TypeError: Can't convert 'bytearray' object to str implicitly
      3 TypeError: method expected 2 arguments, got 3
      3 TypeError: can assign only bytes, buffers, or iterables of ints in 
range(0, 256)
      3 struct.error: argument for 's' must be a bytes object
      3 IndexError: list index out of range
      2 TypeError: can't concat bytearray to str
      2 --------------------- >> end captured stdout << ----------------------
      1 TypeError: slice indices must be integers or None or have an __index__ 
method 
      1     test_hex_array_string (ryu.tests.unit.test_utils.Test_utils)OK
      1 SyntaxError: invalid syntax
      1 Ran 920 tests in 0.239s
      1 FAILED (errors=427, failures=2)
      1 AttributeError: 'NoneType' object has no attribute 'op'
$ cat /tmp/a.py
import sys
import re

e = open('/tmp/err.log', 'r')
r = re.compile('^ERROR:')

lines = e.readlines()
for l in range(len(lines)):
    if r.match(lines[l]):
        print(lines[l-3][:-1])


------------------------------------------------------------------------------
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to