mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Remove workarounds for zipimport threading bug
No longer needed as the new bypy freezing code does not use zipimport
This commit is contained in:
parent
fe478a2cee
commit
06a48034db
@ -393,10 +393,6 @@ def identify(log, abort, # {{{
|
||||
log('The log from individual plugins is below')
|
||||
|
||||
workers = [Worker(p, kwargs, abort) for p in plugins]
|
||||
# Ensure Browser is imported to workaround threading bugs in zipimport on
|
||||
# Windows
|
||||
from calibre import browser
|
||||
browser()
|
||||
for w in workers:
|
||||
w.start()
|
||||
|
||||
|
@ -103,12 +103,6 @@ def cap_path(data):
|
||||
return r'Software\calibre\%s\Capabilities' % data['capability_name']
|
||||
|
||||
|
||||
def pre_import_extensions():
|
||||
for program in default_programs():
|
||||
ext_map = {ext.lower():guess_type('file.' + ext.lower())[0] for ext in extensions(program)}
|
||||
ext_map = {ext:mt for ext, mt in iteritems(ext_map) if mt}
|
||||
|
||||
|
||||
def register():
|
||||
base = os.path.dirname(sys.executable)
|
||||
|
||||
@ -167,14 +161,9 @@ class Register(Thread):
|
||||
def __init__(self, prefs):
|
||||
Thread.__init__(self, name='RegisterDP')
|
||||
self.prefs = prefs
|
||||
pre_import_extensions()
|
||||
self.start()
|
||||
|
||||
def run(self):
|
||||
# make sure no imports happen in this thread as python's zipimport
|
||||
# machinery is not thread safe and main GUI importing is happening
|
||||
# in parallel
|
||||
# https://bugs.python.org/issue38884
|
||||
try:
|
||||
self.do_register()
|
||||
except Exception:
|
||||
|
Loading…
x
Reference in New Issue
Block a user