Upgrading the library: full typing support, remove deprecated methods#46
Upgrading the library: full typing support, remove deprecated methods#46delvinru wants to merge 2 commits intoromis2012:masterfrom delvinru:add-more-typing
Conversation
|
First of all, I think we shouldn't remove the deprecated API until version 1.x is released. There are projects that still use it: Secondly, there is no need to add type annotations to the parameters of "private" methods (_wrap_create_connection). Users of the Thirdly, there is no need to explicitly list all possible parameters in the signature of the Fourth, you do not need to import third-party modules ( Fifth, some type annotations appear to be incorrect ( |
|
In general, from everything you suggested, I would leave only parameter type annotations for methods that are public API of the |
|
Take 1 I decided to look at projects that use the old API and got the following table: etc As you can see, all packages using the old API themselves have long been outdated. In live projects, it can be easily changed to a ProxyConnector. Take 2 Take 3 Take 4 Take 5 |
You are not taking into account projects that are not hosted on github
It is And please remove |
|
And return the deprecated APIs |
Of course not, because i can't review them) Ok, I'll just reopen the pull request with minimal changes. |
Hi, I've been using your library for quite a long time and in many projects, thanks for the work!
When developing projects in python 3.12 with the IDE configured, the following errors often occur, which have to be closed using
# type: ignore:I decided to add more type support to the project, as well as get rid of deprecated methods. In addition, new versions of python-socks cause errors in these methods.
I ran tests, mypy and ruff, they all show that everything is ok.

If there are any comments, I am open to discussion and correction of errors.