classification
Title: os.dup2() tests dup3() availability on each call
Type: performance Stage: resolved
Components: Extension Modules, Library (Lib) Versions: Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, izbyshev, vstinner
Priority: normal Keywords: patch

Created on 2018-02-16 23:10 by izbyshev, last changed 2018-02-21 05:21 by benjamin.peterson. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 5708 merged izbyshev, 2018-02-16 23:13
PR 5768 merged miss-islington, 2018-02-20 07:26
PR 5769 merged miss-islington, 2018-02-20 07:26
Messages (4)
msg312256 - (view) Author: Alexey Izbyshev (izbyshev) * (Python triager) Date: 2018-02-16 23:10
os.dup2() tests for dup3() system call availability at runtime, but doesn't remember the result across calls, repeating the test on each call with inheritable=False even if the test fails.

Judging by the code, 'dup3_works' was intended to be static (the first time its value is checked it's always an initial one).
msg312400 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2018-02-20 07:25
New changeset b3caf388a0418f6c031e4dbdcc0c1ce7e5cc36bd by Benjamin Peterson (Alexey Izbyshev) in branch 'master':
closes bpo-32859: Don't retry dup3() if it is not available at runtime (GH-5708)
https://github.com/python/cpython/commit/b3caf388a0418f6c031e4dbdcc0c1ce7e5cc36bd
msg312401 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2018-02-20 07:46
New changeset bab4fe320ad2e24c1084fd57d2059ef342688aa9 by Benjamin Peterson (Miss Islington (bot)) in branch '3.7':
closes bpo-32859: Don't retry dup3() if it is not available at runtime (GH-5708)
https://github.com/python/cpython/commit/bab4fe320ad2e24c1084fd57d2059ef342688aa9
msg312460 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2018-02-21 05:21
New changeset 16de2a9b8697cf90840eb217fb079f9c4c73e588 by Benjamin Peterson (Miss Islington (bot)) in branch '3.6':
closes bpo-32859: Don't retry dup3() if it is not available at runtime (GH-5708)
https://github.com/python/cpython/commit/16de2a9b8697cf90840eb217fb079f9c4c73e588
History
Date User Action Args
2018-02-21 05:21:14benjamin.petersonsetmessages: + msg312460
2018-02-20 07:46:49benjamin.petersonsetmessages: + msg312401
2018-02-20 07:26:55miss-islingtonsetpull_requests: + pull_request5548
2018-02-20 07:26:09miss-islingtonsetpull_requests: + pull_request5547
2018-02-20 07:25:54benjamin.petersonsetstatus: open -> closed
resolution: fixed
messages: + msg312400

stage: patch review -> resolved
2018-02-16 23:13:27izbyshevsetkeywords: + patch
stage: patch review
pull_requests: + pull_request5497
2018-02-16 23:10:17izbyshevcreate