Skip to content

Extra requirements are lost in pip-compile comments #1577

@sawatsky

Description

@sawatsky

I have a requirements.txt file with the following:

my-package[extra]~=1.0
my-sub-package~=1.1

When I run python -m piptools compile, the extra requirement [extra] gets lost in the list of via requirements under my-sub-package:

my-package[extra]==1.0.0
    # via -r requirements.txt
my-sub-package==1.1.1
    # via
    #   -r requirements.txt
    #   my-package

I need the extra requirements to remain in the comments. We're parsing the output file of pip-compile that's breaking because the [extra] requirement is gone from the comments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    annotationsRelated to packages annotationsextrasHandling optional dependencies

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions