kquick / Thespian

Python Actor concurrency library
MIT License
189 stars 24 forks source link

runcommand: is with a literal #66

Closed sabaini closed 3 years ago

sabaini commented 3 years ago

From Python 3.8 the interpreter will complain about using "is" with a literal:

https://docs.python.org/3.8/whatsnew/3.8.html#changes-in-python-behavior

The runcommand module uses this construct in three places:

thespian/runcommand.py:446: SyntaxWarning: "is" with a literal. Did you mean "=="? if outmark is 'normal' else thespian/runcommand.py:448: SyntaxWarning: "is" with a literal. Did you mean "=="? if outmark is 'normal': thespian/runcommand.py:450: SyntaxWarning: "is" with a literal. Did you mean "=="? elif outmark is 'error':

Not sure of immediate impact but probably should be fixed for cleanliness

kquick commented 3 years ago

Thanks for the report and the patch!