Skip to content

Implement PIP_TRUSTED_HOSTS logic from importing requirements to specified --index URL #5572

Closed
@kalebmckale

Description

Is your feature request related to a problem? Please describe.

The larger problem I'd ideally like to solve is to have newly created Pipfiles contain the correct source information and not be required to first fail, to have to edit the Pipfile, and then to attempt again.

Specifically, when adding an index via command line, if the index URL begins with https, verify_ssl is automatically set to true. However, if using private indices, this may be neither necessary nor preferred.

Describe the solution you'd like

The logic currently used when parsing requirements files in core.py that checks environment variable PIP_TRUSTED_HOSTS when determining the value for verify_ssl could also be implemented with index URLs specified at the command line.

Describe alternatives you've considered

Alternatively, one could pre-generate a blank Pipfile template with the correct sources and not use pipenv to create Pipfile. This would not be preferred.

Additional context

I'm happy to make the simple changes and create a pull request (see kalebmckale/pipenv@7c5dcde). I've already successfully tested this locally on my system, but I understand it needs to run though the full gamut of possible platforms, etc.

Metadata

Assignees

No one assigned

    Labels

    Contributor CandidateThe issue has been identified/triaged and contributions are welcomed/encouraged.Type: Enhancement 💡This is a feature or enhancement request.Type: Possible BugThis issue describes a possible bug in pipenv.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions