[issue26380] Add an http method enum

2016-07-18 Thread Ethan Furman
Ethan Furman added the comment: That was the last nudge I needed. Thanks, everyone. -- assignee: -> ethan.furman resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue26380] Add an http method enum

2016-07-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur that the enum adding nothing of value here. -- nosy: +rhettinger ___ Python tracker ___

[issue26380] Add an http method enum

2016-07-18 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: what's the status of your issue ? -- nosy: +matrixise ___ Python tracker ___ ___ Python-bugs-list m

[issue26380] Add an http method enum

2016-02-21 Thread Demian Brecht
Demian Brecht added the comment: > To me, your later throw-in comment about static analyzers might be the most > persuasive point you made Well, we're in agreement there :) As I'd mentioned, at best it's a minor annoyance. I'm entirely on the fence about the use of the enum as well and after

[issue26380] Add an http method enum

2016-02-19 Thread Martin Panter
Martin Panter added the comment: The RFC for HTTP says the method is case-sensitive, although I have seen one person use lowercase (probably by accident). So “over the wire” it has to be uppercase b"GET". -- ___ Python tracker

[issue26380] Add an http method enum

2016-02-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: If I were deciding, I would be inclined to reject this. Part of the understanding when enums were added was that they would not automatically be used in the stdlib anywhere there could be used. To answer 'why not', there is an obvious gain to naming arbitrary

[issue26380] Add an http method enum

2016-02-18 Thread Demian Brecht
Demian Brecht added the comment: > BTW I think it is actually OPTIONS; see review comment. Well, don't I feel silly. Fixed. -- Added file: http://bugs.python.org/file41962/issue26380_2.patch ___ Python tracker

[issue26380] Add an http method enum

2016-02-18 Thread Demian Brecht
Demian Brecht added the comment: > I can see the advantage of using an enum over a plain string. But you only > get an error at run time, not compile time, if you misspell it. Sure, but at least you're giving static analysis utilities the chance to catch it up front. > And there is also the d

[issue26380] Add an http method enum

2016-02-18 Thread Martin Panter
Martin Panter added the comment: I can see the advantage of using an enum over a plain string. But you only get an error at run time, not compile time, if you misspell it. And there is also the disadvantage of the extra boilerplate of importing HTTPMessage. So I don’t have a strong opinion eit

[issue26380] Add an http method enum

2016-02-18 Thread Demian Brecht
Demian Brecht added the comment: > I don't have a firm opinion at this point -- can you give a few examples of > how this will help in code? It'll help solely with consistency across projects. Generally, using constants are generally favored over using hardcoded values. Mainly, it helps reduce

[issue26380] Add an http method enum

2016-02-18 Thread Ethan Furman
Ethan Furman added the comment: I don't have a firm opinion at this point -- can you give a few examples of how this will help in code? -- nosy: +ethan.furman ___ Python tracker ___

[issue26380] Add an http method enum

2016-02-17 Thread Demian Brecht
Demian Brecht added the comment: If nobody's opposed to the addition, I'll run through the unit tests and replace the hard coded strings. -- keywords: +patch Added file: http://bugs.python.org/file41947/issue26380.diff ___ Python tracker

[issue26380] Add an http method enum

2016-02-17 Thread Demian Brecht
New submission from Demian Brecht: Super minor annoyance that I've had over multiple projects is seeing either hard coded strings being used (which is a bit of a no-no in terms of best practices) or each project defining its own set of constants for http methods. Why not just include a standar