The argparse docs don't say who's responsible for closing FileType objects

2017-01-25 Thread Bob Kline
The subject line pretty much says it all. Should the programmer close the file? If the programmer does that, and the user has asked that the file object be hooked up to standard in (or standard out) what will happen? If the programmer doesn't close it, does it get closed cleanly in the face of a

Re: getting data with proper encoding to the finish

2005-03-23 Thread Bob Kline
e I found in the README ([EMAIL PROTECTED])? Has anyone done any work to pick up where he left off? -- Bob Kline http://www.rksystems.com mailto:[EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Optimization of __len__() in cgi.py

2006-08-16 Thread Bob Kline
implementation of keys() reduces the amount of time taken by several orders of magnitude: def keys(self): return {}.fromkeys([i.name for i in self.list]).keys() Is there a better place for submitting suggestions like this? Bob Kline -- http://mail.python.org/mailman/listinfo/python

Re: Optimization of __len__() in cgi.py

2006-08-16 Thread Bob Kline
Marc 'BlackJack' Rintsch wrote: >> def keys(self): >> return {}.fromkeys([i.name for i in self.list]).keys() > > This does not maintain the order of `self.list`. Don't know if there's > code relying on this. Such code would be flying in the face of an implication that the order of th

Re: Optimization of __len__() in cgi.py

2006-08-16 Thread Bob Kline
Sybren Stuvel wrote: > FieldStorage.__nonzero__ tried first if it exists. You might want to > use that for more optimization. Excellent suggestion! It would be nice if this were adopted to supplement the original optimization, rather than replace it. Bob -- http://mail.python.org/mailman/listin

Re: Optimization of __len__() in cgi.py

2006-08-16 Thread Bob Kline
Georg Brandl wrote: > Post a RFE to the Python Tracker at > http://sourceforge.net/tracker/?group_id=5470&atid=355470 > > If you want, assign it to me (gbrandl). Done, thanks. Bob -- http://mail.python.org/mailman/listinfo/python-list

Re: getting database column names from query

2006-08-16 Thread Bob Kline
Jason Nordwick wrote: > I'm using MySQLdb and can connect and issue queries that return result > sets, but I how do I get the column names for those result sets? [d[0] for d in k.description] Cheers, Bob -- http://mail.python.org/mailman/listinfo/python-list

Un(der)documented bits of cgi.py

2007-09-15 Thread Bob Kline
night, suddenly breaking one's software. Can anyone think of a good reason why it would not be desirable to expose a publicly documented means of detecting the condition described above? Cheers and thanks! Bob Kline -- http://mail.python.org/mailman/listinfo/python-list

Re: Un(der)documented bits of cgi.py

2007-09-17 Thread Bob Kline
Aahz wrote: > What I suggest doing is submitting a doc patch to > http://bugs.python.org/ Done. Thanks for the suggestion. Bob -- http://mail.python.org/mailman/listinfo/python-list

Change in cgi module's handling of POST requests

2009-02-10 Thread Bob Kline
[Didn't realize the mirror didn't work both ways] We just upgraded Python to 2.6 on some of our servers and a number of our CGI scripts broke because the cgi module has changed the way it handles POST requests. When the 'action' attribute was not present in the form element on an HTML page th

Re: Change in cgi module's handling of POST requests

2009-02-12 Thread Bob Kline
Joshua Kugler wrote: We just upgraded Python to 2.6 on some of our servers and a number of our CGI scripts broke because the cgi module has changed the way it handles POST requests. When the 'action' attribute was not present in the form element on an HTML page the module behaved as if the valu

Re: Change in cgi handling of POST requests

2009-02-21 Thread Bob Kline
Aahz wrote: Interesting. Nobody has responded, so I suggest first filing a report using bugs.python.org and then asking on python-dev (with reference to your report). http://bugs.python.org/issue5340 Cheers, Bob -- http://mail.python.org/mailman/listinfo/python-list

Part of RFC 822 ignored by email module

2011-01-20 Thread Bob Kline
essage_from_string("Subject: blah").get('SUBJECT') 'blah' >>> email.message_from_string("Subject:\n blah").get('SUBJECT') ' blah' Note the space in front of the second value returned, but missing from the first. Can someone c

Re: Part of RFC 822 ignored by email module

2011-01-20 Thread Bob Kline
On 1/20/2011 12:23 PM, Carl Banks wrote: On Jan 20, 7:08 am, Bob Kline wrote: I just noticed that the following passage in RFC 822: The process of moving from this folded multiple-line representation of a header field to its single line represen- tation is

Re: Part of RFC 822 ignored by email module

2011-01-20 Thread Bob Kline
ing the leading white space would be reflected documentation (but it isn't). -- Bob Kline http://www.rksystems.com mailto:bkl...@rksystems.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Part of RFC 822 ignored by email module

2011-01-20 Thread Bob Kline
newlines, tabs and spaces make up the whitespace element. That would be true for what the RFC calls "structured" fields, but not for the others (such as the Subject header). -- Bob Kline http://www.rksystems.com mailto:bkl...@rksystems.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Part of RFC 822 ignored by email module

2011-01-20 Thread Bob Kline
On 1/20/2011 5:34 PM, Martin Gregorie wrote: On Thu, 20 Jan 2011 16:25:52 -0500, Bob Kline wrote: On 1/20/2011 3:48 PM, Martin Gregorie wrote: That's only a problem if your code cares about the composition of the whitespace and this, IMO is incorrect behaviour. When the separator be

Canonical list of Python security vulnerabilities

2023-07-14 Thread Bob Kline via Python-list
found security-annou...@python.org, but there hasn't been anything posted there in over a year as far as I can tell, and even before that it's pretty thin. If there's a better place to ask, please advise. Thanks. -- Bob Kline https://www.rksystems.com mailto:bkl...@rks

Re: Canonical list of Python security vulnerabilities

2023-07-14 Thread Bob Kline via Python-list
On Fri, Jul 14, 2023 at 1:35 PM Bob Kline wrote: > Can someone point me to the official catalog of security vulnerabilities > in Python I did try entering "python security vulnerabilities" in the search box of the python.org web site, but what I got back was "No resu

Re: Canonical list of Python security vulnerabilities

2023-07-14 Thread Bob Kline via Python-list
On Fri, Jul 14, 2023 at 3:02 PM Barry wrote: > Where do you get your python from? Directly from python.org. > You may find that the organisation that packages python that you use has such > a list. That's my hope. Just haven't found it yet. :-} -- https://mail.python.org/mailman/listinfo/pyt

Re: Canonical list of Python security vulnerabilities

2023-07-15 Thread Bob Kline via Python-list
On Sat, Jul 15, 2023 at 1:02 PM Dieter Maurer wrote: > > I am active in the `Zope` community (a web application server > based on Python). This community has a security mailing list > for security related reports > and issues public CVE (= "Commun Vulnerabilities and Exposures") reports > (via a "