Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Simplify SSLSocket / SSLObject doc string #9972

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

Merged
merged 1 commit into from
May 17, 2019
Merged

Conversation

tiran
Copy link
Member

@tiran tiran commented Oct 19, 2018

Instead of maintaining the same doc string two times, let's copy common
doc strings from SSLObject methods and properties to SSLSocket.

Signed-off-by: Christian Heimes [email protected]

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice hack :)

Lib/ssl.py Outdated
@@ -781,6 +781,12 @@ def verify_client_post_handshake(self):
return self._sslobj.verify_client_post_handshake()


def _sslcopydoc(func):
"""Copy doc string from SSLObject to SSLSocket"""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: it's called a "docstring" (no space), no?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tiran could you fix doc string? thanks

Instead of maintaining the same doc string two times, let's copy common
doc strings from SSLObject methods and properties to SSLSocket.

Signed-off-by: Christian Heimes <[email protected]>
@matrixise matrixise merged commit 80ed353 into python:master May 17, 2019
@miss-islington
Copy link
Contributor

Thanks @tiran for the PR, and @matrixise for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-13384 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 17, 2019
Instead of maintaining the same doc string two times, let's copy common
doc strings from SSLObject methods and properties to SSLSocket.

Signed-off-by: Christian Heimes <[email protected]>
(cherry picked from commit 80ed353)

Co-authored-by: Christian Heimes <[email protected]>
@matrixise
Copy link
Member

@tiran thanks

matrixise pushed a commit to matrixise/cpython that referenced this pull request May 17, 2019
Instead of maintaining the same doc string two times, let's copy common
doc strings from SSLObject methods and properties to SSLSocket.

Signed-off-by: Christian Heimes <[email protected]>
(cherry picked from commit 80ed353)

Co-authored-by: Christian Heimes <[email protected]>
matrixise pushed a commit that referenced this pull request May 17, 2019
Instead of maintaining the same docstring two times, let's copy common
docstrings from SSLObject methods and properties to SSLSocket.

(cherry picked from commit 80ed353)

Co-authored-by: Christian Heimes <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants