Visitar URL original
devpi-client hook broken · Issue #596 · jaraco/keyring · GitHub
Skip to content

devpi-client hook broken #596

Closed
Closed

Description

@fschulze

The @suppress(KeyringError) line breaks the devpi-client hook. It looks like the argument spec is changed by it which causes pluggy to not pass in the arguments correctly. It happens when trying to devpi push a release to pypi and the password is not set in ~pypirc which causes devpi-client to try the hook.

Activity

  1. fschulze commented on Sep 12, 2022

    @fschulze
    Author

    It can more easily be triggered by devpi login username.

  2. jaraco commented on Sep 17, 2022

    @jaraco
    Owner

    I'm slightly surprised that the argument spec isn't present, because ContextDecorator uses functools.wraps.

  3. jaraco commented on Sep 17, 2022

    @jaraco
    Owner

    It looks like inspect.getfullargspec shows the raw args, but inspect.signature resolves the wrapping.

    >>> inspect.getfullargspec(cl.devpiclient_get_password)
    FullArgSpec(args=[], varargs='args', varkw='kwds', defaults=None, kwonlyargs=[], kwonlydefaults=None, annotations={})
    >>> inspect.signature(cl.devpiclient_get_password)
    <Signature (url, username)>
    
  4. jaraco commented on Sep 17, 2022

    @jaraco
    Owner

    Docs say that getfullargspec is discouraged and signature should be used:

    Note that signature() and Signature Object provide the recommended API for callable introspection, and support additional behaviours (like positional-only arguments) that are sometimes encountered in extension module APIs. This function is retained primarily for use in code that needs to maintain compatibility with the Python 2 inspect module API.

  5. jaraco commented on Sep 17, 2022

    @jaraco
    Owner

    Oh, the issue is known (pytest-dev/pluggy#358) and already linked to #582.

  6. jaraco commented on Sep 17, 2022

    @jaraco
    Owner

    v23.9.3 provides a workaround, but the core issue should be fixed upstream in pluggy.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions