Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP5:Update
ibus.9860
ibus-python3-migration.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File ibus-python3-migration.patch of Package ibus.9860
diff -urN ibus-1.5.8/ibus/attribute.py ibus-1.5.8.py3/ibus/attribute.py --- ibus-1.5.8/ibus/attribute.py 2014-07-24 12:24:25.000000000 +0800 +++ ibus-1.5.8.py3/ibus/attribute.py 2014-08-31 01:37:40.226988785 +0800 @@ -38,8 +38,8 @@ ) import dbus -from exception import IBusException -from serializable import * +from ibus.exception import IBusException +from ibus.serializable import * ATTR_TYPE_UNDERLINE = 1 ATTR_TYPE_FOREGROUND = 2 diff -urN ibus-1.5.8/ibus/bus.py ibus-1.5.8.py3/ibus/bus.py --- ibus-1.5.8/ibus/bus.py 2014-07-24 12:24:25.000000000 +0800 +++ ibus-1.5.8.py3/ibus/bus.py 2014-08-31 01:37:40.231988723 +0800 @@ -29,10 +29,10 @@ import dbus.connection import dbus.mainloop.glib import gobject -import common -import object -import serializable -import config +from ibus import common +from ibus import object +from ibus import serializable +from ibus import config dbus.mainloop.glib.DBusGMainLoop(set_as_default = True) @@ -74,9 +74,9 @@ def __filter_cb(self, conn, message): if message.get_type() == 4: - print "Signal %s" % message.get_member() - print " sender = %s" % message.get_sender() - print " path = %s" % message.get_path() + print("Signal %s" % message.get_member()) + print(" sender = %s" % message.get_sender()) + print(" path = %s" % message.get_path()) return dbus.lowlevel.HANDLER_RESULT_NOT_YET_HANDLED def __dbusconn_disconnected_cb(self, dbusconn): @@ -188,19 +188,19 @@ mainloop = glib.MainLoop() def __disconnected_cb(*args): - print "Disconnected", args + print("Disconnected", args) mainloop.quit() b = Bus() b.connect("disconnected", __disconnected_cb) - print "unique_name =", b.get_name() + print("unique_name =", b.get_name()) for i in b.list_factories(): - print i.name + print(i.name) mainloop.run() - print "Exit" + print("Exit") if __name__ == "__main__": diff -urN ibus-1.5.8/ibus/common.py ibus-1.5.8.py3/ibus/common.py --- ibus-1.5.8/ibus/common.py 2014-07-24 12:24:25.000000000 +0800 +++ ibus-1.5.8.py3/ibus/common.py 2014-08-31 01:37:40.231988723 +0800 @@ -59,7 +59,7 @@ import sys #from xdg import BaseDirectory import ctypes -import _config +from ibus import _config # __display = os.environ["DISPLAY"] # __hostname, __display_screen = __display.split(":", 1) diff -urN ibus-1.5.8/ibus/component.py ibus-1.5.8.py3/ibus/component.py --- ibus-1.5.8/ibus/component.py 2014-07-24 12:24:25.000000000 +0800 +++ ibus-1.5.8.py3/ibus/component.py 2014-08-31 01:37:40.228988760 +0800 @@ -25,10 +25,10 @@ ) import dbus -from exception import IBusException -from serializable import * -from enginedesc import * -from observedpath import * +from ibus.exception import IBusException +from ibus.serializable import * +from ibus.enginedesc import * +from ibus.observedpath import * class Component(Serializable): __gtype_name__ = "PYIBusComponent" diff -urN ibus-1.5.8/ibus/config.py ibus-1.5.8.py3/ibus/config.py --- ibus-1.5.8/ibus/config.py 2014-07-24 12:24:25.000000000 +0800 +++ ibus-1.5.8.py3/ibus/config.py 2014-08-31 01:37:40.228988760 +0800 @@ -30,8 +30,8 @@ IBUS_PATH_CONFIG = "/org/freedesktop/IBus/Config" import gobject -import object -import interface +from ibus import object +from ibus import interface import dbus from dbus.proxies import ProxyObject diff -urN ibus-1.5.8/ibus/_config.py.in ibus-1.5.8.py3/ibus/_config.py.in --- ibus-1.5.8/ibus/_config.py.in 2014-07-24 12:24:25.000000000 +0800 +++ ibus-1.5.8.py3/ibus/_config.py.in 2014-08-31 01:37:40.231988723 +0800 @@ -32,10 +32,10 @@ import gettext -_ = lambda a: gettext.dgettext("@GETTEXT_PACKAGE@", a) +_ = lambda a: gettext.dgettext("ibus10", a) def get_version(): - return '@PACKAGE_VERSION@' + return '1.5.8' def get_copyright(): return _('''Copyright (c) 2007-2010 Peng Huang @@ -46,7 +46,7 @@ def get_ICON_KEYBOARD(): import gtk - icon = '@IBUS_ICON_KEYBOARD@' + icon = 'ibus-keyboard' fallback_icon = 'ibus-keyboard' settings = gtk.settings_get_default() if settings.get_property('gtk-icon-theme-name') != 'gnome': @@ -56,5 +56,5 @@ return fallback_icon return icon -LIBIBUS_SONAME='libibus-@IBUS_API_VERSION@.so.@LT_CURRENT_MINUS_AGE@' -ISOCODES_PREFIX='@ISOCODES_PREFIX@' +LIBIBUS_SONAME='libibus-1.0.so.5' +ISOCODES_PREFIX='/usr' diff -urN ibus-1.5.8/ibus/enginedesc.py ibus-1.5.8.py3/ibus/enginedesc.py --- ibus-1.5.8/ibus/enginedesc.py 2014-07-24 12:24:25.000000000 +0800 +++ ibus-1.5.8.py3/ibus/enginedesc.py 2014-08-31 01:37:40.231988723 +0800 @@ -25,8 +25,8 @@ ) import dbus -from exception import IBusException -from serializable import * +from ibus.exception import IBusException +from ibus.serializable import * class EngineDesc(Serializable): __gtype_name__ = "PYIBusEngineDesc" diff -urN ibus-1.5.8/ibus/engine.py ibus-1.5.8.py3/ibus/engine.py --- ibus-1.5.8/ibus/engine.py 2014-07-24 12:24:25.000000000 +0800 +++ ibus-1.5.8.py3/ibus/engine.py 2014-08-31 01:37:40.231988723 +0800 @@ -24,11 +24,11 @@ "EngineBase", ) -import common -import object -import serializable -import interface -from text import Text +from ibus import common +from ibus import object +from ibus import serializable +from ibus import interface +from ibus.text import Text class EngineBase(object.Object): def __init__(self, bus, object_path): diff -urN ibus-1.5.8/ibus/factory.py ibus-1.5.8.py3/ibus/factory.py --- ibus-1.5.8/ibus/factory.py 2014-07-24 12:24:25.000000000 +0800 +++ ibus-1.5.8.py3/ibus/factory.py 2014-08-31 01:37:40.228988760 +0800 @@ -25,10 +25,10 @@ "FactoryInfo" ) import dbus -import object -import interface -from serializable import * -from exception import * +from ibus import object +from ibus import interface +from ibus.serializable import * +from ibus.exception import * class EngineFactoryBase(object.Object): def __init__(self, bus): diff -urN ibus-1.5.8/ibus/__init__.py ibus-1.5.8.py3/ibus/__init__.py --- ibus-1.5.8/ibus/__init__.py 2014-07-24 12:24:25.000000000 +0800 +++ ibus-1.5.8.py3/ibus/__init__.py 2014-08-31 01:37:40.228988760 +0800 @@ -24,25 +24,25 @@ warnings.warn("The ibus module is deprecated; " "Please use gobject-introspection instead", DeprecationWarning) -from object import * -from attribute import * -from property import * -from common import * -from interface import * -from exception import * -from lookuptable import * -from bus import * -from inputcontext import * -from lang import * -from utility import * -from engine import * -from factory import * -from panel import * -from notifications import * -from config import * -from serializable import * -from text import * -from observedpath import * -from enginedesc import * -from component import * -from _config import * +from ibus.object import * +from ibus.attribute import * +from ibus.property import * +from ibus.common import * +from ibus.interface import * +from ibus.exception import * +from ibus.lookuptable import * +from ibus.bus import * +from ibus.inputcontext import * +from ibus.lang import * +from ibus.utility import * +from ibus.engine import * +from ibus.factory import * +from ibus.panel import * +from ibus.notifications import * +from ibus.config import * +from ibus.serializable import * +from ibus.text import * +from ibus.observedpath import * +from ibus.enginedesc import * +from ibus.component import * +from ibus._config import * diff -urN ibus-1.5.8/ibus/inputcontext.py ibus-1.5.8.py3/ibus/inputcontext.py --- ibus-1.5.8/ibus/inputcontext.py 2014-07-24 12:24:25.000000000 +0800 +++ ibus-1.5.8.py3/ibus/inputcontext.py 2014-08-31 01:37:40.228988760 +0800 @@ -28,10 +28,10 @@ import gobject import dbus import dbus.lowlevel -import object -import common -import serializable -from text import Text +from ibus import object +from ibus import common +from ibus import serializable +from ibus.text import Text class InputContext(object.Object): __gtype_name__ = "PYIBusInputContext" @@ -286,10 +286,10 @@ super(TestWindow,self).__init__() self.__bus = Bus() - print self.__bus.get_name() + print(self.__bus.get_name()) self.__bus.connect("disconnected", gtk.main_quit) context_path = self.__bus.create_input_context("Test") - print context_path + print(context_path) self.__context = InputContext(self.__bus, context_path) self.__context.set_capabilities (9) @@ -310,22 +310,22 @@ self.show_all() def __commit_text_cb(self, context, text): - print "commit-text:", text.text + print("commit-text:", text.text) def __update_preedit_text_cb(self, context, text, cursor_pos, visible): - print "preedit-text:", text.text, cursor_pos, visible + print("preedit-text:", text.text, cursor_pos, visible) def __show_preedit_text_cb(self, context): - print "show-preedit-text" + print("show-preedit-text") def __hide_preedit_text_cb(self, context): - print "hide-preedit-text" + print("hide-preedit-text") def __update_auxiliary_text_cb(self, context, text, visible): - print "auxiliary-text:", text.text, visible + print("auxiliary-text:", text.text, visible) def __update_lookup_table_cb(self, context, table, visible): - print "update-lookup-table:", visible + print("update-lookup-table:", visible) def __key_press_event_cb(self, widget, event): self.__context.process_key_event(event.keyval, event.state) diff -urN ibus-1.5.8/ibus/interface/__init__.py ibus-1.5.8.py3/ibus/interface/__init__.py --- ibus-1.5.8/ibus/interface/__init__.py 2014-07-24 12:24:25.000000000 +0800 +++ ibus-1.5.8.py3/ibus/interface/__init__.py 2014-08-31 01:37:40.226988785 +0800 @@ -20,10 +20,10 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 # USA -from iibus import * -from iinputcontext import * -from iengine import * -from ienginefactory import * -from ipanel import * -from iconfig import * -from inotifications import * +from ibus.interface.iibus import * +from ibus.interface.iinputcontext import * +from ibus.interface.iengine import * +from ibus.interface.ienginefactory import * +from ibus.interface.ipanel import * +from ibus.interface.iconfig import * +from ibus.interface.inotifications import * diff -urN ibus-1.5.8/ibus/lang.py ibus-1.5.8.py3/ibus/lang.py --- ibus-1.5.8/ibus/lang.py 2014-07-24 12:24:25.000000000 +0800 +++ ibus-1.5.8.py3/ibus/lang.py 2014-08-31 01:37:40.228988760 +0800 @@ -61,18 +61,18 @@ def __load_lang(): import os - import _config + from ibus import _config iso_639_xml = os.path.join(_config.ISOCODES_PREFIX, "share/xml/iso-codes/iso_639.xml") p = xml.parsers.expat.ParserCreate() p.StartElementHandler = __start_element p.EndElementHandler = __end_element p.CharacterDataHandler = __char_data - p.ParseFile(file(iso_639_xml)) + p.ParseFile(open(iso_639_xml,"rb")) __load_lang() if __name__ == "__main__": - print get_language_name("mai") - print get_language_name("zh") - print get_language_name("ja") - print get_language_name("ko") + print(get_language_name("mai")) + print(get_language_name("zh")) + print(get_language_name("ja")) + print(get_language_name("ko")) diff -urN ibus-1.5.8/ibus/lookuptable.py ibus-1.5.8.py3/ibus/lookuptable.py --- ibus-1.5.8/ibus/lookuptable.py 2014-07-24 12:24:25.000000000 +0800 +++ ibus-1.5.8.py3/ibus/lookuptable.py 2014-08-31 01:37:40.231988723 +0800 @@ -25,9 +25,9 @@ ) import dbus -from common import * -from serializable import * -from exception import * +from ibus.common import * +from ibus.serializable import * +from ibus.exception import * class LookupTable(Serializable): __gtype_name__ = "PYIBusLookupTable" diff -urN ibus-1.5.8/ibus/observedpath.py ibus-1.5.8.py3/ibus/observedpath.py --- ibus-1.5.8/ibus/observedpath.py 2014-07-24 12:24:25.000000000 +0800 +++ ibus-1.5.8.py3/ibus/observedpath.py 2014-08-31 01:37:40.228988760 +0800 @@ -25,8 +25,8 @@ ) import dbus -from exception import IBusException -from serializable import * +from ibus.exception import IBusException +from ibus.serializable import * class ObservedPath(Serializable): __gtype_name__ = "PYIBusObservedPath" diff -urN ibus-1.5.8/ibus/panel.py ibus-1.5.8.py3/ibus/panel.py --- ibus-1.5.8/ibus/panel.py 2014-07-24 12:24:25.000000000 +0800 +++ ibus-1.5.8.py3/ibus/panel.py 2014-08-31 01:37:40.232988710 +0800 @@ -33,9 +33,9 @@ IBUS_SERVICE_PANEL = "org.freedesktop.IBus.Panel" IBUS_PATH_PANEL = "/org/freedesktop/IBus/Panel" -from serializable import * -from object import Object -import interface +from ibus.serializable import * +from ibus.object import Object +from ibus import interface import dbus class PanelItem: @@ -268,19 +268,19 @@ self.__bus.request_name(IBUS_SERVICE_PANEL, 0) def focus_in(self, ic): - print "focus-in:", ic + print("focus-in:", ic) context = InputContext(self.__bus, ic) info = context.get_factory_info() - print "factory:", info.name + print("factory:", info.name) def focus_out(self, ic): - print "focus-out:", ic + print("focus-out:", ic) def update_auxiliary_text(self, text, visible): - print "update-auxiliary-text:", text.text + print("update-auxiliary-text:", text.text) def update_lookup_table(self, table, visible): - print "update-lookup-table", table + print("update-lookup-table", table) panel = TestPanel() gtk.main() diff -urN ibus-1.5.8/ibus/property.py ibus-1.5.8.py3/ibus/property.py --- ibus-1.5.8/ibus/property.py 2014-07-24 12:24:25.000000000 +0800 +++ ibus-1.5.8.py3/ibus/property.py 2014-08-31 01:37:40.231988723 +0800 @@ -34,8 +34,8 @@ ) import dbus -from text import Text -from serializable import * +from ibus.text import Text +from ibus.serializable import * PROP_TYPE_NORMAL = 0 PROP_TYPE_TOGGLE = 1 @@ -239,7 +239,7 @@ props.append(Property(u"d")) value = serialize_object(props) props = deserialize_object(value) - print props + print(props) if __name__ == "__main__": test() diff -urN ibus-1.5.8/ibus/serializable.py ibus-1.5.8.py3/ibus/serializable.py --- ibus-1.5.8/ibus/serializable.py 2014-07-24 12:24:25.000000000 +0800 +++ ibus-1.5.8.py3/ibus/serializable.py 2014-08-31 01:37:40.232988710 +0800 @@ -26,7 +26,7 @@ "deserialize_object", ) -from object import Object +from ibus.object import Object import dbus import gobject diff -urN ibus-1.5.8/ibus/text.py ibus-1.5.8.py3/ibus/text.py --- ibus-1.5.8/ibus/text.py 2014-07-24 12:24:25.000000000 +0800 +++ ibus-1.5.8.py3/ibus/text.py 2014-08-31 01:37:40.226988785 +0800 @@ -25,9 +25,9 @@ ) import dbus -from exception import IBusException -from serializable import * -from attribute import AttrList +from ibus.exception import IBusException +from ibus.serializable import * +from ibus.attribute import AttrList class Text(Serializable): __gtype_name__ = "PYIBusText"
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor