Issue 4496: misleading comment in urllib2 (original) (raw)

Created on 2008-12-02 21:07 by jjlee, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (4)
msg76783 - (view) Author: John J Lee (jjlee) Date: 2008-12-02 21:07
r54137 replaced a comment in urllib2.py with a misleading comment. The comment now implies the .insort() in question achieves the goal specified in the new comment. That's not true, which was the reason the original comment was there in the first place. At least replace the comment with the original comment. Alternatively, (correctly) resolve the question in the original comment somehow (for example by removing the .handlers attribute -- but since .handlers is misnamed in not having an initial underscore, it may have tempted people to use it, even though it's undocumented, hence private).
msg76801 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008-12-02 23:04
(The change was actually r54138) It seems that this .handlers attribute was used in older versions, before r34922, to close the handlers in-order. IMO it is no more useful, but may be kept for compatibility reasons.
msg124567 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-12-23 19:52
It is used in the tests, but I agree that it doesn't appear to be used in the code. I've removed the misleading comment and marked the self.handlers attribute as backward-compat-only in r87448, r87449, and r87450. The sorting is based on a 'handler_order' attribute, by the way, and presumably does control the order in which they are applied.
msg124584 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2010-12-24 02:46
On Thu, Dec 23, 2010 at 07:53:01PM +0000, R. David Murray wrote: > The sorting is based on a 'handler_order' attribute, by the way, and > presumably does control the order in which they are applied. Yes. Exactly.
History
Date User Action Args
2022-04-11 14:56:42 admin set github: 48746
2010-12-24 02:46:00 orsenthil set nosy: + orsenthilmessages: +
2010-12-23 19:52:59 r.david.murray set status: open -> closednosy: + jhylton, r.david.murraymessages: + resolution: fixedstage: resolved
2008-12-02 23:04:00 amaury.forgeotdarc set nosy: + amaury.forgeotdarcmessages: +
2008-12-02 21:10:23 jjlee set nosy: + facundobatistacomponents: + Library (Lib)versions: + Python 3.0, Python 2.7
2008-12-02 21:07:38 jjlee create