Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watchdog.IsAlive() does not work in python 3.9 #12109

Closed
khurtado opened this issue Sep 24, 2024 · 2 comments · Fixed by #12122
Closed

Watchdog.IsAlive() does not work in python 3.9 #12109

khurtado opened this issue Sep 24, 2024 · 2 comments · Fixed by #12122
Assignees

Comments

@khurtado
Copy link
Contributor

khurtado commented Sep 24, 2024

Impact of the new feature
The WMRuntime class Watchdog:

class Watchdog(threading.Thread):

inherits from threading.Thread.
Starting python 3.9, threading.Thread().isAlive() becomes is_alive().

Is your feature request related to a problem? Please describe.
Unit tests broken in Alma9 nodes with python 3.9: Unit

Describe the solution you'd like
Python 3.6.8+ have support for is_alive. Change unit test method name to it.

Describe alternatives you've considered
Implement isAlive() in python 3.9 as well

@amaltaro
Copy link
Contributor

@khurtado can you please provide the unit test and the error/traceback to this issue (or the original description)?

I don't see isAlive() being used anywhere other than the Daemon object (which is a different isAlive() method).
In addition, this issue should have been fixed by this PR: #11323 , so it is not clear to me now why a new method is created and why it fails.

@khurtado
Copy link
Contributor Author

khurtado commented Sep 30, 2024

@amaltaro

In python 3.9, we fail this line in the following unit test:

https://github.com/dmwm/WMCore/blob/master/test/python/WMCore_t/Misc_t/Runtime_t.py#L76

Python 3.9 deprecates isAlive(), but I failed to see python 3.6.8+ implemented both isAlive() and is_alive(), so it seems simply changing the unit test should be fine.

I am changing this issue's description and creating a different PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
2 participants