[issue18610] wsgiref.validate expects wsgi.input read to give exactly one arg

2015-02-18 Thread PJ Eby
PJ Eby added the comment: This area of the spec is different between 333 and precisely to clarify this point, without technically changing conformance requirements. PEP 333 was supposed to require the app to supply an argument, while PEP was changed to encourage the server to allow

[issue18610] wsgiref.validate expects wsgi.input read to give exactly one arg

2015-02-17 Thread PJ Eby
PJ Eby added the comment: This is a misreading of the spec. The read() method is defined as taking exactly one parameter. The server *should* support it being optional, but the app invoking it without an argument is not compliant, and wsgiref.validate is validating that the *app* performs

[issue21114] wsgiref.simple_server doesn't handle multi-line headers correctly

2014-12-09 Thread PJ Eby
PJ Eby added the comment: The fix for the server looks ok, but the validation and tests must not be changed, since they void spec compatibility and aren't a bug fix (and so must not be added to 2.7.) Indeed, if the validation library *doesn't* fail on CRLF, then *that* would be a

[issue21890] wsgiref.simple_server doesn't accept empty bytes before start_response is called

2014-07-02 Thread PJ Eby
PJ Eby added the comment: You're right, it shouldn't send the headers until a non-empty string occurs. I don't see any problem with treating it as a bug, and fixing it. Your patch will also allow non-compliant behavior, though. It seems to me it would be better to fix the logi

[issue21890] wsgiref.simple_server doesn't accept empty bytes before start_response is called

2014-07-02 Thread PJ Eby
PJ Eby added the comment: Please see this paragraph of the spec (my emphasis added): (Note: the application must invoke the start_response() callable **before the iterable yields its first body string**, so that the server can send the headers before any body content. However, this invocation

[issue17636] Modify IMPORT_FROM to fallback on sys.modules

2013-12-17 Thread PJ Eby
PJ Eby added the comment: Unfortunately, this is not quite true: the weird edge cases for that approach are simply *different*, and harder to diagnose. ;-) The approach here can only affect execution paths that would currently raise ImportError; that one can break execution paths that are

[issue992389] attribute error due to circular import

2013-12-17 Thread PJ Eby
PJ Eby added the comment: The new patch will have weird results in the case of a parent module that defines an attribute that's later replaced by an import, e.g. if foo/__init__.py defines a variable 'bar' that's a proxy for the foo.bar module. This is especially problema

[issue12641] Remove -mno-cygwin from distutils

2013-08-26 Thread PJ Eby
Changes by PJ Eby : -- title: NewInterface -> Remove -mno-cygwin from distutils ___ Python tracker <http://bugs.python.org/issue12641> ___ ___ Python-bugs-lis

[issue12641] NewInterface

2013-08-26 Thread PJ Eby
Changes by PJ Eby : Removed file: http://bugs.python.org/file31471/sa6.html ___ Python tracker <http://bugs.python.org/issue12641> ___ ___ Python-bugs-list mailin