qweechat icon indicating copy to clipboard operation
qweechat copied to clipboard

Separate message parser into separate repo

Open silversquirl opened this issue 8 years ago • 4 comments

It'd be nice to expose the functionality of qweechat.weechat.parser to the world and allow others to use it in their own Python programs.

First, I'd recommend reviewing the code and updating it to work with Python 3, which I'm happy to do. I've got a working version exclusively for Python 3 locally, which I can tweak to make it compatible with Python 2.6+.

After that, it's just a matter of separating it out into a new repo (maybe named pyweerelay, pyweechat or python-weechat-relay), creating a PyPI package for it and adding that package as a dependency of qweechat.

silversquirl avatar Jul 29 '17 22:07 silversquirl

Hi,

Yes, agreed to make a separate package. I'm currently working on a C library to decode the WeeChat relay protocol (to use in WeeChat itself, see https://github.com/weechat/weechat/issues/369). So having same package in python would be great, and I can work on that.

For the support of Python versions, I think 2.6 is really not needed (too old). We could maybe keep 2.7+, and of course fully support Python 3.x.

flashcode avatar Jul 30 '17 10:07 flashcode

Great! Want me to clean up my Python 3 port? Not having to keep backwards compatibility with 2.6 will make things easier, since I'm not sure what's in 2.6's __future__ module and what's not.

silversquirl avatar Jul 30 '17 12:07 silversquirl

Just found https://github.com/k0rmarun/pyweechat (which is on PyPI), this could maybe already be used in Python relay clients (not tested).

flashcode avatar Aug 03 '17 05:08 flashcode

Aha! I hadn't found that. I'll try it out in my current project and get back to you.

silversquirl avatar Aug 03 '17 17:08 silversquirl