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

bpo-32356: idempotent pause_/resume_reading; new is_reading method. #4914

Merged
merged 2 commits into from
Dec 18, 2017

Conversation

1st1
Copy link
Member

@1st1 1st1 commented Dec 18, 2017

@@ -317,6 +317,9 @@ def __del__(self):
source=self)
self.close()

def is_reading(self):
return self._ssl_protocol._transport.is_reading()
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you write a test for it?

Copy link
Contributor

@asvetlov asvetlov left a comment

Choose a reason for hiding this comment

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

Looks good but test for ssl_transport.is_reading() would be awesome.

Make it raise a RuntimeError when it's not yet initialized
@1st1
Copy link
Member Author

1st1 commented Dec 18, 2017

Looks good but test for ssl_transport.is_reading() would be awesome.

Added it!

@1st1 1st1 merged commit d757aaf into python:master Dec 18, 2017
@1st1 1st1 deleted the is_reading branch December 18, 2017 22:03
vstinner added a commit that referenced this pull request Jun 13, 2018
Backport note: don't add new is_reading() method from master to 3.6.

(cherry picked from commit d757aaf)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants