[Bug 894544] Re: action plugin regex failure
Ubuntu Precise now has the latest version of Glipper, so closing this bug. If you need this fixed in an older Ubuntu release, you might want to check out https://wiki.ubuntu.com/SRU. ** Changed in: glipper (Ubuntu) Status: New = Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/894544 Title: action plugin regex failure To manage notifications about this bug go to: https://bugs.launchpad.net/glipper/+bug/894544/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 894544] Re: action plugin regex failure
** Changed in: glipper Status: Fix Committed = Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/894544 Title: action plugin regex failure To manage notifications about this bug go to: https://bugs.launchpad.net/glipper/+bug/894544/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 894544] Re: action plugin regex failure
I have no problem committing this fix if it works for you. I am just very curious as to why I cannot reproduce it. All the history items come from Gtk's wait_for_text(): http://www.pygtk.org/docs/pygtk/class-gtkclipboard.html#method-gtkclipboard--wait-for-text This method says it returns a string or None. So I don't see how it could be anything else. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/894544 Title: action plugin regex failure To manage notifications about this bug go to: https://bugs.launchpad.net/glipper/+bug/894544/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 894544] Re: action plugin regex failure
** Branch linked: lp:glipper -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/894544 Title: action plugin regex failure To manage notifications about this bug go to: https://bugs.launchpad.net/glipper/+bug/894544/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 894544] Re: action plugin regex failure
** Changed in: glipper Status: Triaged = Fix Committed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/894544 Title: action plugin regex failure To manage notifications about this bug go to: https://bugs.launchpad.net/glipper/+bug/894544/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 894544] Re: action plugin regex failure
I spent an hour or so tinkering with python this morning (GMT-5), but I'm learning as I go. It would be useful to know whether whether a numeric value is returned by clipboard.wait_for_text(), self.unicode_or_none(), or is converted at some later point. If you want to send me a patch or script to help pin this down, I'll be happy to assist. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/894544 Title: action plugin regex failure To manage notifications about this bug go to: https://bugs.launchpad.net/glipper/+bug/894544/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 894544] Re: action plugin regex failure
Learning Python is fun, but don't waste your time if you don't want to do it. I've already committed your regex.search patch. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/894544 Title: action plugin regex failure To manage notifications about this bug go to: https://bugs.launchpad.net/glipper/+bug/894544/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 894544] Re: action plugin regex failure
I am hesitant to use str() because then it will fail with unicode text (ie any language other than english). But maybe unicode() will work. The problem is, I can't reproduce this bug. Do you know how I can? Maybe you have some text which, when copied triggers this bug? ** Changed in: glipper Status: New = Triaged ** Changed in: glipper Milestone: None = 2.2 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/894544 Title: action plugin regex failure To manage notifications about this bug go to: https://bugs.launchpad.net/glipper/+bug/894544/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 894544] Re: action plugin regex failure
I'm not sure how I can be more specific than attempts to match all digit strings always fail. Did you try the expression I gave as an example? It doesn't seem especially like the sort of issue to be specific to architecture or library dependencies. In any case, unicode() works just as well, which I've also tested with regex.search() because regex.match() seems like a pointless restriction not mentioned in the documentation (it forces /^/ matching). Attached is an update diff against revision 107. ** Patch added: regex.search(unicode(item)) https://bugs.launchpad.net/glipper/+bug/894544/+attachment/2610774/+files/actions_py.patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/894544 Title: action plugin regex failure To manage notifications about this bug go to: https://bugs.launchpad.net/glipper/+bug/894544/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 894544] Re: action plugin regex failure
Only because I'm not terribly familiar with python did I do some further testing to try to discover how it might be possible to not reproduce this, but all my testing indicates you've done something wrong in testing, or we're using different sources. To eliminate this possibility, here's a simple test script which illustrates the problem, confirmed on 64bit Ubuntu Onierec and 32bit Ubuntu Lucid LTS. Run with no arguments for the failure scenario, any arguments for the successful one (matching this bug ID). If you still cannot reproduce the bug I'll print out the source code and eat it. ** Attachment added: test.py https://bugs.launchpad.net/glipper/+bug/894544/+attachment/2610775/+files/test.py -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/894544 Title: action plugin regex failure To manage notifications about this bug go to: https://bugs.launchpad.net/glipper/+bug/894544/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 894544] Re: action plugin regex failure
Thanks for the test script. It works as you said on my machine too. The problem I have is that I cannot reproduce the fails to stringify clipboard items part. On my machine, everything I copy is a string. In the test script you are using an integer. Of course regex fails with an integer, but how do you copy one? If I select a series of digits and ctrl-c glipper sees it as a string. That's why I can't reproduce the TypeError. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/894544 Title: action plugin regex failure To manage notifications about this bug go to: https://bugs.launchpad.net/glipper/+bug/894544/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 894544] Re: action plugin regex failure
Well that is certainly curious. Based on available information I'm inclined to believe Unity may be involved somehow; however, unless you are under the impression that your input is forever guaranteed to be a string, I don't see that it much matters that in some cases it works. If there is some disadvantage to explicitly setting a variable type in a case like this, I'd prefer to know what that is before spending any time chasing down clipboard bugs — especially those from the seemingly ever increasing Unity pile. I'll see about testing this with Gnome classic or some such, but even if my suspicions about Unity are off the mark, I don't see a case where it's a bad idea to patch this bug. I also hope you'll consider using regex.search, it seems less onerous than beginning every regex with '.*' -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/894544 Title: action plugin regex failure To manage notifications about this bug go to: https://bugs.launchpad.net/glipper/+bug/894544/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 894544] Re: action plugin regex failure
Update: Same issue on another Oneiric machine running XFCE, so I guess that lets Unity off the hook. Meanwhile I've been reading up on python — the language is both strongly and dynamically typed (with duck typing, no less), shouldn't you always ensure you are passing a string where strings are required? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/894544 Title: action plugin regex failure To manage notifications about this bug go to: https://bugs.launchpad.net/glipper/+bug/894544/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 894544] Re: action plugin regex failure
** Tags added: patch ** Tags added: plugin regex ** Also affects: glipper (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/894544 Title: action plugin regex failure To manage notifications about this bug go to: https://bugs.launchpad.net/glipper/+bug/894544/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs