Skip to content

Stubs for PyMySQL are out of date and incomplete #4487

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
GPHemsley opened this issue Aug 27, 2020 · 2 comments
Closed

Stubs for PyMySQL are out of date and incomplete #4487

GPHemsley opened this issue Aug 27, 2020 · 2 comments

Comments

@GPHemsley
Copy link

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.)

@srittau
Copy link
Collaborator

srittau commented Aug 28, 2020

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

vbarbaresi added a commit to vbarbaresi/typeshed that referenced this issue Oct 24, 2020
vbarbaresi added a commit to vbarbaresi/typeshed that referenced this issue Oct 24, 2020
srittau pushed a commit that referenced this issue Oct 29, 2020
Solves part of #4487, other modules can still be updated
@Akuli
Copy link
Collaborator

Akuli commented Jun 16, 2021

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.

@srittau srittau closed this as completed Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants