Skip to content

No way to do operations on marker #448

Description

@gaborbernat

Currently, the marker has its data field private, so there's no way for someone to search for markers once parsed a requirement. My goal here is to filter for some extra, roughly:

extras=[r.value for l, _, r in (i for i in a.marker._markers if isinstance(i, tuple) and len(i) == 3) if l.value =='extra']

I propose to either:

  • make ._markers public
  • implement __iter__ that yields entries from _markers

I've needed this also in tox rewrite - https://github.com/tox-dev/tox/blob/rewrite/src/tox/tox_env/python/virtual_env/package/api.py#L186-L211

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions