Issue 32318: Remove "globals()" call from "socket.accept()" (original) (raw)

Created on 2017-12-14 04:30 by yselivanov, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 4857 closed yselivanov,2017-12-14 04:33
Messages (3)
msg308273 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2017-12-14 04:32
socket.accept currently has this code: type = self.type & ~globals().get("SOCK_NONBLOCK", 0) which I believe is (a) bad Python style; (b) slows things down.
msg308276 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-12-14 06:43
IMHO we should add a private mask constant, see: https://github.com/python/cpython/pull/4231#issuecomment-351622381
msg308768 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2017-12-20 18:39
This was fixed as part of https://bugs.python.org/issue32331
History
Date User Action Args
2022-04-11 14:58:55 admin set github: 76499
2017-12-20 18:39:30 yselivanov set status: open -> closedresolution: out of datemessages: + stage: patch review -> resolved
2017-12-14 06:43:07 vstinner set messages: +
2017-12-14 04:33:31 yselivanov set keywords: + patchstage: patch reviewpull_requests: + <pull%5Frequest4746>
2017-12-14 04:32:14 yselivanov set versions: + Python 3.7nosy: + vstinner, asvetlovmessages: + components: + Library (Lib)type: enhancement
2017-12-14 04:30:55 yselivanov create