radical-cybertools / radical.saga

A Light-Weight Access Layer for Distributed Computing Infrastructure and Reference Implementation of the SAGA Python Language Bindings.
http://radical-cybertools.github.io/saga-python/
Other
83 stars 34 forks source link

fixing python deprecation #816

Closed iparask closed 3 years ago

iparask commented 3 years ago

Thread objects deprecated isAlive from python version 3.7 in favor of is_alive:

(base) iparask@js-17-185:$ conda create -n test python=3.7 -y;conda activate test;python -c 'import threading as mt;t = mt.Thread();print(t.isAlive.__doc__);exit();';conda deactivate;conda remove --all -n test -y

Return whether the thread is alive.

        This method is deprecated, use is_alive() instead.

(base) iparask@js-17-185:$ conda create -n test python=3.6 -y;conda activate test;python -c 'import threading as mt;t = mt.Thread();print(t.is_alive.__doc__);exit();';conda deactivate;conda remove --all -n test -y

Return whether the thread is alive.

        This method returns True just before the run() method starts until just
        after the run() method terminates. The module function enumerate()
        returns a list of all alive threads.

(base) iparask@js-17-185:$ conda create -n test python=3.5 -y;conda activate test;python -c 'import threading as mt;t = mt.Thread();print(t.is_alive.__doc__);exit();';conda deactivate;conda remove --all -n test -y

Return whether the thread is alive.

        This method returns True just before the run() method starts until just
        after the run() method terminates. The module function enumerate()
        returns a list of all alive threads.

(base) iparask@js-17-185:$
iparask commented 3 years ago

ping @andre-merzky