[issue12646] zlib.Decompress.decompress/flush do not raise any exceptions when given truncated input streams

2011-08-06 Thread Nadeem Vawda
Nadeem Vawda added the comment: > I have another proposition (as an alternative). The new _bz2.BZ2Decompressor > objects have an attribute called eof which is False until the end of the > stream is read. The same attribute could be added to zlib.Decompress objects. +1, I like the idea of being

[issue11572] bring Lib/copy.py to 100% coverage

2011-08-06 Thread Sandro Tosi
Sandro Tosi added the comment: JFTR, the same kind of check of __reduce_ex__ and then falling back on __reduce__ is prenset in pickle too: maybe it's worth align them? -- ___ Python tracker __

[issue12703] Loading a module

2011-08-06 Thread Rémy HUBSCHER
New submission from Rémy HUBSCHER : I patched it for redbarrel but there is the same bug on distutils2. This patch allow to see the error raised when loading the module instead of saying that the module does not exists. https://bitbucket.org/tarek/redbarrel/changeset/2cf6d7e32081#chg-redbarrel

[issue12682] Meaning of 'accepted' resolution as documented in devguide

2011-08-06 Thread Ezio Melotti
Ezio Melotti added the comment: FWIW that would be fine with me. Even if there's nothing broken in a feature request, "fixed" applied to feature could mean "the lack of this feature has been fixed". If the issue is valid, one can say so in a message without marking it as 'accepted'. ---

[issue12703] Improve error reporting for packaging.util.resolve_name

2011-08-06 Thread Éric Araujo
Éric Araujo added the comment: Thanks for the report. Would you have time to make a code+test patch for the CPython repo? distutils2 has moved there under the name packaging. -- assignee: tarek -> eric.araujo stage: -> needs patch title: Loading a module -> Improve error reporting f

[issue12666] map semantic change not documented in What's New

2011-08-06 Thread Éric Araujo
Éric Araujo added the comment: I have reported the bugs to the metatracker. In the meantime, could you manually upload a diff? -- ___ Python tracker ___ __

[issue12646] zlib.Decompress.decompress/flush do not raise any exceptions when given truncated input streams

2011-08-06 Thread Nadeem Vawda
Nadeem Vawda added the comment: Here's the patch. -- Added file: http://bugs.python.org/file22846/zlib-eof ___ Python tracker ___ ___

[issue12646] zlib.Decompress.decompress/flush do not raise any exceptions when given truncated input streams

2011-08-06 Thread Nadeem Vawda
Changes by Nadeem Vawda : Added file: http://bugs.python.org/file22847/zlib-eof.patch ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue12646] zlib.Decompress.decompress/flush do not raise any exceptions when given truncated input streams

2011-08-06 Thread Nadeem Vawda
Changes by Nadeem Vawda : Removed file: http://bugs.python.org/file22846/zlib-eof ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue12666] map semantic change not documented in What's New

2011-08-06 Thread Jason R. Coombs
Jason R. Coombs added the comment: I'm attaching the diff at https://bitbucket.org/jaraco/cpython-issue12666/changeset/bc362109eed8 -- keywords: +patch Added file: http://bugs.python.org/file22848/cpython-issue12666-bc362109eed8.diff ___ Python tra

[issue12301] Use :data:`sys.thing` instead of ``sys.thing`` throughout

2011-08-06 Thread Bryce Verdier
Bryce Verdier added the comment: I would like to help out with this, as there seems to be a lot of work that needs to be done. I guess I'm a little unsure about what you mean by ``code`` instead of :data:. Is ``code`` generic? Like in Doc/tutorials/classes.rst I see a lot of things similar t

[issue12301] Use :data:`sys.thing` instead of ``sys.thing`` throughout

2011-08-06 Thread Ezio Melotti
Ezio Melotti added the comment: Nope, ``...`` can be used for generic pieces of code, whereas e.g. :data:`sys.stdout` indicates that stdout is a "data" attribute of the sys module. If you use :data:`...` and rebuild the doc (cd Doc/; make html), you will see that e.g. sys.stdout will be then

[issue11481] The copy module already uses copyreg

2011-08-06 Thread Sandro Tosi
Sandro Tosi added the comment: After quite a long chat with Ezio, I'm just proposing this updated patch: - it fixes the copy doc, explicitly acknowledging the use of copyreg functionalities - it rewords the first paragraph of copyreg doc, which was a bit too pickle-centric - it adds an exampl

[issue12704] Language References does not specify exception raised by final yield()

2011-08-06 Thread Nikolaus Rath
New submission from Nikolaus Rath : >From http://docs.python.org/reference/simple_stmts.html#the-yield-statement: "As of Python version 2.5, the yield statement is now allowed in the try clause of a try ... finally construct. If the generator is not resumed before it is finalized (by reaching

[issue12301] Use :data:`sys.thing` instead of ``sys.thing`` throughout

2011-08-06 Thread Bryce Verdier
Bryce Verdier added the comment: Is this more what was in mind for the bug? -- Added file: http://bugs.python.org/file22850/issue12301.test_patch ___ Python tracker ___

[issue12704] Language References does not specify exception raised by final yield()

2011-08-06 Thread Nikolaus Rath
Nikolaus Rath added the comment: >From http://www.python.org/dev/peps/pep-0342/ I believe that the last yield >will raise GeneratorExit. So my suggestion is to replace the above mentioned >paragraph with: """ As of Python version 2.5, yield is an expression rather than a statement and allowe

[issue12611] 2to3 crashes when converting doctest using reduce()

2011-08-06 Thread Petri Lehtinen
Petri Lehtinen added the comment: Attached a patch that adds a test case reproducing the issue. Hopely someone with more experience with lib2to3 can do the actual fixing... -- keywords: +patch type: -> behavior Added file: http://bugs.python.org/file22851/issue12611_test.patch __

[issue12301] Use :data:`sys.thing` instead of ``sys.thing`` throughout

2011-08-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: I presume so. I believe ``x`` is meant for general code like ``for thing in group: print(thing)``. While Éric specifically mentioned the :data: role, I presume the same idea applies to :func: and possibly other link-generating roles. Is there a statement rol

[issue12702] shutil.copytree() should use os.lutimes() to copy the metadata of symlinks

2011-08-06 Thread Ned Deily
Ned Deily added the comment: Keep in mind that os.lutimes() may not be available on the platform so the patch will need to test for that. -- nosy: +ned.deily ___ Python tracker ___

[issue12301] Use :data:`sys.thing` instead of ``sys.thing`` throughout

2011-08-06 Thread Ezio Melotti
Ezio Melotti added the comment: For global there's :keyword:. Also note that :data: should be used for module-level variables (or constant) not for attributes of e.g. classes and instances. If there are other ``...`` that can be fixed (even using something else like e.g. :func: or :meth:),

[issue12661] Add a new shutil.cleartree function to shutil module

2011-08-06 Thread Senthil Kumaran
Senthil Kumaran added the comment: Hello Leonid, I think the best way forward would be post it as a recipe in active state cookbook if you have not already and see the adoption. If there is enough, then it can be added to shutil module. AFAIK, a couple of shutil features have gained entry in

[issue10087] HTML calendar is broken

2011-08-06 Thread Senthil Kumaran
Senthil Kumaran added the comment: FWIW, I think removing the encoding facility (more so because it can interfere with the terminal encoding) and just dealing with strings to output the html version of calendar seems a neater way than definiing write = sys.stdout.buffer.write and writing the

[issue12608] crash in PyAST_Compile when running Python code

2011-08-06 Thread Meador Inge
Meador Inge added the comment: Thanks for the test case Albert. The attached patch adds a unit test based off of the given repro case and fixes the bug in the FunctionDef compiler. The compiler was hitting a NULL pointer deref on FunctionDefs with empty list bodies. Reproduced and fixed on

[issue10087] HTML calendar is broken

2011-08-06 Thread Ezio Melotti
Ezio Melotti added the comment: BTW, accessing sys.stdout.buffer is not really safe, because if sys.stdout has been replaced with some other object, the buffer attribute might not be available (IIRC StringIO doesn't have it). -- ___ Python tracker

[issue12705] Make compile('1\n2\n', '', 'single') raise an exception instead of silently truncating?

2011-08-06 Thread Devin Jeanpierre
New submission from Devin Jeanpierre : (this is copy-pasted from http://mail.python.org/pipermail/python-ideas/2011-July/010787.html ) compile('1\n2\n', '','single') == compile('1\n', '','single'). That is, it ignores the second statement ('2\n'), without offering a way for the caller to detec

[issue10087] HTML calendar is broken

2011-08-06 Thread Chris Lambacher
Chris Lambacher added the comment: Senthil: I think that would fundamentally make things worse. The HTML calendar apparently always provides a bytes type, but lets assume it provided you with unicode and we used sys.stdout.write on the output. Fundamentally you would get the same behavior as

[issue12677] Turtle, fix right/left rotation orientation

2011-08-06 Thread Senthil Kumaran
Senthil Kumaran added the comment: Sandro - You could go ahead and commit this. -- ___ Python tracker ___ ___ Python-bugs-list mailin

[issue1346874] httplib simply ignores CONTINUE

2011-08-06 Thread Nikolaus Rath
Changes by Nikolaus Rath : -- nosy: +Nikratio ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue10087] HTML calendar is broken

2011-08-06 Thread Senthil Kumaran
Senthil Kumaran added the comment: Chris, as you already suggested in msg124410, I would prefer the removal of encoding specification from command line. Providing the encoding argument via API with deprecating warning is a good idea. The output should be string and it should be just be printe

[issue12398] Sending binary data with a POST request in httplib can cause Unicode exceptions

2011-08-06 Thread Senthil Kumaran
Changes by Senthil Kumaran : -- assignee: -> orsenthil nosy: +orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu