aboutcode-org / python-inspector

Inspect Python code and PyPI package manifests. Resolve Python dependencies.
22 stars 19 forks source link

Prevent duplicated package versions #110

Closed bennati closed 1 year ago

bennati commented 1 year ago

The function get_versions_for_package_from_repo might return duplicated package versions in case the specified version is present both as wheel and as sdist package. Duplicated entries cause the package resolution to take longer. The new behavior is that the package version is considered if the package is present as either wheel or sdist package.

Signed-off-by: Stefano Bennati stefano.bennati@here.com

bennati commented 1 year ago

Any guidance on the failing checks?

TG1999 commented 1 year ago

@bennati you need to regenerate the test outputs, the dependencies have been updated for the tests so for fixing tests in test_cli use this command:

PYINSP_REGEN_TEST_FIXTURES=yes pytest -vvs

for fixing tests in test_resolution, please compare the changes from the expected output.

TG1999 commented 1 year ago

@bennati gentle ping!

pombredanne commented 1 year ago

@bennati Thanks! I think the other failures are not yours. But some weird instability.

TG1999 commented 1 year ago

@bennati thank you, I have pushed one minor commit on your branch to update the tests.