caniusepython3 icon indicating copy to clipboard operation
caniusepython3 copied to clipboard

Update output when package not found on pypi

Open proinsias opened this issue 6 years ago • 1 comments

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

proinsias avatar Jul 26 '19 01:07 proinsias

Please feel free to propose a PR!

brettcannon avatar Jul 26 '19 18:07 brettcannon