[issue4804] Python on Windows disables all C runtime library assertions

2009-02-10 Thread Martin v. Löwis
Martin v. Löwis added the comment: The revised patch looks fine to me, please apply. ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue5200] unicode.normalize gives wrong result for some characters

2009-02-10 Thread Peter Landgren
New submission from Peter Landgren : If any of the Swedish characters "åäöÅÄÖ" are input to unicode.normalize(form, ustr) with form = "NFD" or "NFKD" the result will be "aaoAAO". "åäöÅÄÖ" are normal character and should be the same after normalize. They are not connected to aaoAAO other than for

[issue1818] Add named tuple reader to CSV module

2009-02-10 Thread Jervis Whitley
Jervis Whitley added the comment: Updated NamedTupleReader to give a rename=False keyword argument. rename is passed directly to the namedtuple factory function to enable automatic handling of invalid fieldnames. Two new tests for the rename keyword. Cheers, Added file: http://bugs.python.org

[issue5201] Using LDFLAGS='-rpath=\$$LIB:/some/other/path' ./configure breaks the build

2009-02-10 Thread Floris Bruynooghe
New submission from Floris Bruynooghe : When specifying an RPATH with -rpath or -R you can use the special tokens `$LIB' and `$ORIGIN' which the runtime linker interprets as "normal search path" and "relative to current sofile" respectively. To get these correctly to the gcc command line you nee

[issue5202] wave.py cannot write wave files into a shell pipeline

2009-02-10 Thread David Jones
New submission from David Jones : When using the wave module to output wave files, the output file cannot be a Unix pipeline. Example. The following program outputs a (trivial) wave file on stdout: #!/usr/bin/env python import sys import wave w = wave.open(sys.stdout, 'w') w.setnchannels(1) w

[issue5175] negative PyLong -> C unsigned integral, TypeError or OverflowError?

2009-02-10 Thread Lisandro Dalcin
Lisandro Dalcin added the comment: Mark, here you have a patch. I've only 'make test' on a 32bit Linux box Just two comments: - in docs: perhaps the 'versionchanged' stuff should be added. - in tests: I did not touch Modules/_testcapimodule.c, as it seems the test is covered. However, note th

[issue5202] wave.py cannot write wave files into a shell pipeline

2009-02-10 Thread David Jones
David Jones added the comment: Attached is a patch which is a diff from this version of wave.py : http://svn.python.org/view/*checkout*/python/trunk/Lib/wave.py?rev=54394 -- keywords: +patch Added file: http://bugs.python.org/file13011/wave-20090210.patch

[issue5202] wave.py cannot write wave files into a shell pipeline

2009-02-10 Thread Guilherme Polo
Guilherme Polo added the comment: Wouldn't it be better if you only ignored the 'illegal seek' error instead of ignoring any ioerror (should it even be always discarded) ? I get a 'bad file descriptor' under Windows 7, but, again, can it be always discarded ? You can also reproduce the problem

[issue3386] [PATCH] distutils.sysconfig.get_python_lib prefix argument broken

2009-02-10 Thread Tarek Ziadé
Tarek Ziadé added the comment: Done in r69485. Thanks for the patch Phillip ! -- status: open -> closed ___ Python tracker ___ ___ Pyt

[issue5203] ctypes segfaults when passing a unicode string to a function without argtypes

2009-02-10 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc : The following code segfaults on platforms where HAVE_USABLE_WCHAR_T is not defined (for example: narrow unicode build and sizeof(wchar_t)==4) >>> from ctypes import * >>> import ctypes.util >>> CDLL(ctypes.util.find_library('c')).wcslen(u'text') (it wo

[issue3729] SystemError on calling len() if __len__() doesn't return an int

2009-02-10 Thread Benjamin Peterson
Benjamin Peterson added the comment: Fixed in #5137. -- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue5202] wave.py cannot write wave files into a shell pipeline

2009-02-10 Thread David Jones
David Jones added the comment: On 10 Feb 2009, at 12:28, Guilherme Polo wrote: > > Guilherme Polo added the comment: > > Wouldn't it be better if you only ignored the 'illegal seek' error > instead of ignoring any ioerror (should it even be always discarded) ? No. > I > get a 'bad file descr

[issue5202] wave.py cannot write wave files into a shell pipeline

2009-02-10 Thread David Jones
David Jones added the comment: On 10 Feb 2009, at 12:28, Guilherme Polo wrote: > > Guilherme Polo added the comment: > > I'm really unsure about the proposed patch. Perhaps my example was too trivial. The point is that if you call setnframes then you can get wave.py to avoid patching the h

[issue5134] Compiler warnings in sqlite module

2009-02-10 Thread Martin v. Löwis
Martin v. Löwis added the comment: Fixed in r69489, r69490, r69491, r69492, r69493. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue4804] Python on Windows disables all C runtime library assertions

2009-02-10 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Committed r69495 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue5175] negative PyLong -> C unsigned integral, TypeError or OverflowError?

2009-02-10 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the patch! I agree that the 'versionchanged' reference should be added in the docs. I also think that the test should be updated to check the exception type. Here's a modified version of your patch that adds a test for OverflowError to the capi tes

[issue5204] test.os/TestInvalidFD/test_fdopen on VC6

2009-02-10 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto : This comes from issue4804. This simple patch is required to pass test_fdopen on VC6. -- components: Windows files: test_fdopen_on_vc6.patch keywords: patch messages: 81551 nosy: ocean-city severity: normal stage: commit review status: open title: t

[issue4804] Python on Windows disables all C runtime library assertions

2009-02-10 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I opened new issue related to VC6 as issue5204. ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue5202] wave.py cannot write wave files into a shell pipeline

2009-02-10 Thread David Jones
David Jones added the comment: On 10 Feb 2009, at 13:02, David Jones wrote: > > I also note that my patch can be improved by removing its last 11 > lines. Er, no it can't. What was I thinking? ___ Python tracker ___

[issue5175] negative PyLong -> C unsigned integral, TypeError or OverflowError?

2009-02-10 Thread Lisandro Dalcin
Lisandro Dalcin added the comment: It worked for me. BTW, 'make test' did not noticed the change in Modules/testcapi_long.h, which is #include'd by Modules/_testcapimodule.c. I've attached a trivial patch for setup.py fixing the dependency issue. Added file: http://bugs.python.org/file13014/se

[issue5205] String Formatting with namedtuple

2009-02-10 Thread Lie Ryan
New submission from Lie Ryan : I've been experimenting with namedtuple, it seems that string formatting doesn't recognize namedtuple as mapping. from collections import namedtuple Nt = namedtuple('Nt', ['x', 'y']) nt = Nt(12, 32) print 'one = %(x)s, two = %(y)s' % nt # output should be: one =

[issue5205] String Formatting with namedtuple

2009-02-10 Thread Lie Ryan
Changes by Lie Ryan : -- components: +Interpreter Core versions: +Python 2.6 ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue5175] negative PyLong -> C unsigned integral, TypeError or OverflowError?

2009-02-10 Thread Mark Dickinson
Mark Dickinson added the comment: Committed, r69498 (trunk) and r69499 (py3k). ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue5175] negative PyLong -> C unsigned integral, TypeError or OverflowError?

2009-02-10 Thread Mark Dickinson
Mark Dickinson added the comment: ...and your patch for setup.py applied in r69500, r69501, r69502, r69503. Thank you! -- resolution: -> accepted status: open -> closed ___ Python tracker

[issue1035576] Add New RPM-friendly record option to setup.py

2009-02-10 Thread Akira Kitada
Changes by Akira Kitada : -- nosy: +tarek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue818201] distutils: clean -b ignored; set_undefined_options doesn't

2009-02-10 Thread Akira Kitada
Changes by Akira Kitada : -- nosy: +tarek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue755286] Generate rpm filelist including directories

2009-02-10 Thread Akira Kitada
Akira Kitada added the comment: Duplicate of issue1035576 -- nosy: +akitada, tarek ___ Python tracker ___ ___ Python-bugs-list maili

