Skip to content
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

Use super().method instead of socket.method in SSLSocket #76034

Closed
earonesty mannequin opened this issue Oct 23, 2017 · 6 comments
Closed

Use super().method instead of socket.method in SSLSocket #76034

earonesty mannequin opened this issue Oct 23, 2017 · 6 comments
Assignees
Labels
3.7 (EOL) end of life topic-SSL type-feature A feature request or enhancement

Comments

@earonesty
Copy link
Mannequin

earonesty mannequin commented Oct 23, 2017

BPO 31853
Nosy @warsaw, @tiran, @bitdancer, @njsmith, @methane, @atombrella, @earonesty
PRs
  • bpo-31853: Replaced socket.method calls with super() in SSLSocket. #4048
  • Replaced some instances of ClassName.method with super().method. #5799
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/tiran'
    closed_at = <Date 2018-01-27.12:35:05.377>
    created_at = <Date 2017-10-23.20:26:17.415>
    labels = ['expert-SSL', 'type-feature', '3.7']
    title = 'Use super().method instead of socket.method in SSLSocket'
    updated_at = <Date 2018-03-27.11:36:40.552>
    user = 'https://github.com/earonesty'

    bugs.python.org fields:

    activity = <Date 2018-03-27.11:36:40.552>
    actor = 'christian.heimes'
    assignee = 'christian.heimes'
    closed = True
    closed_date = <Date 2018-01-27.12:35:05.377>
    closer = 'christian.heimes'
    components = ['SSL']
    creation = <Date 2017-10-23.20:26:17.415>
    creator = 'earonesty'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 31853
    keywords = []
    message_count = 6.0
    messages = ['304838', '310856', '314516', '314518', '314520', '314521']
    nosy_count = 7.0
    nosy_names = ['barry', 'christian.heimes', 'r.david.murray', 'njs', 'methane', 'madsjensen', 'earonesty']
    pr_nums = ['4048', '5799']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue31853'
    versions = ['Python 3.7']

    @earonesty
    Copy link
    Mannequin Author

    earonesty mannequin commented Oct 23, 2017

    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__

    @earonesty earonesty mannequin added topic-SSL 3.7 (EOL) end of life labels Oct 23, 2017
    @earonesty earonesty mannequin assigned tiran Oct 23, 2017
    @earonesty earonesty mannequin added the type-feature A feature request or enhancement label Oct 23, 2017
    @tiran
    Copy link
    Member

    tiran commented Jan 27, 2018

    New changeset 746cc75 by Christian Heimes (Mads Jensen) in branch 'master':
    bpo-31853: Replaced socket.method calls with super() in SSLSocket. (bpo-4048)
    746cc75

    @tiran tiran closed this as completed Jan 27, 2018
    @atombrella
    Copy link
    Mannequin

    atombrella mannequin commented Mar 27, 2018

    There are lots of legacy calls in the form of ClassName.method, which should be replaced with super().method.

    @atombrella atombrella mannequin added topic-email and removed topic-SSL labels Mar 27, 2018
    @methane
    Copy link
    Member

    methane commented Mar 27, 2018

    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.

    @njsmith
    Copy link
    Contributor

    njsmith commented Mar 27, 2018

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

    @tiran
    Copy link
    Member

    tiran commented Mar 27, 2018

    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.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life topic-SSL type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants