Skip to content
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

Fix: Include explicit sources in export command #205

Conversation

shiumachi
Copy link
Contributor

This PR addresses an issue where the poetry export command was not exporting the --extra-index-url and --trusted-host options as expected for explicit sources.

Previously, the Exporter class was calling the repositories property from the RepositoryPool in the poetry package to fetch all repository information. However, repositories excludes explicit repositories.

To resolve this issue, I have modified the Exporter class to use the all_repositories property instead of repositories. The all_repositories property includes explicit repositories and ensures the --extra-index-url and --trusted-host options are exported correctly.

fixes: #204

@sonarcloud
Copy link

sonarcloud bot commented May 25, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@shiumachi
Copy link
Contributor Author

I understand the concern raised by SonarCloud regarding the usage of HTTP. However, in the context of this PR, this alert can be safely ignored.

The code snippet in question aligns with existing code found here:
https://github.com/python-poetry/poetry-plugin-export/blob/main/tests/test_exporter.py#L1583

@radoering
Copy link
Member

You can ignore SonarCloud. Maintainers just have to review if it's relevant or not (as in this case).

@radoering radoering merged commit 06c42b2 into python-poetry:main May 26, 2023
18 checks passed
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.

Poetry 1.5: export command does not include --extra-index-url and --trusted-host for explicit sources
2 participants