-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix failing CI by using PySide6 in all of our dev environments #333
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deeplow
reviewed
Feb 7, 2023
Other than the above comment, this LGTM. ✔️ |
deeplow
approved these changes
Feb 7, 2023
deeplow
approved these changes
Feb 7, 2023
apyrgio
force-pushed
the
330-pyside6
branch
2 times, most recently
from
February 7, 2023 15:07
a75eea0
to
9b72a57
Compare
Remove a Poetry version pin to 1.2.2, which causes installation issues on systems with Python 3.11. The pin was originally introduced because Poetry 1.3 was deemed unstable, due to the following bugs: * #292 (comment) * https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1029156 The first problem still stands, but we can circumvent it with the `--no-ansi` flag, at no functionality cost. The second problem has been resolved, but it never affected Ubuntu Focal in the first place. Refs #292
Add libqt5gui5 as a test dependency in the 'convert-test-docs' step. This package brings several other Qt and graphics libraries, which are the ones that we actually require to run the tests *with PySide6*. Else, we encounter this error: ``` Traceback (most recent call last): File "/home/circleci/project/dangerzone/gui/__init__.py", line 19, in <module> from PySide6 import QtCore, QtGui, QtWidgets ImportError: libEGL.so.1: cannot open shared object file: No such file or directory ``` Note that the same package is not required when importing PySide2.QtGui, which is why we hadn't encountered this issue before. Also, in the rest of our environments, we explicitly install libqt5gui5, in order to run the Dangerzone GUI.
apyrgio
force-pushed
the
330-pyside6
branch
3 times, most recently
from
February 7, 2023 16:05
9347f8e
to
86b2948
Compare
Fix an issue in our PyTest wrapper, that caused this recursion error: ``` File "shibokensupport/signature/loader.py", line 61, in feature_importedgc File "shibokensupport/feature.py", line 137, in feature_importedgc File "shibokensupport/feature.py", line 148, in _mod_uses_pysidegc File "/usr/lib/python3.10/inspect.py", line 1147, in getsourcegc lines, lnum = getsourcelines(object)gc File "/usr/lib/python3.10/inspect.py", line 1129, in getsourcelinesgc lines, lnum = findsource(object)gc File "/usr/lib/python3.10/inspect.py", line 954, in findsourcegc lines = linecache.getlines(file, module.__dict__)gc File "/home/user/.cache/pypoetry/virtualenvs/dangerzone-hQU0mwlP-py3.10/lib/python3.10/site-packages/py/_vendored_packages/apipkg/__init__.py", line 177, in __dict__gc self.__makeattr(name)gc File "/home/user/.cache/pypoetry/virtualenvs/dangerzone-hQU0mwlP-py3.10/lib/python3.10/site-packages/py/_vendored_packages/apipkg/__init__.py", line 157, in __makeattrgc result = importobj(modpath, attrname)gc File "/home/user/.cache/pypoetry/virtualenvs/dangerzone-hQU0mwlP-py3.10/lib/python3.10/site-packages/py/_vendored_packages/apipkg/__init__.py", line 75, in importobjgc module = __import__(modpath, None, None, ["__doc__"])gc File "shibokensupport/signature/loader.py", line 54, in feature_importgc RecursionError: maximum recursion depth exceededgc ``` This error seems to be related to pytest-dev/pytest#1794. By not importing `pytest` in our test wrapper, and instead executing directly, we can avoid it. Note that this seems to be triggered only by Shiboken6, which is why we hadn't previously encountered it.
Instead of reinstalling shadow-utils, use the actual fix that the Fedora devs have suggested (rpm --restore shadow-utils). The previous method does not seem to work on Fedora 37, and it threw the following error when building the development environment: Installed package shadow-utils-2:4.12.3-3.fc37.x86_64 (from koji-override-0) not available. Error: No packages marked for reinstall. Error: building at STEP "RUN dnf reinstall -y shadow-utils && dnf clean all": while running runtime: exit status 1
Drop PySide2 from our dependencies (previously used only on Linux environments) and use PySide6 in all dev environments. The reason is that PySide2 (from PyPI) does not support Python 3.11, and the variants that do (Fedora/Debian packages) need to backport fixes from PySide6. Our original attempt was to build PySide2 wheels for Python 3.11 but it was not simple, nor maintainable. So, we were left with two options: 1. Install Python 3.10 in dev environments that have Python 3.11 by default. 2. Use PySide6 in all of our environments. In both cases, we break package parity with the user's system, since we are not testing Dangerzone under the same conditions. However, since option (2) is forwards-compatible with where we want to move the project (use Qt6 and PySide6), we chose that one. Fixes #330
Run CI tests for Fedora 37 environments, now that we no longer require PySide2 as a dev dependency. Fixes #294
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Our CI currently fails for several reasons, the main one being that more and more environments (Fedora 37, Debian Bookworm) use Python 3.11, which is incompatible with PySide2 from PyPI.
In this PR, we remove PySide2 as a dev dependency, and we use PySide6 for all of our environments. The Debian/Fedora packages for Dangerzone will still require PySide2, but that should be the last reference to PySide2 remaining, until we fuly complete the Qt6 transition.
Fixes #294
Fixes #330
(This PR depends on top of #296)