fixed py2.7/3 differences in long type handling in pairing module
Merge branch 'dev' into 2.7-dev