[issue4847] csv fails when file is opened in binary mode

2009-03-09 Thread John Machin
John Machin sjmac...@users.sourceforge.net added the comment: Before patching, could we discuss the requirements? There are two different concepts: (1) text file (assume that CR and/or LF are line terminators, and provide methods for accessing a line at a time) versus binary file (no such

[issue5453] pydoc -k fails (release30-maint patch)

2009-03-09 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: Added file: http://bugs.python.org/file13278/pydoc-keyword-search-patch-py3k.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5453 ___

[issue5454] pydoc -k fails (py3k patch)

2009-03-09 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: You can have multiple attachments to a single issue. I have attached this file to the other issue. -- message_count: 1.0 - 2.0 nosy: +loewis nosy_count: 1.0 - 2.0 resolution: - duplicate status: open - closed

[issue5454] pydoc -k fails (py3k patch)

2009-03-09 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: Removed file: http://bugs.python.org/file13278/pydoc-keyword-search-patch-py3k.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5454 ___

[issue4847] csv fails when file is opened in binary mode

2009-03-09 Thread John Machin
John Machin sjmac...@users.sourceforge.net added the comment: ... and it looks like Option 2 might already *almost* be in place. Continuing with the previous example (book1.csv has embedded lone LFs): C:\devel\csv\python30\python -c import csv; print(repr(list(csv.reader(open('book1.csv','rt',

[issue5406] asyncore doc issue

2009-03-09 Thread Josiah Carlson
Josiah Carlson josiahcarl...@users.sourceforge.net added the comment: Actually, that's exactly what it does. If the count is missing, it defaults to None. The code that is executed is exactly: if count is None: while map: poll_fun(timeout, map) It will loop until the

[issue5406] asyncore doc issue

2009-03-09 Thread Josiah Carlson
Josiah Carlson josiahcarl...@users.sourceforge.net added the comment: Well...the loop can also die if an uncaptured exception is raised, but I'm not sure that is necessary to spell out explicitly. -- message_count: 2.0 - 3.0 ___ Python tracker

[issue5447] future unicode literals and r'\u'

2009-03-09 Thread Zach Hirsch
Zach Hirsch zhir...@umich.edu added the comment: I've hit this, too, and it's annoyed me. So here's a patch against trunk that should fix it. The idea is: whenever unicode_literals are turned on (or the -U command line flag is passed), to convert r\u to \u005c\u0075 and r\U to \u005c\u0055 for

[issue5457] ZipFile writes incorrect modification time (second is off-by-one)

2009-03-09 Thread Christian Theune
New submission from Christian Theune c...@gocept.com: See the attached unit test. On seconds that are 0 and 60 the written second is reduced by 1. (The test doesn't explicitly prove that this happens during writing, but we checked this manually. The read function is fine.) --

[issue2889] curses for windows (alternative patch)

2009-03-09 Thread Zach Hirsch
Zach Hirsch zhir...@umich.edu added the comment: * test_curses: I'd be happier to see the 'if' statement as sys.platform != 'win32' and (not term or term == 'unknown') -- easier to read. OK, fixed. * test_curses: does putp() make PDCurses crash, or is it not available? If the latter, I'd

[issue5457] ZipFile writes incorrect modification time (second is off-by-one)

2009-03-09 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: This appears to be an intrinsic limitation built into a zipfile's standard file header format. The header conforms to http://www.pkware.com/documents/casestudies/APPNOTE.TXT where the date and time fields are specified to be

[issue5458] threading.Thread.join() documentation: missing 'from version' for RuntimeError exceptions

2009-03-09 Thread Eyal Gordon
New submission from Eyal Gordon eyal.gor...@gmail.com: In threading documentation: http://www.python.org/doc/current/library/threading.html?highlight=threading#threading.Thread.join It is not specified from which python version the join() call raises the RuntimeError exception. In python

[issue4847] csv fails when file is opened in binary mode

2009-03-09 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Not good. It should preserve ALL characters in the field. Please look at the doc for open() and io.TextIOWrapper. The `newline` parameter defaults to None, which means universal newlines with newline translation. Setting to '' (yes, the empty

[issue5448] Add precision property to decimal.Decimal

2009-03-09 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: FWIW, there is a public API to get at the same information: Decimal.as_tuple(). That being said, I don't see how your len(value._int) test could be correct. The exponent will potentially shift the value way out-of-bounds

[issue4847] csv fails when file is opened in binary mode

2009-03-09 Thread John Machin
John Machin sjmac...@users.sourceforge.net added the comment: pitrou Please look at the doc for open() and io.TextIOWrapper. The `newline` parameter defaults to None, which means universal newlines with newline translation. Setting to '' (yes, the empty string) enables universal newlines but

[issue5443] trivial typo in itertools documentation

2009-03-09 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: r70261 -- message_count: 1.0 - 2.0 nosy: +rhettinger nosy_count: 2.0 - 3.0 resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org

[issue4111] Add DTrace probes

2009-03-09 Thread Dan Villiom Podlaski Christiansen
Changes by Dan Villiom Podlaski Christiansen dan...@gmail.com: -- nosy: +danchr nosy_count: 12.0 - 13.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4111 ___

[issue4847] csv fails when file is opened in binary mode

2009-03-09 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I had already read it. I gave it a prize for least intuitive arg in the language. Please open a bug, then :) So you plan to use that, reading lines instead of blocks? You'll still have to examine which CRs and LFs are embedded and which are

[issue5237] Allow auto-numbered replacement fields in str.format() strings

2009-03-09 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: I'm attaching a patch that delivers the basic functionality in str.format. This patch is against trunk, although it will probably work elsewhere. DO NOT USE THIS PATCH IN ANY SERIOUS WORK It doesn't implement all of the needed functionality, it

[issue5237] Allow auto-numbered replacement fields in str.format() strings

2009-03-09 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Also note that this patch causes a few tests to fail, since they're trying to ensure that '{}'.format will fail. If we go forward I'll address that too, of course. -- message_count: 15.0 - 16.0 ___

[issue5223] infinite recursion in PyErr_WriteUnraisable

2009-03-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: python 3.0 does not crash. And it has better code for infinite recursion (r55850, r66186) I suggest to backport the py3k code, patch attached. Martin, your comments are welcome. Are there compatibility issues? -- keywords:

[issue5455] csv module no longer works as expected when file opened in binary mode

2009-03-09 Thread Skip Montanaro
Skip Montanaro s...@pobox.com added the comment: Jervis So the returned lineobj is a bytes type and then the Jervis PyUnicode_Check throws the error. Right, but given that fact how do you get a Unicode string out of the bytes without an encoding? You can't open a file in binary mode and

[issue5406] asyncore doc issue

2009-03-09 Thread Giampaolo Rodola'
Giampaolo Rodola' billiej...@users.sourceforge.net added the comment: You're right, my fault. -- message_count: 3.0 - 4.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5406 ___

[issue4847] csv fails when file is opened in binary mode

2009-03-09 Thread Skip Montanaro
Skip Montanaro s...@pobox.com added the comment: me What should be the default? Scratch that. If the iterator passed to csv.reader is in a mode which will cause it to emit bytes instead of unicode objects the caller must give an encoding. The csv.reader code will then perform the necessary

[issue5450] test_tcl testLoadTk fails if DISPLAY defined but connect fails, instead of being skipped

2009-03-09 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Patch uploaded as bzr branch to Launchpad at bzr+ssh://bazaar.launchpad.net/~rdmurray/python/bug5450-test -- message_count: 2.0 - 3.0 ___ Python tracker rep...@bugs.python.org

[issue5448] Add precision property to decimal.Decimal

2009-03-09 Thread Daniel Lescohier
Daniel Lescohier daniel.lescoh...@cbs.com added the comment: I had other code to check scale, but you are right, I should use quantize. There is certainly a lot to absorb in the IBM decimal specification. I really appreciate you pointing me to quantize and Inexact. I guess I inadvertently

[issue5237] Allow auto-numbered replacement fields in str.format() strings

2009-03-09 Thread Guido van Rossum
Guido van Rossum gu...@python.org added the comment: Please go ahead and finish this. I'm glad this is going in! -- message_count: 16.0 - 17.0 nosy: +gvanrossum nosy_count: 6.0 - 7.0 ___ Python tracker rep...@bugs.python.org

[issue5460] Python 3.0 grammar is ambiguous with the addition of star_expr

2009-03-09 Thread Fabio Zadrozny
New submission from Fabio Zadrozny fab...@users.sourceforge.net: Note: A discussion related to this bug was raised on: http://mail.python.org/pipermail/python-dev/2009-March/086939.html The following constructs are ambiguous in the Python 3.0 grammar: arglist: (argument ',')*

[issue5450] test_tcl testLoadTk fails if DISPLAY defined but connect fails, instead of being skipped

2009-03-09 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: Please use test_support.TestSkipped instead of showing a skip message using print. -- message_count: 3.0 - 4.0 nosy: +gpolo nosy_count: 1.0 - 2.0 ___ Python tracker rep...@bugs.python.org

[issue5450] test_tcl testLoadTk fails if DISPLAY defined but connect fails, instead of being skipped

2009-03-09 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: It should be okay to move tk tests to somewhere in Lib/lib-tk/test/test_tkinter/ (answering the final question). Even the rest of test_tcl could be relocated to that place. -- message_count: 4.0 - 5.0

[issue5234] Enhance 3.1 IDLE to exec IDLESTARTUP/PYTHONSTARTUP on restart

2009-03-09 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: Closing in favor of 5233, I see the fix being applied to both 2.7 and 3.1 if accepted. -- message_count: 3.0 - 4.0 nosy: +gpolo nosy_count: 3.0 - 4.0 resolution: - duplicate status: open - closed superseder: - Enhance 2.7 IDLE to exec

[issue5233] Enhance 2.7 IDLE to exec IDLESTARTUP/PYTHONSTARTUP on restart

2009-03-09 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: Assigning to kbk since 5234 was assigned to him. -- assignee: - kbk message_count: 2.0 - 3.0 nosy: +gpolo, kbk nosy_count: 1.0 - 3.0 ___ Python tracker rep...@bugs.python.org

[issue5461] python3 symlink

2009-03-09 Thread David Ripton
New submission from David Ripton d+pyt...@ripton.net: When Python 2.x is manually installed on Linux, a python2 symlink is created, like this: lrwxrwxrwx 1 root root 9 Jan 24 00:03 /usr/bin/python2 - python2.6 (make install updates the symlink; make altinstall does not). When Python 3.x is

[issue5411] add xz compression support to distutils

2009-03-09 Thread Per Øyvind Karlsen
Per Øyvind Karlsen peroyv...@mandriva.org added the comment: hmm, I'm unsure about how this should be done.. I guess such a test would belong in Lib/distutils/test_dist.py, but I'm uncertain about how it should be done, ie. should it be a test for doing 'bdist', 'bdist_rpm' and 'sdist' for

[issue5462] Pythonwin Vista Compatibility

2009-03-09 Thread Julie Earls
New submission from Julie Earls jea...@mail.usf.edu: Hello- I am trying to install a version of Python that includes Pythonwin and is compatible with a 32-bit Winsows Vista computer. Can anyone tell me which version works? I have tried several and so far no luck. Thanks --

[issue5462] Pythonwin Vista Compatibility

2009-03-09 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Please direct your question to the win32 or Python mailing lists. This tracker is for reporting bugs in Python, not support. -- message_count: 1.0 - 2.0 nosy: +benjamin.peterson nosy_count: 1.0 - 2.0 resolution: - invalid status:

[issue5411] add xz compression support to distutils

2009-03-09 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: I guess such a test would belong in Lib/distutils/test_dist.py no, rather in test_bdist_rpm, test_sdist and so on, but I can do it, it'll just take more time. -- message_count: 3.0 - 4.0 ___

[issue5456] io.StringIO's universal newlines support is broken in 3.0.1

2009-03-09 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Thanks, fixed in r70285. -- message_count: 1.0 - 2.0 nosy: +benjamin.peterson nosy_count: 1.0 - 2.0 resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org

[issue5463] Compiler warning get_ulong is never used 3.x

2009-03-09 Thread Andreas Schawo
New submission from Andreas Schawo andr...@schawo.de: When compiling the newest 3.x trunk I've got a compiler warning that get_ulong is defined but never used. I moved the function near the only place where it is used (disabled code). Now I have no more warnings. I don't know if it's of any

[issue5464] msgfmt.py does not work with plural form

2009-03-09 Thread Stephen George
New submission from Stephen George steve_...@optusnet.com.au: It seems that C:\Python26\Tools\i18n\msgfmt.py does not work with PO files that use plural form. Get the following error. ERRORTraceback (most recent call last): File C:\Python26\Tools\i18n\msgfmt.py, line 203, in module

[issue5445] codecs.StreamWriter.writelines problem when passed generator

2009-03-09 Thread Facundo Batista
Facundo Batista facu...@taniquetil.com.ar added the comment: When fixing this, note that the builtin name list should not be overwritten by the argument name. -- message_count: 1.0 - 2.0 nosy: +facundobatista nosy_count: 1.0 - 2.0 ___ Python tracker

[issue5237] Allow auto-numbered replacement fields in str.format() strings

2009-03-09 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Excellent feature - with this, I would actually see some hope for dropping all of my remaining uses of %-formatting at some point in the future. -- message_count: 17.0 - 18.0 nosy: +ncoghlan nosy_count: 7.0 - 8.0

[issue5428] Pyshell history management error

2009-03-09 Thread Michel Weinachter
Michel Weinachter mic...@weinachter.com added the comment: Hello, Ok, you are right I'm currently working using latex and I should have made a copy from the pdf. Sorry. 2009/3/5 Georg Brandl rep...@bugs.python.org: Georg Brandl ge...@python.org added the comment: The code you pasted

[issue5457] ZipFile writes incorrect modification time (second is off-by-one)

2009-03-09 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5457 ___

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2009-03-09 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: I've been far too busy in the new year to keep up with all your updates to this issue, but since Martin wanted some clarification on direction and copyright, Thanks for the clarification. So I think we should focus on Matthew's patches

[issue5464] msgfmt.py does not work with plural form

2009-03-09 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- assignee: - loewis nosy: +loewis nosy_count: 1.0 - 2.0 priority: - high ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5464 ___

[issue5460] Python 3.0 grammar is ambiguous with the addition of star_expr

2009-03-09 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- priority: - high ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5460 ___ ___

[issue5465] No edit in IDLE in right click context menu

2009-03-09 Thread Eddie Slimak
New submission from Eddie Slimak jesli...@gmail.com: I was mucking around attempting to get WConio working and so had an installation for both python 2.5 and 2.6 at the same time. After I uninstalled python 2.5 windows somehow stopped associating .py files with python. -- components:

[issue5465] No edit in IDLE in right click context menu

2009-03-09 Thread Eddie Slimak
Changes by Eddie Slimak jesli...@gmail.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5465 ___ ___ Python-bugs-list

[issue2706] datetime: define division timedelta/timedelta

2009-03-09 Thread Tennessee Leeuwenburg
Changes by Tennessee Leeuwenburg tleeuwenb...@gmail.com: -- nosy: +tleeuwenb...@gmail.com nosy_count: 6.0 - 7.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2706 ___

[issue5370] unpickling vs. __getattr__

2009-03-09 Thread Mike Meyer
Mike Meyer m...@users.sourceforge.net added the comment: I don't believe in documenting bugs instead of fixing them. If this bug is going to stay in the code, I can either fix my install of Python to have non-broken Pickle modules, or I can fix every third-party libraries objects I use whose

[issue5237] Allow auto-numbered replacement fields in str.format() strings

2009-03-09 Thread Senthil
Senthil orsent...@gmail.com added the comment: Would someone like to point the python-ideas discussion which rationalizes this request? And what would be written in the documentation? As much as I understand this, emptry braces {} for replacement fields is kind of unseen and leaves much thinking

[issue5370] unpickling vs. __getattr__

2009-03-09 Thread Mike Meyer
Mike Meyer m...@users.sourceforge.net added the comment: QAD patch for 2.6 pickle.py to fix this bug. Passes the 2.6 pickle unit tests. -- message_count: 5.0 - 6.0 Added file: http://bugs.python.org/file13290/pp ___ Python tracker