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

Deprecate click.get_terminal_size() in favor of stdlib shutil.get_terminal_size() #1736

Closed
jdufresne opened this issue Dec 22, 2020 · 3 comments · Fixed by #1737
Closed

Deprecate click.get_terminal_size() in favor of stdlib shutil.get_terminal_size() #1736

jdufresne opened this issue Dec 22, 2020 · 3 comments · Fixed by #1737
Milestone

Comments

@jdufresne
Copy link
Contributor

Since Python 3.3, the stdlib provides the function shutil.get_terminal_size(). Now that the project has dropped Python 2
support, the compatibility shim is no longer necessary.

The stdlib version returns a named tuple. So rather than indexing "0", can use the more self-documenting attribute "columns".

Docs available at: https://docs.python.org/3/library/shutil.html#shutil.get_terminal_size

@janluke

This comment has been minimized.

@davidism

This comment has been minimized.

@janluke

This comment has been minimized.

@davidism davidism added this to the 8.0.0 milestone Feb 15, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants