Update regex usage for python 3.7#2225
Conversation
|
Can you elaborate on the rtorrent problems ? I'm unsure why Flexget escapes at all. |
|
@JohnDoee The rtorrent issues are here: Flexget/flexget/plugins/clients/rtorrent.py Lines 314 to 316 in 8709b7d It's using re.escape to escape, which changed functionality on python 3.7+. No idea what really needs to be escaped there, so I didn't know how to fix it.
|
|
So I looked through a bit of the rtorrent command argument parsing code. My C++ isn't the best so it might be a bit wrong, anyways: Argument parsing starts after first = found Variable parsing: https://github.com/rakshasa/rtorrent/blob/f0207ce6548026853ec57ab26f2e57a872f223bb/src/rpc/parse.cc#L175 Some helper commands: https://github.com/rakshasa/rtorrent/blob/f0207ce6548026853ec57ab26f2e57a872f223bb/src/rpc/parse.h#L53 Special characters in the given parsing that should probably be escaped for these use-cases:
Alternatively, throw quotes around, escape quotes and strip |
|
I have the diff of this PR currently being applied to my AUR build flexget-git and its working fine for me. Perhaps we could get this PR in and make a sub/another task to fix rtorrent? |
|
I got some complaints with Python 3.6, committed fixes for those. |
# Conflicts: # flexget/_version.py
Motivation for changes:
Fix our usage of re.sub to work on python 3.7
Detailed changes:
Addressed issues:
To Do: