Your message dated Sat, 26 Apr 2014 09:57:09 +0000
with message-id <[email protected]>
and subject line Bug#745867: Removed package(s) from unstable
has caused the Debian Bug report #628484,
regarding python-xpcom: 'print' method from nsIWebBrowserPrint doesn't work 
because it triggers a syntax error
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
628484: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=628484
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: python-xpcom
Version: 1:0.0~hg20100212-5+1
Severity: normal


When trying to access the 'print' method of the nsIWebBrowserPrint
interface, python-xpcom generates Python code on the fly and fails to
evaluate it because 'print' is a reserved keyword in Python:

(sugar-jhbuild1)sascha.silbe@twin:~$ ./print-bug.py
returning /tmp/prefs.js for key NS_APP_PREFS_50_FILE
GConf Error: Failed to contact configuration server; the most common cause is a 
missing or misconfigured D-Bus session bus daemon. See 
http://projects.gnome.org/gconf/ for information. (Details -  1: Server ping 
error: IDL:omg.org/CORBA/COMM_FAILURE:1.0)
Traceback (most recent call last):
  File "./print-bug.py", line 20, in _save_pdf
    getattr(print_iface, 'print')
  File "/usr/lib/pymodules/python2.6/xpcom/client/__init__.py", line 374, in 
__getattr__
    return getattr(interface, attr)
  File "/usr/lib/pymodules/python2.6/xpcom/client/__init__.py", line 466, in 
__getattr__
    unbound_method = BuildMethod(method_info, self._iid_)
  File "/usr/lib/pymodules/python2.6/xpcom/client/__init__.py", line 125, in 
BuildMethod
    codeObject = compile(method_code, "<XPCOMObject method '%s'>" % (name,), 
"exec")
  File "<XPCOMObject method 'print'>", line 2
    def print(self, Param1, Param2):
            ^
SyntaxError: invalid syntax


print-bug.py is attached.

In case anyone else gets stuck on the issue, here is how I worked around it:

        try:
            print_method = getattr(print_iface, 'print')
        except SyntaxError:
            # HACK: Run-time patch python-xpcom to work around a bug.
            # 'print' is a reserved keyword, so it must not occur in generated
            # code.
            iid = interfaces.nsIWebBrowserPrint
            internal_interface = print_iface.__dict__['_interfaces_'][iid]
            info = internal_interface.__dict__['_method_infos_']['print']
            info.name = 'print_'
            print_method = getattr(print_iface, 'print')


-- System Information:
Debian Release: 6.0.1
  APT prefers stable
  APT policy: (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python-xpcom depends on:
ii  libc6                   2.11.2-10        Embedded GNU C Library: Shared lib
ii  libnspr4-0d             4.8.6-1          NetScape Portable Runtime Library
ii  libpython2.6            2.6.6-8+b1       Shared Python runtime library (ver
ii  libstdc++6              4.4.5-8          The GNU Standard C++ Library v3
ii  python                  2.6.6-3+squeeze6 interactive high-level object-orie
ii  python-support          1.0.10           automated rebuilding support for P
ii  xulrunner-1.9.2         1.9.2.13-2       XUL + XPCOM application runner

python-xpcom recommends no packages.

python-xpcom suggests no packages.

-- no debconf information
#!/usr/bin/env python
import gobject
import gtk
import hulahop.webview
import xpcom.components

hulahop.startup('/tmp')


class Browser(hulahop.webview.WebView):
    def do_setup(self):
        hulahop.webview.WebView.do_setup(self)
        gobject.timeout_add(3, self._save_pdf)

    def _save_pdf(self):
        cls = xpcom.components.classes['@mozilla.org/gfx/printsettings-service;1']
        setting_service = cls.getService(xpcom.components.interfaces.nsIPrintSettingsService)
        req = self.get_dom_window().QueryInterface(xpcom.components.interfaces.nsIInterfaceRequestor)
        print_iface = req.getInterface(xpcom.components.interfaces.nsIWebBrowserPrint)
        getattr(print_iface, 'print')


browser = Browser()
browser.show()
main_window = gtk.Window()
main_window.add(browser)
main_window.show()
browser.load_uri('http://www.sugarlabs.org/')
gtk.main()

--- End Message ---
--- Begin Message ---
Version: 1:9.0~hg20111212-2+rm

Dear submitter,

as the package pyxpcom has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/745867

The version of this package that was in Debian prior to this removal
can still be found using http://snapshot.debian.org/.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
[email protected].

Debian distribution maintenance software
pp.
Ansgar Burchardt (the ftpmaster behind the curtain)

--- End Message ---

Reply via email to