Skip to content

Commit

Permalink
Use threading.Thread.is_alive() for Py3.9 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
webknjaz committed Feb 11, 2021
1 parent 98c4295 commit 600efee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion magicbus/plugins/lifecycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def EXIT(self):
# See http://www.cherrypy.org/ticket/751.
self.bus.log('Waiting for child threads to terminate...')
for t in threading.enumerate():
if t == threading.currentThread() or not t.isAlive():
if t == threading.current_thread() or not t.is_alive():
continue

# Note that any dummy (external) threads are always daemonic.
Expand Down

2 comments on commit 600efee

@angelo-romano
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any plan to release a new version of magicbus with this fix? I would like to use this package with Python 3.11 but it is not possible at the moment due to some issues (including this one).

@webknjaz
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly, no. I may need to find time to revisit #11 and get this released, then. This project is not very active and doesn't get enough attention. It looks like it'd need some CI updates additionally. Feel free to stop by the matrix channels @ https://matrix.to/#/%23cherrypy-space:matrix.org if you want to remind me later on.

Please sign in to comment.