Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Mac qt ctrl#21142

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
timhoffm merged 3 commits intomatplotlib:masterfromtacaswell:mac_qt_ctrl
Sep 22, 2021
Merged

Mac qt ctrl#21142

timhoffm merged 3 commits intomatplotlib:masterfromtacaswell:mac_qt_ctrl
Sep 22, 2021

Conversation

tacaswell
Copy link
Member

PR Summary

closes#21110

This fixes the QT tests to pass on OSX and tries to enable running them on GHA.

PR Checklist

  • Has pytest style unit tests (andpytest passes).
  • IsFlake 8 compliant (runflake8 on changed files to check).
  • [N/A] New features are documented, with examples if plot related.
  • [N/A] Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).
  • Conforms to Matplotlib style conventions (installflake8-docstrings and runflake8 --docstring-convention=all).
  • [N/A] New features have an entry indoc/users/next_whats_new/ (follow instructions in README.rst there).
  • [N/A] API changes documented indoc/api/next_api_changes/ (follow instructions in README.rst there).

The alias SIGCLD for SIGCHLD does not exist on OSX
@tacaswelltacaswell added this to thev3.5.0 milestoneSep 20, 2021
Copy link
Contributor

@greglucasgreglucas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This works for me locally, it also looks like it is being hit in CI now (there are no skips in test_backend_qt on macos-latest). Just one minor comment for readability.

(
"Key_A",
["ControlModifier"],
("ctrl+a" if sys.platform != "darwin" else "cmd+a"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I find the previous version a little easier to read with more on a single line. Perhaps you could leave the parametrize section alone and put the switch inside the function?

ifsys.platform=="darwin":qt_mods.replace("ctrl","cmd")

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

fair, that did not occur to me to try! I was going going through the failing tests one at a time and putting the fix in.

On the other hand, changing the parameters makes it clear from looking at the test the expected behavior is which might be clearer in the long run?

'\N{LATIN CAPITAL LETTER A WITH ACUTE}'),
('Key_Aacute', [],
'\N{LATIN SMALL LETTER A WITH ACUTE}'),
('Key_Control', ['AltModifier'], 'alt+control'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I'm not sure why this is "control" rather than "ctrl" here, but it appears to work either way for me locally, and this would get you an easier string replacement.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I think the issue is that in some cases it is 'ctrl' because it is a modifier, but here it is 'control' because it is the key. If this distinction is a good idea or not is a different issue, but this fails on linux if we change control -> ctrl here.

Copy link
Member

@timhoffmtimhoffm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

There's something wrong with 'ctrl' vs. 'control'.

skip pyside2 on GHA because it is segfaulting with openGL issues
Due to some re-(re)-mapping of the modifier keys by the OSX keyboard,then by Qt, and then by us there is an inconsistency between theplatforms.This change to the tests encodes what the Qt on OSX currently does (andto our understand have always done).
@timhoffmtimhoffm merged commit98d6a30 intomatplotlib:masterSep 22, 2021
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestSep 22, 2021
QuLogic added a commit that referenced this pull requestSep 22, 2021
…142-on-v3.5.xBackport PR#21142 on branch v3.5.x (Mac qt ctrl)
@tacaswelltacaswell deleted the mac_qt_ctrl branchSeptember 22, 2021 14:59
tacaswell pushed a commit to tacaswell/matplotlib that referenced this pull requestOct 12, 2021
tacaswell pushed a commit that referenced this pull requestOct 20, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@timhoffmtimhoffmtimhoffm approved these changes

@greglucasgreglucasgreglucas approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v3.5.0
Development

Successfully merging this pull request may close these issues.

Qt swapping ctrl and cmd on OSX
3 participants
@tacaswell@timhoffm@greglucas

[8]ページ先頭

©2009-2025 Movatter.jp