This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Use super().method instead of socket.method in SSLSocket
Type: enhancement Stage: resolved
Components: SSL Versions: Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: christian.heimes Nosy List: barry, christian.heimes, earonesty, madsjensen, methane, njs, r.david.murray
Priority: normal Keywords:

Created on 2017-10-23 20:26 by earonesty, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 4048 merged earonesty, 2017-10-23 20:26
PR 5799 madsjensen, 2018-03-27 11:20
Messages (6)
msg304838 - (view) Author: Erik Aronesty (earonesty) * Date: 2017-10-23 20:26
I asked on #python-dev and was told that it's most likely due to legacy reasons that the class has things like `socket.__init__` instead of `super().__init__`
msg310856 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2018-01-27 12:34
New changeset 746cc75541f31278864a10b995e7d009bd2ff053 by Christian Heimes (Mads Jensen) in branch 'master':
bpo-31853: Replaced socket.method calls with super() in SSLSocket. (#4048)
https://github.com/python/cpython/commit/746cc75541f31278864a10b995e7d009bd2ff053
msg314516 - (view) Author: Mads Jensen (madsjensen) * Date: 2018-03-27 11:20
There are lots of legacy calls in the form of ClassName.method, which should be replaced with super().method.
msg314518 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2018-03-27 11:23
Why *should*?

Legacy ParentClass.method() call is faster than super().method() call, because there are no temporary proxy object.

I don't think there are enough reason to replace all legacy parent calls.
msg314520 - (view) Author: Nathaniel Smith (njs) * (Python committer) Date: 2018-03-27 11:30
The only time this should matter semantically is if someone is trying to subclass SSLSocket and use multiple inheritance. This is something that people *really* shouldn't do.

It also potentially makes it harder to backport ssl changes to 2.7.

I'm not really seeing the advantages here...
msg314521 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2018-03-27 11:36
I agree

Also this ticket was closed a couple of months ago and is about the SSL module. Your PR is about a different module. Although I think that recycling is generally a good idea, it doesn't apply to ticket numbers.
History
Date User Action Args
2022-04-11 14:58:53adminsetgithub: 76034
2018-03-27 11:36:40christian.heimessetmessages: + msg314521
components: + SSL, - email
2018-03-27 11:30:25njssetnosy: + njs
messages: + msg314520
2018-03-27 11:23:37methanesetnosy: + methane
messages: + msg314518
2018-03-27 11:20:30madsjensensetnosy: + barry, r.david.murray
messages: + msg314516
pull_requests: + pull_request5996

components: + email, - SSL
2018-01-27 12:35:05christian.heimessetstatus: open -> closed
resolution: fixed
stage: resolved
2018-01-27 12:34:33christian.heimessetmessages: + msg310856
2017-11-08 10:03:39berker.peksagsetnosy: + earonesty
2017-10-23 20:28:04madsjensensetnosy: + madsjensen, - earonesty
2017-10-23 20:26:17earonestycreate