[issue4707] round(25, 1) should return an integer, not a float
Mark Dickinson dicki...@gmail.com added the comment: Clearer title. -- title: round() shows undocumented behaviour - round(25, 1) should return an integer, not a float ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4707 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4707] round(25, 1) should return an integer, not a float
Mark Dickinson dicki...@gmail.com added the comment: Some minor modifications to the last patch: - fix round docstring: it now reads round(number[, ndigits]) - number instead of round(number[, ndigits]) - floating-point number - add Misc/NEWS entry - add extra tests for round(x, n) with n huge and positive -- stage: - commit review versions: +Python 3.1 Added file: http://bugs.python.org/file12865/round_int_int5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4707 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5068] tarfile loops forever on broken input
New submission from Maciek Fijalkowski fi...@genesilico.pl: I have troubles actually finding such a file, but I encountered it at least once (file is gone by now though). The lines in question are for bz2 compression: in _BZ2Proxy.read: try: raw = self.fileobj.read(self.blocksize) data = self.bz2obj.decompress(raw) b.append(data) except EOFError: break if it ever goes here (after finishing reading header) and data is truncated, fileobj.read() will return 0 and data will be '' and so on forever. -- components: Library (Lib) messages: 80567 nosy: fijal severity: normal status: open title: tarfile loops forever on broken input versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5068 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5057] Unicode-width dependent optimization leads to non-portable pyc file
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5057 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4676] python3 closes + home keys
Weeble clockworksa...@gmail.com added the comment: Just got a chance to test this on a Windows desktop with a proper keyboard. (My laptop does weird things with num-lock and scroll-lock.) I got it to crash once, but I have no idea what was special about that time. Otherwise I can reproduce the exception traceback printed to the console, with the following steps: 1) Start IDLE from the console, e.g.: python c:\python26\Lib\idlelib\idle.py 2) Make sure num-lock is turned OFF. 3) Enter a few characters, e.g: rhubarb 4) Press shift+left to create a selection of at least one character. 5) Press shift+home. The stack trace appears in the console: Exception in Tkinter callback Traceback (most recent call last): File C:\Python26\lib\lib-tk\Tkinter.py, line 1410, in __call__ return self.func(*args) File C:\Python26\lib\idlelib\MultiCall.py, line 150, in handler r = l[i](event) File C:\Python26\lib\idlelib\EditorWindow.py, line 333, in home_callback if self.text.compare(first,,last): File C:\Python26\lib\lib-tk\Tkinter.py, line 2858, in compare self._w, 'compare', index1, op, index2)) TclError: expected boolean value but got This is consistent with my understanding that Tk 8.5 does not use a mark named anchor to indicate the selection anchor. I have written a patch that directly calls tk::TextKeySelect instead of trying to duplicate its behaviour using the anchor mark. I'm not terribly confident with using diff and patch, so please let me know if I've done it wrong. I did use -u. Added file: http://bugs.python.org/file12866/IDLE_fix_shift_home.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4676 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5068] tarfile loops forever on broken input
Changes by Lars Gustäbel l...@gustaebel.de: -- assignee: - lars.gustaebel nosy: +lars.gustaebel ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5068 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4941] Tell GCC Py_DECREF is unlikely to call the destructor
Paolo 'Blaisorblade' Giarrusso p.giarru...@gmail.com added the comment: Probably #if the definitions of Py_LIKELY and Py_UNLIKELY instead of __builtin_expect so new compilers can easily add their own definitions. This was done in the first version, but with the currently supported compilers it's simpler to do like that, because both GCC and ICC support the same __builtin_expect syntax, so you get less code this way. Anyway, the code was inspired from the Linux kernel which only supports those two compilers, so anybody more knowledgeable is welcome to suggest how to express this with other compilers. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4941 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5067] Error msg from using wrong quotes in JSON is unhelpful
Changes by Steven D'Aprano st...@pearwood.info: -- components: +Library (Lib) type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5067 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1722344] Thread shutdown exception in Thread.notify()
Changes by Qiangning Hong hon...@gmail.com: -- nosy: +hongqn ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1722344 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5053] http.client.HTTPMessage.getallmatchingheaders() always returns []
Changes by Mike Watkins pyt...@mikewatkins.ca: -- title: http.client.HTTPMessage.getallmatchingheaders() - http.client.HTTPMessage.getallmatchingheaders() always returns [] ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5053 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5069] Use sets instead of list in posixpath._resolve_link
New submission from Χρήστος Γεωργίου (Christos Georgiou) t...@users.sourceforge.net: The paths_seen object is a list; a set is more appropriate, since its main use is a lookup as in path in paths_seen -- components: Library (Lib) files: posixpath.diff keywords: patch messages: 80570 nosy: tzot severity: normal status: open title: Use sets instead of list in posixpath._resolve_link type: performance versions: Python 2.7 Added file: http://bugs.python.org/file12867/posixpath.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5069 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4753] Faster opcode dispatch on gcc
Paolo 'Blaisorblade' Giarrusso p.giarru...@gmail.com added the comment: -fno-gcse is controversial. Even if it might avoid jumps sharing, the impact of that option has to be measured, since common subexpression elimination allows omitting some recalculations, so disabling global CSE might have a negative impact on other code. It would be maybe better to disable GCSE only for the interpreter loop, but that would make some intra-file inlining impossible. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4753 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4672] Distutils SWIG support blocks use of SWIG -outdir option
Andy Buckley a...@insectnation.org added the comment: Dumb question, but why is distutils wrapping the command args in quotes anyway? I'm not even sure why lists are being used (rather than a string) for the options, except that lists are a bit more Pythony and can be used to semantically divide the options from each other. If you end up having to use separate list elements for the option flag and the value it takes, doesn't that indicate that the list isn't being used properly? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4672 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4753] Faster opcode dispatch on gcc
Changes by Kevin Watters kevinwatt...@gmail.com: -- nosy: +kevinwatters ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4753 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5070] Distutils should create install dir if needed
New submission from Andy Buckley a...@insectnation.org: If you attempt to call python setup.py install --prefix=/foo, and /foo/lib/pythonX.Y/site-packages does not exist, the installation will fail, requiring that the directory be made by hand. Since there is no easy way to know in advance (other than by running Python to build the version number string) exactly where the install will go, this can be troublesome for automated build scripts. For this reason, and also to be more consistent with existing build/install systems like autotools, I suggest that distutils builds the necessary portions of the lib directory tree (provided /foo exists). This should certainly happen (IMHO) if the --force option is given. -- components: Distutils messages: 80573 nosy: andybuckley severity: normal status: open title: Distutils should create install dir if needed type: feature request versions: Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5070 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5070] Distutils should create install dir if needed
Jean-Paul Calderone exar...@divmod.com added the comment: This isn't accurate. distutils *will* create the directory if it does not exist. Perhaps you have setuptools installed? setuptools disables this behavior of distutils and forces you to create the directory manually. -- nosy: +exarkun ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5070 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4705] python3.0 -u: unbuffered stdout
Mark Dickinson dicki...@gmail.com added the comment: It's not about changing it, stdin has always been buffered in py3k. Sorry: I should have been clearer. It's the change from 2.x to 3.x that interests me. So 'python3.0 -u' has buffered stdin, while 'python2.6 -u' does not; I'm wondering: was this an intentional design change? Or was it just an accident/by-product of the rewritten io? Anyway, the patch looks good to me. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4705 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5071] Distutils should not fail if install dir is not in PYTHONPATH
New submission from Andy Buckley a...@insectnation.org: At present, distutils exits with an error return code if the directory that modules are being installed into is not in PYTHONPATH. Since the install path is not easily obtained (it at least requires running Python to work out the version string, plus some guesswork about lib vs. lib64, etc. etc.), it would be nice if this was not a blocking problem... at least when the --force flag is passed to setup.py (PS. It would be nice if there *is* a way to get the installation path from distutils before installing, for the reasons mentioned: that way automatic install scripts like the one I'm managing could work out the path, make it and add it to the PYTHONPATH, without worrying about getting it wrong. Am I just missing something that already exists?) -- components: Distutils messages: 80576 nosy: andybuckley severity: normal status: open title: Distutils should not fail if install dir is not in PYTHONPATH type: feature request versions: Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5071 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5071] Distutils should not fail if install dir is not in PYTHONPATH
Jean-Paul Calderone exar...@divmod.com added the comment: See my comment on issue5070. -- nosy: +exarkun ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5071 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4474] PyUnicode_FromWideChar incorrect for characters outside the BMP (unix only)
STINNER Victor victor.stin...@haypocalc.com added the comment: @marketdickinson, @lemburg: ping! I updated the patch, does it look better? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4474 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4626] compile() doesn't ignore the source encoding when a string is passed in
STINNER Victor victor.stin...@haypocalc.com added the comment: Ping! Can anyone review my patch? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4626 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4010] configure options don't trickle down to distutils
Akira Kitada akit...@gmail.com added the comment: Attached patch changes distutils to pass CPPFLAGS to compiler. -- nosy: +tarek Added file: http://bugs.python.org/file12868/issue4010.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4010 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4010] configure options don't trickle down to distutils
Changes by Tarek Ziadé ziade.ta...@gmail.com: -- assignee: - tarek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4010 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1885] [distutils] - error when processing the --formats=tar option
Tarek Ziadé ziade.ta...@gmail.com added the comment: done (in r68969 for py3k branch) -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1885 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5070] Distutils should create install dir if needed
Changes by Tarek Ziadé ziade.ta...@gmail.com: -- nosy: +tarek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5070 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5071] Distutils should not fail if install dir is not in PYTHONPATH
Changes by Tarek Ziadé ziade.ta...@gmail.com: -- nosy: +tarek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5071 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5070] Distutils should create install dir if needed
Andy Buckley a...@insectnation.org added the comment: Thanks for the rapid feedback: yes, I am using setuptools and didn't realise it would be responsible for this override. Is setuptools feedback done completely independently from this tracker? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5070 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1529142] Allowing multiple instances of IDLE with sub-processes
Weeble clockworksa...@gmail.com added the comment: A thought occurs to me: would this patch make it harder to cope with awkward firewalls that block the connection? Are they more or less likely to intervene when passing a port of 0 and letting it pick a port automatically? And if they do intervene, would users be able to create an exception if there is no small list of ports that might be used? Apart from that, what do I need to do to move this forward? Go hunt for more testers willing to try out the patch? Find an expert to review it? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1529142 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5070] Distutils should create install dir if needed
Jean-Paul Calderone exar...@divmod.com added the comment: Yea. setuptools is often discussed on distutils-sig: http://www.python.org/community/sigs/current/distutils-sig/ And has an issue tracker of its own: http://bugs.python.org/setuptools/ http://bugs.python.org/setuptools/issue54 sounds like this issue. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5070 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5061] Inadequate documentation of the built-in function open
David W. Lambert lamber...@corning.com added the comment: (prospective, not perspective programmer) Spelling out the possibilities as suggested in Message80563 makes better sense to me than writing in words the logic handling the mode argument of the io.open function. (Perhaps there is a clearer implementation using a dictionary with frozenset keys, but the io module for py3k is being recast in c, per my understanding.) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5061 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2459] speedup for / while / if with better bytecode
Changes by Collin Winter coll...@gmail.com: -- nosy: +collinwinter ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2459 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5072] urllib.open sends full URL after GET command instead of local path
New submission from Olemis Lang ole...@gmail.com: Hello ... The first thing I have to say is that I searched the open issues and I found nothing similar to what I am going to report hereinafter. If this ticket is duplicate , I apologize ... Yesterday I was testing how to access the wiki pages in a Trac [1]_ site and I realized that something wrong was happening (a bug? ...) Initially the behavior was as follows : {{{ #!python u = urllib.urlopen('http://localhost:8000/trac-dev') u.read() 'Environment not found' u.close() }}} And tracd reported a line like this {{{ 127.0.0.1 - - [25/Jan/2009 17:32:08] GET http://localhost:8000/trac- dev HTTP/1.0 404 - }}} Which means that a 'Not found' error code was sent back to urllib client. I tried to access the same page from my browser and tracd reported {{{ 127.0.0.1 - - [25/Jan/2009 18:05:44] GET /trac-dev HTTP/1.0 200 - }}} The problem is obvious ... urllib was sending the full URL after GET and it should send only the string after the network location. I applied the following patch to urllib (yours will be better, I am sure about that ;) {{{ #!diff --- /usr/lib/python2.5/urllib.py2008-07-31 13:40:40.0 -0500 +++ /media/urllib_unix.py 2009-01-26 09:48:54.0 -0500 @@ -270,6 +270,7 @@ def open_http(self, url, data=None): Use HTTP protocol. import httplib +from urlparse import urlparse user_passwd = None proxy_passwd= None if isinstance(url, str): @@ -312,12 +313,17 @@ else: auth = None h = httplib.HTTP(host) +target = ''.join(sep + part for sep, part in \ +zip(['', ';', '?', '#'], \ +urlparse(selector)[2:]) \ +if part) +print target if data is not None: -h.putrequest('POST', selector) +h.putrequest('POST', target) h.putheader('Content-Type', 'application/x-www-form- urlencoded') h.putheader('Content-Length', '%d' % len(data)) else: -h.putrequest('GET', selector) +h.putrequest('GET', target) if proxy_auth: h.putheader('Proxy-Authorization', 'Basic %s' % proxy_auth) if auth: h.putheader('Authorization', 'Basic %s' % auth) if realhost: h.putheader('Host', realhost) }}} And everithing was «back» to normal ... {{{ #!python u = urllib.urlopen('http://localhost:8000/trac-dev') u.read() ... # Lots of beautiful HTML code ;) u.close() }}} ... tracd outputted ... {{{ 127.0.0.1 - - [25/Jan/2009 18:05:44] GET /trac-dev HTTP/1.0 200 - }}} The same picture is shown when using both Python 2.5.1 and 2.5.2 ... I have not installed Python 2.6.x so I am not sure about whether this issue has propagated onto newer versions of Python ... and I don't know euther if this issue is also present in urllib2 or not ... ... so further research is needed, but IMO this is a serious bug :( PD: If this is a bug ... how could it be hidden so far ? Is there any test case written to assert this kind of things ? I checked out `test.test_urllib` and `test.test_urllibnet` modules and I saw nothing at all ... .. [1] Trac (http://trac.edgewall.org) -- components: Library (Lib) messages: 80586 nosy: olemis severity: normal status: open title: urllib.open sends full URL after GET command instead of local path type: behavior versions: Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5072 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5068] tarfile loops forever on broken input
Lars Gustäbel l...@gustaebel.de added the comment: Thanks for the report. The problem is in fact easy to reproduce. _BZ2Proxy hangs if it is passed a file object with either no data or with a partial bzipped file. For example try: tarfile.open(mode=r:bz2, fileobj=StringIO.StringIO()) I will create a decent fix for that problem, but not before next week. I am too busy doing other important stuff ATM. -- versions: +Python 3.0, Python 3.1 -Python 2.4, Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5068 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5072] urllib.open sends full URL after GET command instead of local path
Olemis Lang ole...@gmail.com added the comment: Ooops ... sorry, remove the print statement. The patch is as follows : {{{ #!diff --- /usr/lib/python2.5/urllib.py2008-07-31 13:40:40.0 -0500 +++ /media/urllib_unix.py 2009-01-26 09:48:54.0 -0500 @@ -270,6 +270,7 @@ def open_http(self, url, data=None): Use HTTP protocol. import httplib +from urlparse import urlparse user_passwd = None proxy_passwd= None if isinstance(url, str): @@ -312,12 +313,17 @@ else: auth = None h = httplib.HTTP(host) +target = ''.join(sep + part for sep, part in \ +zip(['', ';', '?', '#'], \ +urlparse(selector)[2:]) \ +if part) if data is not None: -h.putrequest('POST', selector) +h.putrequest('POST', target) h.putheader('Content-Type', 'application/x-www-form- urlencoded') h.putheader('Content-Length', '%d' % len(data)) else: -h.putrequest('GET', selector) +h.putrequest('GET', target) if proxy_auth: h.putheader('Proxy-Authorization', 'Basic %s' % proxy_auth) if auth: h.putheader('Authorization', 'Basic %s' % auth) if realhost: h.putheader('Host', realhost) }}} I apologize once again ... ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5072 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5073] bsddb/test/test_lock.py sometimes fails due to floating point error
New submission from Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: time.time() returns floating point, so sometimes folloing assertion in LockingTestCase#test03_lock_timeout fails due to floating point calculation error. self.assertTrue((end_time-start_time) = 0.1 end_time-start_time becomes 0.099046326 for instance. I ran test_lock.py 100 times after applied the attached patch, I saw no error. -- components: Tests files: test_lock.patch keywords: patch messages: 80589 nosy: ocean-city severity: normal status: open title: bsddb/test/test_lock.py sometimes fails due to floating point error versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file12869/test_lock.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5073 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4705] python3.0 -u: unbuffered stdout
Antoine Pitrou pit...@free.fr added the comment: So 'python3.0 -u' has buffered stdin, while 'python2.6 -u' does not; I'm wondering: was this an intentional design change? Or was it just an accident/by-product of the rewritten io? I'm not sure (I didn't write the new io in the first place) but I'd say it was simply overlooked. Otherwise 'python3.0 -u' would have had at least unbuffered stdout/stderr, which it didn't have. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4705 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2459] speedup for / while / if with better bytecode
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Reminder, make sure we can still break out of a while 1: pass. -- nosy: +rhettinger versions: +Python 2.7, Python 3.1 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2459 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5073] bsddb/test/test_lock.py sometimes fails due to floating point error
Mark Dickinson dicki...@gmail.com added the comment: Looks good to me! If it were me I'd probably just code the test directly as self.assertTrue((end_time-start_time) = 0.0999) to avoid having to look for epsilon when reading. Do you want to commit it or shall I? -- nosy: +marketdickinson resolution: - accepted ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5073 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2459] speedup for / while / if with better bytecode
Antoine Pitrou pit...@free.fr added the comment: Reminder, make sure we can still break out of a while 1: pass. Yes, the patch takes care of that. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2459 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4705] python3.0 -u: unbuffered stdout
Changes by Antoine Pitrou pit...@free.fr: -- assignee: - pitrou resolution: - accepted ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4705 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5073] bsddb/test/test_lock.py sometimes fails due to floating point error
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Could you commit please? :-) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5073 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5066] IDLE documentation for Unix obsolete/incorrect
Terry J. Reedy tjre...@udel.edu added the comment: LOL. That doc was apparently last revised in 2000 for the IDLE released with 1.5.2 (see screenshot). Other needed updates I see are: 'Shell' and 'Options' have been added to the menu line; we now have unicode text; screenshots look different (and nicer) on newer Tk on WinXP and could/should be redone. If it were decided to update this and add it to the doc package, I would help in some way. -- nosy: +tjreedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5066 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5073] bsddb/test/test_lock.py sometimes fails due to floating point error
Mark Dickinson dicki...@gmail.com added the comment: Fixed in r68978 (trunk) and r68979 (2.6). bsddb is no longer part of the standard Python distribution for 3.x, so the patch doesn't apply there. Thank you! -- resolution: accepted - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5073 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4705] python3.0 -u: unbuffered stdout
Antoine Pitrou pit...@free.fr added the comment: Committed and applied a small fix to the test so that it passes in debug mode (r68977, r68981, r68982). Thanks! -- resolution: accepted - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4705 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2459] speedup for / while / if with better bytecode
Antoine Pitrou pit...@free.fr added the comment: The patches don't apply cleanly anymore, I'll regenerate a new one. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2459 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2459] speedup for / while / if with better bytecode
Changes by Antoine Pitrou pit...@free.fr: Removed file: http://bugs.python.org/file10147/loops8.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2459 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2459] speedup for / while / if with better bytecode
Changes by Antoine Pitrou pit...@free.fr: Removed file: http://bugs.python.org/file9871/loops7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2459 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2459] speedup for / while / if with better bytecode
Changes by Antoine Pitrou pit...@free.fr: Removed file: http://bugs.python.org/file9863/loops5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2459 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2459] speedup for / while / if with better bytecode
Changes by Antoine Pitrou pit...@free.fr: Removed file: http://bugs.python.org/file9832/loops4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2459 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2459] speedup for / while / if with better bytecode
Changes by Antoine Pitrou pit...@free.fr: Removed file: http://bugs.python.org/file9829/loops3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2459 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4285] Use a named tuple for sys.version_info
Ross Light rlig...@gmail.com added the comment: Tests added and new patch uploaded. Anything else, anyone? Added file: http://bugs.python.org/file12870/patch-4285d.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4285 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5072] urllib.open sends full URL after GET command instead of local path
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment: I could not reproduce this issue neither with Python 2.6 nor 2.5.2 If I print host and selector near line 313, I get 'localhost:8000' and '/trac-dev', the expected results. Do you have an HTTP proxy? running at the *same* port? (!) -- nosy: +gagenellina ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5072 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4673] Distutils should provide an uninstall command
philobyte peter.a.si...@gmail.com added the comment: python setup.py uninstall should do all the same processing as 'install' but whenever it gets to the point of copying a file to a system destination, it should instead unlink the destination. besides the obvious use, here is another one: when upgrading a package, and the new version no longer includes certain files, just installing the new version will leave leftovers of the previous version installed. using uninstall beforehand will clean out the cruft. -- nosy: +philobyte ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4673 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5069] Use sets instead of list in posixpath._resolve_link
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment: Simple and correct. -- nosy: +gagenellina ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5069 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5053] http.client.HTTPMessage.getallmatchingheaders() always returns []
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment: I think unified diffs are preferred. Isn't there an existing test for this method? -- nosy: +gagenellina ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5053 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5067] Error msg from using wrong quotes in JSON is unhelpful
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment: This patch provides a better error message for this case:: json.loads({'test': test}) but still doesn't help in this one:: json.loads({test: 'test'}) 'test' looks like garbage to JSON (it *is* garbage!), exactly the same as:: json.loads({test: @?%%}) so it's hard to provide a better message when the parser expects a generic object. -- nosy: +gagenellina ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5067 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5067] Error msg from using wrong quotes in JSON is unhelpful
Changes by Gabriel Genellina gagsl-...@yahoo.com.ar: -- keywords: +patch Added file: http://bugs.python.org/file12871/json-messages.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5067 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5032] itertools.count step
steve21 steve872929...@yahoo.com.au added the comment: Here's a couple of functions I use with count and step: def cf_e(): '''return: (iterator) the infinite continued fraction for e e=[2; 1, 2, 1, 1, 4, 1, 1, 6, 1 , ... , 1, 2k, 1, ...] ''' yield 2 for k in itertools.count(2, 2): yield 1 yield k yield 1 def prime_factors(n): '''n: (int 1) return: (list) the sorted list of tuples (p,e) of prime factors of n p is a prime factor, e is the number of times the factor is used ''' ret = [] if n = 1: return ret # factors: use known (small) primes, then possible primes (odd numbers) for factor in itertools.chain([2,3,5,7,11], itertools.count(13, 2)): if factor*factor n: if n != 1: ret += [(n, 1)] break for e in itertools.count(0): div, mod = divmod(n, factor) if mod != 0: break n = div if e = 1: ret += [(factor, e)] return ret ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5032 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5053] http.client.HTTPMessage.getallmatchingheaders() always returns []
Mike Watkins pyt...@mikewatkins.ca added the comment: Re diffs, noted for the future. Re tests: # py3k-devel/Lib/test % grep -r getallmatchingheaders * ... Returns nothing, so not only does the email package need a test for this but so does http.client. Incidentally test_mailbox.py has a test for the proposed alternative - get_all(), which I noted above. That's another good reason for ridding the world of getallmatchingheaders() or at least simply calling get_all() from within getallmatchingheaders() if compatibility is a legitimate concern. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5053 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5058] stop pgen.exe from generating CRLF-ended files and causing mayhem with win32-based patch submissions
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment: I don't understand the issue. Those files *are* text files, and have CRLF on Windows as expected, like all other text files. I think you should fix your build process, or your environment, or your diff utility, or whatever is causing you a problem -- but not pgen. -- nosy: +gagenellina ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5058 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5065] IDLE improve Subprocess Startup Error message
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment: #1529142 would fix this issue also, if it were accepted. -- nosy: +gagenellina ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5065 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5032] itertools.count step
David W. Lambert lamber...@corning.com added the comment: Nice. Now I know that $e$ is a least transcendental number. But I can't figure out why inserting this code into your file (and removing some itertools.) is difficult or unreadable. I maintain a personal library of modules that I don't actually expect Guido to include in the python standard library. import itertools def count(offset=0,stride=1): for i in itertools.count(): yield offset+i*stride # this version probably performs faster def count(offset=0,stride=1): while True: yield offset offset += stride ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5032 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1529142] Allowing multiple instances of IDLE with sub-processes
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment: If this patch were accepted, #5065 would be a non-issue then. -- nosy: +gagenellina ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1529142 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5065] IDLE improve Subprocess Startup Error message
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5065 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5074] python3 and ctypes, script causes crash
New submission from Poor Yorick pooryor...@users.sourceforge.net: the following script causes python3 to crash on my Windows XP Pro Machine: import ctypes b = ctypes.windll.Kernel32 var1 = 'TEMP' out = ctypes.create_string_buffer(40) c = b.GetEnvironmentVariableW(var1,out,40) print('ones', c, out, out.raw) print('two: ', dir(out)) -- assignee: theller components: ctypes messages: 80611 nosy: pooryorick, theller severity: normal status: open title: python3 and ctypes, script causes crash type: crash versions: Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5074 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5069] Use sets instead of list in posixpath._resolve_link
Benjamin Peterson benja...@python.org added the comment: Thanks for the patch! Applied in r69003. -- nosy: +benjamin.peterson resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5069 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4626] compile() doesn't ignore the source encoding when a string is passed in
Benjamin Peterson benja...@python.org added the comment: I don't like the change of API to PyTokenizer_FromString. I would prefer another function like PyTokenizer_IgnoreCodingCookie() blows up when parsing has already started. The (char *) cast in PyTokenizer_FromString is unneeded. You need to indent the else clause after you test for ignore_cookie. I'd like to see a test that shows that byte strings still have their cookies examined. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4626 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5032] itertools.count step
steve21 steve872929...@yahoo.com.au added the comment: I already use the second version of the count function you give (without default arguments which I am not a big fan of). I'm not saying its difficult or unreadable to bypass itertools.count and write your own enhanced count function. But if I use a custom count function, you use a custom count function, and possibly many others too, then there could be a common requirement for a step argument and it might be a good idea too make it more widely available. Haskell has a powerful and concise list notation, some of which Python has already borrowed from: multiple3 = [3,6..] ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5032 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5062] Rlcompleter.Completer does not use __dir__ magic method
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment: This is not a bug in rlcompleter; __dir__ is returning bogus items, and rlcompleter checks whether there exist actually an attribute with such name. Defining __getattr__ (or __getattribute__) and a matching __dir__ works fine: class B(object): ... def __dir__(self): ... return dir(object) + [xa,xb,xc] ... def __getattr__(self, name): ... if name in [xa,xb,xc]: ... return None ... raise AttributeError, name ... b = B() import rlcompleter c = rlcompleter.Completer() c.complete(b., 0) 'b.__class__(' c.matches ['b.__class__(', 'b.__delattr__(', 'b.__doc__', 'b.__format__(', 'b.__getattribute__(', ... 'b.xa', 'b.xb', 'b.xc', 'b.__class__(', 'b.__class__(', ...] c.complete(b.x, 0) 'b.xa' c.matches ['b.xa', 'b.xb', 'b.xc'] Now, looking at this I saw there *is* a bug in rlcompleter, as it may return many duplicate items: c.complete(b.__c, 0) 'b.__class__(' c.matches ['b.__class__(', 'b.__class__(', 'b.__class__(', 'b.__class__('] The attached patch fixes that. -- keywords: +patch nosy: +gagenellina Added file: http://bugs.python.org/file12872/rlcompleter.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5062 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5051] test_update2 in test_os.py invalid due to os.environ.clear() followed by reliance on environ COMSPEC
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment: I *did* have /bin/sh in a Windows box some time ago. Probably the test should check sys.platform in addition to /bin/sh existence. -- nosy: +gagenellina ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5051 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5048] Extending itertools.combinations
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: FWIW, I added combinations_with_replacement() in r69001 and r69004 . ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5048 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5032] itertools.count step
David W. Lambert lamber...@corning.com added the comment: Probably a better prime factor algorithm uses Sieve of E. to generate primes through int(1+sqrt(n)) and test these. The other algorithm uses a custom generator anyway. Oh well, good luck, I'll shut up. You do have use cases that I couldn't think of. Dave. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5032 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5062] Rlcompleter.Completer does not use __dir__ magic method
Carl Johnson c...@carlsensei.com added the comment: It seems to me that it isn't tab completion's place to out think the __dir__ method. A) Because the documentation doesn't tell you that it does (although you are warned that it may call some stuff) and B) because if someone set up a __dir__ method, they probably are listing the things that they want listed for a particular reason. I think that it would be less confusing for rlcompleter to follow the __dir__ method when it exists and only do its own poking and prodding when it does not. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5062 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5075] bdist_wininst should not depend on the vc runtime?
New submission from Mark Hammond mhamm...@users.sourceforge.net: After consideration of issue 4120 and issue 4566, it seems to me that executables created by bdist_wininst will have a manifest referencing the MSVC9 assembly, and thus will be in a similar position to the .pyd files in issue 4120 - that unless the assembly is installed globally or next to the executable itself, the executable will not start. Note that I have not verified this, but have verified the final installer executable references the CRT assembly, and given those other bugs, expect it to be true. It seems to me a reasonable solution would be to have the bdist_wininst stub use a static copy of the C runtime library. While this means 2 copies of the CRT will eventually be loaded and would otherwise be considered evil, the way the stub dynamically loads Python and the few API functions it uses means it might be reasonable in this case. Would the trivial patch which achieves this be desired? -- assignee: mhammond components: Distutils messages: 80620 nosy: mhammond severity: normal status: open title: bdist_wininst should not depend on the vc runtime? versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5075 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1498370] Improve itertools.starmap
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: This was fixed in r60013. -- resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1498370 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5034] itertools.fixlen
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5034 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2527] Pass a namespace to timeit
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2527 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1242657] list(obj) can swallow KeyboardInterrupt
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1242657 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4920] Inconsistent usage of next/__next__ in ABC collections; collections.Iterator is not compatible with Python 2.6 iterators.
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4920 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5021] doctest.testfile should set __name__, can't use namedtuple
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5021 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5076] bdist_wininst fails on py3k
New submission from Mark Hammond mhamm...@users.sourceforge.net: bdist_wininst installers created by py3k fail due to PySys_SetArgv and Py_SetProgramName both being passed 'char *' strings instead of wide strings. The patch is against the svn trunk as currently Python 2.x and 3.x share the same bdist_wininst stub. The patch doesn't change the behaviour on Python 2.x, and continues to allow the same executable stub to be shared, as the appropriate signature is determined at runtime based on the Python version. The patch does not include the 2 new stub executables required (wininst-9.0.exe and wininst-9.0-amd64.exe), but the patch *and* the new stub executables should be merged into whatever py3k branches are appropriate. I've tested (pywin32) installers based on the new stub on python 2.6 32bit, and python 3.0 32 and 64bit. -- assignee: mhammond components: Distutils files: wininst_py3k.patch keywords: needs review, patch, patch messages: 80622 nosy: mhammond priority: high severity: normal stage: commit review status: open title: bdist_wininst fails on py3k type: behavior versions: Python 3.0, Python 3.1 Added file: http://bugs.python.org/file12873/wininst_py3k.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5076 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5062] Rlcompleter.Completer does not use __dir__ magic method
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment: This is what rlcompleter does; it uses dir() to find out what names to return. Or do you mean that it should not iterate along __bases__ because this has already been done by dir()? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5062 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5077] 2to3 fixers for the removal of operator functions
New submission from Alexandre Vassalotti alexan...@peadrop.com: This is a 2to3 fixer for the removal of obsolete functions in r68962. -- components: 2to3 (2.x to 3.0 conversion tool) files: fix_operator.py messages: 80624 nosy: alexandre.vassalotti severity: normal stage: patch review status: open title: 2to3 fixers for the removal of operator functions versions: Python 3.0, Python 3.1 Added file: http://bugs.python.org/file12874/fix_operator.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5077 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5062] Rlcompleter.Completer does not use __dir__ magic method
Carl Johnson c...@carlsensei.com added the comment: I think that checking to see which things really exist with getattr/hasattr made sense back in the days before the __dir__, since in those days the real API for an object could diverge wildly from what was reported by dir(object), but nowadays, if someone goes to the trouble of defining the __dir__ method, then we should just trust that as being the API and not do any other checking. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5062 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5077] 2to3 fixers for the removal of operator functions
Changes by Alexandre Vassalotti alexan...@peadrop.com: Added file: http://bugs.python.org/file12875/fix_operator.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5077 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5077] 2to3 fixers for the removal of operator functions
Changes by Alexandre Vassalotti alexan...@peadrop.com: Removed file: http://bugs.python.org/file12874/fix_operator.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5077 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5077] 2to3 fixer for the removal of operator functions
Changes by Alexandre Vassalotti alexan...@peadrop.com: -- title: 2to3 fixers for the removal of operator functions - 2to3 fixer for the removal of operator functions ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5077 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1397474] timeit execution enviroment
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: fdrake - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1397474 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5062] Rlcompleter.Completer does not use __dir__ magic method
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment: The check is made to decide whether the attribute is a method or not (because methods get a ( appended) -- for names that fail to exist, one could just omit the ( and include the name anyway. rlcompleter does nothing special with __dir__, it always uses dir() only. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5062 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5062] Rlcompleter.Completer does not use __dir__ magic method
Carl Johnson c...@carlsensei.com added the comment: Ah, I see. It does a dir(obj) then tests things to see which are callable and while it is at that, it removes the names that don't really exist according to getattr. Actually, can we go back to the Python 2.5 behavior? I really hate those auto-added parentheses. For one thing, it screws it up when you do help(nameTAB. Am I missing some really obvious switch that would turn the behavior back to the old style of ignoring the callable/non-callable thing? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5062 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5074] python3 and ctypes, script causes crash
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment: 3rd argument to GetEnvironmentVariableW is the buffer size in *characters*, not bytes. Your buffer has room for 20 characters only, not 40. You should use create_unicode_buffer instead. Probably the names create_unicode_buffer/create_string_buffer should be revised in 3.x -- nosy: +gagenellina ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5074 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5074] python3 and ctypes, script causes crash
Martin v. Löwis mar...@v.loewis.de added the comment: Why do you think this is a bug in ctypes? *Of course* it is possible to crash Python by using ctypes incorrectly. -- nosy: +loewis resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5074 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5062] Rlcompleter.Completer does not use __dir__ magic method
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment: The current behaviour is actually a requested feature: see #449227 I see your point, it may be annoying sometimes -- but calling a method is far more common than just getting a reference to it, so I think the current behaviour is fine (I'm talking about the added (, not the repeated entries, nor the unneeded __bases__ recursion, nor the deleted entries) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5062 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5075] bdist_wininst should not depend on the vc runtime?
Martin v. Löwis mar...@v.loewis.de added the comment: I think it would be even better if it didn't link with the CRT at all, but until somebody provides a patch for that, linking statically sounds fine to me. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5075 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5076] bdist_wininst fails on py3k
Martin v. Löwis mar...@v.loewis.de added the comment: Is it really useful to be have the same stub for 2.x and 3.x? I think it would be better if they mutually ignore each other, and be different. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5076 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4673] Distutils should provide an uninstall command
Tarek Ziadé ziade.ta...@gmail.com added the comment: philobyte, this means you have to keep the source somewhere to be able to run setup.py uninstall. This is not handy imho. What about a uninstall registery in Python that keeps track of the files installed for each package ? this would let us have an uninstall command that could run on its own. uninstall packagename ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4673 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5053] http.client.HTTPMessage.getallmatchingheaders() always returns []
Mike Watkins pyt...@mikewatkins.ca added the comment: Further investigation ( grep -r getallmatchingheaders Lib/* ) reveals that in addition to having no tests, and being implemented incorrectly in http.client, getallmatchingheaders() is called only once, in http.server; that code is also broken (I reported this yesterday in #5053). Maybe Python 3 is where getallmatchingheaders can make a graceful goodbye (and a 2to3 conversion added?). ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5053 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com