-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[urllib] Add deprecated functions #14457
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
Conversation
This comment has been minimized.
This comment has been minimized.
I think these are maybe better left out. From looking at the history, these are all undocumented functions that weren't meant to be exposed in Python 3: |
In my view, these functions are still usable, as I don’t see any clear reason they wouldn’t be compatible with Python 3.x. Additionally, |
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
As I understand it, these days typeshed's policy is that its generally open to adding undocumented and/or private symbols if they are requested or known to be useful, but generally doesn't try to add all such symbols just because they're present at runtime. Adding undocumented symbols can lead to IDEs suggesting them in autocomplete suggestions and generally can mislead users of type checkers and other tools into thinking that these symbols are/were part of the public API. Do you happen to know if these functions are actually being used out in the wild? I tried doing a quick search of open source code for them, but I'm only seeing cases them being defined in vendored copies of If these do get added to the stubs, I might suggest removing the |
I don't agree with this: they raise DeprecationWarning at runtime, so adding |
I understand your point of view. However, I’m approaching this from the perspective that someone might still be using these functions. So I suggest we wait for the maintainer’s decision. |
I'm a maintainer and I agree that we should only add these if someone comes to us and tells us they're actually using these functions. |
I am also a maintainer and I agree with Jelle. The reason stubtest has never complained about these being missing from the stub is that they've been deliberately omitted from |
I didn't notice your message when I wrote and sent mine |
I think if they haven't been removed then they are still being used