[issue13674] crash in datetime.strftime

2011-12-29 Thread patrick vrijlandt
New submission from patrick vrijlandt : This causes a crash in python 3.2.2 and 3.2, but not in 2.7.2 C:\Python32>python Python 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license"

[issue13674] crash in datetime.strftime

2011-12-29 Thread patrick vrijlandt
patrick vrijlandt added the comment: Is it relevant that 2.7.2 _does_ throw a correct exception? -- ___ Python tracker <http://bugs.python.org/issue13

[issue13674] crash in datetime.strftime

2011-12-30 Thread patrick vrijlandt
patrick vrijlandt added the comment: Somewhere in the code is also/still a seperate check concerning strftime: PythonWin 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit (Intel)] on win32. Portions Copyright 1994-2008 Mark Hammond - see 'Help/About PythonWin' for further

[issue12321] documentation of ElementTree.find

2011-06-13 Thread patrick vrijlandt
New submission from patrick vrijlandt : >From the python docs for version 3.2: 19.12.3. ElementTree Objects find(match) [...] Same as getroot().find(match). [...] This is not true: tree.find accepts an absolute path (like "/*") , whereas element.find doesn't. Also appl

[issue12322] ElementPath 1.3 expressions documentation

2011-06-13 Thread patrick vrijlandt
New submission from patrick vrijlandt : Python 3.2 supports ElementPath version 1.3. The relevant documentation is http://effbot.org/zone/element-xpath.htm. It says: .. (New in 1.3) Selects the parent element. However, a CHANGES document says: The engine also provides limited support for

[issue12323] ElementPath 1.3 expressions

2011-06-13 Thread patrick vrijlandt
New submission from patrick vrijlandt : >From http://effbot.org/zone/element-xpath.htm: [position] (New in 1.3) Selects all elements that are located at the given position. The position can be either an integer (1 is the first position), the expression “last()” (for the last posit

[issue12321] documentation of ElementTree.find

2011-06-19 Thread patrick vrijlandt
patrick vrijlandt added the comment: [...] Same as getroot().find(match). [...] -> [...] For a relative path, this is equivalent to getroot().find(match). Additionally, this form accepts an absolute path. [...] This is easy, but might not be a very good solution. Random thoughts/Points

[issue11987] queue.Queue.put should acquire mutex for unfinished_tasks

2011-05-03 Thread patrick vrijlandt
New submission from patrick vrijlandt : Line 154 in standard library's queue.py, in the definition of Queue.put() is: self.unfinished_tasks += 1 This line should be protected by acquiring the all_tasks_done lock. Theoretically, the increment could occur somewhere during task

[issue11987] queue.Queue.put should acquire mutex for unfinished_tasks

2011-05-03 Thread patrick vrijlandt
patrick vrijlandt added the comment: I agree. Please close the ticket. Thanks, Patrick 2011/5/3 Raymond Hettinger > > Raymond Hettinger added the comment: > > > This line should be protected by acquiring the all_tasks_done lock. > > All of three of the condition var

[issue13779] os.walk: bottom-up

2012-01-13 Thread patrick vrijlandt
New submission from patrick vrijlandt : PythonWin 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit (Intel)] on win32. Portions Copyright 1994-2008 Mark Hammond - see 'Help/About PythonWin' for further copyright information. >>> import os >>> os.makedirs(&

[issue13784] Documentation of xml.sax.xmlreader: Locator.getLineNumber() and Locator.getColumnNumber()

2012-01-14 Thread patrick vrijlandt
New submission from patrick vrijlandt : Problem: Locator methods return the location where the event starts, not where it ends. Locator line numbers start at 1, Locator column numbers can be 0. Proposal: Adapt documentation. >From the docs: Instances of Locator provide these meth

[issue13796] use 'text=...' to define the text attribute of and xml.etree.ElementTree.Element

2012-01-16 Thread patrick vrijlandt
patrick vrijlandt added the comment: I agree the Element syntax is sometimes awkward. But how would you represent text or tail attributes within this enhanced element? comes to mind ... -- nosy: +patrick.vrijlandt ___ Python tracker <h

[issue13779] os.walk: bottom-up

2012-01-16 Thread patrick vrijlandt
patrick vrijlandt added the comment: The documentation of this function is generally ambiguous, because os.walk is a generator. Thus "generate" means (1) yielded from a generator and (2) prepared for later use within the generator. To avoid the ambiguity, "generate" s

[issue13796] use 'text=...' to define the text attribute of and xml.etree.ElementTree.Element

2012-01-17 Thread patrick vrijlandt
patrick vrijlandt added the comment: Hi, Did you look at lxml (http://lxml.de)? from lxml.builder import E from lxml import etree tree = etree.ElementTree( E.Hello( "Good morning!", E.World("How do you do", humour = "excellent"),

[issue13823] xml.etree.ElementTree.ElementTree.write - argument checking

2012-01-19 Thread patrick vrijlandt
New submission from patrick vrijlandt : (1) The docs say: xml_declaration controls if an XML declaration should be added to the file. Use False for never, True for always, None for only if not US-ASCII or UTF-8 or Unicode (default is None). The method also accepts other values, like

[issue13779] os.walk: bottom-up

2012-02-23 Thread patrick vrijlandt
patrick vrijlandt added the comment: Good solution. +1 for closing. Patrick -- ___ Python tracker <http://bugs.python.org/issue13779> ___ ___ Python-bugs-list m

[issue15564] cgi.FieldStorage should not call read_multi on files

2012-08-06 Thread patrick vrijlandt
New submission from patrick vrijlandt: .mht is an archive format created by Microsoft IE 8 when saving a webpage. It is essentially a mime multipart message. My problem occurred when I uploaded such a file to a cgi-based server. The posted data would be fed to cgi.FieldStorage. (I can't

[issue15588] quopri: encodestring and decodestring handle bytes, not strings

2012-08-08 Thread patrick vrijlandt
New submission from patrick vrijlandt: quopri.py's functions encodestring and decodestring are documented to handle strings; and this is clearly suggested by their name. However, these functions accept and return bytes, not strings. This should be reflected in the documentation. Even b

[issue15564] cgi.FieldStorage should not call read_multi on files

2012-08-11 Thread patrick vrijlandt
patrick vrijlandt added the comment: I would not know how to set the MIME-type of a file during upload. This is apparently set by the browser based on the filename (extension). Even (or: especially) if this is a bug in all the current browsers, python should provide the tools to adapt to this

[issue15564] cgi.FieldStorage should not call read_multi on files

2012-08-13 Thread patrick vrijlandt
patrick vrijlandt added the comment: I must admit my usage case is a hack, but the summary is: view a page on one computer, process it on another computer; like sending the page to a friend, with friend -> self and send -> upload. I found one other victim in python (https://groups.goog

[issue12322] ElementPath 1.3 expressions documentation

2012-10-08 Thread patrick vrijlandt
patrick vrijlandt added the comment: To be complete: an xpath 'above' the start element returns None Thanks for the patch! -- ___ Python tracker <http://bugs.python.o

[issue12323] ElementPath 1.3 expressions

2013-01-22 Thread patrick vrijlandt
patrick vrijlandt added the comment: Dear Eli, According to the XPath spec, the 'position' as can be used in xpath expressions, should be positive. However, the current implementation (example below from 3.3.0) accepts some values that should not be ok. Therefore, I do not agr