Skip to content
This repository has been archived by the owner on Jan 2, 2021. It is now read-only.

Update output when package not found on pypi #213

Open
proinsias opened this issue Jul 26, 2019 · 1 comment
Open

Update output when package not found on pypi #213

proinsias opened this issue Jul 26, 2019 · 1 comment

Comments

@proinsias
Copy link

proinsias commented Jul 26, 2019

caniusepython3 will exit without an error code if it can't find a package on pypi, and just assumes the package is Python 3 compatible. On the other hand, It will exit with an error code if it knows the package is Python 2. See below.

I would suggest changing the output to something like:

You have no projects known to block you from using Python 3!

The compatibility status of 1 project could not be determined.

and exiting with an error code so that automated tests using caniusepython3 will catch the issue.

Example of issue:

$ caniusepython3 --projects sphinxcontrib-emacs ; echo $?
Finding and checking dependencies ...

You need 1 project to transition to Python 3.
Of that 1 project, 1 has no direct dependencies blocking its transition:

  sphinxcontrib-emacs
3
$ caniusepython3 --projects fbprophet ; echo $?
Finding and checking dependencies ...
[ERROR] ...
[WARNING] fbprophet not found

🎉  You have 0 projects blocking you from using Python 3!

0
@brettcannon
Copy link
Owner

Please feel free to propose a PR!

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

Successfully merging a pull request may close this issue.

2 participants