-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-95672 skip fcntl when pipesize is smaller than pagesize #102163
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
corona10
merged 13 commits into
python:main
from
hyeongyun0916:test-fcntcl-skip-when-smaller-than-pagesize
Mar 1, 2023
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
a3e90fc
skip fcntl when pipesize is smaller than pagesize
hyeongyun0916 89cc89f
apply review
hyeongyun0916 81a7ac4
Merge branch 'main' into test-fcntcl-skip-when-smaller-than-pagesize
hyeongyun0916 aa752c6
apply review
hyeongyun0916 f8fb6dd
Merge branch 'main' into test-fcntcl-skip-when-smaller-than-pagesize
hyeongyun0916 ec6a0cf
Merge branch 'main' into test-fcntcl-skip-when-smaller-than-pagesize
hyeongyun0916 eea71c3
add get_pagesize to test.support
hyeongyun0916 0464b45
Merge branch 'main' into test-fcntcl-skip-when-smaller-than-pagesize
hyeongyun0916 ca6a96e
Update Lib/test/support/__init__.py
hyeongyun0916 e14a345
Update Lib/test/support/__init__.py
hyeongyun0916 d5c4006
Update Doc/library/test.rst
hyeongyun0916 60fe601
apply reivew
hyeongyun0916 bf11762
Merge branch 'main' into test-fcntcl-skip-when-smaller-than-pagesize
hyeongyun0916 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,6 +51,8 @@ | |
# sys | ||
"is_jython", "is_android", "is_emscripten", "is_wasi", | ||
"check_impl_detail", "unix_shell", "setswitchinterval", | ||
# os | ||
"get_pagesize", | ||
# network | ||
"open_urlresource", | ||
# processes | ||
|
@@ -1893,6 +1895,18 @@ def setswitchinterval(interval): | |
return sys.setswitchinterval(interval) | ||
|
||
|
||
def get_pagesize(): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll change https://github.com/python/cpython/blob/main/Lib/test/memory_watchdog.py#L13 to get_pagesize in other pr.
hyeongyun0916 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"""Get size of a page in bytes.""" | ||
try: | ||
page_size = os.sysconf('SC_PAGESIZE') | ||
except (ValueError, AttributeError): | ||
try: | ||
page_size = os.sysconf('SC_PAGE_SIZE') | ||
except (ValueError, AttributeError): | ||
page_size = 4096 | ||
return page_size | ||
hyeongyun0916 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
@contextlib.contextmanager | ||
def disable_faulthandler(): | ||
import faulthandler | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.