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

2008-12-20 Thread Senthil
Changes by Senthil : -- versions: +Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

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

2008-12-20 Thread Senthil
Senthil 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 tracker

[issue4621] zipfile returns string but expects binary

2008-12-20 Thread Eddie
Eddie 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

[issue4621] zipfile returns string but expects binary

2008-12-20 Thread Eddie
Eddie 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 with encodings wh

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

2008-12-20 Thread Aaron Brady
New submission from Aaron Brady : 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 msvcrt.open_osfhandle can be used to obta

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: Will review the patch later this evening. Thanks for the submission. ___ Python tracker ___ ___ Python-bu

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: Martin, that gives some answers like round(51, -2) --> 0 instead of 100. -- assignee: -> rhettinger ___ Python tracker ___ _

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Martin v. Löwis
Martin v. Löwis 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 Mark Dickinson
Mark Dickinson 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 __

[issue1040026] os.times() is bogus

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis : ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/py

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

2008-12-20 Thread Benjamin Peterson
Benjamin Peterson added the comment: No, I don't have one for 3.0. AFAIK, that hasn't even been attempted yet. ___ Python tracker ___ ___ Pytho

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

2008-12-20 Thread Martin v. Löwis
Martin v. Löwis 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 ___

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

2008-12-20 Thread Benjamin Peterson
Benjamin Peterson added the comment: Ok. Thanks for testing! I've added the installers to the website. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

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

2008-12-20 Thread Benjamin Peterson
Benjamin Peterson added the comment: I've added installers to the website now. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue4705] python3.0 -u: unbuffered stdout

2008-12-20 Thread Fabio Zadrozny
Fabio Zadrozny 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: sys.stdout._line_buffering = True,

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Raymond Hettinger
Raymond Hettinger 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 ___ Python tracker

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Martin v. Löwis
Martin v. Löwis 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, -1) ought

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Mark Dickinson
Mark Dickinson 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 some amount of mu

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Raymond Hettinger
Raymond Hettinger 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 ___ Python t

[issue4610] Unicode case mappings are incorrect

2008-12-20 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 2008-12-20 17:19, Alex Stapleton wrote: > Alex Stapleton 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? Some though

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Jeffrey Yasskin
Jeffrey Yasskin 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, -1) ought to retur

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Christian Taylor
Christian Taylor 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+ (release30-maint:67879) As far as the

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Mark Dickinson
Mark Dickinson added the comment: Jeffrey, any opinion on this? -- nosy: +jyasskin ___ Python tracker ___ ___ Python-bugs-list mailing

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Mark Dickinson
Mark Dickinson 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 one argument, ot

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Martin v. Löwis
Martin v. Löwis added the comment: Why do you say the return type is incorrect? It should, and does, return a float. -- nosy: +loewis ___ Python tracker ___ _

[issue4610] Unicode case mappings are incorrect

2008-12-20 Thread Martin v. Löwis
Martin v. Löwis 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 try to use the C

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Mark Dickinson
Mark Dickinson 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 serious, but still needs

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Mark Dickinson
Mark Dickinson 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. >>> round(25, -

[issue4707] round() shows undocumented behaviour

2008-12-20 Thread Christian Taylor
New submission from Christian Taylor : I've been playing around with the newly released Python 3.0, and I'm a bit confused about the built-in round()-function. To sum it up in a single example: Python 3.0 (r30:67503, Dec 7 2008, 04:54:04) [GCC 4.3.2] on linux2 >>> round(25, -1) 30.0 I had expe

[issue4610] Unicode case mappings are incorrect

2008-12-20 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue4610] Unicode case mappings are incorrect

2008-12-20 Thread Alex Stapleton
Alex Stapleton 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 to add a new method

[issue4621] zipfile returns string but expects binary

2008-12-20 Thread Eddie
Eddie 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 ___

[issue1717] Get rid of more refercenes to __cmp__

2008-12-20 Thread Marc-Andre Lemburg
Marc-Andre Lemburg 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 http://pytho

[issue1068268] subprocess is not EINTR-safe

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis : -- versions: -Python 2.4, Python 2.5, Python 2.5.3 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue2996] IDLE "find in files" output not formatted optimally

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis : -- resolution: -> works for me status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue2996] IDLE "find in files" output not formatted optimally

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis : -- versions: -Python 2.5, Python 2.5.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

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

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis : -- versions: -Python 2.5.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue1040026] os.times() is bogus

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis : -- versions: -Python 2.4, Python 2.5, Python 2.5.3 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue1706039] Added clearerr() to clear EOF state

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis : -- versions: -Python 2.5.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue3767] tkColorChooser may fail if no color is selected

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis : -- versions: -Python 2.5, Python 2.5.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

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

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis : -- versions: -Python 2.5.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

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

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis : -- versions: -Python 2.5, Python 2.5.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue4696] email module does not fold headers

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis : -- versions: -Python 2.5.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[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 : -- versions: -Python 2.5, Python 2.5.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

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

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis : -- versions: -Python 2.5.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

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

2008-12-20 Thread Martin v. Löwis
Martin v. Löwis 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

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

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis : -- 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

[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 : -- versions: -Python 2.4, Python 2.5, Python 2.5.3 ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue4670] setup.py exception when db_setup_debug = True

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis : -- versions: +Python 2.6 -Python 2.5.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[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 : -- versions: -Python 2.5.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

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

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis : -- 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

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

2008-12-20 Thread Martin v. Löwis
Changes by Martin v. Löwis : -- versions: +Python 2.6 -Python 2.5.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue4701] range objects becomes hashable after attribute access

2008-12-20 Thread Nick Coghlan
Nick Coghlan added the comment: Hagen Fürstenau wrote: > Hagen Fürstenau 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? Fast membe

[issue4621] zipfile returns string but expects binary

2008-12-20 Thread STINNER Victor
STINNER Victor 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') >>> testzip.infolist()[1].filename

[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 : 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). If my son's OLPC

[issue4621] zipfile returns string but expects binary

2008-12-20 Thread STINNER Victor
STINNER Victor 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: # Historical ZIP

[issue4621] zipfile returns string but expects binary

2008-12-20 Thread STINNER Victor
STINNER Victor 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 to be a byte string and tes

[issue1068268] subprocess is not EINTR-safe

2008-12-20 Thread STINNER Victor
STINNER Victor 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 ___

[issue4705] python3.0 -u: unbuffered stdout

2008-12-20 Thread STINNER Victor
New submission from STINNER Victor : 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 (disable buffering) of the stdin,

[issue1717] Get rid of more refercenes to __cmp__

2008-12-20 Thread Antoine Pitrou
Antoine Pitrou 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 ___ ___

[issue3106] speedup some comparisons

2008-12-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: I committed the patch, which will also help #1717. Thanks! -- resolution: -> fixed status: open -> closed ___ Python tracker ___ __

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

2008-12-20 Thread STINNER Victor
STINNER Victor added the comment: I hope that this issue will be fixed by io-c (io library rewritten in C language). ___ Python tracker ___ __

[issue4533] 3.0 file.read dreadfully slow

2008-12-20 Thread Antoine Pitrou
Antoine Pitrou 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 tracker

[issue4561] Optimize new io library

2008-12-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: We can't solve this for 3.0.1, downgrading to critical. -- priority: release blocker -> critical ___ Python tracker ___

[issue4565] io write() performance very slow

2008-12-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: We can't solve this for 3.0.1, downgrading to critical. -- priority: release blocker -> critical ___ Python tracker ___

[issue1717] Get rid of more refercenes to __cmp__

2008-12-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: > It shouldn't be too hard to update longobject.c to remove the use. I'll do that one. ___ Python tracker ___ __

[issue4704] Update pybench for python 3.0

2008-12-20 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 2008-12-20 11:54, Mark Dickinson wrote: > New submission from Mark Dickinson : > > 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)

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

2008-12-20 Thread STINNER Victor
STINNER Victor 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 "python myscript.py". ___

[issue1717] Get rid of more refercenes to __cmp__

2008-12-20 Thread Mark Dickinson
Mark Dickinson 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 tracker

[issue1717] Get rid of more refercenes to __cmp__

2008-12-20 Thread Mark Dickinson
Mark Dickinson 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 uses of cmp still in

[issue4704] Update pybench for python 3.0

2008-12-20 Thread Mark Dickinson
New submission from Mark Dickinson : 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 those that have chang

[issue4701] range objects becomes hashable after attribute access

2008-12-20 Thread Hagen Fürstenau
Hagen Fürstenau 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] on linux2 Type "help