Skip to content

How to get requirements with extras? #4052

Closed Answered by MrMarvel
MrMarvel asked this question in Q&A
Discussion options

You must be logged in to vote

Whoila!
working_set.by_key['jsonschema'].requires(('format',)) returns [Requirement.parse('attrs>=22.2.0'), Requirement.parse('jsonschema-specifications>=2023.03.6'), Requirement.parse('referencing>=0.28.4'), Requirement.parse('rpds-py>=0.7.1'), Requirement.parse('fqdn; extra == "format"'), Requirement.parse('idna; extra == "format"'), Requirement.parse('isoduration; extra == "format"'), Requirement.parse('jsonpointer>1.13; extra == "format"'), Requirement.parse('rfc3339-validator; extra == "format"'), Requirement.parse('rfc3987; extra == "format"'), Requirement.parse('uri-template; extra == "format"'), Requirement.parse('webcolors>=1.11; extra == "format"')]

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@MrMarvel
Comment options

@MrMarvel
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by MrMarvel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants