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

Is it possible to remap source URLs in the lock file? #5317

Open
2 tasks done
stefanoborini opened this issue Mar 15, 2022 · 1 comment
Open
2 tasks done

Is it possible to remap source URLs in the lock file? #5317

stefanoborini opened this issue Mar 15, 2022 · 1 comment
Labels
kind/feature Feature requests/implementations

Comments

@stefanoborini
Copy link

  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Issue

Where I work, developers use a .net address for our internal pypi with our packages. However, when it's time to use github actions, we externalise a different address ending in .com.

The problem occurs when developers create a lock file from the pyproject.toml. Naturally, the .net address will be added as a [package.source] in the lock file. Developers will be able to use the lock file to perform the installation, but the github action CI machine won't.

Is there a way to specify a remapping of a given source URL for a different user?

@abn
Copy link
Member

abn commented May 16, 2022

As a workaround, you could use a mitm proxy setup or alternatively just run see over the lockfile in your build step. Both are not ideal however.

I'm not sure if supporting this feature makes a lot of sense as it feels like we are breaking the security model here. Then again, if hashes are present we shouldn't really care what sources we pick the files from.

You could also write a custom plugin that monkey patches poetry's poetry.util.authenticator.Authenicator.request method to rewrite the url.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Feature requests/implementations
Projects
None yet
Development

No branches or pull requests

3 participants