Skip to content

Missing methods on pkg_resources.VersionConflict #3279

Closed

Activity

  1. added
    stubs: incomplete
    on Sep 30, 2019
  2. srittau commented on Sep 30, 2019

    @srittau
    Collaborator

    PR welcome!

  3. utkarsh2102 commented on Oct 7, 2019

    @utkarsh2102
    Contributor

    Hi @srittau,
    While trying to understand how this works, I came up with the following patch:

    --- a/third_party/3/pkg_resources/__init__.pyi
    +++ b/third_party/3/pkg_resources/__init__.pyi
    @@ -202,7 +202,15 @@ class IMetadataProvider:
     
     class ResolutionError(Exception): ...
     class DistributionNotFound(ResolutionError): ...
    -class VersionConflict(ResolutionError): ...
    +
    +class VersionConflict(ResolutionError):
    +    @property
    +    def dist(self) -> List[Any]: ...
    +    @property
    +    def req(self) -> List[Any]: ...
    +    def report(self) -> str: ...
    +    def with_context(self, required_by: Dict[str, Any]) -> ContextualVersionConflict: ...
    +
     class UnknownExtra(ResolutionError): ...
     
     class ExtractionError(Exception):
    

    Though I am certain there'll be something missing/unwanted/wrong, I'd appreciate your help and review in this :D

  4. added a commit that references this issue on Oct 7, 2019
    5fe70f5
  5. srittau commented on Oct 7, 2019

    @srittau
    Collaborator

    @utkarsh2102 Could you open a PR? It's easier to review that way. You can mark it as a draft if you don't want it to be merged yet.

  6. utkarsh2102 commented on Oct 7, 2019

    @utkarsh2102
    Contributor

    @srittau, done :)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    stubs: incomplete

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions