Skip to content
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

Migrate to PySide6 #552

Merged
merged 3 commits into from
Oct 13, 2022
Merged

Migrate to PySide6 #552

merged 3 commits into from
Oct 13, 2022

Conversation

abey79
Copy link
Owner

@abey79 abey79 commented Oct 12, 2022

Description

Why:

How:

  • QGLWidget deprecated and must be replaced by QOpenGLWidget. The main required change was to defer mcl-related initialisation to the first call of paintGL(). Doing it in initializeGL() no longer works.
  • The mere importing of PySide6.QtGui now relies on some OpenGL libraries (possibly due to these bugs). This broke the ubuntu GitHub Actions runner and requires explicit installation of mesa stuff (sudo apt-get install -y -qq libegl1-mesa libegl1-mesa-dev).
  • The already poor typing stubs of PySide2 somehow got worse, so lots of # typing: ignore to be added.
  • Various other easy-to-fix API fixes.
  • PySide6 broke mypy due to new enums (see Fix viewer resizing issue #559)
  • Further fix in 5a3b403

Also, PySide6 introduces a regression when using window manager such as Rectangle and QOpenGLWidget. The window blanks when resized. See this bug report bug report.

Note: this PR doesn't include updated installation instruction, to be done separately close to release date to minimise confusion (#554)

Checklist

  • feature/fix implemented
  • code formatting ok (black and isort)
  • mypy returns no error
  • tests added/updated and pytest succeeds
  • documentation added/updated
    • command docstring and option/argument help
    • README.md updated (Feature Overview)
    • CHANGELOG.md updated
    • added new command to reference.rst
    • RTD doc updated and building with no error (make clean && make html in docs/)

@codecov
Copy link

codecov bot commented Oct 12, 2022

Codecov Report

Base: 94.72% // Head: 94.72% // No change to project coverage 👍

Coverage data is based on head (a7c8371) compared to base (91d32f9).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #552   +/-   ##
=======================================
  Coverage   94.72%   94.72%           
=======================================
  Files          62       62           
  Lines        5668     5668           
  Branches      765      765           
=======================================
  Hits         5369     5369           
  Misses        182      182           
  Partials      117      117           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@abey79 abey79 merged commit fa6fe07 into master Oct 13, 2022
@abey79 abey79 deleted the pyside6-migration-bis branch October 13, 2022 08:30
abey79 added a commit that referenced this pull request Oct 14, 2022
Introduced in #552

Also pinned PySide6 to <6.4 due to compatibility issue with matplotlib.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant