From 1dddbe95e6526259b6655e19f8b6280d6107a395 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 20 Nov 2021 15:06:05 +0530 Subject: [PATCH] Redirect PyQt5 imports to PyQt6 --- src/calibre/constants.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/constants.py b/src/calibre/constants.py index 5646bdd20a..38a75eb119 100644 --- a/src/calibre/constants.py +++ b/src/calibre/constants.py @@ -203,6 +203,9 @@ class DeVendor: return find_spec('feedparser') if fullname.startswith('calibre.ebooks.markdown'): return ModuleSpec(fullname, DeVendorLoader(fullname[len('calibre.ebooks.'):])) + if fullname.startswith('PyQt5.'): + # this is present for third party plugin compat + return ModuleSpec(fullname, DeVendorLoader('qt.webengine' if 'QWebEngine' in fullname else 'qt.core')) class ExtensionsPackageLoader: