pimutils / todoman

✅ A simple, standards-based, cli todo (aka: task) manager.
https://todoman.readthedocs.io
ISC License
482 stars 76 forks source link

Can't run v4.3.2 on Slackware64-15.0 #544

Closed Tonus1 closed 8 months ago

Tonus1 commented 8 months ago

Hi,

I'm having trouble to get the lastest version of todoman (4.3.2 atm) run on fully upgraded Slackware64-15.0 Seems to be related to uncompatible python version : here python v3.9.18 and setuptools-65.1.1 (do not build with stock 57.5.0).

Build and runtime deps are

python3-atomicwrites click click-log icalendar python3-dateutil parsedatetime humanize python3-tabulate python-urwid pytz

The error seems related to this syntax in widget.py (commit b08318a) and cli.py (line 100, commit 17dc309)

def __init__(self, parent: urwid.Widget, *a, **kw) -> None:

Reverting all the related syntax to something like this works

def __init__(self, parent, *a, **kw):

Since I'm total noob in python there's surely a better solution.

Edit : forgot to past the error !

Traceback (most recent call last):
  File "/usr/bin/todo", line 5, in <module>
    from todoman.cli import cli
  File "/usr/lib64/python3.9/site-packages/todoman/cli.py", line 19, in <module>
    from todoman.interactive import TodoEditor
  File "/usr/lib64/python3.9/site-packages/todoman/interactive.py", line 3, in <module>
    from todoman import widgets
  File "/usr/lib64/python3.9/site-packages/todoman/widgets.py", line 29, in <module>
    class ExtendedEdit(urwid.Edit):
  File "/usr/lib64/python3.9/site-packages/todoman/widgets.py", line 48, in ExtendedEdit
    size: tuple[int, int] | tuple[int] | tuple[()],
TypeError: unsupported operand type(s) for |: 'types.GenericAlias' and 'types.GenericAlias'
WhyNotHugo commented 8 months ago

Right, the syntax of our annotations is not compatible with Python 3.9. 16a498328503e69e65db02eea0df161984af7bd7 should fix this.

WhyNotHugo commented 8 months ago

Tagged in v4.4.0.