Skip to content

Prevent duplicated package versions - #110

Merged
pombredanne merged 3 commits into
aboutcode-org:mainfrom
bennati:fix-duplicated-package-versions
Jan 13, 2023
Merged

Prevent duplicated package versions#110
pombredanne merged 3 commits into
aboutcode-org:mainfrom
bennati:fix-duplicated-package-versions

Conversation

@bennati

@bennati bennati commented Jan 3, 2023

Copy link
Copy Markdown
Contributor

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

bennati commented Jan 4, 2023

Copy link
Copy Markdown
Contributor Author

Any guidance on the failing checks?

@TG1999

TG1999 commented Jan 4, 2023

Copy link
Copy Markdown
Contributor

@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

TG1999 commented Jan 10, 2023

Copy link
Copy Markdown
Contributor

@bennati gentle ping!

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 whel or sdist package.

Signed-off-by: Stefano Bennati <stefano.bennati@here.com>
The new dependency tree corresponds to the one generate by
pip download --verbose X where X is flask~=2.1.2 and
autobahn==22.3.2 respectively.

Signed-off-by: Stefano Bennati <stefano.bennati@here.com>
@bennati
bennati force-pushed the fix-duplicated-package-versions branch from 09625b6 to 9383d32 Compare January 11, 2023 10:37
@pombredanne

Copy link
Copy Markdown
Member

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

Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
@TG1999

TG1999 commented Jan 13, 2023

Copy link
Copy Markdown
Contributor

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

@pombredanne pombredanne left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@pombredanne
pombredanne merged commit 51dfcbc into aboutcode-org:main Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants