Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
16c02d8b8c | ||
|
|
badd4dbc78 | ||
|
|
a63418aaac |
@@ -277,13 +277,8 @@ class AddonManager:
|
||||
|
||||
# Make sure module initialization happens after any pending task cancellations
|
||||
# due to module unloading.
|
||||
def _init_soon():
|
||||
cls._call_module_hooks(mod, "handle_init", cls.SESSION_MANAGER)
|
||||
if not cls._SUBPROCESS:
|
||||
for session in cls.SESSION_MANAGER.sessions:
|
||||
with addon_ctx.push(new_session=session):
|
||||
cls._call_module_hooks(mod, "handle_session_init", session)
|
||||
asyncio.get_event_loop().call_soon(_init_soon)
|
||||
|
||||
asyncio.get_event_loop().call_soon(cls._init_module, mod)
|
||||
except Exception as e:
|
||||
if had_mod:
|
||||
logging.exception("Exploded trying to reload addon %s" % spec.name)
|
||||
@@ -299,6 +294,14 @@ class AddonManager:
|
||||
if raise_exceptions and load_exception is not None:
|
||||
raise load_exception
|
||||
|
||||
@classmethod
|
||||
def _init_module(cls, mod: ModuleType):
|
||||
cls._call_module_hooks(mod, "handle_init", cls.SESSION_MANAGER)
|
||||
if not cls._SUBPROCESS:
|
||||
for session in cls.SESSION_MANAGER.sessions:
|
||||
with addon_ctx.push(new_session=session):
|
||||
cls._call_module_hooks(mod, "handle_session_init", session)
|
||||
|
||||
@classmethod
|
||||
def _unload_module(cls, old_mod: ModuleType):
|
||||
cls._call_module_hooks(old_mod, "handle_unload", cls.SESSION_MANAGER)
|
||||
|
||||
4
setup.py
4
setup.py
@@ -25,7 +25,7 @@ from setuptools import setup, find_packages
|
||||
|
||||
here = path.abspath(path.dirname(__file__))
|
||||
|
||||
version = '0.2'
|
||||
version = '0.2.1'
|
||||
|
||||
with open(path.join(here, 'README.md')) as readme_fh:
|
||||
readme = readme_fh.read()
|
||||
@@ -93,7 +93,7 @@ setup(
|
||||
'Glymur<1.0',
|
||||
'numpy<2.0',
|
||||
# These could be in extras_require if you don't want a GUI.
|
||||
'pyside2',
|
||||
'pyside2<6.0',
|
||||
'qasync',
|
||||
],
|
||||
tests_require=[
|
||||
|
||||
Reference in New Issue
Block a user