You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stubs for PyMySQL are out of date and incomplete #4487
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.)
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.
Activity
srittau commentedon Aug 28, 2020
typeshed generally accepts PRs that bring stubs in line with the latest version. At the moment, multiple versions are not supported.
update and complete pymysql.connections stubs to 0.10.1
update and complete pymysql.connections stubs to 0.10.1
update and complete pymysql.connections stubs to 0.10.1 (#4702)
Akuli commentedon 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.