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

warn about newer version of python client #296

Open
soxofaan opened this issue May 2, 2022 · 3 comments
Open

warn about newer version of python client #296

soxofaan opened this issue May 2, 2022 · 3 comments

Comments

@soxofaan
Copy link
Member

soxofaan commented May 2, 2022

This sometimes comes up in discussions on hosted jupyterlab contexts with outdated openeo (python package): is it possible to inform the user that a newer version of the client is available?

One possible solution inspired by how pip, which shows a warning when it detects a newer version is abailbale:

$ pip install ...
WARNING: You are using pip version 20.1.1; however, version 22.0.4 is available.
You should consider upgrading via the '..../bin/python3.7 -m pip install --upgrade pip' command.

we could do something comparable when the user does import openeo

@clausmichele
Copy link
Member

Hi @soxofaan, I've tried to create a PR to address this issue. It actually check if the current version is the same as the one available online, not if is >=.

@soxofaan
Copy link
Member Author

soxofaan commented Mar 3, 2023

quick note: with #176 the conda package is now also distributed through conda, which makes this "version warning" feature a bit more complex: you don't want to push users to pip install if the package was originally installed with conda. I'm not sure if it is possible to properly detect the installation context and emit the correct warning

@soxofaan
Copy link
Member Author

Just saw that jupyterlab also has a "newer version is available" notification. Implementation could be inspiration: https://github.com/jupyterlab/jupyterlab/blob/97f1c6f957f272113dce8157318d74c4fb23c289/jupyterlab/handlers/announcements.py#L78

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants