GothenburgBitFactory / bugwarrior

Pull github, bitbucket, and trac issues into taskwarrior
http://pypi.python.org/pypi/bugwarrior
GNU General Public License v3.0
736 stars 209 forks source link

require taskw@1.3.0? #802

Closed srl295 closed 2 years ago

srl295 commented 3 years ago

I had a bunch of issues with UUID parsing and other failures, until I did:

pip3 install taskw --upgrade

there was a taskw update (taskw@1.3.0) that fixes https://github.com/ralphbean/taskw/issues/120 (which may or may not have been my issue)

The crash i got was

Traceback (most recent call last):
  File "/usr/local/Cellar/python@3.9/3.9.1_6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/Cellar/python@3.9/3.9.1_6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Users/srl295/.vscode-insiders/extensions/ms-python.python-2021.1.502429796/pythonFiles/lib/python/debugpy/__main__.py", line 45, in <module>
    cli.main()
  File "/Users/srl295/.vscode-insiders/extensions/ms-python.python-2021.1.502429796/pythonFiles/lib/python/debugpy/../debugpy/server/cli.py", line 444, in main
    run()
  File "/Users/srl295/.vscode-insiders/extensions/ms-python.python-2021.1.502429796/pythonFiles/lib/python/debugpy/../debugpy/server/cli.py", line 285, in run_file
    runpy.run_path(target_as_str, run_name=compat.force_str("__main__"))
  File "/usr/local/Cellar/python@3.9/3.9.1_6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 268, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "/usr/local/Cellar/python@3.9/3.9.1_6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 97, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/usr/local/Cellar/python@3.9/3.9.1_6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/usr/local/bin/bugwarrior-pull", line 33, in <module>
    sys.exit(load_entry_point('bugwarrior==1.8.0', 'console_scripts', 'bugwarrior-pull')())
  File "/usr/local/lib/python3.9/site-packages/click-7.1.2-py3.9.egg/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/click-7.1.2-py3.9.egg/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/site-packages/click-7.1.2-py3.9.egg/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/site-packages/click-7.1.2-py3.9.egg/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/bugwarrior-1.8.0-py3.9.egg/bugwarrior/command.py", line 73, in pull
    synchronize(issue_generator, config, main_section, dry_run)
  File "/usr/local/lib/python3.9/site-packages/bugwarrior-1.8.0-py3.9.egg/bugwarrior/db.py", line 449, in synchronize
    new_task = tw.task_add(**issue)
  File "/usr/local/lib/python3.9/site-packages/taskw-1.2.0-py3.9.egg/taskw/warrior.py", line 689, in task_add
    task['uuid'] = stdout.strip().split()[-1].strip('.')
  File "/usr/local/lib/python3.9/site-packages/taskw-1.2.0-py3.9.egg/taskw/task.py", line 223, in __setitem__
    self._serialize(key, value, self._fields)
  File "/usr/local/lib/python3.9/site-packages/taskw-1.2.0-py3.9.egg/taskw/task.py", line 110, in _serialize
    return converter.serialize(value)
  File "/usr/local/lib/python3.9/site-packages/taskw-1.2.0-py3.9.egg/taskw/fields/uuid.py", line 19, in serialize
    uuid.UUID(value)
  File "/usr/local/Cellar/python@3.9/3.9.1_6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/uuid.py", line 177, in __init__
    raise ValueError('badly formed hexadecimal UUID string')
ValueError: badly formed hexadecimal UUID string

debugging it ended up with a message such as:

Created task 420.

and '420' was not a good UUID. task --version says 2.5.3.

srl295 commented 3 years ago

perhaps it is due to my taskwarrior version. But I wanted to give a FYI here at least.

ryneeverett commented 3 years ago

I'd also note that neither bugwarrior nor taskwarrior has likely seen much python 3.9 usage which seems like it could be relevant. The bugwarrior-1.8.0 code, on the other hand, has been pretty well tested with taskw-1.2.0 as that was the latest release during development.

srl295 commented 3 years ago

@ryneeverett could well be. I'm pretty much just using homebrew's defaults, but bugwarrior from the develop branch.

srl295 commented 2 years ago

@ryneeverett I assume you'll need to bump the deps anyway for taskwarrior3.6.0 support for #840 / #841 ?

ryneeverett commented 2 years ago

As far as I can tell #840 is about an incompatibility between taskw and taskwarrior. I don't believe it would be appropriate to do anything to address this in bugwarrior. Perhaps taskw should raise an exception if an incompatible taskwarrior version is used but there's not really any way to "bump" a system dependency in a python package.

As for this issue, I would not be inclined to require a higher version of taskw unless it was determined that there was an actual incompatibility with bugwarrior. The exception you're running into could be a bug in taskw 1.2.0 but there could also be bugs that others experience in taskw 1.3.0. If we pinned 1.3.0 that would force users (and package managers) to patch bugwarrior in order to install the version of taskw that works best for them. In general, it's not a good idea to force users to upgrade dependencies without a pretty strong rationale.

srl295 commented 2 years ago

Thanks that all makes sense. I wasn’t sure what the right policies were.

ryneeverett commented 2 years ago

Closing as I don't see anything actionable here.