[issue1035576] Add New RPM-friendly record option to setup.py

2009-02-10 Thread Akira Kitada
Akira Kitada added the comment: duplicate of issue755286 -- nosy: +akitada ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue1169193] Handle ungzipped man pages in rpm builds correctly

2009-02-10 Thread Akira Kitada
Changes by Akira Kitada : -- nosy: +tarek type: -> behavior versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.3 ___ Python tracker ___ __

[issue809846] distutils/bdistwin32 doesn't clean up RO files properly

2009-02-10 Thread Akira Kitada
Changes by Akira Kitada : -- nosy: +tarek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue1169193] Handle ungzipped man pages in rpm builds correctly

2009-02-10 Thread Akira Kitada
Akira Kitada added the comment: Duplicate of issue644744 -- nosy: +akitada ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue644744] bdist_rpm fails when installing man pages

2009-02-10 Thread Akira Kitada
Akira Kitada added the comment: Duplicate of issue1169193 -- nosy: +akitada, tarek ___ Python tracker ___ ___ Python-bugs-list maili

[issue1382562] --install-base not honored on win32

2009-02-10 Thread Akira Kitada
Changes by Akira Kitada : -- nosy: +tarek type: -> behavior versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.4 ___ Python tracker ___ __

[issue957381] bdist_rpm fails on redhat9, fc1, fc2

2009-02-10 Thread Akira Kitada
Akira Kitada added the comment: Is this problem already closed? -- nosy: +akitada, tarek ___ Python tracker ___ ___ Python-bugs-list

[issue1289136] distutils extension library path bug on cygwin

2009-02-10 Thread Akira Kitada
Changes by Akira Kitada : -- nosy: +tarek type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5202] wave.py cannot write wave files into a shell pipeline

2009-02-10 Thread Guilherme Polo
Guilherme Polo added the comment: I see what you want to do, but I fell really uncomfortable by totally ignoring IOError. I could get a bad file descriptor under Linux too, and I wouldn't like to see it discarded for no reason. Now, is there some problem if we remove the calls to the "tell" met

[issue1274324] 'setup.py install' fail on linux from read-only storage

2009-02-10 Thread Akira Kitada
Changes by Akira Kitada : -- nosy: +tarek type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1028432] Specify a source baseurl for bdist_rpm.

2009-02-10 Thread Akira Kitada
Changes by Akira Kitada : -- nosy: +tarek type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.3 ___ Python tracker ___ ___

[issue5206] with context object for unittest assertRaises()

2009-02-10 Thread Martin Blais
New submission from Martin Blais : Here is a useful trick to restore the normal call syntax for delayed evaluation for assertRaises(): from contextlib import contextmanager @contextmanager def raised(exctype): try: yield raise AssertionError("Ex

[issue1051216] make distutils.core.run_setup re-entrant

2009-02-10 Thread Akira Kitada
Changes by Akira Kitada : -- nosy: +tarek type: -> feature request versions: +Python 2.7, Python 3.1 -Python 2.4 ___ Python tracker ___ ___

[issue5207] extend strftime/strptime format for RFC3339 and RFC2822

2009-02-10 Thread Iakov Davydov
New submission from Iakov Davydov : Currently there is no obvious way to parse time from ISO 8601/W3C/RFC3339 date&time format (http://www.ietf.org/rfc/rfc3339.txt) or RFC2822. (Actually RFC2822 could be parsed with rfc822 module but that is not very good way). I suggest that we should add speci

[issue5206] with context object for unittest assertRaises()

2009-02-10 Thread Martin Blais
Changes by Martin Blais : -- components: +Library (Lib) type: -> feature request ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue4448] should socket readline() use default_bufsize instead of _rbufsize?

2009-02-10 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Issue 4879 has been resolved so that that HTTPResponse invokes socket.socket.makefile() with default buffering. see r69209. Since the problem stated in this defect has no bearing on 3.0 (there is no special hack for readline() in 3.0) I am closing t

[issue5208] urllib2.build_opener([handler, ...]) incorrect signature in docs

2009-02-10 Thread Max
New submission from Max : The build_opener() function of urllib2 is speciofied as: urllib2.build_opener([handler, ...]) I think it should be: urllib2.build_opener(handler, ...) see http://docs.python.org/library/urllib2.html?highlight=build_opener -- assignee: georg.brandl components

[issue1214675] module warnings lacks a remove filter function

2009-02-10 Thread Daniel Diniz
Changes by Daniel Diniz : -- versions: +Python 2.7, Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4882] Behavior of backreferences to named groups in regular expressions unclear

2009-02-10 Thread alec resnick
alec resnick added the comment: Hi Georg! Sorry to be so long in getting back to you. I've attached a suggested patch for the python-2.6.1-docs-text/library/re.txt documentation. Also, in looking over Kuchling's HOWTO, the necessary information is actually there, and I just wasn't paying atten

[issue1440472] email.Generator is not idempotent

2009-02-10 Thread Daniel Diniz
Changes by Daniel Diniz : -- components: +Documentation -Library (Lib) type: -> behavior versions: +Python 2.6, Python 3.0 ___ Python tracker ___ _

[issue1661108] base64.urlsafe_b64encode() shouldn't use the = character

2009-02-10 Thread Daniel Diniz
Changes by Daniel Diniz : -- assignee: -> georg.brandl components: +Documentation -Library (Lib) nosy: +georg.brandl type: -> feature request ___ Python tracker ___ _

[issue1381476] csv.reader endless loop

2009-02-10 Thread Daniel Diniz
Daniel Diniz added the comment: Invalid per discussion. -- nosy: +ajaksu2 title: csv.reader endless loop -> csv.reader endless loop ___ Python tracker ___ ___

[issue1630794] Seg fault in readline call.

2009-02-10 Thread Daniel Diniz
Daniel Diniz added the comment: Not confirmed with newer versions, closing suggested. -- nosy: +ajaksu2 ___ Python tracker ___ ___

[issue3676] Obsolete references to PEP 291 in py3k lib

2009-02-10 Thread Daniel Diniz
Changes by Daniel Diniz : -- nosy: +facundobatista ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue3734] subclassing complex

2009-02-10 Thread Daniel Diniz
Daniel Diniz added the comment: Confirmed in trunk. Here's a copy-n-past'able testcase: class xcomplex( complex ): def __new__(cls,*args,**kwargs): return complex.__new__(cls,*args,**kwargs) def __coerce__(self,other): t = complex.__coerce__(self,other) try:

[issue1732212] repr of 'nan' floats not parseable

2009-02-10 Thread Daniel Diniz
Daniel Diniz added the comment: OP posted a message in python-dev, with no replies: http://mail.python.org/pipermail/python-dev/2007-June/073625.html -- nosy: +ajaksu2, marketdickinson versions: +Python 2.7, Python 3.1 -Python 2.6 ___ Python tracker

[issue1151323] New fpconst module

2009-02-10 Thread Daniel Diniz
Changes by Daniel Diniz : -- nosy: +marketdickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue1633648] incomplete numerical comparisons

2009-02-10 Thread Daniel Diniz
Changes by Daniel Diniz : -- nosy: +marketdickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue1177779] explicit sign variable for longs

2009-02-10 Thread Daniel Diniz
Changes by Daniel Diniz : -- nosy: +marketdickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue3694] Undetected error in _struct.pack_into

2009-02-10 Thread Daniel Diniz
Changes by Daniel Diniz : -- nosy: +marketdickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue5206] with context object for unittest assertRaises()

2009-02-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is already done in trunk, you can use it as follows: with self.assertRaises(ZeroDivisionError): 1/0 -- nosy: +pitrou resolution: -> out of date status: open -> closed ___ Python tracker

[issue3694] Undetected error in _struct.pack_into

2009-02-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Yes, PyNumber_AsSsize_t() should be used instead. -- nosy: +pitrou ___ Python tracker ___ ___ Python

[issue3694] Undetected error in _struct.pack_into

2009-02-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Oh, and a test should be added :) ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue1440472] email.Generator is not idempotent

2009-02-10 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I think we should update the documentation to mention these exceptions. ___ Python tracker ___ ___ Python

[issue1911] webbrowser.open firefox 3 issues

2009-02-10 Thread Georg Brandl
Georg Brandl added the comment: Thanks, closing. -- nosy: +georg.brandl resolution: -> out of date status: open -> closed ___ Python tracker ___

[issue1177779] explicit sign variable for longs

2009-02-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: I agree with MvL, it should probably be rejected. Memory size of longs is critical in py3k. -- nosy: +pitrou ___ Python tracker ___ _

[issue1327971] HTTPResponse instance has no attribute 'fileno'

2009-02-10 Thread Georg Brandl
Georg Brandl added the comment: Well, easy access is not the point. If the object is supposed to have the file-like interface, and can provide a fileno(), it should. -- nosy: +georg.brandl ___ Python tracker ___

[issue1175686] add "reload" function to IDLE

2009-02-10 Thread Brett Cannon
Changes by Brett Cannon : -- title: add "reload" function -> add "reload" function to IDLE ___ Python tracker ___ ___ Python-bugs-li

[issue5200] unicode.normalize gives wrong result for some characters

2009-02-10 Thread Martin v. Löwis
Martin v. Löwis added the comment: It is not true that normalize produces "aaoAAO". Instead, it produces u'a\u030aa\u0308o\u0308A\u030aA\u0308O\u0308' This is the correct result, according to the Unicode specification. It would be incorrect to normalize them unchanged under the Unicode Normal

[issue5138] File Reload for IDLE

2009-02-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Duplicate of 1175686. -- resolution: -> duplicate status: open -> closed ___ Python tracker ___

[issue5203] ctypes segfaults when passing a unicode string to a function without argtypes

2009-02-10 Thread Thomas Heller
Thomas Heller added the comment: Fixed in trunk (rev 69505) and release26-maint (rev 69506). The bug was already fixed in a different way in py3k and release30-maint although in a different way, I merged this exact fix anyway (rev 69507 and rev 69508). Thanks. -- resolution: -> fixed

[issue1175686] add "reload" function to IDLE

2009-02-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Kurt, is this something you can add? Closed the duplicate issue 5138 and leaving this open. IDLE would be *much* easier to use in conjunction with version control if there were a reload option that did the equivalent of (close current with no save, followed

[issue3734] subclassing complex

2009-02-10 Thread Mark Dickinson
Mark Dickinson added the comment: I'll take a look. -- assignee: -> marketdickinson ___ Python tracker ___ ___ Python-bugs-list maili

[issue1327971] HTTPResponse instance has no attribute 'fileno'

2009-02-10 Thread Brett Cannon
Brett Cannon added the comment: Georg is right and this has been fixed apparently in 3.0, leaving 2.7 and older broken. There are two possible solutions to this. One is to change socket._fileobject.fileno() to simply try self._sock.fp.fileno() if self._sock.fileno() does not exist. The other op

[issue5204] test.os/TestInvalidFD/test_fdopen on VC6

2009-02-10 Thread Martin v. Löwis
Martin v. Löwis added the comment: The patch is fine, please apply. -- assignee: -> ocean-city nosy: +loewis resolution: -> accepted ___ Python tracker ___

[issue5209] nntplib needs updating to RFC 3977

2009-02-10 Thread Travis Hassloch
New submission from Travis Hassloch : RFC 977 has been obsoleted by RFC 3977 Numerous new commands, standardized extensions, clarifications. -- components: Library (Lib) messages: 81587 nosy: travis severity: normal status: open title: nntplib needs updating to RFC 3977 type: feature re

[issue1327971] HTTPResponse instance has no attribute 'fileno'

2009-02-10 Thread Brett Cannon
Brett Cannon added the comment: Another option is to change urllib.addinfourl to look for fileno() on an HTTPResponse object. ___ Python tracker ___ ___

[issue5210] zlib does not indicate end of compressed stream properly

2009-02-10 Thread Travis Hassloch
New submission from Travis Hassloch : Underlying zlib can determine when it has hit the end of a compressed stream without reading past the end. Python zlib implementation requires that one read past the end before it signals the end by putting data in Decompress.unused_data. This complicates i

[issue1732212] repr of 'nan' floats not parseable

2009-02-10 Thread Mark Dickinson
Mark Dickinson added the comment: I don't see a huge need for this. In 2.6, 3.0 and higher, float(repr(x)) recovers x reliably across platforms (modulo the occasional system strtod bug), even when x is an infinity or nan. It's true that using float() doesn't help if you want to eval the repr

[issue1732212] repr of 'nan' floats not parseable

2009-02-10 Thread Mark Dickinson
Changes by Mark Dickinson : -- assignee: -> marketdickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1151323] New fpconst module

2009-02-10 Thread Mark Dickinson
Mark Dickinson added the comment: Since PEP 754 has been rejected, I think this issue can be closed. As noted at the top of PEP 754, much of the functionality of the patch is already included (in somewhat different form) in 2.6 and 3.0. -- resolution: -> out of date status: open -> c

[issue1633648] incomplete numerical comparisons

2009-02-10 Thread Mark Dickinson
Changes by Mark Dickinson : -- assignee: -> marketdickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue3694] Undetected error in _struct.pack_into

2009-02-10 Thread Daniel Diniz
Daniel Diniz added the comment: Here's a patch with test for 3.x. Erm, I have no idea if that's all that is necessary :) Does this have the potential to break existing code? Added file: http://bugs.python.org/file13017/pynumber_assizet.diff ___ Python track

[issue1177779] explicit sign variable for longs

2009-02-10 Thread Martin v. Löwis
Martin v. Löwis added the comment: I wasn't actually proposing to reject it, merely asking, since all people who ever commented are also committers. However, since nobody bothered committing it in the last 3+ years, I'm now rejecting it. -- resolution: -> rejected status: open -> clos

[issue2204] document ConfigParser behaviour when a file has same section multiple times

2009-02-10 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: > The attached patch is a proof of concept for throwing an exception. If it is not too much of a problem, can you upload the patch to http://codereview.appspot.com? Reviewing there is simpler. Also, you will have to include some test cases in the patch.

[issue5200] unicode.normalize gives wrong result for some characters

2009-02-10 Thread Peter Landgren
Peter Landgren added the comment: Thanks for the fast response. I understand that python follows the unicode specification. I think the unicode standard is not correct in this case for the Swedish letters. I have asked unicode.org for an explanation. Should not the Danish letter "Ø" be no

[issue5200] unicode.normalize gives wrong result for some characters

2009-02-10 Thread Martin v. Löwis
Martin v. Löwis added the comment: > Should not the Danish letter "Ø" be normalized as "O"? I get "Ø" for all > NFC/NFD/NFKC/NFKD > normalizations? I think you have a fundamental misunderstanding what a "decomposition" is. "Ø" should *not* be decomposed as "O", because clearly, "Ø" and "O" ar

[issue722647] lower-level API for longs

2009-02-10 Thread Mark Dickinson
Mark Dickinson added the comment: I recommend closing this due to lack of interest/PEP/patch. 2.7 and 3.1 now have n.bit_length(), which matches Gregory's proposed n.bitwid(). I'm semi-interested in the bit-access methods n.bit(x) and n.bit(hi, lo), but not enough to write a PEP or patch rig

[issue5200] unicode.normalize gives wrong result for some characters

2009-02-10 Thread Peter Landgren
Peter Landgren added the comment: The same applies "Å" and "A", "Ä" and "A" and "Ö" and "O" which also are also different letters as "Ø" and "O" are. ("Ø" is the Danish version of "Ö" ) Maybe not in the unicode world but in treal life. That's why I'm a little confused. Will wait and see what

[issue5186] Reduce hash collisions for objects with no __hash__ method

2009-02-10 Thread Mark Dickinson
Mark Dickinson added the comment: Some comments, while I remember: * the argument to _Py_HashPointer is not always divisible by 8. It's called to create hashes for various objects, including methodobjects; see the line: y = _Py_HashPointer((void*)(a->m_ml->ml_meth)); in meth_hash in

[issue3694] Undetected error in _struct.pack_into

2009-02-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, a patch for 2.6 should be provided as well. Besides, PyExc_OverflowError is probably a better choice than PyExc_IndexError (but I'm not sure on this one). ___ Python tracker _

[issue5202] wave.py cannot write wave files into a shell pipeline

2009-02-10 Thread David Jones
David Jones added the comment: On 10 Feb 2009, at 16:57, Guilherme Polo wrote: > > Guilherme Polo added the comment: > > Now, is there some problem if we remove the calls to the "tell" method > in _write_header ? See patch attached (tests are very welcome too). Yes __

[issue5186] Reduce hash collisions for objects with no __hash__ method

2009-02-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Some tests on py3k (32-bit build): >>> l = [object() for i in range(20)] >>> [id(l[i+1]) - id(l[i]) for i in range(len(l)-1)] [16, -96, 104, 8, 8, 8, 8, 8, -749528, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8] >>> class C(object): ...__slots__ = () ... >>> l = [C() for i

[issue5200] unicode.normalize gives wrong result for some characters

2009-02-10 Thread Martin v. Löwis
Martin v. Löwis added the comment: > The same applies "Å" and "A", "Ä" and "A" and "Ö" and "O" > which also are also different letters as "Ø" and "O" are. Sure. And rightfully, they "Å" is *not* (I repeat: not) normalized as "A", under NFD: py> unicodedata.normalize("NFD", u"Å") u'A\u030a'

[issue1732212] repr of 'nan' floats not parseable

2009-02-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Recommend closing this. We like to have eval(repr(obj))==obj where possible but it is not a strict requirement. Am opposed to the two proposed solutions (float attributes or new literals). Mark's solution of defining nan=float('nan') whereever you care abo

[issue5206] with context object for unittest assertRaises()

2009-02-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Humph! The time machine strikes again. -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bu

[issue1732212] repr of 'nan' floats not parseable

2009-02-10 Thread Martin v. Löwis
Changes by Martin v. Löwis : -- resolution: -> rejected status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue5186] Reduce hash collisions for objects with no __hash__ method

2009-02-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le mardi 10 février 2009 à 21:18 +, Antoine Pitrou a écrit : > Note: a 64-bit build shows an even greater allocation unit: > > >>> class C(object): > ...__slots__ = ('x') > ... > >>> l = [C() for i in range(20)] > >>> [id(l[i+1]) - id(l[i]) for i in ra

[issue722647] lower-level API for longs

2009-02-10 Thread Mark Dickinson
Mark Dickinson added the comment: Closing. -- resolution: -> rejected status: open -> closed ___ Python tracker ___ ___ Python-bugs

[issue5209] nntplib needs updating to RFC 3977

2009-02-10 Thread Travis Hassloch
Travis Hassloch added the comment: Attached is a difference which implements CAPABILITIES and MODE READER and leaves some TODO comments for other RFC 3977 commands. -- keywords: +patch Added file: http://bugs.python.org/file13020/nntplib.diff ___ Pyt

[issue3734] subclassing complex

2009-02-10 Thread Mark Dickinson
Mark Dickinson added the comment: So there's a hint about what's happening here at the bottom of the section http://docs.python.org/reference/datamodel.html#id5 of the docs, where it says: """In the current implementation, the built-in numeric types int, long and float do not use coercion; t

[issue4631] urlopen returns extra, spurious bytes

2009-02-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: I took a look at the patch and it looks ok, apart from the _checkClosed() hack (but I don't think there's any immediate solution). It should be noted that HTTPResponse.readline() will be awfully slow since, as HTTPResponse doesn't have peek(), readline() will ca

[issue4631] urlopen returns extra, spurious bytes

2009-02-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch without the _checkClosed() hack. The solution is simply to remove redundant _checkClosed() calls in IOBase (for example, readline() doesn't need to do an explicit `closed` check as it calls read()). Added file: http://bugs.python.org/file13021/u

  1   2   >