ARMmbed / greentea

IoT reGREssion ENvironment for TEst Automation
Apache License 2.0
27 stars 44 forks source link

Thread isAlive renamed to is_alive in Python 3.9 #306

Closed LDong-Arm closed 3 years ago

LDong-Arm commented 3 years ago

(Copied from https://github.com/ARMmbed/mbed-os-tools/issues/247 so we won't forget)

Description

mbedgt doesn't work with Python 3.9:

mbedgt: running 1 test for platform 'NRF52840_DK' and toolchain 'ARMC6'                                                                                                                                           
        use 1 instance of execution threads for testing                                                                                                                                                           
mbedgt: could not generate test report'Thread' object has no attribute 'isAlive'                                                                                                                                  
mbedgt: completed in 1.53 sec

It's because isAlive has been renamed to is_alive. An update is needed at

https://github.com/ARMmbed/mbed-os-tools/blob/bb7f07fcf8352e89f2197ca0d0891a91c4e4e281/packages/mbed-greentea/mbed_greentea/mbed_greentea_cli.py#L907

Version:

$ mbedgt --version
1.7.4

Issue request type

[ ] Question
[ ] Enhancement
[x] Bug
Patater commented 3 years ago

Fixed via 03d14c634453eb4335e1a957cb8dedc451ea7d56