Skip to content

FIX: macosx check case-insensitive app name #22179

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

Merged
merged 1 commit into from
Jan 10, 2022

Conversation

greglucas
Copy link
Contributor

PR Summary

Only check for "python" case insensitive to match either Python or pythonw.

From the linked issue, the reproducer is to start a pythonw terminal, which freezes interactivity on main, but works with this patch.

import matplotlib.pyplot as plt
plt.ion()
plt.figure()
plt.plot([1], 'ko')    # plot a point

Closes #8400

PR Checklist

Tests and Styling

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • New features are documented, with examples if plot related.
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).

Only check for "python" case insensitive to match either Python
or pythonw.
@greglucas greglucas added this to the v3.5.2 milestone Jan 10, 2022
@timhoffm timhoffm merged commit 72c5c8c into matplotlib:main Jan 10, 2022
@lumberbot-app
Copy link

lumberbot-app bot commented Jan 10, 2022

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout v3.5.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -m1 72c5c8c4390bae1d07037adc933a2737c8353295
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #22179: FIX: macosx check case-insensitive app name'
  1. Push to a named branch:
git push YOURFORK v3.5.x:auto-backport-of-pr-22179-on-v3.5.x
  1. Create a PR against branch v3.5.x, I would have named this PR:

"Backport PR #22179 on branch v3.5.x (FIX: macosx check case-insensitive app name)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

@greglucas greglucas deleted the macosx-pythonw branch January 10, 2022 22:42
greglucas pushed a commit to greglucas/matplotlib that referenced this pull request Jan 11, 2022
QuLogic added a commit that referenced this pull request Jan 11, 2022
…-v3.5.x

Backport PR #22179 on branch v3.5.x (FIX: macosx check case-insensitive app name)
@dstansby
Copy link
Member

dstansby commented Jan 15, 2022

It looks like this is causing our macOS wheel builds to fail with:

    src/_macosx.m:1380:13: error: 'localizedCaseInsensitiveContainsString:' is only available on macOS 10.10 or newer [-Werror,-Wunguarded-availability]
                localizedCaseInsensitiveContainsString:@"python"])
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:162:1: note: 'localizedCaseInsensitiveContainsString:' has been marked as being introduced in macOS 10.10 here, but the deployment target is macOS 10.9.0
    - (BOOL)localizedCaseInsensitiveContainsString:(NSString *)str API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
    ^
    src/_macosx.m:1380:13: note: enclose 'localizedCaseInsensitiveContainsString:' in an @available check to silence this warning
                localizedCaseInsensitiveContainsString:@"python"])
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

See https://github.com/matplotlib/matplotlib/runs/4826163948?check_suite_focus=true from #22238. I think our options are to:

dstansby added a commit that referenced this pull request Jan 15, 2022
jklymak added a commit that referenced this pull request Jan 17, 2022
…of-pr-22179-on-v3.5.x

Revert "Backport PR #22179 on branch v3.5.x (FIX: macosx check case-insensitive app name)"
@QuLogic QuLogic modified the milestones: v3.5.2, v3.6.0 Jan 18, 2022
@greglucas
Copy link
Contributor Author

Thanks for reverting that backport, @dstansby! I agree with that choice and bumping the minimum supported version on main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

figures won't update correctly using MacOSX backend
4 participants