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 --with-credentials export of --extra-index-url lines #117

Merged
merged 6 commits into from
Sep 10, 2022

Conversation

ejd
Copy link
Contributor

@ejd ejd commented Sep 7, 2022

Resolves: #22.

The fix for this issue is to add a single character: indexes_header = ... becomes indexes_header += ... within the loop that builds the --index-url and --extra-index-url lines of the exported text.

I added a test case to demonstrate the problem and prove to myself that I'd fixed it.

I had to run poetry lock to bump the poetry dependency to 1.2.0. The previously locked version, 1.2.0b3, didn't actually remove the PyPI repository from poetry.pool when my new test called poetry.pool.remove_repository("PyPI"). The implementation of that method changed from 1.2.0b3 to 1.2.0 to address exactly that issue. If it's possible to add a different default repository with 1.2.0b3, I'm happy to revert the poetry lock commit and modify the test case.

Poetry 1.2.0 includes a change to
`poetry.repositories.pool.Pool.remove_repository` that allows actually
removing the PyPI repository.  The test added by this branch needs to
remove the default repository so it can add an alternate, custom
repository.
@ejd
Copy link
Contributor Author

ejd commented Sep 9, 2022

Is there anything I can do to help move this PR along? I'm not sure how to fix the security hotspots (or if I need to -- they seem like false positives.)

tests/test_exporter.py Outdated Show resolved Hide resolved
@radoering
Copy link
Member

I had to run poetry lock to bump the poetry dependency to 1.2.0.

IMO, it's ok if we depend on the released version of poetry and do not support betas anymore in the next plugin release. Can please revert your lockfile change, update the dependencies in pyproject.toml for poetry and poetry-core to depend on the releases and run poetry lock --no-update using poetry 1.2.

@sonarcloud
Copy link

sonarcloud bot commented Sep 10, 2022

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 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@radoering radoering merged commit afa3b6b into python-poetry:main Sep 10, 2022
@radoering radoering mentioned this pull request Sep 13, 2022
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.

Exported requirements.txt does not include --extra-index-url
3 participants