poetry-plugin-export icon indicating copy to clipboard operation
poetry-plugin-export copied to clipboard

allow multiple indexes to be trusted hosts

Open kevinwojo opened this issue 2 years ago • 2 comments

Use-Case

This change/enhancement handles a case where my primary repository (Artifactory) is the only machine on the network allowed to talk to pypi.org. All consumers of PyPI packages must pull from Artifactory exclusively.

For business reasons, I cannot have the internal CA certificate installed on all points of consumption. For this reason we pull packages over plain-text HTTP. The business has agreed to risks involved.

Current State

Today, I have a single default source in my pyproject.toml file that looks something like:

[[tool.poetry.source]]
name = "foo"
url = "http://foo.internal.bar/simple/"
default = true
secondary = false

Because it is the default repository, it skips the part of the code that is responsible for appending --trusted-host.

So I propose this change to allow me to add my default repository as a trusted host.

Pip's options append each --trusted-host HOST see: https://github.com/pypa/pip/blob/main/src/pip/_internal/cli/cmdoptions.py#L397

kevinwojo avatar Apr 08 '23 15:04 kevinwojo

  1. SonarCloud's analysis didn't really pick up on this nuance, did it?
  2. If anyone can help me figure out why this code isn't stable across versions & platforms ... I'll buy you a coffee 😄

kevinwojo avatar Apr 08 '23 15:04 kevinwojo

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 7 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
20.2% 20.2% Duplication

sonarqubecloud[bot] avatar Apr 09 '23 14:04 sonarqubecloud[bot]