ncar-xdev / jupyter-forward

Launch Jupyter Lab over SSH with a single command!
https://jupyter-forward.readthedocs.io/
Apache License 2.0
31 stars 12 forks source link

`jupyter-forward` is incompatible with the latest version of `click` (v8.1.0 +) #156

Closed andersy005 closed 2 years ago

andersy005 commented 2 years ago

The latest version of click breaks one of our dependencies (typer). As a result, jupyter-forward is incompatible with the latest version of click and the CI is failing (see https://github.com/ncar-xdev/jupyter-forward/runs/5746567323?check_suite_focus=true). This should be addressed once https://github.com/tiangolo/typer/issues/377 is fixed.

============================= test session starts ==============================
platform linux -- Python 3.8.13, pytest-7.1.1, pluggy-1.0.0 -- /usr/share/miniconda3/envs/jupyter-forward-dev/bin/python
cachedir: .pytest_cache
rootdir: /home/runner/work/jupyter-forward/jupyter-forward, configfile: setup.cfg
plugins: anyio-3.5.0, cov-3.0.0
collecting ... collected 58 items / 1 error

==================================== ERRORS ====================================
______________________ ERROR collecting tests/test_cli.py ______________________
ImportError while importing test module '/home/runner/work/jupyter-forward/jupyter-forward/tests/test_cli.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/share/miniconda3/envs/jupyter-forward-dev/lib/python3.8/importlib/__init__.py:[12](https://github.com/ncar-xdev/jupyter-forward/runs/5746567210?check_suite_focus=true#step:7:12)7: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_cli.py:1: in <module>
    import typer.testing
/usr/share/miniconda3/envs/jupyter-forward-dev/lib/python3.8/site-packages/typer/__init__.py:12: in <module>
    from click.termui import get_terminal_size as get_terminal_size
E   ImportError: cannot import name 'get_terminal_size' from 'click.termui' (/usr/share/miniconda3/envs/jupyter-forward-dev/lib/python3.8/site-packages/click/termui.py)
=============================== warnings summary ===============================
../../../../../usr/share/miniconda3/envs/jupyter-forward-dev/lib/python3.8/site-packages/invoke/loader.py:3
  /usr/share/miniconda3/envs/jupyter-forward-dev/lib/python3.8/site-packages/invoke/loader.py:3: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
    import imp

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

---------- coverage: platform linux, python 3.8.[13](https://github.com/ncar-xdev/jupyter-forward/runs/5746567210?check_suite_focus=true#step:7:13)-final-0 -----------
Coverage XML written to file coverage.xml

!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
========================= 1 warning, 1 error in 0.64s ==========================
tiangolo commented 2 years ago

I just released Typer 0.4.1 that should handle it. :rocket: :nerd_face:

rsignell-usgs commented 2 years ago

And it's on conda-forge! https://anaconda.org/conda-forge/typer

kmpaul commented 2 years ago

It looks like this is fixed with the latest Typer release. (Thanks @tiangolo!)