Skip to content

PySide6 6.5.1 compatibility updates#2734

Merged
ntjess merged 2 commits intopyqtgraph:masterfrom
pijyoi:pyside651-compat
May 28, 2023
Merged

PySide6 6.5.1 compatibility updates#2734
ntjess merged 2 commits intopyqtgraph:masterfrom
pijyoi:pyside651-compat

Conversation

@pijyoi
Copy link
Copy Markdown
Contributor

@pijyoi pijyoi commented May 28, 2023

This PR modifies code patterns in pyqtgraph that are triggering failures on the CI with PySide6 6.5.1

  1. using inner functions (with value capture) as slots
  • PySide6 6.5.1 is not treating the generated inner functions with different values as distinct functions
  • This is not limited to inner functions, it also applies to lambdas
  1. connecting to Signal.emit instead of directly to the signal

To be clear, this PR only makes the CI pass.
Whether more functionality has been broken (but not captured by the CI) is unknown.

@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented May 28, 2023

Oh, never noticed the connection to the emit method directly; that wasn't right 😅

pijyoi added 2 commits May 28, 2023 22:42
the inner function actually captures both "self" and "self.pen"
@pijyoi pijyoi force-pushed the pyside651-compat branch from b998e05 to aaf4009 Compare May 28, 2023 14:43
@pijyoi pijyoi marked this pull request as ready for review May 28, 2023 15:22
@ntjess ntjess merged commit 6c18797 into pyqtgraph:master May 28, 2023
@pijyoi pijyoi deleted the pyside651-compat branch May 28, 2023 16:09
@pijyoi
Copy link
Copy Markdown
Contributor Author

pijyoi commented May 29, 2023

On further reflection, there is a behavior change made by this PR.
Previously, the old instance method was saved. Now it's assumed that the old instance method is equal to the class method.
Let's hope that nobody feels the need to monkey-patch their own QPen instances!

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.

3 participants