Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove psyco support. #3205

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions bin/virtaal
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,6 @@ def main(argv):
parser.error(_("Could not open profile file '%(filename)s'") % {"filename":options.profile})

def default_runner(startup_file):
if not pan_app.DEBUG:
try:
import psyco
psyco.full()
except Exception:
pass
run_virtaal(startup_file)

if options and getattr(options, "profile", None) != None:
Expand Down
1 change: 0 additions & 1 deletion docs/building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ Optional Packages

These are not build dependencies but usually improve the user experience.

- psyco -- provides a nice speedup
- Enchant, pyenchant, gtkspell and pygtkspell (might be packaged as
gnome-python-extras or something similar) -- provides all :doc:`spell
checking <spell_checking>` functionality. For Windows:
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ def add_win32_options(options):
"dist_dir": "virtaal-win32",
"includes": [
# some of these are needed by plugins and are therefore not detected
"lxml", "lxml._elementpath", "psyco", "cairo", "pango",
"lxml", "lxml._elementpath", "cairo", "pango",
"pangocairo", "atk", "gobject", "gtk.keysyms",
"gtkspell",
"gio", # needed for gtk.Builder
Expand Down Expand Up @@ -533,7 +533,7 @@ def add_mac_options(options):
"options": {
"py2app": {
"packages": ["CoreFoundation", "objc"],
"includes": ["lxml", "lxml._elementpath", "lxml.etree", "glib", "gio", "psyco", "cairo", "pango", "pangocairo", "atk", "gobject", "gtk.keysyms", "pycurl", "translate.services", "translate.services.tmclient", "translate.services.opentranclient", "CoreFoundation"],
"includes": ["lxml", "lxml._elementpath", "lxml.etree", "glib", "gio", "cairo", "pango", "pangocairo", "atk", "gobject", "gtk.keysyms", "pycurl", "translate.services", "translate.services.tmclient", "translate.services.opentranclient", "CoreFoundation"],
#"semi_standalone": True,
"compressed": True,
"argv_emulation": True,
Expand Down
17 changes: 1 addition & 16 deletions virtaal/plugins/spellchecker.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,6 @@
from virtaal.common import pan_app
from virtaal.controllers.baseplugin import PluginUnsupported, BasePlugin

if not pan_app.DEBUG:
try:
import psyco
except:
psyco = None
else:
psyco = None

_dict_add_re = re.compile('Add "(.*)" to Dictionary')


Expand Down Expand Up @@ -243,8 +235,6 @@ def _disable_checking(self, text_view):
if not spell is None:
spell.detach()
text_view.spell_lang = None
if psyco:
psyco.cannotcompile(_disable_checking)


# SIGNAL HANDLERS #
Expand Down Expand Up @@ -298,8 +288,7 @@ def _on_unit_lang_changed(self, unit_view, text_view, language):
gobject.idle_add(self._activate_checker, text_view, language, priority=gobject.PRIORITY_LOW)

def _activate_checker(self, text_view, language):
# All the expensive stuff in here called on idle. We mush also isolate
# this away from psyco
# All the expensive stuff in here called on idle
try:
spell = None
try:
Expand All @@ -319,10 +308,6 @@ def _activate_checker(self, text_view, language):
logging.exception("Could not initialize spell checking: %s", e)
self.gtkspell = None
#TODO: unload plugin
if psyco:
# Some of the gtkspell stuff can't work with psyco and will dump core
# if we don't avoid psyco compilation
psyco.cannotcompile(_activate_checker)

def _on_populate_popup(self, textbox, menu):
# We can't work with the menu immediately, since gtkspell only adds its
Expand Down