Skip to content

Prevent duplicated package versions #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

bennati
Copy link
Contributor

@bennati bennati commented Jan 3, 2023

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 [email protected]

@bennati
Copy link
Contributor Author

bennati commented Jan 4, 2023

Any guidance on the failing checks?

@TG1999
Copy link
Contributor

TG1999 commented Jan 4, 2023

@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
Copy link
Contributor

TG1999 commented Jan 10, 2023

@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 <[email protected]>
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 <[email protected]>
@bennati bennati force-pushed the fix-duplicated-package-versions branch from 09625b6 to 9383d32 Compare January 11, 2023 10:37
@pombredanne
Copy link
Member

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

@TG1999
Copy link
Contributor

TG1999 commented Jan 13, 2023

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

Copy link
Member

@pombredanne pombredanne left a comment

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