From: Jozef Urbanovsky <jurbanov(a)redhat.com>
Main changes:
================================================
- Print function - PEP 3105[1]
- Design of dictionaries, their iteration and respective built-in
functions - PEP 469[2], PEP 3106[3]
- Division operator - PEP 238[4]
- Interrupts of system calls - PEP 475[5]
- Socket.accept and interrupts - Docs Python3 Socket[6]
Subprocess[7]
- Binary data and strings - Docs Python3 porting[8]
- Shebangs modified to environmental variable of python3
- Fixed library imports to reflect their respective changes in
transition to python3
- multiprocessing
- xmlrpc
- urllib
- thread
- pickle
lnst/Common/Daemon.py
================================================
- use open instead of deprecated file method
lnst/Common/SecureSocket.py
================================================
- Byte string and unicode/ascii string conflict, fixed by using bytes
internally and sending messages encoded to ascii
- Fixed multiple issues regarding changes to standard python functions,
such as encoding to hex, ordinal value of characters, length of
different types
lnst/Controller/Machine.py
================================================
- module "__builtin__" was renamed in python3 to "builtins"
lnst/Controller/Recipe.py
================================================
- valid results are now concatenated using all method
instead of deprecated reduce along with list comprehension
lnst/Controller/VirtDomainCtl.py
================================================
- HWAddress class implements "__eq__" method, which automatically makes
instaces of this class unhashable, which means they can't be stored
in dictionaries. As instances of this class might be mutable, it is
recommended to leave them unhashable. To ensure storability of instances
of this class in dictionary, method "__str__" is used to convert given
object to string, which is hashable.
lnst/RecipeCommon/Perf/Measurements.py
- Fixed issues where some conditions could try to compare NoneType
with integer value, resulting into wrong evaluations
lnst/Slave/NetTestSlave.py
================================================
- signum 2 (SIGINT) - modified behavior since python 3.5
- Due to changes in interrupting system call, signal receiving and
handling required changes to main slave loop
- Structure of raising, catching and handling interrupt was changed,
to reflect behavior of python 3.5 and higher
- Method run is no longer ended by parameter "finished", but rather
exception breaks the endless loop
lnst/Tests/Netperf.py
================================================
- result["confidence"] was truncating everything after
decimal point, therefore division was incorrect for numbers with
non-zero decimal part.
================================================
[1] - PEP 3105
https://www.python.org/dev/peps/pep-3105/
[2] - PEP 469
https://www.python.org/dev/peps/pep-0469/
[3] - PEP 3106
https://www.python.org/dev/peps/pep-3106/
[4] - PEP 238
https://legacy.python.org/dev/peps/pep-0238/
[5] - PEP 475
https://www.python.org/dev/peps/pep-0475/
[6] - Docs Python3 Socket
https://docs.python.org/3/library/socket.html#socket.socket.accept
[7] - Docs Python3 Subprocess
https://docs.python.org/3/library/subprocess.html
[8] - Docs Python3 Porting
https://docs.python.org/3/howto/pyporting.html#text-versus-binary-data
Signed-off-by: Jozef Urbanovsky <jurbanov(a)redhat.com>