Redirect PyQt5 imports to PyQt6

This commit is contained in:
Kovid Goyal 2021-11-20 15:06:05 +05:30
parent f56d0b5ec0
commit 1dddbe95e6
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -203,6 +203,9 @@ class DeVendor:
return find_spec('feedparser') return find_spec('feedparser')
if fullname.startswith('calibre.ebooks.markdown'): if fullname.startswith('calibre.ebooks.markdown'):
return ModuleSpec(fullname, DeVendorLoader(fullname[len('calibre.ebooks.'):])) 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: class ExtensionsPackageLoader: