[issue5439] string.strip behaves strangly

2009-03-08 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: It's a feature you don't understand. .strip() doesn't expect the substring to be stripped, but a list of characters. Since the strip characters contain /, all leading a,/,b characters get stripped (in any order: py

[issue1701192] symbol conflict for 'readahead'

2009-03-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: If your build process really needs fcntl.h in Python.h, I suggest to customize it again and add: #ifdef Py_BUILD_CORE #define readahead do_readahead #endif -- nosy: +amaury.forgeotdarc resolution: - invalid status: open -

[issue5442] [3.1alpha1] test_importlib fails on Mac OSX 10.5.6

2009-03-08 Thread Ismail Donmez
New submission from Ismail Donmez ism...@namtrac.org: Two failures in test_importlib: == FAIL: test_case_insensitivity (importlib.test.extension.test_case_sensitivity.ExtensionModuleCaseSensi tivityTest)

[issue5442] [3.1alpha1] test_importlib fails on Mac OSX 10.5.6

2009-03-08 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +brett.cannon nosy_count: 1.0 - 2.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5442 ___ ___

[issue5442] [3.1alpha1] test_importlib fails on Mac OSX 10.5.6

2009-03-08 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- components: +Library (Lib), Tests priority: - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5442 ___

[issue5441] Convenience API for timeit.main

2009-03-08 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: It would be even better if you could pass a locals or globals dictionnary instead of the setup arg. And even even better if it could implicitly get the locals/globals from the calling frame :-) -- message_count: 1.0 - 2.0 nosy: +pitrou

[issue1818] Add named tuple reader to CSV module

2009-03-08 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I don't understand why NamedTupleReader requires the fieldnames array rather than the namedtuple class itself. If you could pass it the namedtuple class, users could choose whatever namedtuple subclass with whatever additional methods or behaviour

[issue5425] 2to3 wrong for types.StringTypes

2009-03-08 Thread Hagen Fürstenau
Hagen Fürstenau hfuerste...@gmx.net added the comment: The automatic conversion can't be perfect in all cases, but I think my second suggestion is more in line with the other transformations done by 2to3 (string literals, str, basestring etc.). I propose applying the second patch, but don't

[issue1422398] Unicode IOError: execfile(u'\u043a\u043a\u043a/x.py')

2009-03-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: It works with python 3.0. Of course you have to replace execfile with s = '\u043a\u043a\u043a.py' exec(compile(open(s).read(), s, 'exec')) -- message_count: 1.0 - 2.0 nosy: +amaury.forgeotdarc nosy_count: 1.0 - 2.0

[issue5443] trivial typo in itertools documentation

2009-03-08 Thread Lorenz Quack
New submission from Lorenz Quack d...@amberfisharts.com: In the docs: http://docs.python.org/library/itertools.html#module-itertools; In the table: Iterators terminating on the shortest input sequence: In row: imap() and starmap() In the column: Results It says fun() instead of func()

[issue1390086] ScrolledText hungs up in some conditions

2009-03-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Reproduces with 2.4.2, but seems fixed with 2.5. -- message_count: 2.0 - 3.0 nosy: +amaury.forgeotdarc nosy_count: 3.0 - 4.0 resolution: - out of date status: open - closed ___ Python

[issue1412632] Proper locking with asynchronous callbacks.

2009-03-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: A (better IMO) fix was applied with r68460. -- message_count: 1.0 - 2.0 nosy: +amaury.forgeotdarc nosy_count: 1.0 - 2.0 resolution: - fixed status: open - closed ___ Python tracker

[issue1324261] __name__ available during class dictionary build

2009-03-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This can be done with a metaclass: the metaclass receives the name of the created class, and it's easy to update the class definition there. -- message_count: 1.0 - 2.0 nosy: +amaury.forgeotdarc nosy_count: 1.0 - 2.0

[issue1818] Add named tuple reader to CSV module

2009-03-08 Thread Skip Montanaro
Skip Montanaro s...@pobox.com added the comment: I find this aspect of the proposal disturbing: If *fieldnames* is None the values in the first row of the *csvfile* will be used as the fieldnames I don't think this should be implicit. It makes the NamedTupleReader

[issue5444] .chm build process on Windows doesn't use the right filename

2009-03-08 Thread Gabriel Genellina
New submission from Gabriel Genellina gagsl-...@yahoo.com.ar: doc/make.bat on Windows doesn't correctly build the right .chm filename. This patch does the same as the unix Makefile: run patchlevel.py and set the output as the DISTVERSION environment variable, so it can be used in the final

[issue1818] Add named tuple reader to CSV module

2009-03-08 Thread Skip Montanaro
Changes by Skip Montanaro s...@pobox.com: -- message_count: 26.0 - 25.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1818 ___ ___

[issue1818] Add named tuple reader to CSV module

2009-03-08 Thread Skip Montanaro
Skip Montanaro s...@pobox.com added the comment: I retract my previous comment. I don't use the DictReader the way it operates (fieldnames==None = first row is a header) and forgot about that behavior. -- message_count: 25.0 - 26.0 ___ Python

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

2009-03-08 Thread Daniel Lescohier
New submission from Daniel Lescohier daniel.lescoh...@cbs.com: This is the implementation of codecs.Streamwriter.writelines for all Python versions that I've checked: def writelines(self, list): Writes the concatenated list of strings to the stream using .write().

[issue5444] .chm build process on Windows doesn't use the right filename

2009-03-08 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: Effectively a duplicate of http://bugs.python.org/issue2421 (which has been sitting around unapplied for a few months) I certainly don't mind which one goes in, but I think one should be closed in favour of the other. (And that one should be

[issue5446] doc building progress on Windows doesn't show any color

2009-03-08 Thread Gabriel Genellina
Changes by Gabriel Genellina gagsl-...@yahoo.com.ar: -- versions: +Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5446 ___

[issue5446] doc building progress on Windows doesn't show any color

2009-03-08 Thread Gabriel Genellina
New submission from Gabriel Genellina gagsl-...@yahoo.com.ar: The documentation building progress on Windows doesn't show any colorized output, unlike the linux environment. This patch to console.py provides minimal color support on Windows. -- assignee: georg.brandl components:

[issue5446] doc building progress on Windows doesn't show any color

2009-03-08 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: This should go on the Sphinx tracker. http://bitbucket.org/birkenfeld/sphinx -- message_count: 1.0 - 2.0 nosy: +benjamin.peterson nosy_count: 2.0 - 3.0 resolution: - invalid status: open - closed

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

2009-03-08 Thread Poor Yorick
New submission from Poor Yorick pooryor...@users.sourceforge.net: from __future__ import unicode_literals print(r'\u.bug') SyntaxError: (unicode error) truncated \u -- components: Interpreter Core message_count: 1.0 messages: 83326 nosy: pooryorick nosy_count: 1.0 severity: normal

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

2009-03-08 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: This happens with unicode literals even without from __future__ import unicode_literals because raw strings still have \u escapes interpreted. This isn't true in 3.0, so it would be nice to disable it with unicode_literals. --

[issue5448] Add precision property to decimal.Decimal

2009-03-08 Thread Daniel Lescohier
New submission from Daniel Lescohier daniel.lescoh...@cbs.com: I would like to get the decimal precision of decimal.Decimal objects (for my application, in order to validate whether a Decimal value will fit in the defined decimal precision of a database field). The way I found to get it was

[issue5442] [3.1alpha1] test_importlib fails on Mac OSX 10.5.6

2009-03-08 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: Is your version of OS X installed on a case-sensitive filesystem? These tests all pass for me on my Macbook on 10.5.6. -- assignee: - brett.cannon message_count: 1.0 - 2.0 ___ Python tracker

[issue5442] [3.1alpha1] test_importlib fails on Mac OSX 10.5.6

2009-03-08 Thread Ismail Donmez
Ismail Donmez ism...@namtrac.org added the comment: Yes its case sensitive. -- message_count: 2.0 - 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5442 ___

[issue5442] [3.1alpha1] test_importlib fails on Mac OSX 10.5.6

2009-03-08 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: Ah, OK, that explains it then. I guess I need to come up with a test to verify whether commonly case-sensitive filesystems are truly case-sensitive before running the tests. Thanks for the quick response, Ismail. -- message_count: 3.0 -

[issue1818] Add named tuple reader to CSV module

2009-03-08 Thread Jervis Whitley
Jervis Whitley jervi...@gmail.com added the comment: Jervis in csv.rst removed reference to reader.next() as a public method. Skip Because? I've not seen any discussion in this issue or in any Skip other forums Skip (most certainly not on the c...@python.org mailing list) which would Skip

[issue1818] Add named tuple reader to CSV module

2009-03-08 Thread Jervis Whitley
Jervis Whitley jervi...@gmail.com added the comment: Antoine I don't understand why NamedTupleReader requires the Antoine fieldnames array Antoine rather than the namedtuple class itself. If you could pass it Antoine the namedtuple class, users could choose whatever namedtuple Antoine subclass

[issue1818] Add named tuple reader to CSV module

2009-03-08 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Ok, I got misled by the documentation (The contents of *fieldnames* are passed directly to be used as the namedtuple fieldnames), and your implementation is a bit difficult to follow. -- message_count: 28.0 - 29.0

[issue3002] shutil.copyfile blocks indefinitely on named pipes

2009-03-08 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Here is a patch, introducing a new exception named SpecialFileError which is raised when trying to copy a named pipe. Other kinds of special file aren't checked for, but they could it we thought it's sensible to do so. -- keywords: +patch

[issue3002] shutil.copyfile blocks indefinitely on named pipes

2009-03-08 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I forgot the case where the /destination/ file is a named pipe. Here is a new patch. -- message_count: 8.0 - 9.0 Added file: http://bugs.python.org/file13270/issue3002-2.patch ___ Python tracker

[issue5387] mmap.move crashes by integer overflow

2009-03-08 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I tried r69943 on coLinux, and I got compile error max is not defined. Here is updated patch. -- keywords: +patch message_count: 1.0 - 2.0 Added file: http://bugs.python.org/file13272/fix_mmap_move.patch

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

2009-03-08 Thread R. David Murray
New submission from R. David Murray rdmur...@bitdance.com: If the DISPLAY environment variable is set, the test_tcl test 'testLoadTk' gives a traceback. In the same circumstance, test_tk and test_ttkguionly display the error and are skipped. Although this is a nit rather than a problem, for

[issue1818] Add named tuple reader to CSV module

2009-03-08 Thread Jervis Whitley
Changes by Jervis Whitley jervi...@gmail.com: Removed file: http://bugs.python.org/file13268/ntreader5_py3_1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1818 ___

[issue1818] Add named tuple reader to CSV module

2009-03-08 Thread Jervis Whitley
Changes by Jervis Whitley jervi...@gmail.com: Added file: http://bugs.python.org/file13275/ntreader6_py27.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1818 ___

[issue1818] Add named tuple reader to CSV module

2009-03-08 Thread Jervis Whitley
Jervis Whitley jervi...@gmail.com added the comment: Updated version of docs for 2.7 and 3k. -- message_count: 29.0 - 30.0 Added file: http://bugs.python.org/file13274/ntreader6_py3.diff ___ Python tracker rep...@bugs.python.org

[issue5451] patch to make io.StringIO consistent with open with respect to newlines

2009-03-08 Thread Erick Tryzelaar
New submission from Erick Tryzelaar idade...@users.sourceforge.net: I noticed that io.StringIO is inconsistent with open on how newlines are handled. The default approach open uses is universal newlines: with open('foo', 'w') as f: ... f.write('hello hi\r\nla la\r\n') ... 17

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

2009-03-08 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: That first sentence should have read If the DISPLAY environment variable is set but the display cannot be opened. -- message_count: 1.0 - 2.0 ___ Python tracker rep...@bugs.python.org

[issue5451] patch to make io.StringIO consistent with open with respect to newlines

2009-03-08 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: This is the intended behavior. It is consist with 2.x's StringIO.StringIO behavior. -- message_count: 1.0 - 2.0 nosy: +benjamin.peterson nosy_count: 1.0 - 2.0 resolution: - rejected status: open - closed

[issue5451] patch to make io.StringIO consistent with open with respect to newlines

2009-03-08 Thread Erick Tryzelaar
Erick Tryzelaar idade...@users.sourceforge.net added the comment: Thanks Benjamin. Could the documentation for StringIO be updated then? The docs for io.StringIO [1] says that io.TextIOWrapper implements the constructor, but TextIOWrapper defaults newline to None [2], and there's nothing that

[issue5452] Documentation for io.StringIO has wrong info for arguments

2009-03-08 Thread Erick Tryzelaar
New submission from Erick Tryzelaar idade...@users.sourceforge.net: (this is redirecting from http://bugs.python.org/issue5451). The documentation for io.StringIO is incorrect on the arguments. First off, it doesn't actually accept the encoding and errors arguments. Second, it's not stated

[issue5451] patch to make io.StringIO consistent with open with respect to newlines

2009-03-08 Thread Erick Tryzelaar
Erick Tryzelaar idade...@users.sourceforge.net added the comment: Moving this to a documentation bug here: http://bugs.python.org/issue5452 -- message_count: 3.0 - 4.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5451

[issue5452] Documentation for io.StringIO has wrong info for arguments

2009-03-08 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- assignee: georg.brandl - benjamin.peterson nosy: +benjamin.peterson nosy_count: 2.0 - 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5452

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

2009-03-08 Thread dariusp
New submission from dariusp dari...@internode.on.net: pydoc -k fails for both release30-maint and py3k. In release30-maint the python io module (or more accurately the underlying codecs module used by the io module) raises a LookupError if the encoding is invalid. There is a test module with a

[issue5452] Documentation for io.StringIO has wrong info for arguments

2009-03-08 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Fixed in r70255. -- message_count: 1.0 - 2.0 resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5452

[issue5454] pydoc -k fails (py3k patch)

2009-03-08 Thread dariusp
New submission from dariusp dari...@internode.on.net: Apologies for the duplicate issue, but I wanted to supply two patches (one for release30-maint and one for py3k) and appears that each issue can only have one file. pydoc -k fails for both release30-maint and py3k. In release30-maint the

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

2009-03-08 Thread Skip Montanaro
New submission from Skip Montanaro s...@pobox.com: I just discovered that the csv module's reader class in 3.x doesn't work as expected when used as documented. The requirement has always been that the CSV file is opened in binary mode so that embedded newlines in fields are screwed up. Alas,

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

2009-03-08 Thread Jervis Whitley
Changes by Jervis Whitley jervi...@gmail.com: -- nosy: +jdwhitley nosy_count: 1.0 - 2.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5455 ___ ___

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

2009-03-08 Thread Jervis Whitley
Jervis Whitley jervi...@gmail.com added the comment: in _csv.c, the check is done here: lineobj = PyIter_Next(self-input_iter); if (lineobj == NULL) { /* End of input OR exception */ if (!PyErr_Occurred() self-field_len != 0) PyErr_Format(error_obj, newline

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

2009-03-08 Thread Erick Tryzelaar
New submission from Erick Tryzelaar idade...@users.sourceforge.net: Python version 3.0.1's io.StringIO has a bug when trying to use universal newlines on the mac. It's fixed in 3.1a1 though. Here's the exception: io.StringIO('hello there\r\nlela\r\n', newline=None).readlines() Traceback

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

2009-03-08 Thread Jervis Whitley
Jervis Whitley jervi...@gmail.com added the comment: Hi Skip, Currently, once we are sure the lineobj is a unicode obj we then get it's internal buffer using: line = PyUnicode_AsUnicode(lineobj); for the purpose of iterating through the line. is there an opportunity to use: line =

[issue5223] infinite recursion in PyErr_WriteUnraisable

2009-03-08 Thread lplatypus
lplatypus l...@deller.id.au added the comment: Hi amaury, I am copying you into this issue because I think it was introduced in your revision 65320 when you added a call to PyErr_WriteUnraisable from PyErr_GivenExceptionMatches in Python/errors.c. Any thoughts on on this issue or how to fix it

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

2009-03-08 Thread John Machin
John Machin sjmac...@users.sourceforge.net added the comment: This is in effect a duplicate of issue 4847. Summary: The docs are CORRECT. The 3.X implementation is WRONG. The 2.X implementation is CORRECT. See examples in my comment on issue 4847. -- message_count: 3.0 - 4.0 nosy:

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

2009-03-08 Thread Jervis Whitley
Jervis Whitley jervi...@gmail.com added the comment: Hi all, This patch takes the approach of assuming utf-8 format encoding for files opened with 'rb' directive. That is: 1. Check if each line is Unicode Or Bytes Type. 2. If Bytes, get char array reference to internal buffer. 3. use

[issue5441] Convenience API for timeit.main

2009-03-08 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: - rhettinger nosy: +rhettinger nosy_count: 2.0 - 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5441 ___