pythonqt
pythonqt copied to clipboard
Update __spec__ too (if existing) when setting the import path
This change avoids a warning message "package != spec.parent" (in Python 3.9) on relative imports from modules which have the import paths set with PythonQt::self()->setModuleImportPath(). Since spec is meant to replicate some settings like path, this seems the correct solution.