Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug]: Not compatible with Click 8.1.0 released 2022-03-28 #17

Closed
raxod502 opened this issue Mar 29, 2022 · 5 comments
Closed

[Bug]: Not compatible with Click 8.1.0 released 2022-03-28 #17

raxod502 opened this issue Mar 29, 2022 · 5 comments
Assignees
Labels
bug Something isn't working dependencies Related to dependencies high priority High priority issue

Comments

@raxod502
Copy link

What happened?

Installation from PyPI is broken (installed script fails at startup) with the release of Click 8.1.0 on 2022-03-28 since it removes the previously-deprecated function get_terminal_size that typer depends on, and pacup depends on typer.

This is most likely an upstream bug in typer, and I will report the issue there and submit a fix if appropriate.

What do you expect to happen?

pacup should function correctly after installation.

Which pacscripts are affected?

n/a

Steps to reproduce

% python3 -m venv /tmp/venv
% /tmp/venv/bin/pip install pacup                                                       
Collecting pacup
  Using cached pacup-0.1.2-py3-none-any.whl (29 kB)
Collecting typer<0.5.0,>=0.4.0
  Using cached typer-0.4.0-py3-none-any.whl (27 kB)
Collecting rich<13.0.0,>=12.0.0
  Using cached rich-12.0.1-py3-none-any.whl (224 kB)
Collecting packaging<22.0,>=21.3
  Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting httpx<0.23.0,>=0.22.0
  Using cached httpx-0.22.0-py3-none-any.whl (84 kB)
Collecting sniffio
  Using cached sniffio-1.2.0-py3-none-any.whl (10 kB)
Collecting rfc3986[idna2008]<2,>=1.3
  Using cached rfc3986-1.5.0-py2.py3-none-any.whl (31 kB)
Collecting certifi
  Using cached certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
Collecting httpcore<0.15.0,>=0.14.5
  Using cached httpcore-0.14.7-py3-none-any.whl (68 kB)
Collecting charset-normalizer
  Using cached charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
Collecting anyio==3.*
  Using cached anyio-3.5.0-py3-none-any.whl (79 kB)
Collecting h11<0.13,>=0.11
  Using cached h11-0.12.0-py3-none-any.whl (54 kB)
Collecting idna>=2.8
  Using cached idna-3.3-py3-none-any.whl (61 kB)
Collecting pyparsing!=3.0.5,>=2.0.2
  Using cached pyparsing-3.0.7-py3-none-any.whl (98 kB)
Collecting pygments<3.0.0,>=2.6.0
  Using cached Pygments-2.11.2-py3-none-any.whl (1.1 MB)
Collecting commonmark<0.10.0,>=0.9.0
  Using cached commonmark-0.9.1-py2.py3-none-any.whl (51 kB)
Collecting click<9.0.0,>=7.1.1
  Using cached click-8.1.0-py3-none-any.whl (96 kB)
Installing collected packages: sniffio, idna, rfc3986, h11, certifi, anyio, pyparsing, pygments, httpcore, commonmark, click, charset-normalizer, typer, rich, packaging, httpx, pacup
Successfully installed anyio-3.5.0 certifi-2021.10.8 charset-normalizer-2.0.12 click-8.1.0 commonmark-0.9.1 h11-0.12.0 httpcore-0.14.7 httpx-0.22.0 idna-3.3 packaging-21.3 pacup-0.1.2 pygments-2.11.2 pyparsing-3.0.7 rfc3986-1.5.0 rich-12.0.1 sniffio-1.2.0 typer-0.4.0
% /tmp/venv/bin/pacup --version  
Traceback (most recent call last):
  File "/tmp/venv/bin/pacup", line 5, in <module>
    from pacup.__main__ import main
  File "/tmp/venv/lib/python3.9/site-packages/pacup/__main__.py", line 43, in <module>
    import typer
  File "/tmp/venv/lib/python3.9/site-packages/typer/__init__.py", line 12, in <module>
    from click.termui import get_terminal_size as get_terminal_size
ImportError: cannot import name 'get_terminal_size' from 'click.termui' (/tmp/venv/lib/python3.9/site-packages/click/termui.py)

Version

Latest Release

Relevant log output

No response

@raxod502 raxod502 added bug Something isn't working triage Priority not decided yet labels Mar 29, 2022
@raxod502
Copy link
Author

It looks like this has been reported upstream at fastapi/typer#377, and a PR already out at fastapi/typer#375. We just need to wait until the new release of typer makes it out, and the problem should be transparently resolved without the need for changes on the side of pacup.

@raxod502
Copy link
Author

As a workaround, run this to install from the pull request branch:

% pip3 install git+https://github.com/madkinsz/typer.git@b6efa2f8f40291fd80cf146b617e0ba305f6af3c

@wizard-28 wizard-28 pinned this issue Mar 29, 2022
@wizard-28 wizard-28 added high priority High priority issue and removed triage Priority not decided yet labels Mar 29, 2022
@wizard-28
Copy link
Member

I've pinned this issue for now, users experiencing this issue can use your workaround. I guess I'll wait for this issue to be fixed on typer's side.

@wizard-28 wizard-28 added the dependencies Related to dependencies label Mar 29, 2022
@tiangolo
Copy link

Hello! I just released Typer 0.4.1 that should handle this. 🚀 🤓

@wizard-28
Copy link
Member

@raxod502 closing this, as this works now.

@wizard-28 wizard-28 unpinned this issue Apr 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working dependencies Related to dependencies high priority High priority issue
Projects
None yet
Development

No branches or pull requests

3 participants