[Python-modules-team] Bug#459076: python-sympy: fails to initialize atoms in xlib code

Bernhard R. Link brlink at debian.org
Fri Jan 4 11:51:23 UTC 2008


Package: python-sympy
Version: 0.5.9-1
Severity: normal
Tags: patch

The xlib code used when plotting fails when an atom (here _NET_WM_NAME)
was not yet interned into the X server. There are two fixes: only
setting them when they exist, or interning the atom to set it.

I don't know which of those is better, but the following patch
implements the second possibility and allows isympy to open
a plot window here:

diff -rup sympy-0.5.9.unpatched/sympy/plotting/pyglet/window/xlib/__init__.py sympy-0.5.9/sympy/plotting/pyglet/window/xlib/__init__.py
--- sympy-0.5.9.unpatched/sympy/plotting/pyglet/window/xlib/__init__.py	2007-12-21 23:00:48.000000000 +0100
+++ sympy-0.5.9/sympy/plotting/pyglet/window/xlib/__init__.py	2008-01-04 12:42:32.000000000 +0100
@@ -912,7 +912,7 @@ class XlibWindow(BaseWindow):
         xlib.XSetWMNormalHints(self._x_display, self._window, byref(hints))
 
     def _set_text_property(self, name, value, allow_utf8=True):
-        atom = xlib.XInternAtom(self._x_display, name, True)
+        atom = xlib.XInternAtom(self._x_display, name, False)
         if not atom:
             raise XlibException('Undefined atom "%s"' % name)
         assert type(value) in (str, unicode)


-- System Information:
Debian Release: 4.0
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Locale: LANG=de_DE at euro, LC_CTYPE=de_DE at euro (charmap=ISO-8859-15)

Versions of packages python-sympy depends on:
ii  python                        2.4.4-2    An interactive high-level object-o
ii  python-support                0.5.6      automated rebuilding support for p

Versions of packages python-sympy recommends:
pn  libgtkmathview-bin            <none>     (no description available)
ii  python-ctypes                 1.0.0-1.1  Python package to create and manip
pn  python-imaging                <none>     (no description available)
pn  python-opengl                 <none>     (no description available)

-- no debconf information

Hochachtungsvoll,
	Bernhard R. Link
-- 
"Never contain programs so few bugs, as when no debugging tools are available!"
	Niklaus Wirth





More information about the Python-modules-team mailing list