Skip to content

bpo-34263 Cap timeout submitted to epoll/select etc. to one day.#8532

Merged
1st1 merged 3 commits into
python:masterfrom
MartinAltmayer:fix-issue-34263
Jul 31, 2018
Merged

bpo-34263 Cap timeout submitted to epoll/select etc. to one day.#8532
1st1 merged 3 commits into
python:masterfrom
MartinAltmayer:fix-issue-34263

Conversation

@MartinAltmayer

@MartinAltmayer MartinAltmayer commented Jul 28, 2018

Copy link
Copy Markdown
Contributor

"Timeouts (relative delay or absolute when) should not exceed one day."

Shall we update the doc? With this PR there is no reason anymore to disallow timeouts greater than one day in asyncio.

https://bugs.python.org/issue34263

@the-knights-who-say-ni

Copy link
Copy Markdown

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

When your account is ready, please add a comment in this pull request
and a Python core developer will remove the CLA not signed label
to make the bot check again.

You can check yourself
to see if the CLA has been received.

Thanks again for your contribution, we look forward to reviewing it!

@1st1

1st1 commented Jul 28, 2018

Copy link
Copy Markdown
Member

Shall we update the doc?

Yes, let's just drop that sentence from docs in 3.8.

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is it possible to write a test? Maybe modify the constant during the test?

_HAS_IPv6 = hasattr(socket, 'AF_INET6')

# Maximum timeout passed to select to avoid OS limitations
MAXIMUM_SELECT_TIMEOUT = 24 * 3600

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hum, maybe it's better to make the constant private. What do you think @1st1?

@1st1

1st1 commented Jul 30, 2018

Copy link
Copy Markdown
Member

Is it possible to write a test? Maybe modify the constant during the test?

Yeah, I discussed this with @MartinAltmayer and we ultimately decided that this test would be too fragile and complex. I don't this we need it.

Hum, maybe it's better to make the constant private. What do you think @1st1?

Absolutely all constants in asyncio are already private and it's not recommended to modify them.

@1st1 1st1 merged commit 944451c into python:master Jul 31, 2018
@miss-islington

Copy link
Copy Markdown
Contributor

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

@bedevere-bot

Copy link
Copy Markdown

GH-8586 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 Jul 31, 2018
…honGH-8532)

(cherry picked from commit 944451c)

Co-authored-by: MartinAltmayer <martin.altmayer@web.de>
@bedevere-bot

Copy link
Copy Markdown

GH-8587 is a backport of this pull request to the 3.6 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 31, 2018
…honGH-8532)

(cherry picked from commit 944451c)

Co-authored-by: MartinAltmayer <martin.altmayer@web.de>
@vstinner

Copy link
Copy Markdown
Member

Absolutely all constants in asyncio are already private and it's not recommended to modify them.

My proposal was to add "_" prefix: _MAXIMUM_SELECT_TIMEOUT.

I'm fine with the merged PR.

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.

6 participants