[issue12523] 'str' object has no attribute 'more' [/usr/lib/python3.2/asynchat.py|initiate_send|245]

2014-04-16 Thread Caelyn McAulay
Caelyn McAulay added the comment: Here is a small script that runs fine under 2.7 but demonstrates the error when run at 3.5. If, at all the points annotated with '#not bytes :-(', the unicode strings are replaced with bytes objects, the example then successfully runs at 3.5. -- nosy

[issue12523] 'str' object has no attribute 'more' [/usr/lib/python3.2/asynchat.py|initiate_send|245]

2014-04-16 Thread Caelyn McAulay
Caelyn McAulay added the comment: I was unable to locate a point in the code where we could be certain that the error was ultimately caused by trying to use (unicode) strings instead of bytes object. The patch adds a logging statement suggesting what the trouble is when the error

[issue12523] 'str' object has no attribute 'more' [/usr/lib/python3.2/asynchat.py|initiate_send|245]

2014-04-16 Thread Caelyn McAulay
Caelyn McAulay added the comment: I like that approach decidedly more than my original one. Suggested revision patch attached. The sample script will not produce the following: error: uncaptured python exception, closing channel __main__.fake_asynchat 127.0.0.1:8000 at 0x7f10a85b4ae8 (class

[issue12523] 'str' object has no attribute 'more' [/usr/lib/python3.2/asynchat.py|initiate_send|245]

2014-04-16 Thread Caelyn McAulay
Caelyn McAulay added the comment: *will now produce. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12523 ___ ___ Python-bugs-list mailing list

[issue20928] xml.etree.ElementInclude does not include nested xincludes

2014-04-16 Thread Caelyn McAulay
Caelyn McAulay added the comment: xml.etree.ElementInclude.include now checks the inserted subtree to see if contains any Xincludes itself. And adds them. Also added a unit test to check for the new functionality (which will fail without the change to ElementInclude.py). -- keywords

[issue12148] Clarify or-ing together doctest option flags

2014-04-16 Thread Caelyn McAulay
Caelyn McAulay added the comment: I grepped for 's together' and found two instances of or's together in the docs which I reworded to use bitwise-or instead, in the attached patch. -- keywords: +patch nosy: +math_foo Added file: http://bugs.python.org/file34938/issue12148.patch

[issue5904] strftime docs do not explain locale effect on result string

2014-04-16 Thread Caelyn McAulay
Caelyn McAulay added the comment: Added to Docs that strftime will return a locale dependent byte string. -- keywords: +patch nosy: +math_foo Added file: http://bugs.python.org/file34940/issue5904.patch ___ Python tracker rep...@bugs.python.org http

[issue10523] argparse has problem parsing option files containing empty rows

2014-04-15 Thread Caelyn McAulay
Caelyn McAulay added the comment: I've attached a patch making the changes I suggested, assuming that the current behaviour is desirable. It documents the behaviour of argparse on files with blank lines and changes the way the error message that argparse generates when encountering

[issue18229] attribute headers of http.server.BaseHTTPRequestHandler sometimes does not exists

2014-04-15 Thread Caelyn McAulay
Caelyn McAulay added the comment: Added comment to documentation concerning when the headers attribute gets set. I confirmed that the headers attribute is only ever set in the parse_request method of BaseHTTPRequestHandler and only if the request is successfully parsed as HTTP

[issue7850] platform.system() should be macosx instead of Darwin on OSX

2014-04-15 Thread Caelyn McAulay
Caelyn McAulay added the comment: Added aliased option to platform.system(). I used the same system_alias method as platform.platform(), so the result of the aliased version will match the system entry of the aliased platform.platform(). Added to platform.system unit test to test new

[issue11983] Inconsistent hash and comparison for code objects

2014-04-14 Thread Caelyn McAulay
Caelyn McAulay added the comment: Here is a patch to add the requested documentation to code.h - I expanded it to specify (as per the conversation in this issue) that co_name is used in both hash and comparisons while co_firstlineno is used only in comparisons. I do not attempt explain

[issue15840] Ambiguity with regard to the effect of accessing a closed IOBase instance

2014-04-14 Thread Caelyn McAulay
Caelyn McAulay added the comment: Changed documentation to state that ValueError should be raised if any operation (excluding close()) is called on a closed stream. This appears to be what is done in iobase.c; and some investigation of inheriting types (rawiobase, fileio, bufferedio, etc

[issue10523] argparse has problem parsing option files containing empty rows

2014-04-14 Thread Caelyn McAulay
Caelyn McAulay added the comment: The current behaviour takes empty lines and interprets them as empty strings. The attached demonstration script shows the error occurring. The first case is a simple example to illustrate what happens in the general case. The second case shows empty lines