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

Thread method isAlive compatible with python 3.9 #7

Open
dmknght opened this issue Jan 31, 2021 · 0 comments
Open

Thread method isAlive compatible with python 3.9 #7

dmknght opened this issue Jan 31, 2021 · 0 comments

Comments

@dmknght
Copy link

dmknght commented Jan 31, 2021

  • Faraday GTK Client version: 1.1.0
  • Python version: 3.9
  • Operating System: Parrot OS 4.10

Description

On Debian testing based distro, thee default python has been upgraded to python3.9 which removed isAlive(). It makes application failed to stop (crashes after click on exit)

What I Did

  • Start Faraday-client
  • Stop faraday client
  • Client has this error while stopping
Original exception was:
Traceback (most recent call last):
  File "/usr/bin/faraday-client", line 11, in <module>
    load_entry_point('faraday-client==1.0.0', 'console_scripts', 'faraday-client')()
  File "/usr/lib/python3/dist-packages/faraday_client/start_client.py", line 448, in main
    start_faraday_client()
  File "/usr/lib/python3/dist-packages/faraday_client/start_client.py", line 227, in start_faraday_client
    exit_status = start()
  File "/usr/lib/python3/dist-packages/faraday_client/model/application.py", line 129, in start
    return self.__exit(exit_code)
  File "/usr/lib/python3/dist-packages/faraday_client/model/application.py", line 141, in __exit
    if self._model_controller.isAlive():
TypeError: 'NoneType' object is not callable

Link: https://bugs.python.org/issue37804

Fix method is edit isAlive() to is_alive() at https://github.com/infobyte/faraday-client/blob/master/faraday_client/model/application.py#L141
It worked well with python3.9.
It should be compatible with python2 (doc: https://docs.python.org/2.7/library/threading.html) and any older version of python3 (doc: https://docs.python.org/3.5/library/threading.html)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant