<div dir="ltr">Package: libjs-jquery-hotkeys<br>Version: 0~20130707+git2d51e3a9+dfsg-2<br>Severity: normal<br><br>Dear Maintainer,<br><br>The python-coverage and python3-coverage packages use jquery.hotkeys to bind shortcut keys for HTML coverage reports. The upstream coverage project will use javascript libraries found in /usr/share/javascript/, and falls back to their own, vendorised copies. <br>
<br>The Debian package is based on <a href="https://github.com/jeresig/jquery.hotkeys">https://github.com/jeresig/jquery.hotkeys</a>, but seems to include several changes unique to the Debian version. Specifically this revision:<br>
<br><a href="http://anonscm.debian.org/gitweb/?p=pkg-javascript/libjs-jquery-hotkeys.git;a=commit;h=479c001b064494cb1f76304f82e870bebb69f879">http://anonscm.debian.org/gitweb/?p=pkg-javascript/libjs-jquery-hotkeys.git;a=commit;h=479c001b064494cb1f76304f82e870bebb69f879</a><br>
<br>was the last revision that works with coverage.py. All later revisions fail - they either do not trigger any action when the key is pressed, or they trigger all actions (depending on the specific version tested).<br><br>
This can be easily tested with this simple bash script:<br><br>--<code>--<br>#!/bin/sh -ex<br> <br>if [ -d reproducer_ve ]; then<br>rm -r reproducer_ve<br>fi<br> <br>virtualenv reproducer_ve<br>. reproducer_ve/bin/activate<br>
pip install coverage<br><br>cat > foo.py <<EOF<br> <br>def bar(a, b):<br>if a < 0:<br>return a + b<br>return a - b<br> <br>EOF<br> <br>cat > test_foo.py <<EOF<br>from foo import bar<br>from unittest import TestCase<br>
 <br> <br>class FooTests(TestCase):<br>def test_bar(self):<br>bar(1, 2)<br>EOF<br> <br>coverage run -m unittest test_foo<br>coverage html<br>xdg-open htmlcov/index.html<br>--</code>--<br><br>To reproduce, open the report for the 'foo' module, and try pressing an unbound key (like 'alt', for example). In the current package, all actions will be triggered.<br>
<br>Note: The above script uses 'pip' + 'virtualenv', but the same behavior is present in the 'python-coverage' and 'python3-coverage' packages. I use pip in the script above since it means I don't need root to install the package.<br>
<br>I'm not a JS developer, so I'm not able to easily tell what the exact issue is in the latest package, but the diff between the version that works and the version(s) that don't is relatively small, so hopefully someone can figure out what's wrong.<br>
<br>Please let me know if I've forgotten to include any important information. I'm happy to help get this fixed.<br><br>Cheers,<br><br>-- System Information:<br>Debian Release: jessie/sid<br>  APT prefers trusty-updates<br>
  APT policy: (500, 'trusty-updates'), (500, 'trusty-security'), (500, 'trusty'), (100, 'trusty-backports')<br>Architecture: amd64 (x86_64)<br>Foreign Architectures: i386<br><br>Kernel: Linux 3.13.0-12-generic (SMP w/8 CPU cores)<br>
Locale: LANG=en_NZ.UTF-8, LC_CTYPE=en_NZ.UTF-8 (charmap=UTF-8)<br>Shell: /bin/sh linked to /bin/dash<br><br>Versions of packages libjs-jquery-hotkeys depends on:<br>ii  dpkg          1.17.5ubuntu4<br>ii  libjs-jquery  1.7.2+dfsg-2ubuntu1<br>
<br>Versions of packages libjs-jquery-hotkeys recommends:<br>ii  javascript-common  11<br><br>libjs-jquery-hotkeys suggests no packages.<br><br>-- no debconf information<br><br clear="all"><br>-- <br><div dir="ltr"><div>Thomi Richards<br>
</div><a href="mailto:thomi.richards@canonical.com" target="_blank">thomi.richards@canonical.com</a><br></div>
</div>