[issue4701] range objects becomes hashable after attribute access

2008-12-20 Thread Hagen Fürstenau
Hagen Fürstenau hfuerste...@gmx.net added the comment: I don't believe there is any driving reason for them not to be hashable. On the other hand, what is the use case for hashing objects whose equality is defined as object identity? Python 3.0 (r30:67503, Dec 4 2008, 06:47:38) [GCC 4.3.2]

[issue4704] Update pybench for python 3.0

2008-12-20 Thread Mark Dickinson
New submission from Mark Dickinson dicki...@gmail.com: pybench needs to be updated for Python 3.0, in particular to remove use of cmp. Here's a patch, against the py3k branch. Questions (mainly for Marc-André Lemburg): 1. Should the version number be bumped for *all* tests, or just for

[issue1717] Get rid of more refercenes to __cmp__

2008-12-20 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Still to do: pybench needs updating to remove a cmp reference; since the changes required for pybench are a little bit more substantial than simple cmp replacement, I've broken this out into a separate issue: issue 4704. There are many

[issue1717] Get rid of more refercenes to __cmp__

2008-12-20 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Should Py_CmpToRich (in object.c) disappear? It's currently used in longobject.c, but nowhere else as far as I can tell. It shouldn't be too hard to update longobject.c to remove the use. ___ Python

[issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open()

2008-12-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I also think we should consider hard adding more modules that are loaded at startup time to py3k already huge list. My patch uses tokenize modules in setup.py bootstrap. But it doesn't affect Python classic usage python or

[issue4704] Update pybench for python 3.0

2008-12-20 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: On 2008-12-20 11:54, Mark Dickinson wrote: New submission from Mark Dickinson dicki...@gmail.com: pybench needs to be updated for Python 3.0, in particular to remove use of cmp. Here's a patch, against the py3k branch. Questions

[issue1717] Get rid of more refercenes to __cmp__

2008-12-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: It shouldn't be too hard to update longobject.c to remove the use. I'll do that one. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1717 ___

[issue4565] io write() performance very slow

2008-12-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: We can't solve this for 3.0.1, downgrading to critical. -- priority: release blocker - critical ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4565

[issue4561] Optimize new io library

2008-12-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: We can't solve this for 3.0.1, downgrading to critical. -- priority: release blocker - critical ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4561

[issue4533] 3.0 file.read dreadfully slow

2008-12-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Since it is solved for 3.x and only needs to be bacported to 2.x (where the io module isn't the default), downgrading to critical. -- nosy: +pitrou priority: release blocker - critical ___ Python

[issue3618] possible deadlock in IO library (Lib/io.py)

2008-12-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I hope that this issue will be fixed by io-c (io library rewritten in C language). ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3618

[issue3106] speedup some comparisons

2008-12-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I committed the patch, which will also help #1717. Thanks! -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3106

[issue1717] Get rid of more refercenes to __cmp__

2008-12-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: It shouldn't be too hard to update longobject.c to remove the use. I'll do that one. Done in r67871, r67873. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1717

[issue4705] python3.0 -u: unbuffered stdout

2008-12-20 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: I like and I need an unbuffered standard output which was provided by -u command line option (or PYTHONUNBUFFERED environment variable). Current status of -u option in Python3: the option exists and change the buffer size

[issue1068268] subprocess is not EINTR-safe

2008-12-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: naufraghi there are a lot of other places where EINTR naufraghi can cause and error. Can you write a list of these places? ___ Python tracker rep...@bugs.python.org

[issue4621] zipfile returns string but expects binary

2008-12-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: In the ZIP file format, a filename is a byte string because we don't know the encoding. You can not guess the encoding because it's not stored in the ZIP file and it depends on the OS and the OS configuration. So t1.filename have

[issue4621] zipfile returns string but expects binary

2008-12-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Oh, I see that zipfile.py uses the following code to choose the filename encoding: if flags 0x800: # UTF-8 file names extension filename = filename.decode('utf-8') else:

[issue4706] try to build a C module, but don't worry if it doesn't work

2008-12-20 Thread Zooko O'Whielacronx
New submission from Zooko O'Whielacronx zo...@zooko.com: I was trying to install Twisted on my son's OLPC. Twisted comes with a handful of C extensions which are all optional and most of which are not expected to compile on this platform anyway (they are platform-specific for Mac or Windows).

[issue4621] zipfile returns string but expects binary

2008-12-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Test on Ubuntu Gutsy (utf8 file system) with zip 2.32: $ mkdir x $ touch x/hé $ zip -r x.zip x adding: x/ (stored 0%) adding: x/hé (stored 0%) $ python # 3.0 trunk import zipfile testzip = zipfile.ZipFile('x.zip')

[issue4701] range objects becomes hashable after attribute access

2008-12-20 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Hagen Fürstenau wrote: Hagen Fürstenau hfuerste...@gmx.net added the comment: I don't believe there is any driving reason for them not to be hashable. On the other hand, what is the use case for hashing objects whose equality is defined

[issue4625] IDLE won't open anymore, .idlerc unaccessible

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- versions: +Python 2.6 -Python 2.5.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4625 ___ ___

[issue4629] getopt should not accept no_argument that ends with '='

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- versions: -Python 2.1.1, Python 2.1.2, Python 2.2, Python 2.2.1, Python 2.2.2, Python 2.2.3, Python 2.3, Python 2.4, Python 2.5, Python 2.5.3 ___ Python tracker rep...@bugs.python.org

[issue4646] distutils chokes on empty options arg in the setup function

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- versions: -Python 2.5.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4646 ___ ___

[issue4670] setup.py exception when db_setup_debug = True

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- versions: +Python 2.6 -Python 2.5.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4670 ___ ___

[issue4501] asyncore's urgent data management and connection closed events are broken when using poll()

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- versions: -Python 2.4, Python 2.5, Python 2.5.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4501 ___

[issue4686] Exceptions in ConfigParser don't set .args

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- versions: -Python 2.1.1, Python 2.1.2, Python 2.2, Python 2.2.1, Python 2.2.2, Python 2.2.3, Python 2.3, Python 2.4, Python 2.5, Python 2.5.3 ___ Python tracker rep...@bugs.python.org

[issue4689] Typo in PyObjC URL on GUI Programming on the Mac

2008-12-20 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Thanks for pointing that out. For the 2.5.3 file release, this was too late; I fixed it in the online copy only. -- nosy: +loewis resolution: - fixed status: open - closed ___ Python tracker

[issue4643] cgitb.html fails if getattr call raises exception

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- versions: -Python 2.5.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4643 ___ ___

[issue4690] asyncore calls handle_write() on closed sockets when use_poll=True

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- versions: -Python 2.5, Python 2.5.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4690 ___ ___

[issue4696] email module does not fold headers

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- versions: -Python 2.5.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4696 ___ ___

[issue4228] struct.pack('L', -1)

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- versions: -Python 2.5, Python 2.5.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4228 ___ ___

[issue3248] ScrolledText can't be placed in a PanedWindow

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- versions: -Python 2.5.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3248 ___ ___

[issue3767] tkColorChooser may fail if no color is selected

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- versions: -Python 2.5, Python 2.5.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3767 ___ ___

[issue1706039] Added clearerr() to clear EOF state

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- versions: -Python 2.5.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1706039 ___ ___

[issue1040026] os.times() is bogus

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- versions: -Python 2.4, Python 2.5, Python 2.5.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1040026 ___

[issue4010] configure options don't trickle down to distutils

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- versions: -Python 2.5.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4010 ___ ___

[issue2996] IDLE find in files output not formatted optimally

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- versions: -Python 2.5, Python 2.5.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2996 ___ ___

[issue2996] IDLE find in files output not formatted optimally

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- resolution: - works for me status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2996 ___

[issue1068268] subprocess is not EINTR-safe

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- versions: -Python 2.4, Python 2.5, Python 2.5.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1068268 ___

[issue1717] Get rid of more refercenes to __cmp__

2008-12-20 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Please remember to add back PyUnicode_Compare() if that hasn't already been done. Thanks, -- Marc-Andre Lemburg eGenix.com 2008-12-02: Released mxODBC.Connect 1.0.0

[issue4621] zipfile returns string but expects binary

2008-12-20 Thread Eddie
Eddie skr...@gmail.com added the comment: The problem is not about reading the filenames, but reading the contents of a file with filename that has non-ascii charaters. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4621

[issue4610] Unicode case mappings are incorrect

2008-12-20 Thread Alex Stapleton
Alex Stapleton al...@prol.etari.at added the comment: I am trying to get a PEP together for this. Does anyone have any thoughts on how to handle comparison between unicode strings in a locale aware situation? Should __lt__ and __gt__ be specified as ignoring locale? In which case do we need

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Looks like a bug to me. I get the expected behaviour on my machine. Python 3.0+ (release30-maint:67878, Dec 20 2008, 17:31:44) [GCC 4.0.1 (Apple Inc. build 5490)] on darwin Type help, copyright, credits or license for more information.

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' billiej...@users.sourceforge.net: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4707 ___

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Correction: it looks like two bugs to me. I think the wrong-return-type bug is rather serious, possibly a release blocker for 3.0.1. I'll see if I can produce a patch. The incorrect rounding (returning 30.0 instead of 20.0) is less

[issue4610] Unicode case mappings are incorrect

2008-12-20 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: I am trying to get a PEP together for this. Does anyone have any thoughts on how to handle comparison between unicode strings in a locale aware situation? Implementation-wise, or specification-wise? Implementation-wise, you can either

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Why do you say the return type is incorrect? It should, and does, return a float. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4707

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Why do you say the return type is incorrect? It should, and does, return a float. The documentation at: http://docs.python.org/dev/3.0/library/functions.html#round says, of round(x[, n]): The return value is an integer if called with

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Jeffrey, any opinion on this? -- nosy: +jyasskin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4707 ___

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Christian Taylor
Christian Taylor di...@chello.at added the comment: I'm using Arch Linux (32 bit) with kernel 2.6.25 and glibc 2.8 on a core 2 duo. The described behaviour occurs in a precompiled binary of Python 3.0, but also in versions I've compiled just now, which includes Python 3.0+

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Jeffrey Yasskin
Jeffrey Yasskin jyass...@gmail.com added the comment: When PEP 3141 says something should be Real, that includes both int and float as possibilities (since Real is a supertype of Integral), so it's consistent with the PEP for round(int, int) to return an int, and I agree with Mark that round(25,

[issue4610] Unicode case mappings are incorrect

2008-12-20 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: On 2008-12-20 17:19, Alex Stapleton wrote: Alex Stapleton al...@prol.etari.at added the comment: I am trying to get a PEP together for this. Does anyone have any thoughts on how to handle comparison between unicode strings in a locale

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: The code that hands-off long.__round__ to float.__round__ is a train wreck. The intended result can be computed directly and exactly for all sizes of long. -- nosy: +rhettinger priority: - critical

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Is your guess for round(25.0, -1)==30.0 that 25.0*(1/10.0) is slightly more than 2.5 on some systems? Yes, something like that. I don't think it's feasible to make round perfectly correct (for floats) in all cases without implementing

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: When PEP 3141 says something should be Real, that includes both int and float as possibilities (since Real is a supertype of Integral), so it's consistent with the PEP for round(int, int) to return an int, and I agree with Mark that

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: IMO, having long.__round__ return a float is a landmine, guaranteed to cause someone problems someday (problems that are hard to find). -- priority: critical - release blocker ___

[issue4705] python3.0 -u: unbuffered stdout

2008-12-20 Thread Fabio Zadrozny
Fabio Zadrozny fab...@users.sourceforge.net added the comment: Just as a note, Pydev needs the unbuffered output (or it cannot get it). This has been brought up in the python-dev list: http://mail.python.org/pipermail/python-dev/2008-December/084436.html As a workaround for now I'm using:

[issue4627] Add Mac OS X Disk Images to Python.org homepage

2008-12-20 Thread Benjamin Peterson
Benjamin Peterson musiccomposit...@gmail.com added the comment: I've added installers to the website now. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4627

[issue4017] Tkinter cannot find Tcl/Tk on Mac OS X

2008-12-20 Thread Benjamin Peterson
Benjamin Peterson musiccomposit...@gmail.com added the comment: Ok. Thanks for testing! I've added the installers to the website. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4017

[issue4627] Add Mac OS X Disk Images to Python.org homepage

2008-12-20 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: I've added installers to the website now. Does that include a 3.0 installer? I can't see any. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4627

[issue4627] Add Mac OS X Disk Images to Python.org homepage

2008-12-20 Thread Benjamin Peterson
Benjamin Peterson musiccomposit...@gmail.com added the comment: No, I don't have one for 3.0. AFAIK, that hasn't even been attempted yet. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4627 ___

[issue1040026] os.times() is bogus

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1040026 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Here's a first attempt at a patch for round(int, int) - int. -- keywords: +patch Added file: http://bugs.python.org/file12407/round_int_int.patch ___ Python tracker rep...@bugs.python.org

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Correct me if I'm wrong, but I think computing the quotient is not necessary; the remainder is sufficient: def round(n, i): if i = 0: return n i = 10**(-i) r = n%(2*i) if r i: return n-r return n-r+2*i

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Martin, that gives some answers like round(51, -2) -- 0 instead of 100. -- assignee: - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4707

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Will review the patch later this evening. Thanks for the submission. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4707 ___

[issue4708] os.pipe should return inheritable descriptors (Windows)

2008-12-20 Thread Aaron Brady
New submission from Aaron Brady castiro...@gmail.com: os.pipe should return inheritable descriptors on Windows. Patch below, test attached. New pipe() returns descriptors, which cannot be inherited. However, their permissions are set correctly, so msvcrt.get_osfhandle and

[issue4621] zipfile returns string but expects binary

2008-12-20 Thread Eddie
Eddie skr...@gmail.com added the comment: I read again what STINNER Victor and I think that he found another bug. Because, when listing the filenames of that zip file, the names are not displayed correctly. In fact 'x/h├⌐' == 'x/hé'.encode('utf-8').decode('cp437') So, there is again a problem

[issue4621] zipfile returns string but expects binary

2008-12-20 Thread Eddie
Eddie skr...@gmail.com added the comment: Attached is a patch that solves (I hope) the initial problem, the one from Francesco Ricciardi. -- keywords: +patch Added file: http://bugs.python.org/file12409/patch.diff ___ Python tracker

[issue4608] urllib.request.urlopen does not return an iterable object

2008-12-20 Thread Senthil
Senthil orsent...@gmail.com added the comment: Here is a patch to fix the issue. Jeremy, is it approach okay? Or do you have any other suggestion? -- keywords: +patch Added file: http://bugs.python.org/file12410/issue4608_py31.diff ___ Python

[issue4608] urllib.request.urlopen does not return an iterable object

2008-12-20 Thread Senthil
Changes by Senthil orsent...@gmail.com: -- versions: +Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4608 ___ ___ Python-bugs-list