Closed gdetrez closed 3 years ago
Hi @ralphbean! I'd love to get some feedback on this if you have time. I can restore compatibility with legacy python if that's a concern.
This likely broke Python 2 support, as FileNotFoundError
doesnt exist in Python 2.
Python 2 is declared as supported in setup.py
Oh, hrm; that wasn't intentional, but I am also not all that motivated to worry about maintaining Python 2.7 support in general given that it has been EOL'd for nearly a year now, and prevents us from doing things like adding type annotations.
Was there a reason we wanted to preserve Python 2.7 support?
Importing taskw without having taskwarrior installed raises an exception (tested with CPython3.7):
This fixes the issue by refactoring exception handling in
taskw/warrior.py
to useFileNotFoundError
instead of matching on the string.It is however a python 3.3+ solution and I just realized you advertise legacy python compatibility in
setup.py
. But since it's two weeks to 2020 maybe that's ok? :crossed_fingers: