[issue6215] Backport the IO lib to trunk

2009-06-14 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I think I could fix windows build issue. (r73423) It seems some tests are failing. See http://www.python.org/dev/buildbot/trunk.stable/x86%20XP-4%20trunk/builds/2244/step-test/0 -- nosy: +ocean-city

[issue6215] Backport the IO lib to trunk

2009-06-14 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I found following patch can fix test_invalid_operations error on windows. Is this correct fix? There are many other places using bare open(). Index: Lib/test/test_io.py

[issue6281] Bug in hashlib

2009-06-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Can you propose an actual test case and a patch? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6281 ___

[issue6282] In tarfile, compression level cannot be specified

2009-06-14 Thread Omri Shaked
New submission from Omri Shaked omri.sha...@gmail.com: When creating a TarFile object that uses compression, the compressor is always created using its default compression level. import bz2 self.cmp = bz2.BZ2Compressor() You can't specify the compression level (i.e. self.cmp =

[issue6279] datamodel documentation confuses staticmethod with classmethod

2009-06-14 Thread Florian Mayer
Florian Mayer florma...@aim.com added the comment: Sorry, my fault. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6279 ___

[issue6279] datamodel documentation confuses staticmethod with classmethod

2009-06-14 Thread Florian Mayer
Changes by Florian Mayer florma...@aim.com: Removed file: http://bugs.python.org/file14292/datamodel.rst.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6279 ___

[issue6205] sdist doesn't include data_files

2009-06-14 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: Hi James, this has been changed already for trunk and 3.x, see #2279. Although it hasn't been backported in Python 2.6.x because it's a major behavior change that breaks setuptools. Although, when 2.7 and 3.2 are out, we will provide a

[issue6283] Cannot build extension in amd64 using msvc9compiler

2009-06-14 Thread Alex Shih-Han Lin
New submission from Alex Shih-Han Lin ale...@mail2000.com.tw: OS is Windows 7 x64, python using 2.6.2 amd64, SDK installed, but when I build some module by setup.py, it always traceback ValueError. running build running build_py running build_ext building 'genshi._speedups' extension Traceback

[issue5811] io.BufferedReader.peek(): Documentation differs from Implementation

2009-06-14 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: I updated the documentation in r73429. Is that better? -- versions: +Python 3.2 -Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5811

[issue6283] Cannot build extension in amd64 using msvc9compiler

2009-06-14 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Do you have VS2008 installed also? -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6283 ___

[issue6275] let unittest.assertRaises() return the exception object caught

2009-06-14 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Guido's comment is out of date. The assertRaises(exception) already returns something: A context manager. If we don't want to return the object, how about retainig it in the context manager, then? It is very awkward otherwise

[issue6275] let unittest.assertRaises() return the exception object caught

2009-06-14 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: Well, his comment was made after assertRaises had already been made a context manager. Keeping the exception attached to the context manager is an interesting suggestion and a less 'surprising' change to the API. --

[issue6275] let unittest.assertRaises() return the exception object caught

2009-06-14 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: I disagree that the regex version is half-assed though. If all you want to do is to make assertions about the exception message (the most common use case in *my* experience) it is enormously convenient. --

[issue1399935] enhance unittest to define tests that *should* fail

2009-06-14 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: Patch needs updating but still seems like a useful feature. I'll update and commit. I agree that decorator should be lowercase - should_fail or shouldfail ? -- ___ Python tracker

[issue6281] Bug in hashlib

2009-06-14 Thread Daniel Eloff
Daniel Eloff dan.el...@gmail.com added the comment: If you're missing any hash algorithm from openssl (say sha224) and the corresponding _sha224 module, hashlib will fail to import and no hash algorithms will be available. Additionally, if no (or only some) openssl algorithms are available, the

[issue6275] let unittest.assertRaises() return the exception object caught

2009-06-14 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Uploading a slimmed down patch, with only the exc_value memeber added to the assertRaises context manager. -- Added file: http://bugs.python.org/file14298/unitest2.patch ___ Python

[issue6284] C/API PyErr_AsUnicode()

2009-06-14 Thread Campbell Barton
New submission from Campbell Barton ideasma...@gmail.com: This function returns the output of PyErr_Print as a unicode string. We needed this in Blender3D because it has its own error logging system which does not use the console. The patch is made against python3k r73429. --

[issue6281] Bug in hashlib

2009-06-14 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- assignee: - gregory.p.smith nosy: +gregory.p.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6281 ___

[issue6284] C/API PyErr_AsUnicode()

2009-06-14 Thread Campbell Barton
Campbell Barton ideasma...@gmail.com added the comment: last patch was bad heres a new one. -- Added file: http://bugs.python.org/file14300/PyErr_AsUnicode_r73429.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6284

[issue6284] C/API PyErr_AsUnicode()

2009-06-14 Thread Campbell Barton
Changes by Campbell Barton ideasma...@gmail.com: Removed file: http://bugs.python.org/file14299/PyErr_AsUnicode_r73429.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6284 ___

[issue1399935] enhance unittest to define tests that *should* fail

2009-06-14 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Actually, unittest already has @expectedFailure. -- resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1399935

[issue6284] C/API PyErr_AsUnicode()

2009-06-14 Thread Campbell Barton
Changes by Campbell Barton ideasma...@gmail.com: Removed file: http://bugs.python.org/file14300/PyErr_AsUnicode_r73429.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6284 ___

[issue6284] C/API PyErr_AsUnicode()

2009-06-14 Thread Campbell Barton
Changes by Campbell Barton ideasma...@gmail.com: Added file: http://bugs.python.org/file14301/PyErr_AsUnicode_r73429.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6284 ___

[issue6281] Bug in hashlib

2009-06-14 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- stage: - patch review versions: +Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6281 ___

[issue6208] path separator output ignores shell's path separator: / instead of \

2009-06-14 Thread ThurnerRupert
ThurnerRupert rupert.thur...@credit-suisse.com added the comment: the parent process would be sh.exe in the msys case, contrary to the windows standard cmd.exe, explorer.exe, system, system idle process, ... an example is the mercurial status command, see

[issue6215] Backport the IO lib to trunk

2009-06-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I found following patch can fix test_invalid_operations error on windows. Is this correct fix? There are many other places using bare open(). The fix looks ok. test_io should use self.open() instead of open() everywhere, except in places where

[issue4388] test_cmd_line fails on MacOS X

2009-06-14 Thread Jean Brouwers
Jean Brouwers mrje...@gmail.com added the comment: This test still fails and is the only failure with Python 3.1rc2 on MacOS X 10.4.11 Tiger (Intel). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4388

[issue1252236] Simplying Tkinter's event loop

2009-06-14 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: Michiel, the patch on #1049855 has been rejected so there is no longer a fix for the first problem to be solved. Also, the fourth problem you described is not entirely true, it is possible to run tkinter apps on IDLE without calling the mainloop

[issue3407] test_urllib2_localnet fails on MacOS X 10.4.11 (Intel)

2009-06-14 Thread Jean Brouwers
Jean Brouwers mrje...@gmail.com added the comment: This test passes with Python 3.1rc2 on MacOS X 10.4.11 Tiger (Intel). % ./python.exe Python 3.1rc2 (r31rc2:73411, Jun 14 2009, 09:27:12) [GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin Type help, copyright, credits or license for more

[issue3407] test_urllib2_localnet fails on MacOS X 10.4.11 (Intel)

2009-06-14 Thread Jean Brouwers
Jean Brouwers mrje...@gmail.com added the comment: The test also passes on Python 2.6.2 on MacOS X 10.4.11 Tiger (Intel): % ./python.exe Python 2.6.2 (r262:71600, Apr 15 2009, 21:47:16) [GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin Type help, copyright, credits or license for more

[issue5811] io.BufferedReader.peek(): Documentation differs from Implementation

2009-06-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Rather than only a single read on the raw stream, it should be at most a single read on the raw stream, IMHO. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5811

[issue6275] let unittest.assertRaises() return the exception object caught

2009-06-14 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Ok, maybe a bad choice of words :) I don't write unittests that much, of course, but I have found that when I am writing tests for stuff such as http, I want to verify the actual error code, i.e. HTTPError.code, which is not

[issue5492] Error on leaving IDLE with quit() or exit() under Linux

2009-06-14 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: I can get a similar error from time to time, just try it a couple of times and I believe you should hit it too. When that error isn't thrown IDLE prints the traceback of a SystemExit exception inside IDLE right before closing, so it may be hard

[issue1230] Tix HList class missing method implementation for info_bbox

2009-06-14 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: Please include a diff of this modified Tix.py instead. -- nosy: +gpolo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1230 ___

[issue6227] doctest_aliases doesn't test duplicate removal

2009-06-14 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Fixed in r73432 (trunk), will be merged to py3k after 3.1 is final. Thanks for the report! -- nosy: +amaury.forgeotdarc resolution: - fixed status: open - closed ___ Python tracker

[issue5221] help related topic doesn't exist

2009-06-14 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: In 3.1rc2, SPECIALMETHODS help ends with Related help topics: BASICMETHODS, ATTRIBUTEMETHODS, CALLABLEMETHODS, SEQUENCEMETHODS1, MAPPINGMETHODS, SEQUENCEMETHODS2, NUMBERMETHODS, CLASSES. The topic list only has SEQUENCEMETHODS and not S...1 and

[issue6284] C/API PyErr_AsUnicode()

2009-06-14 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: PyErr_Print seems a too high-level function for this usage: - it uses sys.excepthook - it exits the process if the exception is SystemExit (!) I'd prefer a function similar to PyErr_Display. And sys.stderr should not be redirected to a

[issue1489051] keyword and topic help broken in Pythonwin IDE

2009-06-14 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Something changed in the past year so that keyword and topic help work in 3.2rc2 at both the main prompt and help prompt. Thanks to whoever. If this is also fixed in 2.6.2 or even 2.6 in SVN, this can be closed. help('while') The ``while``

[issue6281] Bug in hashlib

2009-06-14 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: In addition, I would replace exec funcName + ' = __get_hash(funcName)' with globals()[funcName] = __get_hash(funcName) -- nosy: +amaury.forgeotdarc ___ Python tracker

[issue6281] Bug in hashlib

2009-06-14 Thread Daniel Eloff
Daniel Eloff dan.el...@gmail.com added the comment: Yes, I prefer: globals()[funcName] = __get_hash(funcName) The exec was used in the original code, I'm not aware of the style of the python stdlib programmers, so I tried to be as true to what I found as possible. I just wanted to blunt my

[issue6095] os.curdir as the default argument for os.listdir

2009-06-14 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Some comments about the patch: - It seems wasteful to allocate a new PyUnicode object for the .; the posix implements does it right: a simple wcscopy should be enough (and reduces the chances of refcount mistakes) - the last block is

[issue6095] os.curdir as the default argument for os.listdir

2009-06-14 Thread Virgil Dupras
Virgil Dupras hs...@hardcoded.net added the comment: 1. Yeah, I know. At first, that's what I wanted to do, but it resulted in a lot of code duplication (alloc, memerror, copy), which I didn't much like. But then again, what I ended up writing (because I realized I had to decref the new po)

[issue6285] Silent abort on XP help document display

2009-06-14 Thread Scott David Daniels
New submission from Scott David Daniels scott.dani...@acm.org: When running Idle on Windows XP, Python 3.1rc2, a failure to find an entry in the help documents causes Idle to exit (with no visible indication of why). The reason is in a failure of the call to os.startfile, and apparenly the

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2009-06-14 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Do you want to write a patch? (Note: the time module is written in C) -- nosy: +amaury.forgeotdarc stage: - needs patch ___ Python tracker rep...@bugs.python.org

[issue6282] In tarfile, compression level cannot be specified

2009-06-14 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The TarFile.bz2open function does have a 'compresslevel' parameter. How do you use TarFile? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org

[issue6215] Backport the IO lib to trunk

2009-06-14 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Here is a patch to convert open() and io.open() to self.open(). # I didn't change _default_chunk_size() but maybe should this also use self.open()? -- Added file: http://bugs.python.org/file14302/self_open.patch

[issue6215] Backport the IO lib to trunk

2009-06-14 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: except in places where it's not used as a test. I couldn't distinguish which one is that case, so I converted all open(). ;-) -- ___ Python tracker rep...@bugs.python.org

[issue6283] Cannot build extension in amd64 using msvc9compiler

2009-06-14 Thread Alex Shih-Han Lin
Alex Shih-Han Lin ale...@mail2000.com.tw added the comment: yes, I have already installed VS 2008 (but it is Express Edition for VC, VB ,C#...I have no money to buy standard edition.) -- ___ Python tracker rep...@bugs.python.org

[issue6277] Add description of new syntax of with to 2.7 whatsnew document.

2009-06-14 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: AMK writes the whatsnew for 2.7 and I write it for 3.1. In the case of 3.1, I already have an entry. -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org

[issue6277] Add description of new syntax of with to 2.7 whatsnew document.

2009-06-14 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: I should have been clearer. There is no need to submit patches for whatsnew documents. Those are solely the responsiblity of their individual maintainers (see the instructions at the top of the file). --

[issue1489051] keyword and topic help broken in Pythonwin IDE

2009-06-14 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Very good :) -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1489051 ___

[issue6143] IDLE - an extension to clear the shell window

2009-06-14 Thread Roger Serwy
Roger Serwy roger.se...@gmail.com added the comment: I just tried Squeezer. It's pretty neat and it solves a different problem. Clearing the contents of the shell window should be a simple operation. The undo operation doesn't restore iomark properly, nor does it restore tags. I've uploaded a

[issue5811] io.BufferedReader.peek(): Documentation differs from Implementation

2009-06-14 Thread Lucas Prado Melo
Lucas Prado Melo lukepada...@gmail.com added the comment: Here is a patch that passes all the tests (I had to change some of them though, they were expecting erroneous behaviours IMHO). The biggest problem was the read1 testing, I've tried to get the maximum of bytes less than or equal to what

[issue5811] io.BufferedReader.peek(): Documentation differs from Implementation

2009-06-14 Thread Lucas Prado Melo
Lucas Prado Melo lukepada...@gmail.com added the comment: Here, it's a patch that passes all the tests (I had to change some of them though, they were expecting erroneous behaviours IMHO). The biggest problem was the read1 testing, I've tried to get the maximum of bytes less than or equal to

[issue6285] Silent abort on XP help document display

2009-06-14 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: How exactly did you trigger the error that you are fixing? -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6285 ___

[issue6285] Silent abort on XP help document display

2009-06-14 Thread Scott David Daniels
Scott David Daniels scott.dani...@acm.org added the comment: I uninstalled 3.1rc1, installed 3.1rc2, was exercising, and went to look up something in the docs, and Idle disappeared. I tried again, same result. So I opened a command window, and ran Idle as: python -m idlelib.idle Tried it

[issue6283] Cannot build extension in amd64 using msvc9compiler

2009-06-14 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: So when you run vcvarsall.bat, and then do set, does it print any of the variables include, lib, libpath, path? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6283

[issue6285] Silent abort on XP help document display

2009-06-14 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: I uninstalled 3.1rc1, installed 3.1rc2, was exercising, and went to look up something in the docs What does that mean? What exactly did you do to look up something in the docs? (I assume was exercising didn't cause IDLE to crash)