-
Notifications
You must be signed in to change notification settings - Fork 414
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
Better Unicode / emoji capability detection #614
Conversation
I moved the |
Is the plural of emoji emojis or emojies? The spelling is inconsistent between the commit message and the module name. |
Yeahhhhhh. I was trying to ignore that 😛 https://www.theatlantic.com/technology/archive/2016/01/whats-the-plural-of-emoji-emojis/422763/
It does seem that the plural is a choice between "emojis" and "emoji". So I'm going to rename the module "emojis" without the "e", since "emojies" seems unloved by everybody. |
Add app_name "pipx" to ensurepath comments, don't duplicate bin_paths. Apply typing.NoReturn to code base (pypa#605) Fix post-release development versioning (pypa#601) Make constants.py single source for WINDOWS boolean. (pypa#607) Add section on where pipx keeps its logs. (pypa#608) Upgrade all pre-commit plugins except black. (pypa#611) Fix show/hide cursor for older Windows (pypa#610) Drop .exe appending on Windows (pypa#606) This makes Venv.run_app() and code path along it accept an additional argument, so we can distinguish between the "real" name (filename) of an app, and the name supplied by the user. This makes the code simpler, espacially when dealing with the proposed [pipx.run] entry points. Add text color capability for Windows (pypa#612) Better Unicode / emoji capability detection (pypa#614) Use python 3.9 as default python for CI. (pypa#622) Don't show / hide cursor if not in tty. (pypa#620)
docs/changelog.md
Summary of changes
Closes #73.
Previously we only disallowed emojis (Unicode characters) when we detected Windows, and allowed for all other platforms. This ignored the fact that some shells in Windows are now perfectly happy displaying emojis/Unicode, while some non-Windows platforms' shells are not using a Unicode encoding and actually crash when we try to print emoji (See #73.)
This PR actually directly tests encoding our emoji unicode characters using
sys.stderr.encoding
to determine if it will work on a platform.Test plan
Uninstalling a nonexistent package will show the "sleep" emoji. This should omit the emoji and not yield an error if non-Unicode encoding is used in the shell. It should show an emoji if the shell has Unicode-capable encoding.
This PR:
pipx 0.16.0.0: