filllabs/dependi

Mishandled space after package name in requirements.txt

Closed this issue · 2 comments

Describe the bug
After the last update, which seems to be 0.7.6, dependi started flagging packages unexpectedly with three exclamation marks. Removing the space between the package name and the "greater than or equal" sign solves the problem.
https://pip.pypa.io/en/stable/reference/requirements-file-format/ gives examples in which there is a space between package name and the comparison operator, so that should be acceptable syntax.

To Reproduce
Steps to reproduce the behavior:

  1. Install latest version of dependi on vscode as of 2024-07-27.
  2. Create a project with a "requirements.txt" file containing the line "anthropic >= 0.31.2" (with spaces around the operator)
  3. Open the "requirements.txt" file and you will see an alert by dependi
    Screenshot from 2024-07-27 05-57-48

Expected behavior
You will see the expected behavior if you remove the space just after the package name:
Screenshot from 2024-07-27 05-58-02

Desktop (please complete the following information):
lsb_release -a gives:

LSB Version:	core-11.1.0ubuntu4-noarch:printing-11.1.0ubuntu4-noarch:security-11.1.0ubuntu4-noarch
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.4 LTS
Release:	22.04
Codename:	jammy

Additional context
The error window displays Error: statusCode=404 and proceeds to display a link with an extra space. It seems to be the case of simply stripping the space when creating the url.

Hi @mirandadam, we have fixed this issue per your request in our new version 0.7.7.
We'd be really happy if you could review Dependi, here is our reviews page.

Thanks! I noticed you fixed the error with options too like httpx[http2] >= 0.27.0. There may be, however, something still amiss. The line httpx[http2] >= 0.27.0 gets a green checkmark, but so does httpx[http2] >= 1.0.0 which is odd, since 1.0.0 does not yet exist. httpx[http2] >= 0.26.0 gets a green checkmark too, don't know if it's intentional, but not what I expected.

Should I file a separate issue or are these related to the original issue on this thread?