[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#899050: stretch-pu: package accerciser/3.22.0-2



Package: release.debian.org
Severity: normal
Tags: stretch
User: release.debian.org@packages.debian.org
Usertags: pu

Hello,

Accerciser is a debugging tool for accessibility (think of it as an
accessibility inspector)

The version of accerciser currently in stable is actually basically
unusable due to bugs #848119 and #875629. The first prevents the python
console from working, thus preventing from hardcode debugging. The
second prevents from actually selecting a widget to inspect when not
using a desktop compositor, thus preventing basically everything.  The
fixes have been tested for a long time in "testing", and are forwarded
upstream.

It happens that people needing accerciser are usually using the testing
distribution, but it'd be still useful to have these fixed in stable.

Here is the proposed cherry-pick debdiff.

Samuel

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'stable-debug'), (500, 'oldoldstable'), (500, 'buildd-unstable'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental-debug'), (1, 'buildd-experimental'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.16.0 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

-- 
Samuel
Be warned that typing \fBkillall \fIname\fP may not have the desired
effect on non-Linux systems, especially when done by a privileged user.
(From the killall manual page)
diff -Nru accerciser-3.22.0/debian/changelog accerciser-3.22.0/debian/changelog
--- accerciser-3.22.0/debian/changelog	2016-11-09 14:05:38.000000000 +0100
+++ accerciser-3.22.0/debian/changelog	2018-05-18 19:25:43.000000000 +0200
@@ -1,3 +1,13 @@
+accerciser (3.22.0-2+deb9u1) stretch; urgency=medium
+
+  * Add patches/02_ipython5.patch to fix python console (Closes: #848119)
+  * Add patches/03_get_image.patch to fix accessing items without a compositor
+    (Closes: #875629)
+  * control: Add python3-xlib dependency.
+  * control: Add python3-xlib runtime dependency (Closes: #880735)
+
+ -- Samuel Thibault <sthibault@debian.org>  Fri, 18 May 2018 19:25:43 +0200
+
 accerciser (3.22.0-2) unstable; urgency=medium
 
   * Add missing Depends on gir1.2-glib-2.0 and gir1.2-rsvg-2.0.
diff -Nru accerciser-3.22.0/debian/control accerciser-3.22.0/debian/control
--- accerciser-3.22.0/debian/control	2016-11-09 14:05:38.000000000 +0100
+++ accerciser-3.22.0/debian/control	2018-05-18 19:25:43.000000000 +0200
@@ -17,6 +17,7 @@
                      libgtk-3-dev (>= 3.1.13),
                      pkg-config,
                      python3 (>= 3.2),
+                     python3-xlib,
                      python-gi-dev (>= 3.4.2),
                      python3-pyatspi2 (>= 2.5.2)
 X-Python3-Version: >= 3.2
@@ -39,6 +40,7 @@
          gir1.2-rsvg-2.0,
          gir1.2-wnck-3.0,
          python3-cairo,
+         python3-xlib,
          python3-pyatspi (>= 2.5.2)
 Description: interactive Python accessibility explorer for the GNOME desktop
  It uses AT-SPI to inspect and control widgets, allowing you to check if
diff -Nru accerciser-3.22.0/debian/control.in accerciser-3.22.0/debian/control.in
--- accerciser-3.22.0/debian/control.in	2016-11-09 14:03:25.000000000 +0100
+++ accerciser-3.22.0/debian/control.in	2018-05-18 19:24:04.000000000 +0200
@@ -13,6 +13,7 @@
                      libgtk-3-dev (>= 3.1.13),
                      pkg-config,
                      python3 (>= 3.2),
+                     python3-xlib,
                      python-gi-dev (>= 3.4.2),
                      python3-pyatspi2 (>= 2.5.2)
 X-Python3-Version: >= 3.2
@@ -35,6 +36,7 @@
          gir1.2-rsvg-2.0,
          gir1.2-wnck-3.0,
          python3-cairo,
+         python3-xlib,
          python3-pyatspi (>= 2.5.2)
 Description: interactive Python accessibility explorer for the GNOME desktop
  It uses AT-SPI to inspect and control widgets, allowing you to check if
diff -Nru accerciser-3.22.0/debian/patches/02_ipython5.patch accerciser-3.22.0/debian/patches/02_ipython5.patch
--- accerciser-3.22.0/debian/patches/02_ipython5.patch	1970-01-01 01:00:00.000000000 +0100
+++ accerciser-3.22.0/debian/patches/02_ipython5.patch	2018-05-18 19:21:45.000000000 +0200
@@ -0,0 +1,33 @@
+diff --git a/plugins/ipython_view.py b/plugins/ipython_view.py
+index 04f2d53..ae3d2be 100755
+--- a/plugins/ipython_view.py
++++ b/plugins/ipython_view.py
+@@ -125,7 +125,8 @@ class IterableIPShell:
+     self.complete_sep =  re.compile('[\s\{\}\[\]\(\)]')
+     self.updateNamespace({'exit':lambda:None})
+     self.updateNamespace({'quit':lambda:None})
+-    self.IP.readline_startup_hook(self.IP.pre_readline)
++    if parse_version(IPython.release.version) < parse_version("5.0.0"):
++      self.IP.readline_startup_hook(self.IP.pre_readline)
+     # Workaround for updating namespace with sys.modules
+     #
+     self.__update_namespace()
+@@ -208,13 +209,16 @@ class IterableIPShell:
+     # Backwards compatibility with ipyton-0.11
+     #
+     ver = IPython.__version__
+-    if '0.11' in ver:
++    if ver[0:4] == '0.11':
+         prompt = self.IP.hooks.generate_prompt(is_continuation)
+-    else:
++    elif parse_version(IPython.release.version) < parse_version("5.0.0"):
+         if is_continuation:
+             prompt = self.IP.prompt_manager.render('in2')
+         else:
+             prompt = self.IP.prompt_manager.render('in')
++    else:
++        # TODO: update to IPython 5.x and later
++        prompt = "In [%d]: " % self.IP.execution_count
+ 
+     return prompt
+ 
diff -Nru accerciser-3.22.0/debian/patches/03_get_image.patch accerciser-3.22.0/debian/patches/03_get_image.patch
--- accerciser-3.22.0/debian/patches/03_get_image.patch	1970-01-01 01:00:00.000000000 +0100
+++ accerciser-3.22.0/debian/patches/03_get_image.patch	2018-05-18 19:22:02.000000000 +0200
@@ -0,0 +1,74 @@
+---
+ src/lib/accerciser/node.py |   33 ++++++++++++++++-----------------
+ 1 file changed, 16 insertions(+), 17 deletions(-)
+
+--- a/src/lib/accerciser/node.py
++++ b/src/lib/accerciser/node.py
+@@ -24,6 +24,8 @@ import pyatspi
+ import string
+ from .tools import ToolsAccessor, parseColorString
+ 
++import Xlib, Xlib.display
++
+ MAX_BLINKS = 6
+ 
+ gsettings = GSettings.new('org.a11y.Accerciser')
+@@ -147,14 +149,11 @@ class Node(GObject.GObject, ToolsAccesso
+     self.max_blinks = times
+     self.blinks = 0
+     # get info for drawing higlight rectangles
+-    display = gdk.Display.get_default()
+-    screen = display.get_default_screen()
+-    self.root = screen.get_root_window()
+-    self.gc = self.root.new_gc()
+-    self.gc.set_subwindow(gdk.SubwindowMode.INCLUDE_INFERIORS)
+-    self.gc.set_function(gdk.Function.INVERT)
+-    self.gc.set_line_attributes(3, gdk.LineStyle.ON_OFF_DASH, \
+-                                gdk.CapStyle.BUTT, gdk.JoinStyle.MITER)
++    display = Xlib.display.Display()
++    screen = display.screen()
++    self.root = screen.root
++    self.gc = w.create_gc(subwindow_mode = Xlib.X.IncludeInferiors, function = Xlib.X.GXinvert)
++
+     self.inv = gtk.Invisible()
+     self.inv.set_screen(screen)
+     GLib.timeout_add(30, self._drawRectangle)
+@@ -167,7 +166,7 @@ class Node(GObject.GObject, ToolsAccesso
+     if self.blinks == 0:
+       self.inv.show()
+       self.inv.grab_add()
+-    self.root.draw_rectangle(self.gc, False, 
++    self.root.fill_rectangle(self.gc,
+                              self.extents.x,
+                              self.extents.y,
+                              self.extents.width,
+@@ -217,10 +216,10 @@ class _HighLight(gtk.Window):
+       screen = self.get_screen()
+       visual = screen.get_rgba_visual()
+       self.set_visual(visual)
+-    else:
+-      # Take a screenshot for compositing on the client side.
+-      self.root = gdk.get_default_root_window().get_image(
+-        self.x, self.y, self.w, self.h)
++    #else:
++    #   Take a screenshot for compositing on the client side.
++    #  self.root = gdk.get_default_root_window().get_image(
++    #    self.x, self.y, self.w, self.h)
+ 
+     # Place window, and resize it, and set proper properties.
+     self.set_app_paintable(True)
+@@ -265,10 +264,10 @@ class _HighLight(gtk.Window):
+     if not self._composited:
+       # Draw the screengrab of the underlaying window, and set the drawing
+       # operator to OVER.
+-      self.window.draw_image(self.style.black_gc, self.root,
+-                             event.area.x,event.area.y,
+-                             event.area.x, event.area.y,
+-                             event.area.width, event.area.height)
++      #self.window.draw_image(self.style.black_gc, self.root,
++      #                       event.area.x,event.area.y,
++      #                       event.area.x, event.area.y,
++      #                       event.area.width, event.area.height)
+       cairo_operator = cairo.OPERATOR_OVER
+     else:
+       cairo_operator = cairo.OPERATOR_SOURCE
diff -Nru accerciser-3.22.0/debian/patches/series accerciser-3.22.0/debian/patches/series
--- accerciser-3.22.0/debian/patches/series	2011-10-11 10:19:48.000000000 +0200
+++ accerciser-3.22.0/debian/patches/series	2018-05-18 19:22:02.000000000 +0200
@@ -1 +1,3 @@
 01_remove_site_package_version.patch
+02_ipython5.patch
+03_get_image.patch

Reply to: