Fix an issue with memoryview and ctypes c_char_array not working in
python3. The behavior is sufficiently different in python2 and 3 that
a shim memoryview function was added.
Test Plan:
Tests pass
$ mvn package
$ PYTHONPATH=nailgun-client/py python2.7 nailgun-client/py/test_ng.py
com.facebook.nailgun.builtins.NGServerStats: 1/1
........
----------------------------------------------------------------------
Ran 8 tests in 27.692s
OK
$ PYTHONPATH=nailgun-client/py python3.6 nailgun-client/py/test_ng.py
com.facebook.nailgun.builtins.NGServerStats: 1/1
........
----------------------------------------------------------------------
Ran 8 tests in 25.942s
OK
$ PYTHONPATH=nailgun-client/py python3.7 nailgun-client/py/test_ng.py
com.facebook.nailgun.builtins.NGServerStats: 1/1
........
----------------------------------------------------------------------
Ran 8 tests in 25.942s
OK
PS C:\Users\pjameson\nailgun> git checkout python3
Switched to a new branch 'python3'
Branch 'python3' set up to track remote branch 'python3' from 'origin'.
PS C:\Users\pjameson\nailgun> $env:PYTHONPATH=".\nailgun-client\py\"; python3.6 .\nailgun-client\py\test_ng.py
com.facebook.nailgun.builtins.NGServerStats: 1/1
........
----------------------------------------------------------------------
Ran 8 tests in 108.627s
OK
PS C:\Users\pjameson\nailgun> $env:PYTHONPATH=".\nailgun-client\py\"; python2.7 .\nailgun-client\py\test_ng.py
com.facebook.nailgun.builtins.NGServerStats: 1/1
........
----------------------------------------------------------------------
Ran 8 tests in 131.204s
OK
Fix an issue with memoryview and ctypes c_char_array not working in python3. The behavior is sufficiently different in python2 and 3 that a shim memoryview function was added.
Test Plan:
Tests pass