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

Import get_terminal_size from shutil #378

Closed
wants to merge 1 commit into from

Conversation

arefrazavi
Copy link

get_terminal_size function has been removed from Click 8.1.0. We should use shutil.get_terminal_size instead.

This change is required to handle the following error when using spaCy 3.2.3.

ImportError: cannot import name 'get_terminal_size' from 'click.termui'

`get_terminal_size`  function has been removed from Click 8.1.0. We should use shutil.get_terminal_size instead.

This change is required to handle the following error when using Spacy 3.2.3.

```
ImportError: cannot import name 'get_terminal_size' from 'click.termui'
```
@zanieb
Copy link
Contributor

zanieb commented Mar 29, 2022

Note this is a duplicate of #375 and the issue is being tracked in #377.

Copy link

@jofegan jofegan left a comment

Choose a reason for hiding this comment

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

I prefer this over #375 because this PR respects the alphabetical ordering of the existing import statements.

@jofegan jofegan mentioned this pull request Mar 29, 2022
@zanieb
Copy link
Contributor

zanieb commented Mar 29, 2022

I prefer this over #375 because this PR respects the alphabetical ordering of the existing import statements.

#375 follows isort ordering (used by this project) in which standard library imports are placed before external library imports.

@davidism
Copy link

#380 was just merged, sounds like a new release is coming soon.

@henryiii
Copy link

27 minutes ago: https://pypi.org/project/typer/0.4.1/

FYI, anyone running into this via some application in pre-commit, especially pre-commit.ci, environments are cached (globally), so you might still see issues for a while.

@tiangolo
Copy link
Member

tiangolo commented Mar 30, 2022

Hello! I just released Typer 0.4.1 that includes #380 based on #375, it should handle this. 🚀 🤓

I'll close this issue now.

@tiangolo tiangolo closed this Mar 30, 2022
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.

6 participants