Skip to content

Stubs for PyMySQL are out of date and incomplete #4487

Closed

Description

@GPHemsley

Stubs for PyMySQL were added in #861 in 2017. Based on some quick comparisons, it seems they were incomplete then and have not really been maintained since.

As far as I can tell, version v0.7.9 was the latest at the time of that PR; here's the upstream diff since then:
PyMySQL/PyMySQL@v0.7.9...master

The specific issues I'm encountering all tend to revolve around Connection:

error: Unexpected keyword argument "defer_connect" for "Connection"
error: "Connection" has no attribute "connect"
error: Unexpected keyword argument "password" for "Connection"; did you mean "passwd"?
error: Unexpected keyword argument "database" for "Connection"
error: Unexpected keyword argument "autocommit" for "Connection"

The odd thing is, most of these existed in v0.7.9, so I'm not sure what version was used to generate the stubs initially.

Either way, would it be possible to regenerate the stubs or otherwise bring them up to date for the latest version of PyMySQL? (If multiple versions need to be supported, PyMySQL does appear to provide a VERSION value in its __init__ file.)

Activity

  1. srittau commented on Aug 28, 2020

    @srittau
    Collaborator

    typeshed generally accepts PRs that bring stubs in line with the latest version. At the moment, multiple versions are not supported.

  2. Akuli commented on Jun 16, 2021

    @Akuli
    Collaborator

    I think this can be closed now that third-party stubs are checked with stubtest. In #5652, I found that I needed to add more arguments to Connection.__init__ to make stubtest pass.

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