You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be useful to have a shutdown() function in pygeodiff that would force unload of the loaded dynamic library using ctypes. This would help especially on Windows, where the .pyd file gets write-protected when it gets loaded, and then QGIS plugin manager is unable to upgrade/reinstall Mergin Maps plugin, because it is not possible to delete the .pyd file. Having the shutdown() function would allow us to use it in plugin's unload() handler to remove the write protection lock.
As a part of this, it would be good to do a bit of code refactor: GeoDiffLib class now handles both library loading and handling of context. We should separate those, because the library can be loaded just once, but there may be multiple contexts (with different logging setups). The library (ctypes.CDLL instance) could be stored at the module level and lazy-loaded.
The text was updated successfully, but these errors were encountered:
It would be useful to have a
shutdown()
function in pygeodiff that would force unload of the loaded dynamic library using ctypes. This would help especially on Windows, where the .pyd file gets write-protected when it gets loaded, and then QGIS plugin manager is unable to upgrade/reinstall Mergin Maps plugin, because it is not possible to delete the .pyd file. Having theshutdown()
function would allow us to use it in plugin's unload() handler to remove the write protection lock.This works fine on Windows to release the lock:
As a part of this, it would be good to do a bit of code refactor:
GeoDiffLib
class now handles both library loading and handling of context. We should separate those, because the library can be loaded just once, but there may be multiple contexts (with different logging setups). The library (ctypes.CDLL
instance) could be stored at the module level and lazy-loaded.The text was updated successfully, but these errors were encountered: