Skip to content

mikro.py: Add support for private sip module

PyQt5 packages on PyPI use a private copy of sip runtime module, called PyQt5.sip, since July 2018.

ArchLinux and Fedora are already using the new name; in Debian we are going to switch to it soon.

Some work to support this was done in 858f19a8, however two files are still using import sip:

  • plugins/extensions/pykrita/plugin/krita/attic/mikro.py which I am fixing here.

  • plugins/extensions/pykrita/plugin/utilities.cpp — a comment says it's fine so I am leaving it as is. However maybe that code should be wrapped into #ifndef IS_PY3K block to avoid useless warnings? Currently the following warning is printed when starting Krita:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ModuleNotFoundError: No module named 'sip'

In the next MR I am planning to add support for SIP v5.

Test Plan

(Tell us how to test the changes you made.)

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
    • I did not find any relevant unit tests. However this change should not break anything.
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.

Merge request reports

Loading