From report at bugs.python.org Wed Oct 1 00:02:32 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Sep 2008 22:02:32 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> Message-ID: <1222812152.26.0.891446512296.issue3187@psf.upfronthosting.co.za> STINNER Victor added the comment: As I wrote, python3_bytes_filename.patch was just an initial support for bytes filename. So as asked by Guido, here is a new version of my patch. Changes: - for all functions, support bytes as well as bytearray - os.readlink(unicode) -> unicode and raise an error if unicode conversion fails. Note: os.readlink(bytes)->bytes was already working. - many changes in posixpath to fix all functions: add many "if isinstance(...):" and repeat sep / curdir / parent / ... in bytes - current version of test_posixpath contains a duplicate to test_splitdrive() and test_normcase() calls normcase() twice which is wrong (fixed in my patch) - i used copy/paste + conversion to bytes to test posixpath with bytes arguments - i added some checks in posixpath tests to reject mixing bytes + str - fix quoting style - factorize pattern compilation in fnmatch - fnmatch.fnmatchcase() supports bytes - fix test_unicode_file: replace getcwdu() by getcwd(), and sometimes getcwd() by getcwdb() Open issues: - pwd.getpwnam() and grp.getgrpnam() should accept bytes, and then expanduser() should use pwd with bytes. Now expanduser() supposes that an username is an ASCII string and the user directory can be converted using getfilesystemencoding() - expandvars() doesn't support non-ASCII variable value: that's new problem. os.environ key should be str or bytes? And the value: str or bytes? It str is choosen, what is the charset to convert str to bytes? Added file: http://bugs.python.org/file11667/python3_bytes_filename-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 00:38:36 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Sep 2008 22:38:36 +0000 Subject: [issue4004] missing newline in "Could not convert argument %s to string" error message In-Reply-To: <1222814316.77.0.949437896792.issue4004@psf.upfronthosting.co.za> Message-ID: <1222814316.77.0.949437896792.issue4004@psf.upfronthosting.co.za> New submission from STINNER Victor : Example: $ ./python $(echo -e "\xff"); ./python $(echo -e "\xff"); echo "--" Could not convert argument 1 to stringCould not convert argument 1 to string-- ---------- files: argv_error_newline.patch keywords: patch messages: 74102 nosy: haypo severity: normal status: open title: missing newline in "Could not convert argument %s to string" error message type: behavior versions: Python 3.0 Added file: http://bugs.python.org/file11668/argv_error_newline.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 01:27:24 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 30 Sep 2008 23:27:24 +0000 Subject: [issue4001] 2to3 does relative import for modules not in a package. In-Reply-To: <1222780832.06.0.913683232517.issue4001@psf.upfronthosting.co.za> Message-ID: <1222817244.45.0.227414736947.issue4001@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks. Fixed in r66707. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 01:42:31 2008 From: report at bugs.python.org (Matthew Barnett) Date: Tue, 30 Sep 2008 23:42:31 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1222818151.68.0.902851536744.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: The explanation of the zero-width bug is incorrect. What happens is this: The functions for finditer(), findall(), etc, perform searches and want the next one to continue from where the previous match ended. However, if the match was actually zero-width then that would've made it search from where the previous search _started_, and it would be stuck forever. Therefore, after a zero-width match the caller of the search consumes a character. Unfortunately, that can result a character being 'missed'. The bug in re.split() is also the result of an incorrect fix to this zero-width problem. I suggest that the regex code should include the fix for the zero-width split bug; we can have code to turn it off unless a re.ZEROWIDTH flag is present, if that's the decision. The patch issue2636+01+09-02+17+18+19+20+21+24+26_speedup.diff includes some speedups. Added file: http://bugs.python.org/file11669/issue2636+01+09-02+17+18+19+20+21+24+26_speedup.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 01:44:22 2008 From: report at bugs.python.org (Matthew Barnett) Date: Tue, 30 Sep 2008 23:44:22 +0000 Subject: [issue694374] Recursive regular expressions Message-ID: <1222818262.87.0.886865772759.issue694374@psf.upfronthosting.co.za> Matthew Barnett added the comment: I'll have a look at this. No promises, though. ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 01:52:08 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 30 Sep 2008 23:52:08 +0000 Subject: [issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line. In-Reply-To: <1205817752.04.0.892564898323.issue2382@psf.upfronthosting.co.za> Message-ID: <1222818728.09.0.227952318428.issue2382@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I think that your patch works only for terminals where one byte of the encoded text is displayed as one character on the terminal. This is not true for utf-8 terminals, for example. In the attached patch, I tried to write some unit tests, (I had to adapt the traceback module as well), and one test still fails because the captured stderr has a utf-8 encoding. I think that it's better to count unicode characters. ---------- nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file11670/traceback_adjust_cursor.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 04:09:55 2008 From: report at bugs.python.org (Nick Edds) Date: Wed, 01 Oct 2008 02:09:55 +0000 Subject: [issue2876] Write UserDict fixer for 2to3 In-Reply-To: <1210913348.4.0.543107843307.issue2876@psf.upfronthosting.co.za> Message-ID: <1222826995.67.0.809646331583.issue2876@psf.upfronthosting.co.za> Nick Edds added the comment: Could somebody else take a look at this and check in it if it looks alright? I think that it works currently but I can't check it in... _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 04:10:40 2008 From: report at bugs.python.org (Nick Edds) Date: Wed, 01 Oct 2008 02:10:40 +0000 Subject: [issue3448] Multi-process 2to3 In-Reply-To: <1217019998.69.0.231122552254.issue3448@psf.upfronthosting.co.za> Message-ID: <1222827040.11.0.963385613494.issue3448@psf.upfronthosting.co.za> Nick Edds added the comment: Is there still any interest in this Collin? Is there anything else you need me to do for it? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 05:07:03 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 01 Oct 2008 03:07:03 +0000 Subject: [issue2876] Write UserDict fixer for 2to3 In-Reply-To: <1210913348.4.0.543107843307.issue2876@psf.upfronthosting.co.za> Message-ID: <1222830423.87.0.753982236318.issue2876@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> benjamin.peterson nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 05:08:37 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 01 Oct 2008 03:08:37 +0000 Subject: [issue3448] Multi-process 2to3 In-Reply-To: <1217019998.69.0.231122552254.issue3448@psf.upfronthosting.co.za> Message-ID: <1222830517.26.0.515390204863.issue3448@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Nick, is there a way you could isolate the process functionality in a RefactoringTool subclass? It's an interesting idea, but I don't it needs to infect the main library. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 05:24:18 2008 From: report at bugs.python.org (Bill Janssen) Date: Wed, 01 Oct 2008 03:24:18 +0000 Subject: [issue3991] urllib.request.urlopen does not handle non-ASCII characters In-Reply-To: <1222627636.82.0.587488225038.issue3991@psf.upfronthosting.co.za> Message-ID: <1222831458.15.0.871045533304.issue3991@psf.upfronthosting.co.za> Bill Janssen added the comment: I'm not concerned about any example inputs. I was just trying to explain why this isn't a bug. On the other hand, the IRI spec (RFC 3897) is another thing we might try to implement for Python. ---------- type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 05:30:47 2008 From: report at bugs.python.org (Andrew I MacIntyre) Date: Wed, 01 Oct 2008 03:30:47 +0000 Subject: [issue3862] test_array fails on FreeBSD7 amd64 In-Reply-To: <1221355819.02.0.121896067033.issue3862@psf.upfronthosting.co.za> Message-ID: <1222831847.92.0.108999428266.issue3862@psf.upfronthosting.co.za> Andrew I MacIntyre added the comment: Yes, the bleeding obvious became so after some sleep. Committed to trunk as r66708 with the extra fix and a more abbreviated failure message, which I hope is still semantically the same as Mark's suggested text. Will forward port as appropriate to py3k. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 06:09:02 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Wed, 01 Oct 2008 04:09:02 +0000 Subject: [issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line. In-Reply-To: <1205817752.04.0.892564898323.issue2382@psf.upfronthosting.co.za> Message-ID: <1222834142.56.0.172636065325.issue2382@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: You are right, this issue is more difficult than I thought... I found wcswidth(3), if this function is available we can use this function, but unfortunately there is no such function in VC6 and this function is meaningless on cygwn, so I cannot test it. ;-( Maybe we can use import unicodedata unicodedata.east_asian_width() but I need to investigate more. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 07:09:00 2008 From: report at bugs.python.org (David W. Lambert) Date: Wed, 01 Oct 2008 05:09:00 +0000 Subject: [issue4000] Additional 2to3 documentation updates In-Reply-To: <1222748434.01.0.683191866382.issue4000@psf.upfronthosting.co.za> Message-ID: <1222837740.71.0.794640686679.issue4000@psf.upfronthosting.co.za> David W. Lambert added the comment: http://docs.python.org/dev/3.0/library/reprlib.html Should read return eval(obj) return `obj` http://docs.python.org/dev/3.0/library/collections.html#id2 Relic decimal point in named tuple example. >>> for p in Point(3, 4), Point(14, 5/7.): _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 08:24:50 2008 From: report at bugs.python.org (James Mills) Date: Wed, 01 Oct 2008 06:24:50 +0000 Subject: [issue4005] pydoc in web server mode tails at initial request In-Reply-To: <1222842290.34.0.581261002226.issue4005@psf.upfronthosting.co.za> Message-ID: <1222842290.34.0.581261002226.issue4005@psf.upfronthosting.co.za> New submission from James Mills : Trying to use pydoc in it's webserver mode fails: $ pydoc3.0 -p 8000 pydoc server ready at http://localhost:8000/ ---------------------------------------- Exception happened during processing of request from ('127.0.0.1', 42939) Traceback (most recent call last): File "/usr/lib/python3.0/socketserver.py", line 281, in _handle_request_noblock self.process_request(request, client_address) File "/usr/lib/python3.0/socketserver.py", line 307, in process_request self.finish_request(request, client_address) File "/usr/lib/python3.0/socketserver.py", line 320, in finish_request self.RequestHandlerClass(request, client_address, self) File "/usr/lib/python3.0/socketserver.py", line 614, in __init__ self.handle() File "/usr/lib/python3.0/http/server.py", line 363, in handle self.handle_one_request() File "/usr/lib/python3.0/http/server.py", line 357, in handle_one_request method() File "/usr/lib/python3.0/pydoc.py", line 1957, in do_GET indices.append(html.index(dir, seen)) File "/usr/lib/python3.0/pydoc.py", line 929, in index for importer, name, ispkg in pkgutil.iter_modules([dir]): File "/usr/lib/python3.0/pkgutil.py", line 147, in iter_modules for name, ispkg in iter_importer_modules(i, prefix): File "/usr/lib/python3.0/pkgutil.py", line 325, in iter_zipimport_modules dirlist.sort() AttributeError: 'dict_keys' object has no attribute 'sort' ---------------------------------------- pydoc server stopped ---------- components: Demos and Tools messages: 74116 nosy: prologic severity: normal status: open title: pydoc in web server mode tails at initial request type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 08:39:58 2008 From: report at bugs.python.org (Toshio Kuratomi) Date: Wed, 01 Oct 2008 06:39:58 +0000 Subject: [issue3991] urllib.request.urlopen does not handle non-ASCII characters In-Reply-To: <1222627636.82.0.587488225038.issue3991@psf.upfronthosting.co.za> Message-ID: <1222843198.95.0.31754427624.issue3991@psf.upfronthosting.co.za> Toshio Kuratomi added the comment: Oh, that's cool. I've been fine with this being a request for a needed function to quote and unquote full urls rather than a bug in urlopen(). I think iri's are a distraction here, though. The RFC for iris even says that specifications that call for uris and do not mention iris should not take iris. So there's definitely a need for a function to quote a full uri. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 09:17:21 2008 From: report at bugs.python.org (Toshio Kuratomi) Date: Wed, 01 Oct 2008 07:17:21 +0000 Subject: [issue4006] os.getenv silently discards env variables with non-UTF-8 values In-Reply-To: <1222845441.08.0.104904424427.issue4006@psf.upfronthosting.co.za> Message-ID: <1222845441.08.0.104904424427.issue4006@psf.upfronthosting.co.za> New submission from Toshio Kuratomi : On a Linux system with a locale setting whose encoding is utf-8, if you set an environment variable to have a non-utf-8 chanacter, that environment variable silently does not appear in os.environ:: mkdir ? convmv -f utf-8 -t latin-1 --notest ? for i in * ; do export PATH=$PATH:$i ; done echo $PATH /usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin:/home/badger/bin:? python3.0 Python 3.0rc1 (r30rc1:66499, Sep 28 2008, 08:21:09) [GCC 4.3.0 20080428 (Red Hat 4.3.0-8)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.environ['PATH'] Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.0/os.py", line 389, in __getitem__ return self.data[self.keymap(key)] KeyError: 'PATH' I'm uncertain of the impact of this. It was brought up in a discussion of sending non-ASCii data to a CGI-WSGI script where the data would be transferred via os.environ. ---------- components: Unicode messages: 74118 nosy: a.badger severity: normal status: open title: os.getenv silently discards env variables with non-UTF-8 values type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 10:14:01 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 01 Oct 2008 08:14:01 +0000 Subject: [issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line. In-Reply-To: <1205817752.04.0.892564898323.issue2382@psf.upfronthosting.co.za> Message-ID: <1222848841.07.0.0224167443803.issue2382@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: For the moment, I'd suggest that one unicode character has a the same with as the space character, assuming that stdout.encoding correctly matches the terminal. Then the C implementation could do something similar to the statements I added in traceback.py: offset = len(line.encode('utf-8')[:offset].decode('utf-8')) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 10:59:31 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 01 Oct 2008 08:59:31 +0000 Subject: [issue4005] pydoc in web server mode tails at initial request In-Reply-To: <1222842290.34.0.581261002226.issue4005@psf.upfronthosting.co.za> Message-ID: <1222851571.81.0.298894417784.issue4005@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The problem occurs when sys.path contains the name of an existing zip file. Here is a patch, with tests. ---------- keywords: +needs review, patch nosy: +amaury.forgeotdarc priority: -> critical Added file: http://bugs.python.org/file11671/pkgutil.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 11:05:10 2008 From: report at bugs.python.org (Collin Winter) Date: Wed, 01 Oct 2008 09:05:10 +0000 Subject: [issue3448] Multi-process 2to3 In-Reply-To: <1217019998.69.0.231122552254.issue3448@psf.upfronthosting.co.za> Message-ID: <1222851910.45.0.634672527935.issue3448@psf.upfronthosting.co.za> Collin Winter added the comment: I believe the only issue I recall was that the patch didn't work out-of-the-box for Python 2.6 (changed imports, PEP 8 compliance changes in the multiprocess module). Has that been fixed? I disagree with Benjamin: this is an import speed increase, and I don't see the point in adding the needless complexity of a subclass. The user won't notice any difference, and anyone wanting to use this as a library will want the faster version. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 11:50:41 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 01 Oct 2008 09:50:41 +0000 Subject: [issue3959] Add Google's ipaddr.py to the stdlib In-Reply-To: <1222298050.73.0.172554962966.issue3959@psf.upfronthosting.co.za> Message-ID: <1222854641.49.0.792418734648.issue3959@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 12:20:54 2008 From: report at bugs.python.org (Dan OD) Date: Wed, 01 Oct 2008 10:20:54 +0000 Subject: [issue3774] tkinter Menu.delete bug In-Reply-To: <1220534371.28.0.918007681781.issue3774@psf.upfronthosting.co.za> Message-ID: <1222856454.21.0.5752495731.issue3774@psf.upfronthosting.co.za> Dan OD added the comment: gpolo's patch issue3774_2.diff does seem to fix this bug, but it's not in the SVN trunk - could this be done before 2.6 final? Thanks! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 12:39:52 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 01 Oct 2008 10:39:52 +0000 Subject: [issue3974] collections.namedtuple uses exec to create new classes In-Reply-To: <1222430514.93.0.950826754089.issue3974@psf.upfronthosting.co.za> Message-ID: <1222857592.59.0.1601382216.issue3974@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Have you run benchmarks of both versions? It seems the benefit of the original version is that it's faster, thanks to hardcoding critical methods. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 13:22:15 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 01 Oct 2008 11:22:15 +0000 Subject: [issue3620] test_smtplib is flaky In-Reply-To: <1219244969.03.0.636728598981.issue3620@psf.upfronthosting.co.za> Message-ID: <1222860135.07.0.269697686711.issue3620@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 13:22:57 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 01 Oct 2008 11:22:57 +0000 Subject: [issue3989] Tools\Scripts\2to3.py broken under 3.0 rc1 Windows In-Reply-To: <1222615250.32.0.962224147544.issue3989@psf.upfronthosting.co.za> Message-ID: <1222860177.26.0.0844968873824.issue3989@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This is now fixed in r66710 and r66711. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 13:23:29 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 01 Oct 2008 11:23:29 +0000 Subject: [issue3863] 2.6rc1: test_threading hangs on FreeBSD 6.3 i386 In-Reply-To: <1221391510.13.0.209829217282.issue3863@psf.upfronthosting.co.za> Message-ID: <1222860209.58.0.834279767886.issue3863@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- priority: release blocker -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 13:29:41 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 01 Oct 2008 11:29:41 +0000 Subject: [issue2944] asyncore doesn't handle connection refused correctly In-Reply-To: <1211462641.02.0.497686644895.issue2944@psf.upfronthosting.co.za> Message-ID: <1222860581.44.0.319854305391.issue2944@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: This should have already been fixed in r64062. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 13:31:24 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 01 Oct 2008 11:31:24 +0000 Subject: [issue1541] Bad OOB data management when using asyncore with select.poll() In-Reply-To: <1196618056.9.0.300104478176.issue1541@psf.upfronthosting.co.za> Message-ID: <1222860684.22.0.439575867686.issue1541@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +josiah.carlson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 13:39:01 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 01 Oct 2008 11:39:01 +0000 Subject: [issue1736190] asyncore/asynchat patches Message-ID: <1222861141.63.0.397155549377.issue1736190@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: This issue should be closed. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 13:40:18 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 01 Oct 2008 11:40:18 +0000 Subject: [issue1161031] Neverending warnings from asyncore Message-ID: <1222861218.69.0.457654662522.issue1161031@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 13:42:36 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 01 Oct 2008 11:42:36 +0000 Subject: [issue658749] asyncore connect() and winsock errors Message-ID: <1222861356.74.0.509155443261.issue658749@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 14:01:13 2008 From: report at bugs.python.org (Alexander Shigin) Date: Wed, 01 Oct 2008 12:01:13 +0000 Subject: [issue2944] asyncore doesn't handle connection refused correctly In-Reply-To: <1211462641.02.0.497686644895.issue2944@psf.upfronthosting.co.za> Message-ID: <1222862473.61.0.890025711339.issue2944@psf.upfronthosting.co.za> Alexander Shigin added the comment: I've got the same error in r64768. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 14:52:38 2008 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 01 Oct 2008 12:52:38 +0000 Subject: [issue4007] make clean fails to delete .a and .so.X.Y files In-Reply-To: <1222865558.69.0.211492206559.issue4007@psf.upfronthosting.co.za> Message-ID: <1222865558.69.0.211492206559.issue4007@psf.upfronthosting.co.za> New submission from Skip Montanaro : The "clean" target in the makefile fails to delete the libpython.a file and the libpython.so.X.Y file (should you have configured using --enable-shared). The attached trivial patch solves that problem. The patch is against the trunk as of just before the 2.6 final release. It will almost certainly apply cleanly to the py3k version as well. ---------- components: Build keywords: easy, patch messages: 74128 nosy: skip.montanaro priority: normal severity: normal status: open title: make clean fails to delete .a and .so.X.Y files type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 16:05:42 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Wed, 01 Oct 2008 14:05:42 +0000 Subject: [issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line. In-Reply-To: <1205817752.04.0.892564898323.issue2382@psf.upfronthosting.co.za> Message-ID: <1222869942.45.0.344214938548.issue2382@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Amaury, if doing so, the cursor will shift left by 5 columns on my environment like this, no? ("?" requires 2 columns for example) print "?????" ^ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 16:19:22 2008 From: report at bugs.python.org (Collin Winter) Date: Wed, 01 Oct 2008 14:19:22 +0000 Subject: [issue214033] re incompatibility in sre Message-ID: <1222870762.3.0.64215247854.issue214033@psf.upfronthosting.co.za> Changes by Collin Winter : ---------- nosy: -collinwinter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 16:53:20 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Wed, 01 Oct 2008 14:53:20 +0000 Subject: [issue3774] tkinter Menu.delete bug In-Reply-To: <1220534371.28.0.918007681781.issue3774@psf.upfronthosting.co.za> Message-ID: <1222872800.62.0.290360635202.issue3774@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I think gpolo's patch can go. >I'm not sure (self._tclCommands is not None) check is not really needed. I want to cancel this opinion. I saw no self._tclCommands check before any other deletecommand() call, I beleive this is OK. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 17:37:55 2008 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Oct 2008 15:37:55 +0000 Subject: [issue4008] IDLE: checksyntax() doesn't support Unicode? In-Reply-To: <1222875475.18.0.22602254781.issue4008@psf.upfronthosting.co.za> Message-ID: <1222875475.18.0.22602254781.issue4008@psf.upfronthosting.co.za> New submission from STINNER Victor : IDLE checksyntax() function doesn't support Unicode. Example with idle-3.0rc1-quits-when-run.py in an ASCII terminal: $ ./python Tools/scripts/idle Exception in Tkinter callback Traceback (most recent call last): File "/home/haypo/prog/py3k/Lib/tkinter/__init__.py", line 1405, in __call__ return self.func(*args) File "/home/haypo/prog/py3k/Lib/idlelib/ScriptBinding.py", line 124, in run_module_event code = self.checksyntax(filename) File "/home/haypo/prog/py3k/Lib/idlelib/ScriptBinding.py", line 86, in checksyntax source = f.read() File "/home/haypo/prog/py3k/Lib/io.py", line 1719, in read decoder.decode(self.buffer.read(), final=True)) File "/home/haypo/prog/py3k/Lib/io.py", line 1294, in decode output = self.decoder.decode(input, final=final) File "/home/haypo/prog/py3k/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 87: ordinal not in range(128) To open an ASCII terminal on Linux, you can for example use xterm with an empty environment (except DISPLAY and HOME variables): "env -i DISPLAY=$DISPLAY HOME=$HOME xterm". ---------- components: IDLE files: idle-3.0rc1-quits-when-run.py messages: 74131 nosy: haypo severity: normal status: open title: IDLE: checksyntax() doesn't support Unicode? versions: Python 3.0 Added file: http://bugs.python.org/file11672/idle-3.0rc1-quits-when-run.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 17:41:24 2008 From: report at bugs.python.org (John) Date: Wed, 01 Oct 2008 15:41:24 +0000 Subject: [issue4009] A Minor Glitch in the Documentation In-Reply-To: <1222875684.11.0.0089536164395.issue4009@psf.upfronthosting.co.za> Message-ID: <1222875684.11.0.0089536164395.issue4009@psf.upfronthosting.co.za> New submission from John : Hello, I don't know why my previous bug report was ignored, but I must report this. Since this is a minor glitch, I hope it will be fixed. Please be so kind and fix this. Please go here and see the 3rd code example: http://docs.python.org/dev/3.0/library/functions.html? highlight=property#property class C(object): def __init__(self): self._x = None All other lines in the code example are written in the way that the code block of the function definition is in the next line and properly indented. Please fix this little glitch. Thank you. ---------- assignee: georg.brandl components: Documentation messages: 74132 nosy: fretai, georg.brandl severity: normal status: open title: A Minor Glitch in the Documentation versions: Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 18:11:54 2008 From: report at bugs.python.org (Georg Brandl) Date: Wed, 01 Oct 2008 16:11:54 +0000 Subject: [issue4009] A Minor Glitch in the Documentation In-Reply-To: <1222875684.11.0.0089536164395.issue4009@psf.upfronthosting.co.za> Message-ID: <1222877514.49.0.722912377761.issue4009@psf.upfronthosting.co.za> Georg Brandl added the comment: Please stop wasting our time. There is no bug in how this class is written. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 18:14:00 2008 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Oct 2008 16:14:00 +0000 Subject: [issue4008] IDLE: checksyntax() doesn't support Unicode? In-Reply-To: <1222875475.18.0.22602254781.issue4008@psf.upfronthosting.co.za> Message-ID: <1222877640.96.0.0472929328747.issue4008@psf.upfronthosting.co.za> STINNER Victor added the comment: Hum, the problem is that IDLE asks io.open() to detect the charset whereas open() doesn't know the #coding: header. So if your locale is ASCII, CP1252 or anything different of UTF-8, read the file will fails. I wrote a patch to detect the encoding. Python code (detect_encoding() function) is based on PyTokenizer_FindEncoding() and get_coding_spec() (from Parser/tokenizer.c). There is no existing Python function to detect the encoding of a Python script? (a public function available in a Python script) ---------- keywords: +patch Added file: http://bugs.python.org/file11673/idle_encoding.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 18:17:41 2008 From: report at bugs.python.org (James Athey) Date: Wed, 01 Oct 2008 16:17:41 +0000 Subject: [issue3978] ZipFileExt.read() can be incredibly slow In-Reply-To: <1222457019.27.0.267576306603.issue3978@psf.upfronthosting.co.za> Message-ID: <1222877861.84.0.875525853416.issue3978@psf.upfronthosting.co.za> James Athey added the comment: Why not include this in 2.6.1 or 3.0.1? The patch fixes several bugs; it does not provide any new functionality. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 18:22:26 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 01 Oct 2008 16:22:26 +0000 Subject: [issue3974] collections.namedtuple uses exec to create new classes In-Reply-To: <1222430514.93.0.950826754089.issue3974@psf.upfronthosting.co.za> Message-ID: <1222878146.95.0.758711761069.issue3974@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The current version is clear and maintainable. There is nothing unholy about using exec. Earlier versions used other approaches and they proved unnecessarily complex and had unexpected problems. It is a key feature for named tuples that they are exactly equivalent to a hand-written class. I appreciate your effort but am rejecting it flat-out. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 18:43:53 2008 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 01 Oct 2008 16:43:53 +0000 Subject: [issue4010] configure options don't trickle down to distutils In-Reply-To: <1222879433.22.0.765704464081.issue4010@psf.upfronthosting.co.za> Message-ID: <1222879433.22.0.765704464081.issue4010@psf.upfronthosting.co.za> New submission from Skip Montanaro : If you are fortunate enough to have all your third-party libraries in a single quasi-standard location, say, /usr/local/lib, you will probably have never encountered this problem, but setting environment variables like LDFLAGS don't get translated into the relevant args for the distutils build_ext command. The evidence for this is this output at the end of the make process: Failed to find the necessary bits to build these modules: _hashlib _sqlite3 _ssl bsddb185 linuxaudiodev ossaudiodev To find the necessary bits, look in setup.py in detect_modules() for the module's name. Failed to build these modules: _curses _curses_panel _tkinter gdbm readline Here's the specific failure for readline: >>> import readline_failed Traceback (most recent call last): File "", line 1, in ImportError: ld.so.1: python: fatal: libreadline.so.4: open failed: No such file or directory yet if you poke around in my config.status file you'll see that I set the relevant -L and -R flags: s, at LDFLAGS@,|#_!!_#|-L/opt/app/nonc++/ncurses-5.6/lib -R/opt/app/nonc++/ncurses-5.6/lib -L/opt/app/nonc++/gdbm-1.8/lib -R/opt/app/nonc++/gdbm-1.8/lib -L/opt/app/nonc++/readline-4.3/lib -R/opt/app/nonc++/readline-4.3/lib -L/opt/app/nonc++/tcl-8.4/lib -R/opt/app/nonc++/tcl-8.4/lib -L/opt/app/nonc++/BerkleyDB-4.3/lib -R/opt/app/nonc++/BerkleyDB-4.3/lib,g The workaround is to run the build_ext command separately: ./python ../setup.py build_ext --library-dirs=... --rpath=... It's not hard to work around this problem, but it's tedious to build the command line args from the massive list of directories I have to educate distutils about. ---------- components: Build, Distutils messages: 74137 nosy: skip.montanaro priority: normal severity: normal status: open title: configure options don't trickle down to distutils type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 20:28:29 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 01 Oct 2008 18:28:29 +0000 Subject: [issue4006] os.getenv silently discards env variables with non-UTF-8 values In-Reply-To: <1222845441.08.0.104904424427.issue4006@psf.upfronthosting.co.za> Message-ID: <1222885709.1.0.579989249834.issue4006@psf.upfronthosting.co.za> Martin v. L?wis added the comment: For the moment, this case is just not supported. ---------- nosy: +loewis versions: +Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 20:34:42 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 01 Oct 2008 18:34:42 +0000 Subject: [issue3774] tkinter Menu.delete bug In-Reply-To: <1222856454.21.0.5752495731.issue3774@psf.upfronthosting.co.za> Message-ID: <48E3C2BF.7080904@v.loewis.de> Martin v. L?wis added the comment: > gpolo's patch issue3774_2.diff does seem to fix this bug, but it's not in > the SVN trunk - could this be done before 2.6 final? Definitely not. The release is about to be produced today. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 21:25:59 2008 From: report at bugs.python.org (Brett Cannon) Date: Wed, 01 Oct 2008 19:25:59 +0000 Subject: [issue4010] configure options don't trickle down to distutils In-Reply-To: <1222879433.22.0.765704464081.issue4010@psf.upfronthosting.co.za> Message-ID: <1222889159.6.0.750270759845.issue4010@psf.upfronthosting.co.za> Brett Cannon added the comment: Well, all of my modules are in a non-standard location and I have no build issues on OS X 10.5. If you look at PyBuildExt.detect_modules() you will see that the paths are at least added for the search path from LDFLAGS and CPPFLAGS. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 21:38:46 2008 From: report at bugs.python.org (Roumen Petrov) Date: Wed, 01 Oct 2008 19:38:46 +0000 Subject: [issue3995] iso-xxx/cp1252 inconsistencies in Python 2.* not in 3.* In-Reply-To: <1222682223.58.0.12502846451.issue3995@psf.upfronthosting.co.za> Message-ID: <1222889926.85.0.210840409787.issue3995@psf.upfronthosting.co.za> Roumen Petrov added the comment: Thanks Martin for correction: yes not reserved - assigned. Jean-Michel, you test case is incorrect. You terminal is run in CP1252 where byte \x80 is shown as euro sing. But if you run terminal(if is possible in reported operating system) in ISO-8859-{1|15} this byte is a control character without visual representation. To avoid "visual" ambiguity you should use hex representation of characters: 1) >>> unicode('\x80', 'cp1252') u'\u20ac' 2) >>> unicode('\xa4','iso-8859-15') u'\u20ac' For the second case in you terminal you should enter: >>> unicode('?','iso-8859-15') u'\u20ac' '?'(cp1252) = \xa4 = 164 = '?'(iso-8859-15) I guess you understand what is incorrect in you report. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 21:40:53 2008 From: report at bugs.python.org (Greg Couch) Date: Wed, 01 Oct 2008 19:40:53 +0000 Subject: [issue1759845] subprocess.call fails with unicode strings in command line Message-ID: <1222890053.17.0.536235934008.issue1759845@psf.upfronthosting.co.za> Greg Couch added the comment: We're having the same problem. My quick fix was to patch subprocess.py so the command line and executable are converted to the filesystem encoding (mbcs). ---------- nosy: +gregcouch Added file: http://bugs.python.org/file11674/Python-2.5.2-subprocess.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 22:27:17 2008 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 01 Oct 2008 20:27:17 +0000 Subject: [issue4010] configure options don't trickle down to distutils In-Reply-To: <1222889159.6.0.750270759845.issue4010@psf.upfronthosting.co.za> Message-ID: <18659.56606.547753.174871@montanaro-dyndns-org.local> Skip Montanaro added the comment: Brett> Well, all of my modules are in a non-standard location and I have Brett> no build issues on OS X 10.5. If you look at Brett> PyBuildExt.detect_modules() you will see that the paths are at Brett> least added for the search path from LDFLAGS and CPPFLAGS. Ah, there's the problem. It picks through LDFLAGS looking for -L but fails to pay attention to -R. I'll see if I can work up a patch. Also, I'm seeing this problem on Solaris. I suppose it's possible that linkage on OS X records the location of the libraries it finds, sort of implicitly doing a -R. Skip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 22:35:22 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 01 Oct 2008 20:35:22 +0000 Subject: [issue3448] Multi-process 2to3 In-Reply-To: <1217019998.69.0.231122552254.issue3448@psf.upfronthosting.co.za> Message-ID: <1222893322.53.0.474694816429.issue3448@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I don't think we should force people using it as a library to go multiprocess. Also, it's trivial to just change the name of the class used if that is wanted. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 22:43:58 2008 From: report at bugs.python.org (Nick Edds) Date: Wed, 01 Oct 2008 20:43:58 +0000 Subject: [issue3448] Multi-process 2to3 In-Reply-To: <1217019998.69.0.231122552254.issue3448@psf.upfronthosting.co.za> Message-ID: <1222893838.62.0.996913117796.issue3448@psf.upfronthosting.co.za> Nick Edds added the comment: The currently attached patch works in Python2.5 not Python2.6, so I will update it for 2.6 when I get the chance. But as it is currently written, the default behavior is not multiprocess. Instead, if you want multiprocess, you specify how many processes you want when you run 2to3 from the command line. And as long as you've got multiple files to run 2to3 on and multiple cores, doing multiprocess 2to3 is significantly faster. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 22:44:40 2008 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 01 Oct 2008 20:44:40 +0000 Subject: [issue4010] configure options don't trickle down to distutils In-Reply-To: <1222879433.22.0.765704464081.issue4010@psf.upfronthosting.co.za> Message-ID: <1222893880.49.0.398365151789.issue4010@psf.upfronthosting.co.za> Skip Montanaro added the comment: Here's a patch. Works for me on Solaris 10. I'll try to check it out on OS X 10.5. Would appreciate it if someone on Linux can kick the tires too. ---------- keywords: +easy, patch Added file: http://bugs.python.org/file11675/runtime.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 1 23:31:06 2008 From: report at bugs.python.org (Brett Cannon) Date: Wed, 01 Oct 2008 21:31:06 +0000 Subject: [issue4011] Create DAG for PEP 101 In-Reply-To: <1222896665.95.0.381960877122.issue4011@psf.upfronthosting.co.za> Message-ID: <1222896665.95.0.381960877122.issue4011@psf.upfronthosting.co.za> New submission from Brett Cannon : PEP 101 says it would be nice to have a dependency graph that showed what could and could not be done in parallel when cutting a release. Should throw one together using OmniGraffle or Graphviz. ---------- assignee: brett.cannon messages: 74147 nosy: brett.cannon priority: low severity: normal status: open title: Create DAG for PEP 101 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 00:31:40 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 01 Oct 2008 22:31:40 +0000 Subject: [issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line. In-Reply-To: <1205817752.04.0.892564898323.issue2382@psf.upfronthosting.co.za> Message-ID: <1222900300.75.0.0972703697796.issue2382@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This seems to be a difficult problem. Doesn't the exact width depend on the terminal capabilities? and fonts, and combining diacritics... An easy way to put the caret at the same exact position is to repeat the beginning of the line up to the offending offset: print "?????" print "?????^<------------------ But I don't know how to make it look less ugly. At least my "one unicode char is one space" suggestion corrects the case of Western languages, and all messages with single-width characters. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 03:21:17 2008 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Oct 2008 01:21:17 +0000 Subject: [issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line. In-Reply-To: <1205817752.04.0.892564898323.issue2382@psf.upfronthosting.co.za> Message-ID: <1222910477.17.0.369467102731.issue2382@psf.upfronthosting.co.za> STINNER Victor added the comment: See also a related issue: issue3975. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 03:23:40 2008 From: report at bugs.python.org (Kent Johnson) Date: Thu, 02 Oct 2008 01:23:40 +0000 Subject: [issue4012] Minor errors in multiprocessing docs In-Reply-To: <1222910620.56.0.617350560863.issue4012@psf.upfronthosting.co.za> Message-ID: <1222910620.56.0.617350560863.issue4012@psf.upfronthosting.co.za> New submission from Kent Johnson : In the docs for AsyncResult http://docs.python.org/dev/library/multiprocessing.html#multiprocessing.pool.AsyncResult "get([timeout)" is missing a ] In the example following, it refers to pool.applyAsync() in two places; the docs spell this apply_async(), one of them must be wrong :-) ---------- assignee: georg.brandl components: Documentation messages: 74150 nosy: georg.brandl, kjohnson severity: normal status: open title: Minor errors in multiprocessing docs versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 03:24:11 2008 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Oct 2008 01:24:11 +0000 Subject: [issue4006] os.getenv silently discards env variables with non-UTF-8 values In-Reply-To: <1222845441.08.0.104904424427.issue4006@psf.upfronthosting.co.za> Message-ID: <1222910651.54.0.992295841.issue4006@psf.upfronthosting.co.za> STINNER Victor added the comment: It's not a bug, it's a feature! Python3 rejects invalid byte sequence (according to the "default system encoding") from the command line or environment variables. listdir(str) will also drop invalid filenames. Yes, we need a PEP (a FAQ) about invalid bytes sequences. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 04:24:32 2008 From: report at bugs.python.org (Skip Montanaro) Date: Thu, 02 Oct 2008 02:24:32 +0000 Subject: [issue4010] configure options don't trickle down to distutils In-Reply-To: <1222879433.22.0.765704464081.issue4010@psf.upfronthosting.co.za> Message-ID: <1222914272.62.0.506169433564.issue4010@psf.upfronthosting.co.za> Skip Montanaro added the comment: Confirmed that nothing seems broken on my OS X 10.5 laptop (doing a unix-style build, not a framework build). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 04:38:06 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 02 Oct 2008 02:38:06 +0000 Subject: [issue3736] super is a built-in type In-Reply-To: <1220053590.33.0.225544185622.issue3736@psf.upfronthosting.co.za> Message-ID: <1222915086.61.0.244918351365.issue3736@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The super() docs have been updated to be more clear. It is still listed amongst built-in functions -- that list doesn't separate callables that are also types, so super() is appropriately listed side-by-side with tuple(). ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 05:31:31 2008 From: report at bugs.python.org (Skip Montanaro) Date: Thu, 02 Oct 2008 03:31:31 +0000 Subject: [issue4010] configure options don't trickle down to distutils In-Reply-To: <1222879433.22.0.765704464081.issue4010@psf.upfronthosting.co.za> Message-ID: <1222918291.38.0.879645015488.issue4010@psf.upfronthosting.co.za> Skip Montanaro added the comment: Seems to work for framework builds as well. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 10:40:20 2008 From: report at bugs.python.org (Collin Winter) Date: Thu, 02 Oct 2008 08:40:20 +0000 Subject: [issue3448] Multi-process 2to3 In-Reply-To: <1217019998.69.0.231122552254.issue3448@psf.upfronthosting.co.za> Message-ID: <1222936820.15.0.183806271192.issue3448@psf.upfronthosting.co.za> Collin Winter added the comment: "I don't think we should force people using it as a library to go multiprocess." I don't understand this. What downsides do you perceive in multiprocessing support? Multiprocessing is a significant speed-up for 2to3 on multicore systems. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 12:14:39 2008 From: report at bugs.python.org (Koen van de Sande) Date: Thu, 02 Oct 2008 10:14:39 +0000 Subject: [issue4013] Python 2.6 Doc/tools folder bigger than in 2.6rc2 In-Reply-To: <1222942479.13.0.732489569924.issue4013@psf.upfronthosting.co.za> Message-ID: <1222942479.13.0.732489569924.issue4013@psf.upfronthosting.co.za> New submission from Koen van de Sande : The Doc/tools folder in the 2.6 distribution contains docutils, jinja, pygments, sphinx folders, which were not there in the 2.6rc2 .tar.bz2. Also, there is a roman.pyc in the Doc/tools folder. The difference in uncompressed size is about 9MB between 2.6 and 2.6rc2. The difference in compressed size is 1.5MB. Perhaps including a fully functional doc build environment is intentional? ---------- assignee: georg.brandl components: Documentation messages: 74156 nosy: georg.brandl, koen severity: normal status: open title: Python 2.6 Doc/tools folder bigger than in 2.6rc2 type: resource usage versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 13:03:34 2008 From: report at bugs.python.org (Koen van de Sande) Date: Thu, 02 Oct 2008 11:03:34 +0000 Subject: [issue4014] Python-2.6-py2.6.egg-info contains Alpha reference In-Reply-To: <1222945413.86.0.0834970306858.issue4014@psf.upfronthosting.co.za> Message-ID: <1222945413.86.0.0834970306858.issue4014@psf.upfronthosting.co.za> New submission from Koen van de Sande : In file lib/python2.6/lib-dynload/Python-2.6-py2.6.egg-info, after a fresh installation of Python 2.6 there are two lines for Development status both Alpha and Mature: Platform: Many Classifier: Development Status :: 3 - Alpha Classifier: Development Status :: 6 - Mature Classifier: License :: OSI Approved :: Python Software Foundation License This is found in line 1839 of http://svn.python.org/view/python/tags/ r26/setup.py?rev=66716&view=markup ---------- components: None messages: 74157 nosy: koen severity: normal status: open title: Python-2.6-py2.6.egg-info contains Alpha reference versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 13:56:51 2008 From: report at bugs.python.org (Christian Heimes) Date: Thu, 02 Oct 2008 11:56:51 +0000 Subject: [issue957650] Fix for bugs relating to ntpath.expanduser() Message-ID: <1222948611.61.0.0822552367288.issue957650@psf.upfronthosting.co.za> Christian Heimes added the comment: I just saw this bug entry in the whatsnew list. The os.path.expanduser() function handles ~user the wrong way. The (naive) implementation expects that all user directories are inside a common base path. This is only true for standalone Windows computers. There is no way to get the path to a user's home directory w/o her login+password or the login of a domain admin. The feature should be removed in 2.6.1. Martin, do you concur? ---------- assignee: georg.brandl -> loewis components: +Windows -None nosy: +christian.heimes, loewis priority: normal -> high resolution: accepted -> status: closed -> open versions: +Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 14:12:08 2008 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 02 Oct 2008 12:12:08 +0000 Subject: [issue4015] [patch] make installed scripts executable on windows In-Reply-To: <1222949528.24.0.767744507339.issue4015@psf.upfronthosting.co.za> Message-ID: <1222949528.24.0.767744507339.issue4015@psf.upfronthosting.co.za> New submission from anatoly techtonik : Distutils contains code to make scripts executable on posix platform. Here is a patch to for the same feature for nt. It adds .bat file for every script that doesn't have executable launcher. ---------- components: Distutils files: create.bat.scripts.on.nt.patch keywords: patch messages: 74159 nosy: techtonik severity: normal status: open title: [patch] make installed scripts executable on windows versions: Python 2.6 Added file: http://bugs.python.org/file11676/create.bat.scripts.on.nt.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 14:32:25 2008 From: report at bugs.python.org (Jesse Noller) Date: Thu, 02 Oct 2008 12:32:25 +0000 Subject: [issue4012] Minor errors in multiprocessing docs In-Reply-To: <1222910620.56.0.617350560863.issue4012@psf.upfronthosting.co.za> Message-ID: <1222950745.07.0.100314080312.issue4012@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- assignee: georg.brandl -> jnoller nosy: +jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 14:52:55 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 02 Oct 2008 12:52:55 +0000 Subject: [issue3664] Pickler.dump from a badly initialized Pickler segfaults In-Reply-To: <1219609595.23.0.140986466622.issue3664@psf.upfronthosting.co.za> Message-ID: <1222951975.57.0.0685913058024.issue3664@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- priority: deferred blocker -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 14:53:44 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 02 Oct 2008 12:53:44 +0000 Subject: [issue3661] sys.call_tracing segfaults In-Reply-To: <1219606145.44.0.504923400807.issue3661@psf.upfronthosting.co.za> Message-ID: <1222952024.88.0.47175950654.issue3661@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- priority: deferred blocker -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 14:54:03 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 02 Oct 2008 12:54:03 +0000 Subject: [issue1210] imaplib does not run under Python 3 In-Reply-To: <1190872174.76.0.553436258502.issue1210@psf.upfronthosting.co.za> Message-ID: <1222952043.98.0.836096776778.issue1210@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- priority: deferred blocker -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 14:54:13 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 02 Oct 2008 12:54:13 +0000 Subject: [issue3775] Update RELNOTES file In-Reply-To: <1220536018.76.0.0823799232176.issue3775@psf.upfronthosting.co.za> Message-ID: <1222952053.53.0.718392262849.issue3775@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- priority: deferred blocker -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 14:54:23 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 02 Oct 2008 12:54:23 +0000 Subject: [issue3574] compile() cannot decode Latin-1 source encodings In-Reply-To: <1218933580.53.0.0614369271998.issue3574@psf.upfronthosting.co.za> Message-ID: <1222952063.43.0.337184275275.issue3574@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- priority: deferred blocker -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 14:54:30 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 02 Oct 2008 12:54:30 +0000 Subject: [issue1717] Get rid of more refercenes to __cmp__ In-Reply-To: <1199205565.64.0.0495465164968.issue1717@psf.upfronthosting.co.za> Message-ID: <1222952070.65.0.645695664963.issue1717@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- priority: deferred blocker -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 14:54:38 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 02 Oct 2008 12:54:38 +0000 Subject: [issue3799] Byte/string inconsistencies between different dbm modules In-Reply-To: <1220738372.55.0.492476136204.issue3799@psf.upfronthosting.co.za> Message-ID: <1222952078.22.0.697457719819.issue3799@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- priority: deferred blocker -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 14:54:43 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 02 Oct 2008 12:54:43 +0000 Subject: [issue3787] Make PyInstanceMethod_Type available or remove it In-Reply-To: <1220640720.16.0.546689222531.issue3787@psf.upfronthosting.co.za> Message-ID: <1222952083.93.0.237992319505.issue3787@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- priority: deferred blocker -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 14:54:52 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 02 Oct 2008 12:54:52 +0000 Subject: [issue3626] python3.0 interpreter on Cygwin ignores all arguments In-Reply-To: <1219293362.56.0.98048679745.issue3626@psf.upfronthosting.co.za> Message-ID: <1222952092.26.0.725618811336.issue3626@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- priority: deferred blocker -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 14:54:58 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 02 Oct 2008 12:54:58 +0000 Subject: [issue3781] warnings.catch_warnings fails gracelessly when recording warnings but no warnings are emitted In-Reply-To: <1220566209.35.0.614126643007.issue3781@psf.upfronthosting.co.za> Message-ID: <1222952098.52.0.438919406223.issue3781@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- priority: deferred blocker -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 14:55:46 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 02 Oct 2008 12:55:46 +0000 Subject: [issue3685] Crash while compiling Python 3000 in OpenBSD 4.4 In-Reply-To: <1219733554.71.0.0422559715732.issue3685@psf.upfronthosting.co.za> Message-ID: <1222952146.62.0.124934020896.issue3685@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- priority: deferred blocker -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 14:56:01 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 02 Oct 2008 12:56:01 +0000 Subject: [issue3988] Byte warning mode and b'' != '' In-Reply-To: <1222601577.06.0.270135591037.issue3988@psf.upfronthosting.co.za> Message-ID: <1222952161.21.0.862995402655.issue3988@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- priority: deferred blocker -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 14:56:08 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 02 Oct 2008 12:56:08 +0000 Subject: [issue3723] Py_NewInterpreter does not work In-Reply-To: <1220011870.63.0.171875917127.issue3723@psf.upfronthosting.co.za> Message-ID: <1222952168.25.0.257940860778.issue3723@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- priority: deferred blocker -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 14:56:14 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 02 Oct 2008 12:56:14 +0000 Subject: [issue3895] _lsprof issue In-Reply-To: <1221705166.83.0.0369639810422.issue3895@psf.upfronthosting.co.za> Message-ID: <1222952174.83.0.204759713492.issue3895@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- priority: deferred blocker -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 14:56:21 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 02 Oct 2008 12:56:21 +0000 Subject: [issue3623] _json: fix raise_errmsg(), py_encode_basestring_ascii() and linecol() In-Reply-To: <1219273124.72.0.104841129313.issue3623@psf.upfronthosting.co.za> Message-ID: <1222952181.43.0.706133021166.issue3623@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- priority: deferred blocker -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 14:56:28 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 02 Oct 2008 12:56:28 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> Message-ID: <1222952188.45.0.553705365762.issue3187@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- priority: deferred blocker -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 14:56:36 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 02 Oct 2008 12:56:36 +0000 Subject: [issue3863] 2.6rc1: test_threading hangs on FreeBSD 6.3 i386 In-Reply-To: <1221391510.13.0.209829217282.issue3863@psf.upfronthosting.co.za> Message-ID: <1222952196.12.0.105533453354.issue3863@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- priority: deferred blocker -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 16:11:14 2008 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Oct 2008 14:11:14 +0000 Subject: [issue4008] IDLE: checksyntax() doesn't support Unicode? In-Reply-To: <1222875475.18.0.22602254781.issue4008@psf.upfronthosting.co.za> Message-ID: <1222956674.47.0.519701276946.issue4008@psf.upfronthosting.co.za> STINNER Victor added the comment: Ah! tokenize has already a method detect_encoding(). My new patch uses it to avoid code duplication. Added file: http://bugs.python.org/file11677/idle_encoding-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 16:11:18 2008 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Oct 2008 14:11:18 +0000 Subject: [issue4008] IDLE: checksyntax() doesn't support Unicode? In-Reply-To: <1222875475.18.0.22602254781.issue4008@psf.upfronthosting.co.za> Message-ID: <1222956678.64.0.484514299404.issue4008@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11673/idle_encoding.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 16:29:28 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 02 Oct 2008 14:29:28 +0000 Subject: [issue4008] IDLE: checksyntax() doesn't support Unicode? In-Reply-To: <1222875475.18.0.22602254781.issue4008@psf.upfronthosting.co.za> Message-ID: <1222957768.77.0.71972817251.issue4008@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Notice that there is also IOBinding.coding_spec. Not sure whether this or the one in tokenize is more correct. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 16:32:23 2008 From: report at bugs.python.org (Toshio Kuratomi) Date: Thu, 02 Oct 2008 14:32:23 +0000 Subject: [issue4006] os.getenv silently discards env variables with non-UTF-8 values In-Reply-To: <1222845441.08.0.104904424427.issue4006@psf.upfronthosting.co.za> Message-ID: <1222957943.28.0.508732032829.issue4006@psf.upfronthosting.co.za> Toshio Kuratomi added the comment: It's not a feature it's a bug! :-) (I hope you meant to have a smiley too ;-) As stated in the os.listdir() related bug, on Unix filesystems filenames are a sequence of bytes. The system encoding allows the user-level tools to display the filenames as characters instead of byte sequences and allows you to manipulate the filenames using characters instead of byte sequences. But if you change your locale the user level tools will interpret the byte sequences as different characters and allow you free access to create files in a different encoding. So in order to work correctly on Unix you must be able to accept byte sequences in place of filename. The sad fact of the matter is that while we can be all unicode with data and strings inside of python we will always have to be prepared to handle supposed strings as byte sequences when talking to some things outside of ourselves. Sometimes the border has a specification that tells us what encoding to expect and we can do conversion automatically. But when it doesn't we have to be prepared to 1) tell the user that the data exists even but isn't string type as expected and 2) make the byte sequence available to the user. Silently pretending that the data doesn't exist at all is a bug (maybe a minor bug depending on how often we expect the situation to arise but still a bug.) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 16:35:53 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Thu, 02 Oct 2008 14:35:53 +0000 Subject: [issue3664] Pickler.dump from a badly initialized Pickler segfaults In-Reply-To: <1219609595.23.0.140986466622.issue3664@psf.upfronthosting.co.za> Message-ID: <1222958153.48.0.886762393212.issue3664@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: I will try to time next weekend to fix this (and other pickle blockers). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 16:36:15 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Thu, 02 Oct 2008 14:36:15 +0000 Subject: [issue3664] Pickler.dump from a badly initialized Pickler segfaults In-Reply-To: <1219609595.23.0.140986466622.issue3664@psf.upfronthosting.co.za> Message-ID: <1222958175.15.0.590703823902.issue3664@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 16:36:28 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Thu, 02 Oct 2008 14:36:28 +0000 Subject: [issue3664] Pickler.dump from a badly initialized Pickler segfaults In-Reply-To: <1219609595.23.0.140986466622.issue3664@psf.upfronthosting.co.za> Message-ID: <1222958188.59.0.517297184874.issue3664@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: I will try to find time next weekend to fix this (and other pickle blockers). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 16:42:04 2008 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Oct 2008 14:42:04 +0000 Subject: [issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open() In-Reply-To: <1222958524.04.0.862408977928.issue4016@psf.upfronthosting.co.za> Message-ID: <1222958524.04.0.862408977928.issue4016@psf.upfronthosting.co.za> New submission from STINNER Victor : linecache uses it own code to detect a Python script encoding whereas a function tokenize.detect_encoding() already exists. It does also convert bytes => unicode conversion of the file lines whereas open() already supports this feature. ---------- components: Library (Lib) files: linecache_refactor.patch keywords: patch messages: 74165 nosy: haypo severity: normal status: open title: improve linecache: reuse tokenize.detect_encoding() and io.open() versions: Python 3.0 Added file: http://bugs.python.org/file11678/linecache_refactor.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 16:43:13 2008 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Oct 2008 14:43:13 +0000 Subject: [issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open() In-Reply-To: <1222958524.04.0.862408977928.issue4016@psf.upfronthosting.co.za> Message-ID: <1222958593.07.0.204389655173.issue4016@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file11679/tokenize_bom_utf8.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 17:16:30 2008 From: report at bugs.python.org (Fabio FZero) Date: Thu, 02 Oct 2008 15:16:30 +0000 Subject: [issue4017] IDLE 2.6 broken on OSX (Leopard) In-Reply-To: <1222960590.08.0.635891151551.issue4017@psf.upfronthosting.co.za> Message-ID: <1222960590.08.0.635891151551.issue4017@psf.upfronthosting.co.za> New submission from Fabio FZero : I've just installed Python 2.6 on Mac OS X 10.5.5 and IDLE won't start. IDLE 2.5 still works fine. Here's the traceback: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/Current/bin/idle", line 3, in from idlelib.PyShell import main File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/idlelib/PyShell.py", line 14, in import macosxSupport File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/idlelib/macosxSupport.py", line 6, in import Tkinter File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk/Tkinter.py", line 39, in import _tkinter # If this fails your Python may not be configured for Tk ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_tkinter.so, 2): Library not loaded: /Library/Frameworks/Tcl.framework/Versions/8.5/Tcl Referenced from: /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_tkinter.so Reason: image not found ---------- components: IDLE messages: 74166 nosy: fzero severity: normal status: open title: IDLE 2.6 broken on OSX (Leopard) type: crash versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 17:58:41 2008 From: report at bugs.python.org (Josiah Carlson) Date: Thu, 02 Oct 2008 15:58:41 +0000 Subject: [issue1541] Bad OOB data management when using asyncore with select.poll() In-Reply-To: <1196618056.9.0.300104478176.issue1541@psf.upfronthosting.co.za> Message-ID: <1222963121.66.0.0444962967169.issue1541@psf.upfronthosting.co.za> Josiah Carlson added the comment: While handle_expt() is documented has only being called when OOB data is known, it has become the catch-all for "something strange is happening on the socket". The reason it wasn't changed/fixed in Python 2.6 is because a new method would need to be added, which would break previously existing asyncore- derived applications. I might still be able to fix it for 3.0 . ---------- assignee: akuchling -> josiahcarlson nosy: +josiahcarlson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 18:06:12 2008 From: report at bugs.python.org (John Ehresman) Date: Thu, 02 Oct 2008 16:06:12 +0000 Subject: [issue4018] "for me" installer problem on x64 Vista In-Reply-To: <1222963572.56.0.515590438992.issue4018@psf.upfronthosting.co.za> Message-ID: <1222963572.56.0.515590438992.issue4018@psf.upfronthosting.co.za> New submission from John Ehresman : After installing the 32 bit .msi or the 64 bit .msi "for me" on a fairly clean Vista x64 machine, the socket module won't import because of a side-by-side configuration error. The output below is from the 32 bit build. Microsoft Windows [Version 6.0.6000] Copyright (c) 2006 Microsoft Corporation. All rights reserved. C:\Users\maint>\python26\python Python 2.6 (r26:66721, Oct 2 2008, 11:35:03) [MSC v.1500 32 bit (Intel)] on win 32 Type "help", "copyright", "credits" or "license" for more information. >>> import socket Traceback (most recent call last): File "", line 1, in File "C:\python26\lib\socket.py", line 46, in import _socket ImportError: DLL load failed: The application has failed to start because its si de-by-side configuration is incorrect. Please see the application event log for more detail. >>> The event log entry for this is: Activation context generation failed for "C:\python26\DLLs\_socket.pyd".Error in manifest or policy file "C:\python26\DLLs\Microsoft.VC90.CRT.MANIFEST" on line 12. The value "../msvcr90.dll" of attribute "name" in element "urn:schemas-microsoft-com:asm.v1^file" is invalid. Changing ../msvcr90.dll to ..\msvcr90.dll does not fix the problem Importing socket does work when the msi is installed for everyone. ---------- components: Windows messages: 74168 nosy: jpe severity: normal status: open title: "for me" installer problem on x64 Vista type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 18:07:23 2008 From: report at bugs.python.org (Christian Heimes) Date: Thu, 02 Oct 2008 16:07:23 +0000 Subject: [issue4018] "for me" installer problem on x64 Vista In-Reply-To: <1222963572.56.0.515590438992.issue4018@psf.upfronthosting.co.za> Message-ID: <1222963643.93.0.821332811542.issue4018@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- assignee: -> loewis nosy: +loewis priority: -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 18:08:28 2008 From: report at bugs.python.org (Christian Heimes) Date: Thu, 02 Oct 2008 16:08:28 +0000 Subject: [issue4018] "for me" installer problem on x64 Vista In-Reply-To: <1222963572.56.0.515590438992.issue4018@psf.upfronthosting.co.za> Message-ID: <1222963708.76.0.361119069468.issue4018@psf.upfronthosting.co.za> Christian Heimes added the comment: Could you try it again with "..\\msvcr90.dll", please? ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 18:12:25 2008 From: report at bugs.python.org (Josiah Carlson) Date: Thu, 02 Oct 2008 16:12:25 +0000 Subject: [issue1541] Bad OOB data management when using asyncore with select.poll() In-Reply-To: <1196618056.9.0.300104478176.issue1541@psf.upfronthosting.co.za> Message-ID: <1222963945.42.0.865450797103.issue1541@psf.upfronthosting.co.za> Josiah Carlson added the comment: 3.0 is a no-go, no non-documentation changes allowed. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 18:34:58 2008 From: report at bugs.python.org (Craig Holmquist) Date: Thu, 02 Oct 2008 16:34:58 +0000 Subject: [issue4019] 2.6 (final) uses old icons in Start Menu In-Reply-To: <1222965298.37.0.497940779276.issue4019@psf.upfronthosting.co.za> Message-ID: <1222965298.37.0.497940779276.issue4019@psf.upfronthosting.co.za> New submission from Craig Holmquist : The Start Menu icons created by the Python 2.6 installer use the old icons (the green snake, 4-bit color) instead of the new ones (blue and yellow snake, 24-bit color). This was observed on Windows XP. An installation of 2.5.2 on the same machine uses the new icons. ---------- components: Installation messages: 74171 nosy: craigneuro severity: normal status: open title: 2.6 (final) uses old icons in Start Menu type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 18:35:18 2008 From: report at bugs.python.org (Craig Holmquist) Date: Thu, 02 Oct 2008 16:35:18 +0000 Subject: [issue4019] 2.6 (final) uses old icons in Start Menu In-Reply-To: <1222965298.37.0.497940779276.issue4019@psf.upfronthosting.co.za> Message-ID: <1222965318.2.0.952926424192.issue4019@psf.upfronthosting.co.za> Changes by Craig Holmquist : ---------- components: +Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 18:39:39 2008 From: report at bugs.python.org (John Ehresman) Date: Thu, 02 Oct 2008 16:39:39 +0000 Subject: [issue4018] "for me" installer problem on x64 Vista In-Reply-To: <1222963708.76.0.361119069468.issue4018@psf.upfronthosting.co.za> Message-ID: <48E4F945.8050609@wingware.com> John Ehresman added the comment: Neither "..\\msvcr90.dll" or a full path work (with \ or \\) seem to work. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 18:43:48 2008 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 02 Oct 2008 16:43:48 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> Message-ID: <1222965828.88.0.884840779644.issue3187@psf.upfronthosting.co.za> Guido van Rossum added the comment: Martin, can you check in your changes to add sys.setfilesystemencoding()? I will check in Victor's changes (with some edits). Together this means that the various suggested higher-level solutions (like returning path-like objects, or some kind of roudtripping almost-but-not-quite-utf-8 encoding) can be implemented in pure Python. ---------- assignee: -> gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 18:48:16 2008 From: report at bugs.python.org (Matthew Barnett) Date: Thu, 02 Oct 2008 16:48:16 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1222966096.17.0.01470531458.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: I've found an interesting difference between Python and Perl regular expressions: In Python: \Z matches at the end of the string In Perl: \Z matches at the end of the string or before a newline at the end of the string \z matches at the end of the string _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 18:50:26 2008 From: report at bugs.python.org (Christian Heimes) Date: Thu, 02 Oct 2008 16:50:26 +0000 Subject: [issue4018] "for me" installer problem on x64 Vista In-Reply-To: <1222963572.56.0.515590438992.issue4018@psf.upfronthosting.co.za> Message-ID: <1222966226.05.0.380276839985.issue4018@psf.upfronthosting.co.za> Christian Heimes added the comment: I don't have a Vista box at my disposal. Martin might be able to help you. Barry: I've marked this bug as blocker because it makes Vista installations useless. It's not a blocker for the upcoming beta but it should be fixed before the next rc. It's a rather nasty issue with side-by-side assemblies. It can only be debugged on a Vista machine *WITHOUT* any development tools like Visual Studio or 3rd party programs shipped with msvcrt90 assembly. ---------- nosy: +barry priority: critical -> deferred blocker versions: +Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 19:00:26 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 02 Oct 2008 17:00:26 +0000 Subject: [issue4012] Minor errors in multiprocessing docs In-Reply-To: <1222910620.56.0.617350560863.issue4012@psf.upfronthosting.co.za> Message-ID: <1222966826.03.0.766516459328.issue4012@psf.upfronthosting.co.za> Georg Brandl added the comment: There's also an applyAsync left in the introductory Pool example. Jesse, while you're at it, could you please add a blurb that some examples won't work when tried at the interactive interpreter (and perhaps also why)? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 19:07:56 2008 From: report at bugs.python.org (Jesse Noller) Date: Thu, 02 Oct 2008 17:07:56 +0000 Subject: [issue4012] Minor errors in multiprocessing docs In-Reply-To: <1222910620.56.0.617350560863.issue4012@psf.upfronthosting.co.za> Message-ID: <1222967276.75.0.524126509358.issue4012@psf.upfronthosting.co.za> Jesse Noller added the comment: Which examples are you talking about Georg? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 19:08:21 2008 From: report at bugs.python.org (Jesse Noller) Date: Thu, 02 Oct 2008 17:08:21 +0000 Subject: [issue4012] Minor errors in multiprocessing docs In-Reply-To: <1222910620.56.0.617350560863.issue4012@psf.upfronthosting.co.za> Message-ID: <1222967301.8.0.31793442224.issue4012@psf.upfronthosting.co.za> Jesse Noller added the comment: Also, several things which are properties are still referred to as methods and include the () chars for the call _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 19:10:09 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 02 Oct 2008 17:10:09 +0000 Subject: [issue4012] Minor errors in multiprocessing docs In-Reply-To: <1222910620.56.0.617350560863.issue4012@psf.upfronthosting.co.za> Message-ID: <1222967409.99.0.507002383711.issue4012@psf.upfronthosting.co.za> Georg Brandl added the comment: I e.g. tried a minimal example with Pool.map(): >>> from multiprocessing import Pool >>> p = Pool(5) >>> def f(x): ... return x*x ... >>> p.map(f, [1,2,3]) Process PoolWorker-1: Traceback (most recent call last): File "/home/gbr/devel/python/Lib/multiprocessing/process.py", line 231, in _bootstrap self.run() File "/home/gbr/devel/python/Lib/multiprocessing/process.py", line 88, in run self._target(*self._args, **self._kwargs) File "/home/gbr/devel/python/Lib/multiprocessing/pool.py", line 57, in worker Process PoolWorker-2: [some more exceptions] task = get() File "/home/gbr/devel/python/Lib/multiprocessing/queues.py", line 339, in get return recv() AttributeError: 'module' object has no attribute 'f' And then the prompt doesn't reappear. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 19:10:49 2008 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Oct 2008 17:10:49 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> Message-ID: <1222967449.55.0.927145026286.issue3187@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file11680/python3_bytes_filename-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 19:10:54 2008 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Oct 2008 17:10:54 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> Message-ID: <1222967454.95.0.376794395611.issue3187@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11667/python3_bytes_filename-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 19:16:34 2008 From: report at bugs.python.org (Jesse Noller) Date: Thu, 02 Oct 2008 17:16:34 +0000 Subject: [issue4012] Minor errors in multiprocessing docs In-Reply-To: <1222910620.56.0.617350560863.issue4012@psf.upfronthosting.co.za> Message-ID: <1222967794.51.0.905896237004.issue4012@psf.upfronthosting.co.za> Jesse Noller added the comment: Ok, let me take a look at that _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 19:20:27 2008 From: report at bugs.python.org (Erik Nolte) Date: Thu, 02 Oct 2008 17:20:27 +0000 Subject: [issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters In-Reply-To: <1210441054.55.0.264831714691.issue2810@psf.upfronthosting.co.za> Message-ID: <1222968027.92.0.0396872077741.issue2810@psf.upfronthosting.co.za> Erik Nolte added the comment: To reproduce on Windows XP with Python 2.4, 2.5, and 2.6: 1. Import issue_2810.reg (it creates two keys under HKCU\PythonTestUnicodeKeys: one with a one byte unicode char in the key, the other with multiple 2-byte unicode chars) 2. Run the following: import _winreg key = _winreg.OpenKey( _winreg.HKEY_CURRENT_USER, "PythonTestUnicodeKeys" ) one_byte_key = _winreg.EnumKey( key, 0 ) two_byte_key = _winreg.EnumKey( key, 1 ) _winreg.CloseKey( key ) try: unicode( one_byte_key ) except Exception, ex: print "EnumKey didn't return a valid string:", ex print "should be unicode, not str:", two_byte_key.__class__ for ch in two_byte_key: print ord( ch ), print "" ---------- nosy: +enolte versions: +Python 2.4, Python 2.6 -Python 3.0 Added file: http://bugs.python.org/file11681/issue_2810.reg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 19:31:38 2008 From: report at bugs.python.org (Jesse Noller) Date: Thu, 02 Oct 2008 17:31:38 +0000 Subject: [issue4012] Minor errors in multiprocessing docs In-Reply-To: <1222967409.99.0.507002383711.issue4012@psf.upfronthosting.co.za> Message-ID: <4222a8490810021031j760cb510k438cebd9f7244342@mail.gmail.com> Jesse Noller added the comment: On Thu, Oct 2, 2008 at 1:10 PM, Georg Brandl wrote: > > Georg Brandl added the comment: > > I e.g. tried a minimal example with Pool.map(): > >>>> from multiprocessing import Pool >>>> p = Pool(5) >>>> def f(x): > ... return x*x > I'll add a note. I'm going to file a separate bug, I don't think that should happen and it's fairly embarrassing that it does. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 19:39:56 2008 From: report at bugs.python.org (Kent Johnson) Date: Thu, 02 Oct 2008 17:39:56 +0000 Subject: [issue4012] Minor errors in multiprocessing docs In-Reply-To: <1222967276.75.0.524126509358.issue4012@psf.upfronthosting.co.za> Message-ID: <1c2a2c590810021039w66f10e11k215f7c6cef767e57@mail.gmail.com> Kent Johnson added the comment: On Thu, Oct 2, 2008 at 1:07 PM, Jesse Noller wrote: > > Jesse Noller added the comment: > > Which examples are you talking about Georg? I think you mean me, not Georg...I was referring to the example that immediately follows http://docs.python.org/library/multiprocessing.html#multiprocessing.pool.AsyncResult.successful _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 19:48:40 2008 From: report at bugs.python.org (Steve Lee) Date: Thu, 02 Oct 2008 17:48:40 +0000 Subject: [issue4018] "for me" installer problem on x64 Vista In-Reply-To: <1222963572.56.0.515590438992.issue4018@psf.upfronthosting.co.za> Message-ID: <1222969720.43.0.923790740865.issue4018@psf.upfronthosting.co.za> Changes by Steve Lee : ---------- nosy: +slee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 20:17:40 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 02 Oct 2008 18:17:40 +0000 Subject: [issue3972] Add Option to Bind to a Local IP Address in httplib.py In-Reply-To: <1222423132.09.0.32780438264.issue3972@psf.upfronthosting.co.za> Message-ID: <1222971460.07.0.739286238516.issue3972@psf.upfronthosting.co.za> Gregory P. Smith added the comment: This is useful but as its a feature we won't be able to add it until 2.7/3.1. Assigning to me to make sure it happens. Until then, the approach I suggest is to subclass httplib.HTTPConnection and HTTPSConnection to add your own variants that do bind before connecting. ---------- assignee: -> gregory.p.smith nosy: +gregory.p.smith priority: -> normal versions: -Python 2.4, Python 2.5, Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 20:38:39 2008 From: report at bugs.python.org (Eldon Ziegler) Date: Thu, 02 Oct 2008 18:38:39 +0000 Subject: [issue3972] Add Option to Bind to a Local IP Address in httplib.py In-Reply-To: <1222971460.07.0.739286238516.issue3972@psf.upfronthosting.co.za> Message-ID: <1222972715.3059.95.camel@carmen.atlantic> Eldon Ziegler added the comment: Sounds good. Let me know if there is anything I can do to help. Eldon On Thu, 2008-10-02 at 18:17 +0000, Gregory P. Smith wrote: > Gregory P. Smith added the comment: > > This is useful but as its a feature we won't be able to add it until > 2.7/3.1. Assigning to me to make sure it happens. > > Until then, the approach I suggest is to subclass httplib.HTTPConnection > and HTTPSConnection to add your own variants that do bind before connecting. > > ---------- > assignee: -> gregory.p.smith > nosy: +gregory.p.smith > priority: -> normal > versions: -Python 2.4, Python 2.5, Python 2.6, Python 3.0 > > _______________________________________ > Python tracker > > _______________________________________ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 20:57:46 2008 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 02 Oct 2008 18:57:46 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> Message-ID: <1222973866.09.0.242289619914.issue3187@psf.upfronthosting.co.za> Guido van Rossum added the comment: I have committed a somewhat modified version of Victor's latest patch as r66743. Assigning to MvL now for the sys.setfilesystemencoding() commit. Then you can hand it over to the doc folks; something derived from http://wiki.python.org/moin/Python3UnicodeDecodeError should probably be added to the Doc tree. ---------- assignee: gvanrossum -> loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 21:06:41 2008 From: report at bugs.python.org (Xore) Date: Thu, 02 Oct 2008 19:06:41 +0000 Subject: [issue4020] hasattr boundary case failure In-Reply-To: <1222974401.06.0.475431208448.issue4020@psf.upfronthosting.co.za> Message-ID: <1222974401.06.0.475431208448.issue4020@psf.upfronthosting.co.za> New submission from Xore : http://www.python.org/doc/2.5.2/lib/built-in-funcs.html#l2h-35 "(This is implemented by calling getattr(object, name) and seeing whether it raises an exception or not.)" If a property exists but it's retrieval throws some error, hasattr will interpret this as the property not existing, since it only checks for the existence of an error, not an AttributeError class test: @property def prop(self): # do stuff raise ZeroDivisionError # an example foobar = test() assert hasattr(foobar, "prop") ---------- messages: 74187 nosy: Xore severity: normal status: open title: hasattr boundary case failure type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 21:19:08 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 02 Oct 2008 19:19:08 +0000 Subject: [issue4014] Python-2.6-py2.6.egg-info contains Alpha reference In-Reply-To: <1222945413.86.0.0834970306858.issue4014@psf.upfronthosting.co.za> Message-ID: <1222975148.73.0.23154635361.issue4014@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Guido, it seems you added these in r31526. What do you think? ---------- assignee: -> gvanrossum nosy: +gvanrossum, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 21:25:40 2008 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 02 Oct 2008 19:25:40 +0000 Subject: [issue4014] Python-2.6-py2.6.egg-info contains Alpha reference In-Reply-To: <1222945413.86.0.0834970306858.issue4014@psf.upfronthosting.co.za> Message-ID: <1222975540.58.0.345834139559.issue4014@psf.upfronthosting.co.za> Guido van Rossum added the comment: Yeah, but I have no idea where I got the info, alas. I would recommend to just delete the Alpha line, but who knows what it means. And should we update this for each alpha or beta release??? ---------- assignee: gvanrossum -> loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 21:27:37 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 02 Oct 2008 19:27:37 +0000 Subject: [issue4020] hasattr boundary case failure In-Reply-To: <1222974401.06.0.475431208448.issue4020@psf.upfronthosting.co.za> Message-ID: <1222975657.64.0.207686991522.issue4020@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This is fixed in 2.6. ---------- nosy: +benjamin.peterson resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 21:34:21 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 02 Oct 2008 19:34:21 +0000 Subject: [issue957650] Fix for bugs relating to ntpath.expanduser() In-Reply-To: <1222948611.61.0.0822552367288.issue957650@psf.upfronthosting.co.za> Message-ID: <48E52239.7050903@v.loewis.de> Martin v. L?wis added the comment: > Martin, do you concur? Not really. On my system, which is part of a domain, expanduser("~") gives 'C:\\Documents and Settings\\martin.vonloewis', which is indeed the directory where my profile lives. HOMEDRIVE is Y:, and HOMESHARE is some system in our network, but those aren't considered for determining ~ - although I do think %HOMEDRIVE%\%HOMEPATH% might have been a better choice. However, given the choice that was made, I think the assumption is correct that somebody else's profile will live in the same folder. Is it possible to configure a domain profile so that it's not in Documents and Settings? Even if this doesn't work for all systems, I don't think we can revert it for 2.6.1 (as it does give the correct answer at least in some cases). Such a change will have to wait for 2.7. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 21:35:20 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 02 Oct 2008 19:35:20 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <1222965828.88.0.884840779644.issue3187@psf.upfronthosting.co.za> Message-ID: <48E52276.90508@v.loewis.de> Martin v. L?wis added the comment: > Martin, can you check in your changes to add sys.setfilesystemencoding()? Will do tomorrow. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 21:49:17 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 02 Oct 2008 19:49:17 +0000 Subject: [issue4018] "for me" installer problem on x64 Vista In-Reply-To: <1222963572.56.0.515590438992.issue4018@psf.upfronthosting.co.za> Message-ID: <1222976957.78.0.120880637867.issue4018@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I had noticed the problem myself, and I don't know any solution to it. It's still part of the aftermath of switching to VS 2008, maybe we should have stayed with VS 2003 :-( Out of curiosity: Is this Vista SP1? If so, can somebody try Vista RTM? I recall that it used to work, but I don't have any Vista RTM installation anymore. In short, the problem is that Vista now complains about the .. in the name attribute of the manifest; XP considers the manifest file fine. A work-around is to place another copy of msvcr90.dll into the DLLs order, and adjusting the manifest to point to this copy. I rejected this solution, as it causes two copies of the CRT to be loaded (as can be seen in sysinternals process explorer). Loading two copies of the CRT itself caused problems in the past (e.g. when FILE* is passed across DLL boundaries). As a consequence, I propose that the "for me" installation just isn't supported on Vista; it should be easy to adjust the UI accordingly. Vista users should invoke the "for all installation" (and I should change the installer back to invoking UAC). In any case, I don't think this should block the release, given that no real solution seems possible. ---------- priority: deferred blocker -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 22:13:59 2008 From: report at bugs.python.org (=?utf-8?q?Jes=C3=BAs_Cea_Avi=C3=B3n?=) Date: Thu, 02 Oct 2008 20:13:59 +0000 Subject: [issue3664] Pickler.dump from a badly initialized Pickler segfaults In-Reply-To: <1219609595.23.0.140986466622.issue3664@psf.upfronthosting.co.za> Message-ID: <1222978439.98.0.29771472368.issue3664@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 22:14:59 2008 From: report at bugs.python.org (=?utf-8?q?Jes=C3=BAs_Cea_Avi=C3=B3n?=) Date: Thu, 02 Oct 2008 20:14:59 +0000 Subject: [issue3799] Byte/string inconsistencies between different dbm modules In-Reply-To: <1220738372.55.0.492476136204.issue3799@psf.upfronthosting.co.za> Message-ID: <1222978499.77.0.0916918073421.issue3799@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 22:54:11 2008 From: report at bugs.python.org (Benoit Boissinot) Date: Thu, 02 Oct 2008 20:54:11 +0000 Subject: [issue3799] Byte/string inconsistencies between different dbm modules In-Reply-To: <1220738372.55.0.492476136204.issue3799@psf.upfronthosting.co.za> Message-ID: <1222980851.99.0.539399944563.issue3799@psf.upfronthosting.co.za> Changes by Benoit Boissinot : ---------- nosy: +bboissin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 22:54:44 2008 From: report at bugs.python.org (djc) Date: Thu, 02 Oct 2008 20:54:44 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> Message-ID: <1222980884.79.0.0915646952442.issue3187@psf.upfronthosting.co.za> Changes by djc : ---------- nosy: +djc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 22:57:23 2008 From: report at bugs.python.org (Roumen Petrov) Date: Thu, 02 Oct 2008 20:57:23 +0000 Subject: [issue4010] configure options don't trickle down to distutils In-Reply-To: <1222879433.22.0.765704464081.issue4010@psf.upfronthosting.co.za> Message-ID: <1222981043.77.0.499723939045.issue4010@psf.upfronthosting.co.za> Roumen Petrov added the comment: One of the problems that I see in that LDFLAGS is Makefile variable and Makefile is part of distribution for posix build systems. If you set specific LDFLAGS and you want to distribute own python build user will get you specific settings. One another environment variable is OPT (if compiler don't accept -R XXX may be -Wl,-rpath,XXX ?) and we may use it. Also OPT environment variable is also Makefile variable and user specific settings will go into distribution too :( . I quick look into distutils code show that sysconfig.py don't parse LDFLAGS and append environment variable LDFLAGS as is to the ldshared variable. So the first question is why setup.py parse only -L flags instead to pass variable value as is (aka sysconfig.py). The second question is why LDFLAGS is a Makefile variable ? For now I would like to know if you set on Solaris suitable LD_RUN_PATH(for the build) and LD_LIBRARY_PATH (when run) did you succeed to build and run python ? ---------- nosy: +rpetrov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 22:57:39 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 02 Oct 2008 20:57:39 +0000 Subject: [issue3972] Add Option to Bind to a Local IP Address in httplib.py In-Reply-To: <1222423132.09.0.32780438264.issue3972@psf.upfronthosting.co.za> Message-ID: <1222981059.35.0.115562905621.issue3972@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 22:58:55 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 02 Oct 2008 20:58:55 +0000 Subject: [issue4019] 2.6 (final) uses old icons in Start Menu In-Reply-To: <1222965298.37.0.497940779276.issue4019@psf.upfronthosting.co.za> Message-ID: <1222981135.33.0.908910485548.issue4019@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Yeah, that was the first thing I noticed. :) ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 23:03:58 2008 From: report at bugs.python.org (Benoit Boissinot) Date: Thu, 02 Oct 2008 21:03:58 +0000 Subject: [issue3799] Byte/string inconsistencies between different dbm modules In-Reply-To: <1220738372.55.0.492476136204.issue3799@psf.upfronthosting.co.za> Message-ID: <1222981438.91.0.232932918626.issue3799@psf.upfronthosting.co.za> Changes by Benoit Boissinot : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 23:04:09 2008 From: report at bugs.python.org (Benoit Boissinot) Date: Thu, 02 Oct 2008 21:04:09 +0000 Subject: [issue3799] Byte/string inconsistencies between different dbm modules In-Reply-To: <1220738372.55.0.492476136204.issue3799@psf.upfronthosting.co.za> Message-ID: <1222981449.36.0.820731101339.issue3799@psf.upfronthosting.co.za> Changes by Benoit Boissinot : ---------- nosy: -bboissin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 23:04:26 2008 From: report at bugs.python.org (Benoit Boissinot) Date: Thu, 02 Oct 2008 21:04:26 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> Message-ID: <1222981466.39.0.968409904813.issue3187@psf.upfronthosting.co.za> Changes by Benoit Boissinot : ---------- nosy: +bboissin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 23:18:02 2008 From: report at bugs.python.org (John Ehresman) Date: Thu, 02 Oct 2008 21:18:02 +0000 Subject: [issue4018] "for me" installer problem on x64 Vista In-Reply-To: <1222976957.78.0.120880637867.issue4018@psf.upfronthosting.co.za> Message-ID: <48E53A7E.6010302@wingware.com> John Ehresman added the comment: I think one of the tested machines is Vista RTM, though it's been updated. I also tried of Vista x32 SP1 and it fails there. If non-admin installs can't be made to work, I agree that the "for me" option be dropped and the installer changed to invoke UAC. I looked for a solution to this, but so far can't find any -- and this would also mean that .pyd files in site-packages and elsewhere would need .manifest files that contain the path to where msvcr90.dll is located. I think requiring an admin install might cause problems for py2exe though. This is rather important because it means that python is unusable using the default installation options and I suspect that many users won't know how to install for everyone. I'd still like to see the need to depend on a C runtime dll dropped at some point in the future, but I know that it's not an easy thing to do. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 23:47:21 2008 From: report at bugs.python.org (Daniel Darabos) Date: Thu, 02 Oct 2008 21:47:21 +0000 Subject: [issue1651995] sgmllib _convert_ref UnicodeDecodeError exception, new in 2.5 Message-ID: <1222984041.43.0.783309396326.issue1651995@psf.upfronthosting.co.za> Changes by Daniel Darabos : ---------- nosy: +cyhawk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 2 23:49:14 2008 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Oct 2008 21:49:14 +0000 Subject: [issue4008] IDLE: checksyntax() doesn't support Unicode? In-Reply-To: <1222875475.18.0.22602254781.issue4008@psf.upfronthosting.co.za> Message-ID: <1222984154.8.0.04402572573.issue4008@psf.upfronthosting.co.za> STINNER Victor added the comment: loewis wrote: > Notice that there is also IOBinding.coding_spec. > Not sure whether this or the one in tokenize is more correct. Oh! IOBinding reimplement many features now available in Python like universal new line or function to write unicode strings to a file. But I don't want to rewrite IDLE, I just want to fix the initial problem: IDLE is unable to open a non-ASCII file using "#coding:" header. So IDLE reimplemented coding detection twice: once in IOBinding and once in ScriptBinding. So I wrote a new version of my patch removing all the code to reuse tokenize.detect_encoding(). I changed IDLE behaviour: IOBinding._decode() used the locale encoding if it's unable to detect the encoding using UTF-8 BOM and/or if the #coding: header is missing. Since I also read "Finally, try the locale's encoding. This is deprecated", I prefer to remove it. If you want to keep the current behaviour, use: ------------------------- def detect_encoding(filename, default=None): with open(filename, 'rb') as f: encoding, line = tokenize.detect_encoding(f.readline) if (not line) and default: return default return encoding ... encoding = detect_encoding(filename, locale_encoding) ------------------------- Please review and test my patch (which becomes longer and longer) :-) Added file: http://bugs.python.org/file11682/idle_encoding-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 00:00:01 2008 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Oct 2008 22:00:01 +0000 Subject: [issue4006] os.getenv silently discards env variables with non-UTF-8 values In-Reply-To: <1222845441.08.0.104904424427.issue4006@psf.upfronthosting.co.za> Message-ID: <1222984801.97.0.393001224339.issue4006@psf.upfronthosting.co.za> STINNER Victor added the comment: @a.badger: Again, dropping invalid filenames in listdir() is a (very recent) choice of the Python3 design. Please read this document which explain the current situation of bytes vs unicode: http://wiki.python.org/moin/Python3UnicodeDecodeError See also issue3187 and read the long python-dev mailing list thread about filenames (start few days ago). Guido just commited my huge patch to support bytes filename in Python3 trunk. So using Python3 final, you will be abl to list all files using os.listdir(b'.') or os.listdir(os.getcwdb()). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 00:03:41 2008 From: report at bugs.python.org (Brett Cannon) Date: Thu, 02 Oct 2008 22:03:41 +0000 Subject: [issue4010] configure options don't trickle down to distutils In-Reply-To: <1222981043.77.0.499723939045.issue4010@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Thu, Oct 2, 2008 at 1:57 PM, Roumen Petrov wrote: > > Roumen Petrov added the comment: > > One of the problems that I see in that LDFLAGS is Makefile variable and > Makefile is part of distribution for posix build systems. > If you set specific LDFLAGS and you want to distribute own python build > user will get you specific settings. > One another environment variable is OPT (if compiler don't accept -R XXX > may be -Wl,-rpath,XXX ?) and we may use it. Also OPT environment > variable is also Makefile variable and user specific settings will go > into distribution too :( . > > I quick look into distutils code show that sysconfig.py don't parse > LDFLAGS and append environment variable LDFLAGS as is to the ldshared > variable. > So the first question is why setup.py parse only -L flags instead to > pass variable value as is (aka sysconfig.py). Because that's the use case I was supporting when I added the support; I just needed the -L flags for compiling the extensions. If someone writes a patch that makes it more generic it has a chance of being checked in. > The second question is why LDFLAGS is a Makefile variable ? Because there is no guarantee that someone specified the envvar when running setup.py, but if they were set for configure you know that Python was built using those values. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 00:07:50 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 02 Oct 2008 22:07:50 +0000 Subject: [issue3448] Multi-process 2to3 In-Reply-To: <1217019998.69.0.231122552254.issue3448@psf.upfronthosting.co.za> Message-ID: <1222985270.99.0.365208669221.issue3448@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I'm just saying that a client of lib2to3 shouldn't have to use multiple processes. Just as long as the multiple processes are optional, I'm happy. :) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 00:30:21 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 02 Oct 2008 22:30:21 +0000 Subject: [issue4018] "for me" installer problem on x64 Vista In-Reply-To: <48E53A7E.6010302@wingware.com> Message-ID: <48E54B7B.9080506@v.loewis.de> Martin v. L?wis added the comment: > I looked for > a solution to this, but so far can't find any -- and this would also > mean that .pyd files in site-packages and elsewhere would need .manifest > files that contain the path to where msvcr90.dll is located. I don't think this could even work: apparently, Vista disallows putting a path into the name field. So extension modules will have to ship with their own copy of the CRT (or link statically). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 00:33:35 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 02 Oct 2008 22:33:35 +0000 Subject: [issue4008] IDLE: checksyntax() doesn't support Unicode? In-Reply-To: <1222984154.8.0.04402572573.issue4008@psf.upfronthosting.co.za> Message-ID: <48E54C3D.9080004@v.loewis.de> Martin v. L?wis added the comment: > Oh! IOBinding reimplement many features now available in Python like > universal new line or function to write unicode strings to a file. It did not *re*implement. The implementation in IOBinding predates all other implementations out there. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 00:49:59 2008 From: report at bugs.python.org (Matthew Barnett) Date: Thu, 02 Oct 2008 22:49:59 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1222987799.82.0.977009226711.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: Perl v5.10 offers the ability to have duplicate capture group numbers in branches. For example: (?|(a)|(b)) would number both of the capture groups as group 1. Something to include? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 00:51:06 2008 From: report at bugs.python.org (Matthew Barnett) Date: Thu, 02 Oct 2008 22:51:06 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1222987866.85.0.890590586266.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: I've extended the group referencing. It now has: Forward group references (\2two|(one))+ \g-type group references (n is name or number) \g (Python re replacement string) \g{n} (Perl) \g'n' (Perl) \g"n" (because ' and " are interchangeable) \gn (n is single digit) (Perl) (n is number) \g<+n> \g<-n> \g{+n} (Perl) \g{-n} (Perl) \k-type group references (n is group name) \k (Perl) \k{n} (Perl) \k'n' (Perl) \k"n" (because ' and " are interchangeable) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 01:00:33 2008 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Oct 2008 23:00:33 +0000 Subject: [issue4021] tokenize.detect_encoding(): raise SyntaxError on codecs.lookup() error In-Reply-To: <1222988433.37.0.412294241613.issue4021@psf.upfronthosting.co.za> Message-ID: <1222988433.37.0.412294241613.issue4021@psf.upfronthosting.co.za> New submission from STINNER Victor : tokenize.detect_encoding() raises a LookupError() if the charset is unknown whereas Python raises a SyntaxError. So this patch mimics Python behaviour for tokenize module. Extra: reuse BOM_UTF8 from the codecs module. ---------- files: tokenize_detect_encoding.patch keywords: patch, patch messages: 74205 nosy: haypo severity: normal status: open title: tokenize.detect_encoding(): raise SyntaxError on codecs.lookup() error versions: Python 3.0 Added file: http://bugs.python.org/file11683/tokenize_detect_encoding.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 01:01:24 2008 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Oct 2008 23:01:24 +0000 Subject: [issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open() In-Reply-To: <1222958524.04.0.862408977928.issue4016@psf.upfronthosting.co.za> Message-ID: <1222988484.37.0.635955941308.issue4016@psf.upfronthosting.co.za> STINNER Victor added the comment: I wrote a different (and better) patch for tokenize module: moved to the issue4021. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 01:01:27 2008 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Oct 2008 23:01:27 +0000 Subject: [issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open() In-Reply-To: <1222958524.04.0.862408977928.issue4016@psf.upfronthosting.co.za> Message-ID: <1222988487.88.0.466581007124.issue4016@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11679/tokenize_bom_utf8.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 01:05:40 2008 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Oct 2008 23:05:40 +0000 Subject: [issue4008] IDLE: checksyntax() doesn't support Unicode? In-Reply-To: <1222875475.18.0.22602254781.issue4008@psf.upfronthosting.co.za> Message-ID: <1222988740.33.0.482691906489.issue4008@psf.upfronthosting.co.za> STINNER Victor added the comment: @loewis: Ok, I didn't know. I think that it's better to reuse existing code. I also compared the implementations of encoding detection, and the code looks the same in IDLE and tokenize, but I prefer tokenize. tokenize.detect_encoding() has longer documentation, return the line (decoded as Unicode) matching the encoding cookie, and look to be more robust. I saw an interesting test in IDLE code: it checks the charset. So I wrote a patch raising a SyntaxError for tokenize: issue4021. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 01:05:54 2008 From: report at bugs.python.org (John Ehresman) Date: Thu, 02 Oct 2008 23:05:54 +0000 Subject: [issue4018] "for me" installer problem on x64 Vista In-Reply-To: <48E54B7B.9080506@v.loewis.de> Message-ID: <48E553C4.2030500@wingware.com> John Ehresman added the comment: > I don't think this could even work: apparently, Vista disallows putting > a path into the name field. So extension modules will have to ship with > their own copy of the CRT (or link statically). I agree that this is the case. The closest thing I found to documentation of this is http://msdn.microsoft.com/en-us/library/ms235291.aspx under Deploying Visual C++ library DLLs as private assemblies. It specifies that the assembly be copied twice, once into the folder with the .exe and again into the folder with the .dll. I think the best option is to always install for everyone as administrator on Vista. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 01:15:43 2008 From: report at bugs.python.org (Armando Rowe) Date: Thu, 02 Oct 2008 23:15:43 +0000 Subject: [issue4022] 2.6 dependent on c:\python26\ on windows In-Reply-To: <1222989342.94.0.529774628368.issue4022@psf.upfronthosting.co.za> Message-ID: <1222989342.94.0.529774628368.issue4022@psf.upfronthosting.co.za> New submission from Armando Rowe : The windows installer for Python 2.6 offers to install on c:\python26\ - If you chose to install on c:\python\ instead, the installation will run through and terminate succesfully, but whenever you try executing any python program, an error message tells you that mvscr90.dll is missing. It turns out the installer does properly install the dll in a subfolder of c:\windows\winsxs. If you remove python, then install on c:\python26\, it will work just fine. Event occurred on a Dell latitude D620 laptop with 2 GB RAM and a 2 GHz intel core duo, with Windows XP professional Service Pack 3. No python packages were installed. ---------- components: Build messages: 74209 nosy: armandorowe severity: normal status: open title: 2.6 dependent on c:\python26\ on windows type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 01:19:46 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 02 Oct 2008 23:19:46 +0000 Subject: [issue4008] IDLE: checksyntax() doesn't support Unicode? In-Reply-To: <1222875475.18.0.22602254781.issue4008@psf.upfronthosting.co.za> Message-ID: <1222989586.22.0.78477379517.issue4008@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I can't reproduce the problem. It works fine for me, displaying the box drawing character. In case it matters, sys.getpreferredencoding returns 'ANSI_X3.4-1968'; this is on Linux, idle started from an xterm, r66761 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 01:22:19 2008 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Oct 2008 23:22:19 +0000 Subject: [issue4023] convert os.getcwdu() to os.getcwd(), and getcwdu() to getcwd() In-Reply-To: <1222989739.85.0.364233815039.issue4023@psf.upfronthosting.co.za> Message-ID: <1222989739.85.0.364233815039.issue4023@psf.upfronthosting.co.za> New submission from STINNER Victor : Python3 removes os.getcwdu() and introduces os.getcwdb(). The patch is a fixer for lib2to3 replacing "os.getcwdu()" to "os.getcwd()", and "getcwdu()" to "getcwd()". I hope that nobody defined its own "getcwdu()" function :-) Example: ---- cwd = os.getcwdu() print "cwd=%s" % cwd from os import getcwdu cwd = getcwdu() print "cwd=%s" % cwd ---- Result: ----- import os -cwd = os.getcwdu() -print "cwd=%s" % cwd +cwd = os.getcwd() +print("cwd=%s" % cwd) -from os import getcwdu -cwd = getcwdu() -print "cwd=%s" % cwd +from os import getcwd +cwd = getcwd() +print("cwd=%s" % cwd) ----- ---------- assignee: benjamin.peterson components: 2to3 (2.x to 3.0 conversion tool) keywords: patch messages: 74211 nosy: benjamin.peterson, haypo severity: normal status: open title: convert os.getcwdu() to os.getcwd(), and getcwdu() to getcwd() versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 01:22:46 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 02 Oct 2008 23:22:46 +0000 Subject: [issue4022] 2.6 dependent on c:\python26\ on windows In-Reply-To: <1222989342.94.0.529774628368.issue4022@psf.upfronthosting.co.za> Message-ID: <1222989766.39.0.293596044151.issue4022@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Did you chose "for all users", or "just for me"? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 01:23:51 2008 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Oct 2008 23:23:51 +0000 Subject: [issue4023] convert os.getcwdu() to os.getcwd(), and getcwdu() to getcwd() In-Reply-To: <1222989739.85.0.364233815039.issue4023@psf.upfronthosting.co.za> Message-ID: <1222989831.34.0.882027021693.issue4023@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file11684/fix_getcwdu.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 01:24:09 2008 From: report at bugs.python.org (Armando Rowe) Date: Thu, 02 Oct 2008 23:24:09 +0000 Subject: [issue4022] 2.6 dependent on c:\python26\ on windows In-Reply-To: <1222989342.94.0.529774628368.issue4022@psf.upfronthosting.co.za> Message-ID: <1222989849.89.0.89640929886.issue4022@psf.upfronthosting.co.za> Armando Rowe added the comment: For all users in all attempts _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 01:25:22 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 02 Oct 2008 23:25:22 +0000 Subject: [issue4023] convert os.getcwdu() to os.getcwd(), and getcwdu() to getcwd() In-Reply-To: <1222989739.85.0.364233815039.issue4023@psf.upfronthosting.co.za> Message-ID: <1222989922.5.0.454604662953.issue4023@psf.upfronthosting.co.za> Martin v. L?wis added the comment: (there is currently no patch attached) I don't think getcwd() should be fixed as getcwdb(). It's not possible to tell what the intention of the call was, in which case I recommend not to change the code at all. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 01:26:10 2008 From: report at bugs.python.org (Roumen Petrov) Date: Thu, 02 Oct 2008 23:26:10 +0000 Subject: [issue4018] "for me" installer problem on x64 Vista In-Reply-To: <1222963572.56.0.515590438992.issue4018@psf.upfronthosting.co.za> Message-ID: <1222989970.91.0.816529237871.issue4018@psf.upfronthosting.co.za> Roumen Petrov added the comment: May be call of SetDllDirectory with argument path to python executable before to load a python module may help. ---------- nosy: +rpetrov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 01:47:03 2008 From: report at bugs.python.org (Armando Rowe) Date: Thu, 02 Oct 2008 23:47:03 +0000 Subject: [issue4018] "for me" installer problem on x64 Vista In-Reply-To: <1222963572.56.0.515590438992.issue4018@psf.upfronthosting.co.za> Message-ID: <1222991223.36.0.0356971825057.issue4018@psf.upfronthosting.co.za> Armando Rowe added the comment: See issue 4022 for a similar problem in WIndows XP professional, installed for all users. ---------- nosy: +armandorowe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 01:49:04 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 02 Oct 2008 23:49:04 +0000 Subject: [issue4021] tokenize.detect_encoding(): raise SyntaxError on codecs.lookup() error In-Reply-To: <1222988433.37.0.412294241613.issue4021@psf.upfronthosting.co.za> Message-ID: <1222991344.9.0.338303026116.issue4021@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This patch seems good to me, it fixes the following test: Index: Lib/test/test_tokenize.py =================================================================== --- Lib/test/test_tokenize.py (revision 66701) +++ Lib/test/test_tokenize.py (working copy) @@ -795,6 +795,8 @@ self.assertEquals(encoding, 'utf-8') self.assertEquals(consumed_lines, []) + readline = self.get_readline((b'# coding: bad\n',)) + self.assertRaises(SyntaxError, detect_encoding, readline) class TestTokenize(TestCase): ---------- keywords: +needs review nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 01:50:52 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 02 Oct 2008 23:50:52 +0000 Subject: [issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open() In-Reply-To: <1222958524.04.0.862408977928.issue4016@psf.upfronthosting.co.za> Message-ID: <1222991452.35.0.978233370976.issue4016@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This patch looks good. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 01:53:20 2008 From: report at bugs.python.org (Armando Rowe) Date: Thu, 02 Oct 2008 23:53:20 +0000 Subject: [issue4022] 2.6 dependent on c:\python26\ on windows In-Reply-To: <1222989342.94.0.529774628368.issue4022@psf.upfronthosting.co.za> Message-ID: <1222991600.09.0.664151145514.issue4022@psf.upfronthosting.co.za> Armando Rowe added the comment: I got the file name misspelled. The actual file is MSVCR90.dll the link below explains how to manually install the runtime library. One would expect the problem would disapear then, It did not. http://www.microsoft.com/downloads/details.aspx?familyid=32BC1BEE-A3F9-4C13-9C99-220B62A191EE&displaylang=en Manually depositing msvcr90.dll on c:\windows\system or c:\windows\system32 fixes this error, but it causes the next one: runtime error R6034 - An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team for more information. The only way I could find to make the problem disapear was installing on C:\python26\ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 02:06:53 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 03 Oct 2008 00:06:53 +0000 Subject: [issue4018] "for me" installer problem on x64 Vista In-Reply-To: <1222989970.91.0.816529237871.issue4018@psf.upfronthosting.co.za> Message-ID: <48E56216.1050002@v.loewis.de> Martin v. L?wis added the comment: > May be call of SetDllDirectory with argument path to python executable > before to load a python module may help. I'm skeptical. According to the documentation, "The directory from which the application loaded." is already in the search path, and even before lpPathName. Can you try it out and propose a patch if it works? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 02:57:33 2008 From: report at bugs.python.org (Bryan Bingham) Date: Fri, 03 Oct 2008 00:57:33 +0000 Subject: [issue4017] IDLE 2.6 broken on OSX (Leopard) In-Reply-To: <1222960590.08.0.635891151551.issue4017@psf.upfronthosting.co.za> Message-ID: <1222995453.0.0.878104033229.issue4017@psf.upfronthosting.co.za> Bryan Bingham added the comment: Installing tcl 8.5 from activestate gets rid of that error but then the following happens on my pretty clean iMac: Traceback (most recent call last): File "/usr/local/bin/idle", line 5, in main() File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/idlelib /PyShell.py", line 1382, in main root = Tk(className="Idle") File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib- tk/Tkinter.py", line 1645, in __init__ self._loadtk() File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib- tk/Tkinter.py", line 1659, in _loadtk % (_tkinter.TK_VERSION, tk_version) RuntimeError: tk.h version (8.4) doesn't match libtk.a version (8.5) ---------- nosy: +ohmi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 03:45:44 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 03 Oct 2008 01:45:44 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> Message-ID: <1222998344.24.0.868081077345.issue3187@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Here is a patch for Windows: The failing tests on buildbots now pass (test_fnmatch test_posixpath test_unicode_file) test_ntpath also runs functions with bytes. I suppose macpath.py is broken as well. Added file: http://bugs.python.org/file11685/win32-bytes-filenames.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 04:44:12 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 03 Oct 2008 02:44:12 +0000 Subject: [issue4023] convert os.getcwdu() to os.getcwd(), and getcwdu() to getcwd() In-Reply-To: <1222989739.85.0.364233815039.issue4023@psf.upfronthosting.co.za> Message-ID: <1223001852.85.0.796626626575.issue4023@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I concur with Martin; getcwd should not be converted to getcwdb. You're patch looks pretty good. Could you write tests for it, though? Also, I don't think you need to handle the second case of a bare getcwdu. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 05:25:07 2008 From: report at bugs.python.org (lplatypus) Date: Fri, 03 Oct 2008 03:25:07 +0000 Subject: [issue4024] float(0.0) singleton In-Reply-To: <1223004306.88.0.574076862856.issue4024@psf.upfronthosting.co.za> Message-ID: <1223004306.88.0.574076862856.issue4024@psf.upfronthosting.co.za> New submission from lplatypus : Here is a patch to make PyFloat_FromDouble(0.0) always return the same float instance. This is similar to the existing optimization in PyInt_FromLong(x) for small x. My own motivation is that the patch reduces memory by several megabytes for a particular in-house data processing script, but I think that it should be generally useful assuming that zero is a very common float value, and at worst almost neutral when this assumption is wrong. The minimal performance impact of the test for zero should be easily recovered by reduced memory allocation calls. I am happy to look into benchmarking if you require empirical performance data. ---------- components: Interpreter Core files: python_zero_float.patch keywords: patch messages: 74224 nosy: ldeller severity: normal status: open title: float(0.0) singleton type: resource usage versions: Python 2.6 Added file: http://bugs.python.org/file11686/python_zero_float.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 07:24:39 2008 From: report at bugs.python.org (David W. Lambert) Date: Fri, 03 Oct 2008 05:24:39 +0000 Subject: [issue4000] Additional 2to3 documentation updates In-Reply-To: <1222748434.01.0.683191866382.issue4000@psf.upfronthosting.co.za> Message-ID: <1223011479.39.0.243598086459.issue4000@psf.upfronthosting.co.za> David W. Lambert added the comment: http://docs.python.org/dev/3.0/reference/lexical_analysis.html#identifi ers-and-keywords Back quote "`" appears in the list of delimiters. I suspect it isn't one. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 08:52:24 2008 From: report at bugs.python.org (Collin Winter) Date: Fri, 03 Oct 2008 06:52:24 +0000 Subject: [issue3448] Multi-process 2to3 In-Reply-To: <1217019998.69.0.231122552254.issue3448@psf.upfronthosting.co.za> Message-ID: <1223016744.18.0.278434814115.issue3448@psf.upfronthosting.co.za> Collin Winter added the comment: You have yet to articulate a reason for that preference. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 09:41:02 2008 From: report at bugs.python.org (Winfried Plappert) Date: Fri, 03 Oct 2008 07:41:02 +0000 Subject: [issue3909] Building PDF documentation from tex files In-Reply-To: <1221842807.23.0.726390591277.issue3909@psf.upfronthosting.co.za> Message-ID: <1223019662.34.0.403058388904.issue3909@psf.upfronthosting.co.za> Winfried Plappert added the comment: Now that the official PDF documentation is released for download on the website - including TOC and Index for every major document, the question arises: what is the difference between the 'official' built and my 'private' built since some of my documents still missing the TOC and the index? Is it the pdflatex version? The underlying OS or modified control files? I have used the official 2.6 tar ball as a base fpr my experiments, including the released sphinx version etc... Any ideas? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 09:46:28 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 03 Oct 2008 07:46:28 +0000 Subject: [issue4024] float(0.0) singleton In-Reply-To: <1223004306.88.0.574076862856.issue4024@psf.upfronthosting.co.za> Message-ID: <1223019988.41.0.847151513432.issue4024@psf.upfronthosting.co.za> Georg Brandl added the comment: Will it correctly distinguish between +0.0 and -0.0? ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 10:15:05 2008 From: report at bugs.python.org (David Jones) Date: Fri, 03 Oct 2008 08:15:05 +0000 Subject: [issue4025] C99 comments in Python 2.6 break build on AIX 6.1 In-Reply-To: <1223021705.78.0.0680927211456.issue4025@psf.upfronthosting.co.za> Message-ID: <1223021705.78.0.0680927211456.issue4025@psf.upfronthosting.co.za> New submission from David Jones : Doing a plan "configure" then "make"; the compilation breaks due to // style comments in a file called Objects/frameobject.c: cc_r -qlanglvl=extc89 -c -DNDEBUG -O -I. -IInclude -I./Include - DPy_BUILD_CORE -o Objects/frameobject.o Objects/frameobject.c "Objects/frameobject.c", line 520.9: 1506-046 (S) Syntax error. Full transcript attached. Furthermore, attempting to select a more permissive (better?) compiler, with "CC=c99 ./configure --without-gcc" for example, doesn't work because of the bug reported in http://bugs.python.org/issue1633863 (CC is ignored). I will comment separately in that issue. It is my understanding (per my blog article http://drj11.wordpress.com/2008/10/02/python-and-bragging-about-c89/ ) that the code is now c89 clean (or at least as clean as ?gcc -std=c89 - Werror? can make it. That means you should be able to close this bug fairly quickly. :) After I've hacked the configure script the build still fails, but for different reasons. I'll file another bug for that. ---------- components: Interpreter Core files: py26aix61script1 messages: 74229 nosy: drj severity: normal status: open title: C99 comments in Python 2.6 break build on AIX 6.1 type: compile error versions: Python 2.6 Added file: http://bugs.python.org/file11687/py26aix61script1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 10:18:51 2008 From: report at bugs.python.org (David Jones) Date: Fri, 03 Oct 2008 08:18:51 +0000 Subject: [issue1633863] AIX: configure ignores $CC Message-ID: <1223021931.97.0.887537466202.issue1633863@psf.upfronthosting.co.za> David Jones added the comment: This is still a problem for Python 2.6 on AIX 6.1. The simplest fix is to change ?CC=cc_r? to ?CC=${CC:-xlc_r}? but I have no idea how to go about changing the configure script. ---------- nosy: +drj versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 10:32:43 2008 From: report at bugs.python.org (David Jones) Date: Fri, 03 Oct 2008 08:32:43 +0000 Subject: [issue4026] fcntl extension fails to build on AIX 6.1 In-Reply-To: <1223022763.11.0.245770368063.issue4026@psf.upfronthosting.co.za> Message-ID: <1223022763.11.0.245770368063.issue4026@psf.upfronthosting.co.za> New submission from David Jones : After hacking the configure script to work around the issues http://bugs.python.org/issue4025 and http://bugs.python.org/issue1633863 the build still fails: building 'fcntl' extension xlc_r -DNDEBUG -O -I. -I/home/u0006584/Python-2.6/./Include -I. - IInclude -I./Include -I/home/u0006584/Python-2.6/Include - I/home/u0006584/Python-2.6 -c /home/u0006584/Python- 2.6/Modules/fcntlmodule.c -o build/temp.aix-6.1- 2.6/home/u0006584/Python-2.6/Modules/fcntlmodule.o ./Modules/ld_so_aix xlc_r -bI:Modules/python.exp build/temp.aix-6.1- 2.6/home/u0006584/Python-2.6/Modules/fcntlmodule.o -o build/lib.aix-6.1- 2.6/fcntl.so ld: 0711-317 ERROR: Undefined symbol: .flock ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. *** WARNING: renaming "fcntl" since importing it failed: 0509-022 Cannot load module build/lib.aix-6.1-2.6. 0509-026 System error: A file or directory in the path name does not exist. error: No such file or directory make: 1254-004 The error code from the last command is 1. (Full transcript attached) I'm mystified and I can't log in to the AIX box right now. This does not appear to be the same as http://bugs.python.org/issue1756343 and http://bugs.python.org/issue1694442 which both appear to be the same, but documenting a differen AIX build problem. ---------- files: py26aix61script2 messages: 74231 nosy: drj severity: normal status: open title: fcntl extension fails to build on AIX 6.1 type: compile error versions: Python 2.6 Added file: http://bugs.python.org/file11688/py26aix61script2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 10:33:56 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 03 Oct 2008 08:33:56 +0000 Subject: [issue4025] C99 comments in Python 2.6 break build on AIX 6.1 In-Reply-To: <1223021705.78.0.0680927211456.issue4025@psf.upfronthosting.co.za> Message-ID: <1223022836.81.0.851803387832.issue4025@psf.upfronthosting.co.za> Georg Brandl added the comment: Christian, I guess it's all fixed now? ---------- assignee: -> christian.heimes nosy: +christian.heimes, georg.brandl resolution: -> fixed status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 11:41:16 2008 From: report at bugs.python.org (Ray Wang) Date: Fri, 03 Oct 2008 09:41:16 +0000 Subject: [issue4027] wrong page index number in reference book of python documentation In-Reply-To: <1223026876.14.0.133212410345.issue4027@psf.upfronthosting.co.za> Message-ID: <1223026876.14.0.133212410345.issue4027@psf.upfronthosting.co.za> New submission from Ray Wang : the Glossary's index number is 3, which should be 75, so people could not navigate "Glossary" by clicking the title showed in Table of Content, or index link which is beside the content in Evince. ---------- assignee: georg.brandl components: Documentation files: ref.png messages: 74233 nosy: georg.brandl, ray severity: normal status: open title: wrong page index number in reference book of python documentation type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file11689/ref.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 12:08:19 2008 From: report at bugs.python.org (yanne) Date: Fri, 03 Oct 2008 10:08:19 +0000 Subject: [issue3932] HTMLParser cannot handle '&' and non-ascii characters in attribute names In-Reply-To: <1222086790.7.0.800001604957.issue3932@psf.upfronthosting.co.za> Message-ID: <1223028499.58.0.354764210843.issue3932@psf.upfronthosting.co.za> Changes by yanne : Removed file: http://bugs.python.org/file11557/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 12:10:16 2008 From: report at bugs.python.org (yanne) Date: Fri, 03 Oct 2008 10:10:16 +0000 Subject: [issue3932] HTMLParser cannot handle '&' and non-ascii characters in attribute names In-Reply-To: <1222086790.7.0.800001604957.issue3932@psf.upfronthosting.co.za> Message-ID: <1223028616.94.0.0740311121139.issue3932@psf.upfronthosting.co.za> yanne added the comment: It seems that I managed to upload wrong test file the first time. This attached test should fail, I tested it with Python2.6 final both on Linux and Windows. Added file: http://bugs.python.org/file11690/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 12:29:36 2008 From: report at bugs.python.org (STINNER Victor) Date: Fri, 03 Oct 2008 10:29:36 +0000 Subject: [issue4023] convert os.getcwdu() to os.getcwd(), and getcwdu() to getcwd() In-Reply-To: <1223001852.85.0.796626626575.issue4023@psf.upfronthosting.co.za> Message-ID: <200810031229.33697.victor.stinner@haypocalc.com> STINNER Victor added the comment: Le Friday 03 October 2008 04:44:13 Benjamin Peterson, vous avez ?crit?: > You're patch looks pretty good. Could you write tests for it, though? My patch doesn't work, that's why I don't write unit test :-) - os.getcwdu() was correctly replaced - getcwdu() was also replaced - but not "from os import getcwdu" Since most people use os.getcwdu(), and that 2to3 is unable to make sure that getcwdu() comes from os or is an user defined module, I prefer to only keep the first fixer (os.getcwdu() => os.getcwd()). The new patch include a test. (Let's try Roundup by email using an attachment :-)) Added file: http://bugs.python.org/file11691/fix_getcwdu-2.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: fix_getcwdu-2.patch URL: From report at bugs.python.org Fri Oct 3 12:38:11 2008 From: report at bugs.python.org (STINNER Victor) Date: Fri, 03 Oct 2008 10:38:11 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <1222998344.24.0.868081077345.issue3187@psf.upfronthosting.co.za> Message-ID: <200810031238.20821.victor.stinner@haypocalc.com> STINNER Victor added the comment: Le Friday 03 October 2008 03:45:44 Amaury Forgeot d'Arc, vous avez ?crit?: > Here is a patch for Windows: (...) > test_ntpath also runs functions with bytes. Which charset is used when you use bytes filename? I read somewhere that it's the "current codepage". How can the user get this codepage in Python? I ask this to complete my document: http://wiki.python.org/moin/Python3UnicodeDecodeError Don't hesitate to edit directly the document, which may also be moved to Python3 Doc/ directory. You should also support bytearray() in ntpath: isinstance(path, (bytes, bytearray)) The unit tests might use pure unicode on Windows and bytes on Linux, especially getcwd() vs getcwdb(). I don't have Windows nor Mac to test bytes filenames on these systems. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 12:43:52 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 03 Oct 2008 10:43:52 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <200810031238.20821.victor.stinner@haypocalc.com> Message-ID: <48E5F765.30100@v.loewis.de> Martin v. L?wis added the comment: > Which charset is used when you use bytes filename? It's the "ANSI" code page, which is a system-wide admin-modifiable indirection to some real code page (changing it requires a reboot). In the API, it's referred to as CP_ACP. It's also related to the "multi-byte" API, which has caused Mark Hammond to call the codec invoking it "mbcs" (IOW, "mbcs" is always the codec name for the file system encoding). The specific code page that CP_ACP denotes can be found with locale.getpreferredencoding(). Using that codec name (which might be e.g. "cp1252") is different from using "mbcs", as that goes through a regular (table-driven) Python codec. In particular, the Python codec will report errors, whereas the "mbcs" codec will find replacement characters. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 12:57:09 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 03 Oct 2008 10:57:09 +0000 Subject: [issue4019] 2.6 (final) uses old icons in Start Menu In-Reply-To: <1222965298.37.0.497940779276.issue4019@psf.upfronthosting.co.za> Message-ID: <1223031429.15.0.244804917903.issue4019@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Thanks for pointing that out. I rebuilt the icons file on my build machine, so future releases should pick up the new icons. ---------- nosy: +loewis resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 13:09:15 2008 From: report at bugs.python.org (Simon Cross) Date: Fri, 03 Oct 2008 11:09:15 +0000 Subject: [issue3932] HTMLParser cannot handle '&' and non-ascii characters in attribute names In-Reply-To: <1222086790.7.0.800001604957.issue3932@psf.upfronthosting.co.za> Message-ID: <1223032155.96.0.398070025919.issue3932@psf.upfronthosting.co.za> Simon Cross added the comment: I've tracked down the cause to the .unescape(...) method in HTMLParser. The replaceEntities function passed to re.sub() always returns a unicode character, even when matching string s is a byte string. Changing line 383 to: return self.entitydefs[s].encode("utf-8") makes the test pass. Unfortunately this is obviously not a viable solution in the general case. The problem is that there is no way to know what character set to encode in without knowing both the HTTP headers (which are not available to HTMLParser) and looking at the XML and HTML headers. Python 3.0 implicitly rejects non-unicode strings right at the start of html.parser.HTMLParser.feed(...) by adding '' to the data passed in. Given Python 3.0's behaviour, the docs should perhaps be updated to say HTMLParser does not support non-unicode strings? If it should support byte strings, we'll have to figure out how to handle encoded entity issues. It's a bit weird that character and entity references outside tags/attributes result in calls to .entityref(...) and .charref(...) while those inside get unescape called automatically. Don't really see what can be done about that though. ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 13:31:38 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 03 Oct 2008 11:31:38 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <200810031238.20821.victor.stinner@haypocalc.com> Message-ID: <1223033492.23259.2.camel@fsol> Antoine Pitrou added the comment: > You should also support bytearray() in ntpath: > isinstance(path, (bytes, bytearray)) The most generic way of allowing all bytes-alike objects is to write: path = bytes(path) It raises a TypeError if `path` can't export a read-only buffer of contiguous bytes; also, it is a no-op if `path` is already a bytes object, so very cheap in the common case. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 13:43:54 2008 From: report at bugs.python.org (STINNER Victor) Date: Fri, 03 Oct 2008 11:43:54 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <1223033492.23259.2.camel@fsol> Message-ID: <200810031344.06702.victor.stinner@haypocalc.com> STINNER Victor added the comment: > The most generic way of allowing all bytes-alike objects is to write: > path = bytes(path) If you use that, any unicode may fails and the function will always return unicode. The goal is to get: func(bytes)->bytes func(bytearray)->bytes (or maybe bytearray, it doesn't matter) func(unicode)->unicode _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 13:53:00 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 03 Oct 2008 11:53:00 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <200810031344.06702.victor.stinner@haypocalc.com> Message-ID: <1223034773.23259.4.camel@fsol> Antoine Pitrou added the comment: Le vendredi 03 octobre 2008 ? 11:43 +0000, STINNER Victor a ?crit : > STINNER Victor added the comment: > > > The most generic way of allowing all bytes-alike objects is to write: > > path = bytes(path) > > If you use that, any unicode may fails and the function will always return > unicode. The goal is to get: > func(bytes)->bytes > func(bytearray)->bytes (or maybe bytearray, it doesn't matter) > func(unicode)->unicode Then make it: path = path if isinstance(path, str) else bytes(path) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 14:00:02 2008 From: report at bugs.python.org (lplatypus) Date: Fri, 03 Oct 2008 12:00:02 +0000 Subject: [issue4024] float(0.0) singleton In-Reply-To: <1223004306.88.0.574076862856.issue4024@psf.upfronthosting.co.za> Message-ID: <1223035202.1.0.439818891319.issue4024@psf.upfronthosting.co.za> lplatypus added the comment: No it won't distinguish between +0.0 and -0.0 in its present form, because these two have the same value according to the C equality operator. This should be easy to adjust, eg we could exclude -0.0 by changing the comparison if (fval == 0.0) into static double positive_zero = 0.0; ... if (!memcmp(&fval, &positive_zero, sizeof(double))) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 14:16:34 2008 From: report at bugs.python.org (STINNER Victor) Date: Fri, 03 Oct 2008 12:16:34 +0000 Subject: [issue4024] float(0.0) singleton In-Reply-To: <1223004306.88.0.574076862856.issue4024@psf.upfronthosting.co.za> Message-ID: <1223036194.02.0.978394197478.issue4024@psf.upfronthosting.co.za> STINNER Victor added the comment: We need maybe more hardcoded floats. I mean a "cache" of current float. Example of pseudocode: def cache_float(value): return abs(value) in (0.0, 1.0, 2.0) def create_float(value): try: return cache[value] except KeyError: obj = float(value) if cache_value(value): cache[value] = obj return obj Since some (most?) programs don't use float, the cache is created on demand and not at startup. Since the goal is speed, only a benchmark can answer to my question (is Python faster using such cache) ;-) Instead of cache_float(), an RCU cache might me used. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 14:19:46 2008 From: report at bugs.python.org (Christian Heimes) Date: Fri, 03 Oct 2008 12:19:46 +0000 Subject: [issue4024] float(0.0) singleton In-Reply-To: <1223004306.88.0.574076862856.issue4024@psf.upfronthosting.co.za> Message-ID: <1223036386.49.0.664500762873.issue4024@psf.upfronthosting.co.za> Christian Heimes added the comment: Please use copysign(1.0, fval) == 1.0 instead of your memcpy trick. It's the cannonical way to check for negative zero. copysign() is always available because we have our own implementation if the platform doesn't provide one. We might also want to special case 1.0 and -1.0. I've to check with Guido and Barry if we can get the optimization into 2.6.1 and 3.0.1. It may have to wait until 2.7 and 3.0. ---------- assignee: -> christian.heimes nosy: +christian.heimes priority: -> normal versions: +Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 14:23:29 2008 From: report at bugs.python.org (STINNER Victor) Date: Fri, 03 Oct 2008 12:23:29 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> Message-ID: <1223036609.8.0.800099166141.issue3187@psf.upfronthosting.co.za> STINNER Victor added the comment: path=path is useless most of the code (unicode path), this code is faster if both cases (bytes or unicode)! if not isinstance(path, str): path = bytes(path) * a if b else c: unicode=0.756730079651; bytes=1.93071103096 * if test: path=...: unicode=0.681571006775; bytes=1.88843798637 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 14:45:55 2008 From: report at bugs.python.org (Ralph Corderoy) Date: Fri, 03 Oct 2008 12:45:55 +0000 Subject: [issue3758] "make check" suggest a testing target under GNU coding standards In-Reply-To: <1220362449.51.0.882466438238.issue3758@psf.upfronthosting.co.za> Message-ID: <1223037955.97.0.123767923182.issue3758@psf.upfronthosting.co.za> Ralph Corderoy added the comment: The patchcheck target isn't in .PHONY at the end of the file. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 15:14:20 2008 From: report at bugs.python.org (JB Robertson) Date: Fri, 03 Oct 2008 13:14:20 +0000 Subject: [issue4028] Problem compiling the multiprocessing module on sunos5 In-Reply-To: <1223039660.71.0.470025758339.issue4028@psf.upfronthosting.co.za> Message-ID: <1223039660.71.0.470025758339.issue4028@psf.upfronthosting.co.za> New submission from JB Robertson : Hello, there's some issues compiling the multiprocessing module on the SunOS I have here, where CMSG_LEN, CMSG_ALIGN, CMSG_SPACE and sem_timedwait are absent. $ uname -av SunOS xxxxxxx 5.9 Generic_117171-15 sun4u sparc SUNW,Sun-Fire-V440 it looks like simply defining the first three macros like this works: #ifndef CMSG_SPACE # define CMSG_SPACE(len) (CMSG_ALIGN(sizeof(struct cmsghdr))+CMSG_ALIGN(len)) #endif #ifndef CMSG_ALIGN # ifdef __sun__ # define CMSG_ALIGN _CMSG_DATA_ALIGN # else # define CMSG_ALIGN(len) (((len)+sizeof(long)-1) & ~(sizeof(long)-1)) # endif #endif #ifndef CMSG_LEN # define CMSG_LEN(len) (CMSG_ALIGN(sizeof(struct cmsghdr))+(len)) #endif (from http://mailman.videolan.org/pipermail/vlc-devel/2006-May/024400.html ) and setting HAVE_SEM_TIMEDWAIT=0 in setup.py does the trick for the last one. Presumably, adding something like elif platform.startswith('sunos5'): macros = dict( HAVE_SEM_OPEN=1, HAVE_SEM_TIMEDWAIT=0, HAVE_FD_TRANSFER=1 ) libraries = ['rt'] in setup.py should work, but I have no other SunOS machines to test this on. thanks ---------- components: Extension Modules messages: 74248 nosy: jr244 severity: normal status: open title: Problem compiling the multiprocessing module on sunos5 type: compile error versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 15:23:48 2008 From: report at bugs.python.org (Steve Lee) Date: Fri, 03 Oct 2008 13:23:48 +0000 Subject: [issue4018] "for me" installer problem on x64 Vista In-Reply-To: <1222963572.56.0.515590438992.issue4018@psf.upfronthosting.co.za> Message-ID: <1223040228.24.0.990445180635.issue4018@psf.upfronthosting.co.za> Steve Lee added the comment: I spotted the problem on Vista Home Premium SP1 32bit As John indicates the problem with the 'all users' install is that it requires elevation to run as admin even if logged in as an administrator. That is rather non obvious (John suggests running cmd.exe as administrator which works fine). As most people doing it will be developers and have own machine it is not a big issue (assuming use py2exe, eggs etc. is used for end user setup ;-)) Oh I wonder if the same problem exists there? I ran into SxS problems on XP when building Python 2.5.? from source for use in Mozilla XULRunner and needed to use VC8 Express for both (so same CRT). I moved on so never fully resolved it apart from dropping copies of the CRT in various system folders. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 15:35:53 2008 From: report at bugs.python.org (Steve Lee) Date: Fri, 03 Oct 2008 13:35:53 +0000 Subject: [issue4018] "for me" installer problem on x64 Vista In-Reply-To: <1222963572.56.0.515590438992.issue4018@psf.upfronthosting.co.za> Message-ID: <1223040953.25.0.938965604347.issue4018@psf.upfronthosting.co.za> Steve Lee added the comment: The mozilla bug is https://bugzilla.mozilla.org/show_bug.cgi?id=371359 but looking at it now, especially comment 4, it's not much help. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 16:17:29 2008 From: report at bugs.python.org (David W. Lambert) Date: Fri, 03 Oct 2008 14:17:29 +0000 Subject: [issue4029] Documentation displays incorrectly in iexplore. In-Reply-To: <1223043449.43.0.741779453712.issue4029@psf.upfronthosting.co.za> Message-ID: <1223043449.43.0.741779453712.issue4029@psf.upfronthosting.co.za> New submission from David W. Lambert : I use IEXPLORE version 6.0.2900.2180.xpsp_sp2_gdr.-70227-2254CO without any known customizations and have observed 3 display problems. (And since I guess that the python html libraries generated the manuals, could these libraries be improved?) 1) The browser ties underscores together into an underline making them hard to count. 2) The horizontal position of the quick links depends on the browser window width. Very narrow and they hide themselves beyond the right window edge. Sufficiently wide and they fit into the left margin where they sensibly belong. At a comfortable reading width they overlap the text. See picture. 3) The "print" function heading displays incorrectly. Please view the attached picture. Backslashes seem to display correctly elsewhere in the various normal texts throughout the documents. Also the space character would be more obvious in a fixed width font. Thanks, Dave. ---------- assignee: georg.brandl components: Documentation files: linksCanOverlapText.bmp messages: 74251 nosy: LambertDW, georg.brandl severity: normal status: open title: Documentation displays incorrectly in iexplore. versions: Python 3.0 Added file: http://bugs.python.org/file11692/linksCanOverlapText.bmp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 16:39:25 2008 From: report at bugs.python.org (Manatsawin Hanmongkolchai) Date: Fri, 03 Oct 2008 14:39:25 +0000 Subject: [issue4030] msi installer does not requires UAC permission on Vista In-Reply-To: <1223044765.27.0.112047586653.issue4030@psf.upfronthosting.co.za> Message-ID: <1223044765.27.0.112047586653.issue4030@psf.upfronthosting.co.za> New submission from Manatsawin Hanmongkolchai : Hello, the Python 2.6 installer on Vista does not requires UAC permission thus does not work with "install for All user" option. The installer said: You do not have sufficient privilleges to completes the installation for all users of the machine. Log on as administrator and then retry this installation. ---------- components: Installation messages: 74252 nosy: willwill severity: normal status: open title: msi installer does not requires UAC permission on Vista versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 16:46:48 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 03 Oct 2008 14:46:48 +0000 Subject: [issue4030] msi installer does not requires UAC permission on Vista In-Reply-To: <1223044765.27.0.112047586653.issue4030@psf.upfronthosting.co.za> Message-ID: <1223045208.02.0.934995613023.issue4030@psf.upfronthosting.co.za> Martin v. L?wis added the comment: See the "Vista Note" on http://www.python.org/download/releases/2.6/ Closing as "won't fix". ---------- nosy: +loewis resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 16:47:39 2008 From: report at bugs.python.org (Koen van de Sande) Date: Fri, 03 Oct 2008 14:47:39 +0000 Subject: [issue4022] 2.6 dependent on c:\python26\ on windows In-Reply-To: <1222989342.94.0.529774628368.issue4022@psf.upfronthosting.co.za> Message-ID: <1223045259.22.0.226177134542.issue4022@psf.upfronthosting.co.za> Koen van de Sande added the comment: Have you tried restarting your machine after installing the Visual C++ runtime from Microsoft? These runtimes will sometimes only finish installing after a reboot. Also, putting them in System/System32 is not "allowed" by MSVCR90.dll, either it goes into your application folder (together with a .manifest file), or into the WinSXS folder. ---------- nosy: +koen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 18:11:03 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 03 Oct 2008 16:11:03 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> Message-ID: <1223050263.34.0.190578870327.issue3187@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I've committed sys.setfilesystemencoding as r66769. Declaring it as a documentation issue now. Not sure whether it should remain a release blocker; IMO, the documentation can still be produced after the release. ---------- assignee: loewis -> georg.brandl components: +Documentation -Library (Lib) nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 18:34:58 2008 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 03 Oct 2008 16:34:58 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> Message-ID: <1223051698.05.0.0287230053704.issue3187@psf.upfronthosting.co.za> Guido van Rossum added the comment: Reducing priority to critical, it's just docs and tweaks from here. You should also support bytearray() in ntpath: > isinstance(path, (bytes, bytearray)) No, you shouldn't. I changed my mind on this several times and in the end figured it's good enough to just support bytes and str instances. Amaury: I've reviewed your patch and ran test_ntpath.py on a Linux box. I get this traceback: ====================================================================== ERROR: test_relpath (__main__.TestNtpath) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_ntpath.py", line 188, in test_relpath tester('ntpath.relpath("a")', 'a') File "Lib/test/test_ntpath.py", line 22, in tester gotResult = eval(fn) File "", line 1, in File "/usr/local/google/home/guido/python/py3k/Lib/ntpath.py", line 530, in relpath start_list = abspath(start).split(sep) File "/usr/local/google/home/guido/python/py3k/Lib/ntpath.py", line 499, in abspath path = join(os.getcwd(), path) File "/usr/local/google/home/guido/python/py3k/Lib/ntpath.py", line 137, in join if b[:1] in seps: TypeError: 'in ' requires string as left operand, not bytes ---------------------------------------------------------------------- The fix is to change the fallback abspath to this code: def abspath(path): """Return the absolute version of a path.""" if not isabs(path): if isinstance(path, bytes): cwd = os.getcwdb() else: cwd = os.getcwd() path = join(cwd, path) return normpath(path) Once you fix that please check it in! ---------- priority: release blocker -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 18:35:34 2008 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 03 Oct 2008 16:35:34 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> Message-ID: <1223051734.16.0.412935937482.issue3187@psf.upfronthosting.co.za> Guido van Rossum added the comment: Assigning to Amaury for Windows fix first. ---------- assignee: georg.brandl -> amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 18:43:44 2008 From: report at bugs.python.org (patricio) Date: Fri, 03 Oct 2008 16:43:44 +0000 Subject: [issue4031] 08 value popups an stdin error, no date handle allowed In-Reply-To: <1223052224.4.0.0197033611138.issue4031@psf.upfronthosting.co.za> Message-ID: <1223052224.4.0.0197033611138.issue4031@psf.upfronthosting.co.za> New submission from patricio : a = 08 print a File"",line 1 a = 08 < syntax error:invalid token (if I use 07, the 0 is supressed but it compiles & display the 7) ---------- messages: 74258 nosy: pgimelli severity: normal status: open title: 08 value popups an stdin error, no date handle allowed type: compile error versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 18:58:54 2008 From: report at bugs.python.org (Tim Gordon) Date: Fri, 03 Oct 2008 16:58:54 +0000 Subject: [issue4031] 08 value popups an stdin error, no date handle allowed In-Reply-To: <1223052224.4.0.0197033611138.issue4031@psf.upfronthosting.co.za> Message-ID: <48E64F49.4040908@aleph17.co.uk> Tim Gordon added the comment: By prefixing a number with 0, you're actually using octal rather than decimal (i.e., only digits 0 to 7 are valid). For example, try: >>> print 030 24 >>> print 077 63 patricio wrote: > New submission from patricio : > > a = 08 > print a > File"",line 1 > a = 08 > < > syntax error:invalid token > > (if I use 07, the 0 is supressed but it compiles & display the 7) > > ---------- > messages: 74258 > nosy: pgimelli > severity: normal > status: open > title: 08 value popups an stdin error, no date handle allowed > type: compile error > versions: Python 2.5 > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________________ > New-bugs-announce mailing list > New-bugs-announce at python.org > http://mail.python.org/mailman/listinfo/new-bugs-announce > > ---------- nosy: +QuantumTim _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 19:00:51 2008 From: report at bugs.python.org (Tim Gordon) Date: Fri, 03 Oct 2008 17:00:51 +0000 Subject: [issue4031] 08 value popups an stdin error, no date handle allowed In-Reply-To: <1223052224.4.0.0197033611138.issue4031@psf.upfronthosting.co.za> Message-ID: <48E64FBE.2050901@aleph17.co.uk> Tim Gordon added the comment: Whoops, I thought the tracker automatically removed quoted text! :z _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 19:02:20 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 03 Oct 2008 17:02:20 +0000 Subject: [issue4024] float(0.0) singleton In-Reply-To: <1223004306.88.0.574076862856.issue4024@psf.upfronthosting.co.za> Message-ID: <1223053340.28.0.7835134238.issue4024@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I question whether this should be done at all. Making the creation of a float even slightly slower is bad. This is on the critical path for all floating point intensive computations. If someone really cares about the memory savings, it is not hard take a single in instance of float and use it everywhere: ZERO=0.0; arr=[ZERO if x == 0.0 else x for x in arr]. That technique also works for 1.0 and -1.0 and pi and other values that may commonly occur in a particular app. Also, the technique is portable to implementations other than CPython. I don't mind this sort of optimization for immutable containers but feel that floats are too granular. Special cases aren't special enough to break the rules. If the OP is insistent, then at least this should be discussed with the numeric community who will have a better insight into whether the speed/space trade-off makes sense in other applications beyond the OP's original case. Tim, any insights? ---------- assignee: christian.heimes -> tim_one nosy: +rhettinger, tim_one _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 19:04:49 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 03 Oct 2008 17:04:49 +0000 Subject: [issue4031] 08 value popups an stdin error, no date handle allowed In-Reply-To: <1223052224.4.0.0197033611138.issue4031@psf.upfronthosting.co.za> Message-ID: <1223053489.8.0.33441210741.issue4031@psf.upfronthosting.co.za> Changes by Amaury Forgeot d'Arc : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 19:08:50 2008 From: report at bugs.python.org (Collin Winter) Date: Fri, 03 Oct 2008 17:08:50 +0000 Subject: [issue2532] file that breaks 2to3 (despite being correct python) In-Reply-To: <1207095014.88.0.392837207981.issue2532@psf.upfronthosting.co.za> Message-ID: <1223053730.2.0.915596227352.issue2532@psf.upfronthosting.co.za> Collin Winter added the comment: Fixed in r66775. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 19:09:48 2008 From: report at bugs.python.org (Collin Winter) Date: Fri, 03 Oct 2008 17:09:48 +0000 Subject: [issue3358] 2to3 Iterative Wildcard Matching In-Reply-To: <1216095149.85.0.174459482366.issue3358@psf.upfronthosting.co.za> Message-ID: <1223053788.52.0.177546748447.issue3358@psf.upfronthosting.co.za> Collin Winter added the comment: Applied as r66775. I used the example file from issue2532 as test data. Thanks for the patch, Nick! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 19:10:58 2008 From: report at bugs.python.org (Collin Winter) Date: Fri, 03 Oct 2008 17:10:58 +0000 Subject: [issue3260] fix_imports does not handle intra-package renames In-Reply-To: <1215028935.08.0.401449015598.issue3260@psf.upfronthosting.co.za> Message-ID: <1223053858.98.0.248863017773.issue3260@psf.upfronthosting.co.za> Changes by Collin Winter : ---------- assignee: collinwinter -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 19:38:37 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 03 Oct 2008 17:38:37 +0000 Subject: [issue1706863] Failed to build Python 2.5.1 with sqlite3 Message-ID: <1223055517.28.0.46065136208.issue1706863@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I've committed "fix_sqlite3_setup_error.patch" in r66766. I think the problem disutils cannot recognize .dll.a as library on cygwin is another issue, so I'll open new tracker item. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 19:38:54 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 03 Oct 2008 17:38:54 +0000 Subject: [issue4032] disutils cannot recognize ".dll.a" as library on cygwin In-Reply-To: <1223055534.39.0.439061882395.issue4032@psf.upfronthosting.co.za> Message-ID: <1223055534.39.0.439061882395.issue4032@psf.upfronthosting.co.za> New submission from Hirokazu Yamamoto : This issue is derived from issue1706863. ---------- components: Distutils messages: 74265 nosy: amaury.forgeotdarc, ghaering, jlt63, ocean-city, rpetrov, tan2, vitalyy2000 severity: normal status: open title: disutils cannot recognize ".dll.a" as library on cygwin versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 19:52:27 2008 From: report at bugs.python.org (tommusic) Date: Fri, 03 Oct 2008 17:52:27 +0000 Subject: [issue4017] IDLE 2.6 broken on OSX (Leopard) In-Reply-To: <1222960590.08.0.635891151551.issue4017@psf.upfronthosting.co.za> Message-ID: <1223056347.57.0.0111215298488.issue4017@psf.upfronthosting.co.za> Changes by tommusic : ---------- nosy: +tommusic _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 20:11:59 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 03 Oct 2008 18:11:59 +0000 Subject: [issue3758] "make check" suggest a testing target under GNU coding standards In-Reply-To: <1220362449.51.0.882466438238.issue3758@psf.upfronthosting.co.za> Message-ID: <1223057519.85.0.9967049289.issue3758@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 20:40:34 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 03 Oct 2008 18:40:34 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> Message-ID: <1223059234.31.0.586564469363.issue3187@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Thanks for testing the non-Windows part of ntpath. Committed patch in r66777. Leaving the issue open: macpath.py should certainly be modified. ---------- assignee: amaury.forgeotdarc -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 20:52:02 2008 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 03 Oct 2008 18:52:02 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> Message-ID: <1223059922.82.0.607660220435.issue3187@psf.upfronthosting.co.za> Guido van Rossum added the comment: Sorry Amaury, but there's another issue. test_ntpath now fails when run with -bb: ====================================================================== ERROR: test_expandvars (__main__.TestNtpath) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_ntpath.py", line 151, in test_expandvars tester('ntpath.expandvars("$foo bar")', "bar bar") File "Lib/test/test_ntpath.py", line 10, in tester gotResult = eval(fn) File "", line 1, in File "/usr/local/google/home/guido/python/py3k/Lib/ntpath.py", line 344, in expandvars if c in ('\'', b'\''): # no expansion within single quotes BytesWarning: Comparison between bytes and string ====================================================================== ERROR: test_normpath (__main__.TestNtpath) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_ntpath.py", line 120, in test_normpath tester("ntpath.normpath('A//////././//.//B')", r'A\B') File "Lib/test/test_ntpath.py", line 10, in tester gotResult = eval(fn) File "", line 1, in File "/usr/local/google/home/guido/python/py3k/Lib/ntpath.py", line 465, in normpath if comps[i] in ('.', '', b'.', b''): BytesWarning: Comparison between bytes and string ====================================================================== ERROR: test_relpath (__main__.TestNtpath) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_ntpath.py", line 188, in test_relpath tester('ntpath.relpath("a")', 'a') File "Lib/test/test_ntpath.py", line 10, in tester gotResult = eval(fn) File "", line 1, in File "/usr/local/google/home/guido/python/py3k/Lib/ntpath.py", line 534, in relpath start_list = abspath(start).split(sep) File "/usr/local/google/home/guido/python/py3k/Lib/ntpath.py", line 504, in abspath return normpath(path) File "/usr/local/google/home/guido/python/py3k/Lib/ntpath.py", line 465, in normpath if comps[i] in ('.', '', b'.', b''): BytesWarning: Comparison between bytes and string ---------- assignee: -> amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 20:54:36 2008 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 03 Oct 2008 18:54:36 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> Message-ID: <1223060076.51.0.00443953045852.issue3187@psf.upfronthosting.co.za> Guido van Rossum added the comment: FWIW, I don't see a need to change macpath.py -- it's only used for MacOS 9 and the occasional legacy app. OSX uses posixpath.py. ---------- resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 21:29:44 2008 From: report at bugs.python.org (David W. Lambert) Date: Fri, 03 Oct 2008 19:29:44 +0000 Subject: [issue4000] Additional 2to3 documentation updates In-Reply-To: <1222748434.01.0.683191866382.issue4000@psf.upfronthosting.co.za> Message-ID: <1223062184.92.0.065504687918.issue4000@psf.upfronthosting.co.za> David W. Lambert added the comment: http://docs.python.org/dev/3.0/library/reprlib.html Back ticks didn't become a part of my python repertoire. I suppose return repr(obj) # is correct replacement for return `obj` _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 21:55:46 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 03 Oct 2008 19:55:46 +0000 Subject: [issue3255] [proposal] alternative for re.sub In-Reply-To: <1214988192.81.0.533532272888.issue3255@psf.upfronthosting.co.za> Message-ID: <1223063746.41.0.265510029481.issue3255@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 22:35:16 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 03 Oct 2008 20:35:16 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> Message-ID: <1223066116.66.0.1634836696.issue3187@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Committed r66779: test_ntpath now passes with the -bb option. It seems that the Windows buildbots do not set -bb. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 22:55:28 2008 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 03 Oct 2008 20:55:28 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> Message-ID: <1223067328.45.0.951799700316.issue3187@psf.upfronthosting.co.za> Guido van Rossum added the comment: Thanks Amaury! On to Georg for doc tweaks. Summary: - all the os.path functions now work on bytes as well, on all platforms - only on Unix (but not OSX) do we recommend using bytes - os.getcwdu() no longer exists - os.getcwdb() returns bytes - os.listdir() skips undecodable entries (previously it returned a mixture of str and bytes instances) - open() accepts bytes as filename Stuff that didn't change but that you might want to mention: - all the syscalls in os support bytes args; readlink() and listdir() return bytes if the arg is bytes - getcwd() may raise UnicodeDecodeError Martin already documented sys.setfilesystemencoding(). ---------- assignee: amaury.forgeotdarc -> georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 23:01:28 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 03 Oct 2008 21:01:28 +0000 Subject: [issue3448] Multi-process 2to3 In-Reply-To: <1217019998.69.0.231122552254.issue3448@psf.upfronthosting.co.za> Message-ID: <1223067688.52.0.592169423688.issue3448@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Because I would like to use lib2to3 without the complexity of multiple processes. That it is a good performance boost is excellent, but I don't think it should be a required part of using the library. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 23:04:43 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 03 Oct 2008 21:04:43 +0000 Subject: [issue3448] Multi-process 2to3 In-Reply-To: <1217019998.69.0.231122552254.issue3448@psf.upfronthosting.co.za> Message-ID: <1223067883.47.0.852348287394.issue3448@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think it's reasonable to only enable multiprocessing if the adequate command-line option has been set. It's how `make` already works (next time you compile Python, try `make -jN` where N is your number of CPU cores). ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 23:15:09 2008 From: report at bugs.python.org (jolleyjoe) Date: Fri, 03 Oct 2008 21:15:09 +0000 Subject: [issue4033] python search path - .pth recursion In-Reply-To: <1223068509.57.0.8948521791.issue4033@psf.upfronthosting.co.za> Message-ID: <1223068509.57.0.8948521791.issue4033@psf.upfronthosting.co.za> New submission from jolleyjoe : I have an a.pth file in dir_a with a line that says: dir_b In dir_b, I have a b.pth file that lists some eggs in dir_b: JCC-1.9-py2.5-linux-i686.egg lucene-2.3.2-py2.5-linux-i686.egg >From http://www.python.org/doc/2.5.2/inst/search-path.html: "Paths can be absolute or relative, in which case they're relative to the directory containing the .pth file. Any directories added to the search path will be scanned in turn for .pth files. See site module documentation for more information." I assume that .pth files are scanned recursively... is this true? I found an old ticket here: http://bugs.python.org/issue1431, but it wasn't clear how it concludes (ie: do .pth files get scanned recursively for directories to add to the search path or not). ---------- assignee: georg.brandl components: Documentation messages: 74274 nosy: georg.brandl, jolleyjoe severity: normal status: open title: python search path - .pth recursion type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 23:21:25 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 03 Oct 2008 21:21:25 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> Message-ID: <1223068885.4.0.51064033093.issue3187@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I have a patch for macpath.py nonetheless. Tested on Windows (of course ;-) but all functions are pure text manipulation, except realpath(). It was much easier than ntpath.py. I also added tests for three functions which were not exercised at all. Added file: http://bugs.python.org/file11693/macpath.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 23:50:10 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 03 Oct 2008 21:50:10 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> Message-ID: <1223070610.45.0.471266339637.issue3187@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Amaury, you're patch looks good. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 3 23:57:38 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 03 Oct 2008 21:57:38 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> Message-ID: <1223071058.18.0.653177366882.issue3187@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Committed macpath.py in r66781. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 00:21:06 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 03 Oct 2008 22:21:06 +0000 Subject: [issue2876] Write UserDict fixer for 2to3 In-Reply-To: <1210913348.4.0.543107843307.issue2876@psf.upfronthosting.co.za> Message-ID: <1223072466.06.0.506748768175.issue2876@psf.upfronthosting.co.za> Benjamin Peterson added the comment: The patch looks very good over all. However, I'm not completely sure that 2to3 needs to give a warning on UserDict.UserDict instances. Wouldn't it be better to handle that with a py3k warning in UserDict? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 00:23:21 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 03 Oct 2008 22:23:21 +0000 Subject: [issue2876] Write UserDict fixer for 2to3 In-Reply-To: <1210913348.4.0.543107843307.issue2876@psf.upfronthosting.co.za> Message-ID: <1223072601.19.0.417111447334.issue2876@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Also, I believe the variable initializations at the beginning of the transform method are unneeded. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 00:37:13 2008 From: report at bugs.python.org (STINNER Victor) Date: Fri, 03 Oct 2008 22:37:13 +0000 Subject: [issue4008] IDLE: checksyntax() doesn't support Unicode? In-Reply-To: <1222875475.18.0.22602254781.issue4008@psf.upfronthosting.co.za> Message-ID: <1223073433.74.0.13349664868.issue4008@psf.upfronthosting.co.za> STINNER Victor added the comment: @loewis: I guess that your locale is still UTF-8. On Linux (Ubuntu Gutsy) using "env -i DISPLAY=$DISPLAY HOME=$HOME xterm" to get a new empty environment, I get: $ locale LANG= LC_ALL= LC_CTYPE="POSIX" LC_NUMERIC="POSIX" LC_TIME="POSIX" LC_COLLATE="POSIX" ... $ python3.0 >>> from idlelib.IOBinding import encoding >>> encoding 'ansi_x3.4-1968' >>> import locale >>> locale.getdefaultlocale() (None, None) >>> locale.nl_langinfo(locale.CODESET) 'ANSI_X3.4-1968' In this environment, IDLE is unable to detect idle-3.0rc1-quits-when-run.py encoding. IDLE uses open(filename, 'r'): it doesn't specify the charset. In this case, TextIOWrapper uses locale.getpreferredencoding() as encoding (or ASCII on failure). To sum IDLE: if your locale is UTF-8, you will be able to open an UTF-8 file. So for example, if your locale is UTF-8, you won't be able to open an ISO-8859-1 file. Let's try iso.py: IDLE displays the error "Failed to decode" and quit whereas I specified the encoding :-/ Added file: http://bugs.python.org/file11694/iso.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 00:51:57 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 03 Oct 2008 22:51:57 +0000 Subject: [issue4023] convert os.getcwdu() to os.getcwd(), and getcwdu() to getcwd() In-Reply-To: <1222989739.85.0.364233815039.issue4023@psf.upfronthosting.co.za> Message-ID: <1223074317.41.0.79305702551.issue4023@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks for the patch. Reviewed and applied in r66782. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 01:31:59 2008 From: report at bugs.python.org (Greg Hazel) Date: Fri, 03 Oct 2008 23:31:59 +0000 Subject: [issue4034] traceback attribute error In-Reply-To: <1223076719.45.0.395696576555.issue4034@psf.upfronthosting.co.za> Message-ID: <1223076719.45.0.395696576555.issue4034@psf.upfronthosting.co.za> New submission from Greg Hazel : Unrelated to this bug, I would like to have the ability to remove the reference to the frame from the traceback object. Specifically so that the traceback object could be stored for a while without keeping all the locals alive as well. So, periodically I test to see if python allows that. Python 2.6 gave some strange results compared to 2.5.2: Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> try: ... x = dskjfds ... except: ... import sys ... t, v, tb = sys.exc_info() ... >>> tb >>> dir(tb) ['tb_frame', 'tb_lasti', 'tb_lineno', 'tb_next'] >>> tb.tb_frame >>> tb.tb_frame = None Traceback (most recent call last): File "", line 1, in TypeError: 'traceback' object has only read-only attributes (assign to .tb_frame) >>> Python 2.6 (r26:66721, Oct 2 2008, 11:35:03) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> try: ... x = lfdskf ... except: ... import sys ... t, v, tb = sys.exc_info() ... >>> tb >>> dir(tb) ['tb_frame', 'tb_lasti', 'tb_lineno', 'tb_next'] >>> tb.tb_frame >>> tb.tb_frame = None Traceback (most recent call last): File "", line 1, in AttributeError: 'traceback' object has no attribute 'tb_frame' >>> ---------- messages: 74282 nosy: ghazel severity: normal status: open title: traceback attribute error type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 01:38:24 2008 From: report at bugs.python.org (STINNER Victor) Date: Fri, 03 Oct 2008 23:38:24 +0000 Subject: [issue4035] Support bytes for os.exec*() In-Reply-To: <1223077104.22.0.62328245443.issue4035@psf.upfronthosting.co.za> Message-ID: <1223077104.22.0.62328245443.issue4035@psf.upfronthosting.co.za> New submission from STINNER Victor : os.exec*() functions doesn't support bytes if the program name doesn't use absolute path. The problem is that PATH is used to complete the full path but Python3 disallows bytes+str (which is a good thing!). Example: python -c "import os; os.execvp('pwd', 'pwd')" Traceback (most recent call last): ... File "/home/haypo/prog/py3k/Lib/os.py", line 328, in execvp _execvpe(file, args) File "/home/haypo/prog/py3k/Lib/os.py", line 364, in _execvpe func(fullname, *argrest) TypeError: execv() arg 2 must be a tuple or list Attached patch allows bytes in os.exec*(). It converts each directory of PATH using sys.getfilesystemencoding(). ---------- files: os_exec_bytes.patch keywords: patch, patch messages: 74283 nosy: haypo severity: normal status: open title: Support bytes for os.exec*() versions: Python 3.0 Added file: http://bugs.python.org/file11695/os_exec_bytes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 01:45:15 2008 From: report at bugs.python.org (STINNER Victor) Date: Fri, 03 Oct 2008 23:45:15 +0000 Subject: [issue4036] Support bytes for subprocess.Popen() In-Reply-To: <1223077515.41.0.60688229915.issue4036@psf.upfronthosting.co.za> Message-ID: <1223077515.41.0.60688229915.issue4036@psf.upfronthosting.co.za> New submission from STINNER Victor : subprocess doesn't support bytes for the "args" argument. - On Windows, subprocess._execute_child() converts args to a string if it was a list - On UNIX, subprocess._execute_child() converts args to a list if it's a string If shell=True, _execute_child() adds a prefix to the arguments. I don't know if subprocess should accept bytes in a command line. Attached patch fixes POSIX version of subprocess to support bytes. See also related issue #4035. ---------- files: os_exec_bytes.patch keywords: patch, patch messages: 74284 nosy: haypo severity: normal status: open title: Support bytes for subprocess.Popen() versions: Python 3.0 Added file: http://bugs.python.org/file11696/os_exec_bytes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 02:13:26 2008 From: report at bugs.python.org (daaku) Date: Sat, 04 Oct 2008 00:13:26 +0000 Subject: [issue4037] doctest.py should include method descriptors when looking inside a class __dict__ In-Reply-To: <1223079206.04.0.17382541424.issue4037@psf.upfronthosting.co.za> Message-ID: <1223079206.04.0.17382541424.issue4037@psf.upfronthosting.co.za> New submission from daaku : doctest.py currently does not include doctests from method descriptors in a class. The patch is simple, in the _find function in class DocTestFinder: Original: # Recurse to methods, properties, and nested classes. if ((inspect.isfunction(val) or inspect.isclass(val) or isinstance(val, property)) and self._from_module(module, val)): Patched: # Recurse to methods, properties, and nested classes. if ((inspect.isfunction(val) or inspect.isclass(val) or inspect.ismethoddescriptor(val) or isinstance(val, property)) and self._from_module(module, val)): Adding the "inspect.ismethoddescriptor(val) or" line. ---------- components: Library (Lib) messages: 74285 nosy: daaku severity: normal status: open title: doctest.py should include method descriptors when looking inside a class __dict__ versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 02:17:30 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 04 Oct 2008 00:17:30 +0000 Subject: [issue4015] [patch] make installed scripts executable on windows In-Reply-To: <1222949528.24.0.767744507339.issue4015@psf.upfronthosting.co.za> Message-ID: <1223079450.67.0.381051114777.issue4015@psf.upfronthosting.co.za> Terry J. Reedy added the comment: As a Windows user, I am not sure I would want this. A run command associated with .py makes all .py files executable. From a command prompt, which I suspect most Windows users never use, typing 'python' is not a big deal. Adding .bat files should at least be optional. ---------- nosy: +tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 02:19:39 2008 From: report at bugs.python.org (STINNER Victor) Date: Sat, 04 Oct 2008 00:19:39 +0000 Subject: [issue3574] compile() cannot decode Latin-1 source encodings In-Reply-To: <1218933580.53.0.0614369271998.issue3574@psf.upfronthosting.co.za> Message-ID: <1223079579.69.0.656098034704.issue3574@psf.upfronthosting.co.za> STINNER Victor added the comment: Using py3k trunk + fix_latin.diff: - compile(b'# coding: latin-1\nu = "\xC7"\n', '', 'exec') doesn't fail - test_pep3120.py is ok - but execute a ISO-8859-1 script fails: see attached iso.py Original Python3: $ python iso.py 'Bonjour ma ch\xe8re amie' Patched Python3: $ python iso.py 'Bonjour ma ch\xc3\xa8re amie' ---------- nosy: +haypo Added file: http://bugs.python.org/file11697/iso.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 02:23:24 2008 From: report at bugs.python.org (STINNER Victor) Date: Sat, 04 Oct 2008 00:23:24 +0000 Subject: [issue3574] compile() cannot decode Latin-1 source encodings In-Reply-To: <1218933580.53.0.0614369271998.issue3574@psf.upfronthosting.co.za> Message-ID: <1223079804.37.0.815141770669.issue3574@psf.upfronthosting.co.za> STINNER Victor added the comment: See also Lib/test/test_shlex.py: trunk is ok, but with fix_latin.diff the test fails. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 02:39:07 2008 From: report at bugs.python.org (Mark Hammond) Date: Sat, 04 Oct 2008 00:39:07 +0000 Subject: [issue4001] 2to3 does relative import for modules not in a package. In-Reply-To: <1222780832.06.0.913683232517.issue4001@psf.upfronthosting.co.za> Message-ID: <1223080747.18.0.00410133822477.issue4001@psf.upfronthosting.co.za> Mark Hammond added the comment: I must be going crazy, but I can't see r66707 in the trunk, the py3k branch, or anywhere else in the svn tree. Can you please lend me a clue-stick? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 02:40:18 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 04 Oct 2008 00:40:18 +0000 Subject: [issue4001] 2to3 does relative import for modules not in a package. In-Reply-To: <1223080747.18.0.00410133822477.issue4001@psf.upfronthosting.co.za> Message-ID: <1afaf6160810031740i658cfab2t76b484a173854e2e@mail.gmail.com> Benjamin Peterson added the comment: On Fri, Oct 3, 2008 at 7:39 PM, Mark Hammond wrote: > > Mark Hammond added the comment: > > I must be going crazy, but I can't see r66707 in the trunk, the py3k > branch, or anywhere else in the svn tree. Can you please lend me a > clue-stick? You're not crazy; it's just hidden. :) It's in the 2to3 main line of development: /sandbox/trunk/2to3 I'll merge into the trunk and py3k soon. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 02:40:21 2008 From: report at bugs.python.org (STINNER Victor) Date: Sat, 04 Oct 2008 00:40:21 +0000 Subject: [issue3574] compile() cannot decode Latin-1 source encodings In-Reply-To: <1218933580.53.0.0614369271998.issue3574@psf.upfronthosting.co.za> Message-ID: <1223080821.14.0.847578753345.issue3574@psf.upfronthosting.co.za> STINNER Victor added the comment: It looks like the problem of fix_latin.diff is the decoding_state: it's set to STATE_NORMAL whereas current behaviour is to stay in state STATE_RAW. I wrote another patch which is a mix of case 1 (utf-8: just set tok->encoding) and case 2 (another charset: set tok->enc, tok->encoding and tok>decoding_state): a new case 3 which set enc, encoding but stay a the state STATE_RAW. I don't understand my patch, so review it (twice or more :-D). Using my patch: - compile(...) works - test_shlex.py works - test_pep3120.py - iso.py works Added file: http://bugs.python.org/file11698/tokenizer_iso-8859-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 02:55:56 2008 From: report at bugs.python.org (Mark Hammond) Date: Sat, 04 Oct 2008 00:55:56 +0000 Subject: [issue4038] py3k error in distutils file_copy exception handlers In-Reply-To: <1223081756.15.0.501609436342.issue4038@psf.upfronthosting.co.za> Message-ID: <1223081756.15.0.501609436342.issue4038@psf.upfronthosting.co.za> New submission from Mark Hammond : All the exception handlers i dustutils.file_utils._copy_file_contents() are of the form: |except os.error as e: | (errno, errstr) = e This fails to unpack the exception in py3k. I'm attaching a patch that uses exception attributes rather than unpacking e.args. FWIW, one of these exceptions in particular is likely to get hit on Windows if the destination file is in use, as Windows can't replace such files. This isn't a huge problem in practice as it only hits when an error occurs. ---------- components: Distutils files: file_util_exceptions.patch keywords: needs review, patch, patch messages: 74292 nosy: mhammond priority: normal severity: normal status: open title: py3k error in distutils file_copy exception handlers type: behavior versions: Python 3.0 Added file: http://bugs.python.org/file11699/file_util_exceptions.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 02:56:16 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 04 Oct 2008 00:56:16 +0000 Subject: [issue4027] wrong page index number in reference book of python documentation In-Reply-To: <1223026876.14.0.133212410345.issue4027@psf.upfronthosting.co.za> Message-ID: <1223081776.5.0.092479813934.issue4027@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Which version of the Ref Manual is this supposed to be? By Evince do you mean the Gnome document viewer? http://www.gnome.org/projects/evince/ If so, are you trying to view a .pdf downloaded from python.org? If so, did you try viewing it with acrobat or some other .pdf viewer? This would indicate whether the fault is with the Evince or Python's .pdf generation or index support. The screenshot shows two other major problems with the TOC. Data model should not be indented; it is not part of lexical analysis. Three chapters between Data Model and Compound Statements are missing. ---------- nosy: +tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 03:24:43 2008 From: report at bugs.python.org (Brett Cannon) Date: Sat, 04 Oct 2008 01:24:43 +0000 Subject: [issue3574] compile() cannot decode Latin-1 source encodings In-Reply-To: <1218933580.53.0.0614369271998.issue3574@psf.upfronthosting.co.za> Message-ID: <1223083483.94.0.482295604514.issue3574@psf.upfronthosting.co.za> Brett Cannon added the comment: But why does iso-8859-1 need to be treated as a special case? UTF-8 is special because it is the default encoding for source. But iso-8859-1 really shouldn't be special, IMO. Your patch does exactly what happens lower when set_readline() succeeds. So I want to know why set_readline() is not returning something for iso-8859-1 (which your patch seems to be suggesting). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 03:28:14 2008 From: report at bugs.python.org (Brett Cannon) Date: Sat, 04 Oct 2008 01:28:14 +0000 Subject: [issue3574] compile() cannot decode Latin-1 source encodings In-Reply-To: <1218933580.53.0.0614369271998.issue3574@psf.upfronthosting.co.za> Message-ID: <1223083694.99.0.671845279407.issue3574@psf.upfronthosting.co.za> Brett Cannon added the comment: Sorry, I mis-spoke: your patch, Victor, doesn't change the state to NORMAL. But my worry still stands; why does iso-8859-1 need to be special-cased? It suggests to me that some more fundamental needs to be dealt with instead of just patching around iso-8859-1. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 03:42:23 2008 From: report at bugs.python.org (STINNER Victor) Date: Sat, 04 Oct 2008 01:42:23 +0000 Subject: [issue3574] compile() cannot decode Latin-1 source encodings In-Reply-To: <1218933580.53.0.0614369271998.issue3574@psf.upfronthosting.co.za> Message-ID: <1223084543.07.0.547982544852.issue3574@psf.upfronthosting.co.za> STINNER Victor added the comment: @brett.cannon: I found it: ast.c used a hack for iso-8859-1! Since this hack introduces a bug (your compile(...) example), I prefer to remove it to simplify to code. The new patch just removes the hack in tokenizer.c and ast.c. It does also document encoding and enc attributes of tok_state in tokenizer.h. Using tokenizer_iso-8859-1-patch2.patch, all tests (test_pep3120.py, iso.py, test_shlex.py, etc.) are OK. Added file: http://bugs.python.org/file11700/tokenizer_iso-8859-1-patch2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 03:52:47 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 04 Oct 2008 01:52:47 +0000 Subject: [issue4029] Documentation displays incorrectly in iexplore. In-Reply-To: <1223043449.43.0.741779453712.issue4029@psf.upfronthosting.co.za> Message-ID: <1223085167.47.0.267647297077.issue4029@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 3. There is a typo to fix in the header for print on http://docs.python.org/library/functions.html end = 'n' should be end = '\n' About spaces: both IE7 and FF3 on my machine display the same line with real commas that appear moved a pixel to the left, instead of the comma-apostrophes in your picture. 1. Multiple underscores are supposed to form an underline. This is standard in any case and completely out of the Python's control. 2. IE6 is ancient*. Upgrade or get Firefox 3. Seriously. (If you don't like IE7, I sympathize. It drove me to FF.) * From what I have read, it is very buggy w/r/t the standards. IE7 displays the new docs just fine. The Windows installer includes the docs in Windows Help format and the Start Menu Pythonx.y directory has an entry for it. No browser needed. On both IE7 and FF3, the index bar is rock solid, not shrinking even with a text width of 1/4 inch. The only problem is that below about 6 inches, the title above, "Python v3.0c1 documentation ? The Python Standard Library ? wraps down into the index area. This is identical on both and unavoidable. ---------- nosy: +tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 04:14:54 2008 From: report at bugs.python.org (David W. Lambert) Date: Sat, 04 Oct 2008 02:14:54 +0000 Subject: [issue4029] Documentation displays incorrectly in iexplore. In-Reply-To: <1223043449.43.0.741779453712.issue4029@psf.upfronthosting.co.za> Message-ID: <1223086494.07.0.818845885188.issue4029@psf.upfronthosting.co.za> David W. Lambert added the comment: multiple underscores could be replaced by a gif. latex2html solves a bunch of font problems this way. I tried to dump IE but was warned it would break microsoft office, which I need for work. If you happen to know how to adjust the registry so that msoffice works with FF, I'd like to know, but it belongs not in the python bugs. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 04:23:43 2008 From: report at bugs.python.org (Brett Cannon) Date: Sat, 04 Oct 2008 02:23:43 +0000 Subject: [issue3574] compile() cannot decode Latin-1 source encodings In-Reply-To: <1218933580.53.0.0614369271998.issue3574@psf.upfronthosting.co.za> Message-ID: <1223087023.42.0.493782448375.issue3574@psf.upfronthosting.co.za> Brett Cannon added the comment: Thanks for finding that, Victor! I will do a patch review when I have a chance (it won't be until after the weekend). ---------- assignee: -> brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 04:36:39 2008 From: report at bugs.python.org (STINNER Victor) Date: Sat, 04 Oct 2008 02:36:39 +0000 Subject: [issue3574] compile() cannot decode Latin-1 source encodings In-Reply-To: <1218933580.53.0.0614369271998.issue3574@psf.upfronthosting.co.za> Message-ID: <1223087799.69.0.118133446467.issue3574@psf.upfronthosting.co.za> STINNER Victor added the comment: After reading tokenizer.c 1000 times, I finally used grep: $ grep -l -i 'iso.8859.1' $(find -name "*.c") ./Python/ast.c <~~~ WTF? ./Objects/unicodeobject.c ./Parser/tokenizer.c ./Modules/cjkcodecs/_codecs_iso2022.c ./Modules/expat/xmltok.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 05:24:01 2008 From: report at bugs.python.org (David W. Lambert) Date: Sat, 04 Oct 2008 03:24:01 +0000 Subject: [issue1040026] os.times() is bogus Message-ID: <1223090641.6.0.665275219096.issue1040026@psf.upfronthosting.co.za> David W. Lambert added the comment: I don't know what is "HZ", but if it's "hertz" then a division is necessary. total_clocks time = ----------------- clocks_per_second otherwise there's no hope. ---------- nosy: +LambertDW _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 09:58:53 2008 From: report at bugs.python.org (Ray Wang) Date: Sat, 04 Oct 2008 07:58:53 +0000 Subject: [issue4027] wrong page index number in reference book of python documentation In-Reply-To: <1223026876.14.0.133212410345.issue4027@psf.upfronthosting.co.za> Message-ID: <1223107133.7.0.482784892715.issue4027@psf.upfronthosting.co.za> Ray Wang added the comment: hi, sorry for didn't present very clear. > Which version of the Ref Manual is this supposed to be? the newest python documentations, Release 2.6, October 2, 2008 > By Evince do you mean the Gnome document viewer? > http://www.gnome.org/projects/evince/ Yes > If so, are you trying to view a .pdf downloaded from python.org? Yes, from the official site. download the docs from http://docs.python.org/ftp/python/doc/2.6/python-docs-pdf-a4.tar.bz2 > If so, did you try viewing it with acrobat or some other .pdf viewer? Yes, the same. I tested in acrobat. both has this problem. > This would indicate whether the fault is with the Evince or Python's > .pdf generation or index support. I guess the problem is index support. > The screenshot shows two other major problems with the TOC. > Data model should not be indented; it is not part of lexical analysis. > Three chapters between Data Model and Compound Statements are missing. exactly, the index may be messed up. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 10:00:54 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 04 Oct 2008 08:00:54 +0000 Subject: [issue4008] IDLE: checksyntax() doesn't support Unicode? In-Reply-To: <1223073433.74.0.13349664868.issue4008@psf.upfronthosting.co.za> Message-ID: <48E722B1.5030406@v.loewis.de> Martin v. L?wis added the comment: > @loewis: I guess that your locale is still UTF-8. To refute this claim, I reported that locale.getpreferredencoding reports 'ANSI_X3.4-1968'. I was following your instructions exactly (on Debian 4.0), and still, it opens successfully (when loaded through File/Open). Should I do something else with it to trigger the error, other than opening it? When opening iso.py, I get a pop window titled "Decoding error", with a message "Failed to Decode". This seems to be correct also. So I still can't reproduce the problem. I don't understand why you say that IDLE uses open(filename, 'r'). In IOBinding.IOBinding.loadfile, I see # open the file in binary mode so that we can handle # end-of-line convention ourselves. f = open(filename,'rb') _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 10:03:09 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 04 Oct 2008 08:03:09 +0000 Subject: [issue4035] Support bytes for os.exec*() In-Reply-To: <1223077104.22.0.62328245443.issue4035@psf.upfronthosting.co.za> Message-ID: <1223107389.52.0.737531966309.issue4035@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This is incorrect. On Windows, if the path contains characters with no representation in CP_ACP, encoding the path as bytes makes it invalid. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 10:16:46 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 04 Oct 2008 08:16:46 +0000 Subject: [issue4036] Support bytes for subprocess.Popen() In-Reply-To: <1223077515.41.0.60688229915.issue4036@psf.upfronthosting.co.za> Message-ID: <1223108206.07.0.782768194856.issue4036@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I think this should be deferred to 3.1. I'm not sure how much consistency across platforms is desirable, however, using strings is surely the better choice on Windows. I could sympathize with providing bytes support only on POSIX, but I'm sure others will disagree. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 10:21:30 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 04 Oct 2008 08:21:30 +0000 Subject: [issue4038] py3k error in distutils file_copy exception handlers In-Reply-To: <1223081756.15.0.501609436342.issue4038@psf.upfronthosting.co.za> Message-ID: <1223108490.89.0.187889401579.issue4038@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Looks fine to me, please apply. ---------- keywords: -needs review nosy: +loewis resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 10:39:10 2008 From: report at bugs.python.org (Winfried Plappert) Date: Sat, 04 Oct 2008 08:39:10 +0000 Subject: [issue4027] wrong page index number in reference book of python documentation In-Reply-To: <1223026876.14.0.133212410345.issue4027@psf.upfronthosting.co.za> Message-ID: <1223109550.96.0.367597037347.issue4027@psf.upfronthosting.co.za> Winfried Plappert added the comment: In addition to the same issue: library.pdf, downloaded from http://docs.python.org/ftp/python/doc/2.6/python-docs-pdf-a4.tar.bz2: Glossary points to chapter 1, "About these documents" chapter 2, History and License chapter 3, Copyright chapter 4. The Index points correctly to the "Symbol Index", but misplaces the "Module Index": the "Module Index" is a subchapter of the "Copyright". ---------- nosy: +wplappert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 11:19:21 2008 From: report at bugs.python.org (Winfried Plappert) Date: Sat, 04 Oct 2008 09:19:21 +0000 Subject: [issue4027] wrong page index number in reference book of python documentation In-Reply-To: <1223026876.14.0.133212410345.issue4027@psf.upfronthosting.co.za> Message-ID: <1223111961.24.0.109206865911.issue4027@psf.upfronthosting.co.za> Winfried Plappert added the comment: distutils.pdf shows the wrong behaviour quite nicely. See attached png file Added file: http://bugs.python.org/file11701/distutils.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 13:06:33 2008 From: report at bugs.python.org (peppergrower) Date: Sat, 04 Oct 2008 11:06:33 +0000 Subject: [issue4039] Add __enter__ and __exit__ methods to StringIO/cStringIO classes In-Reply-To: <1223118393.0.0.542108397821.issue4039@psf.upfronthosting.co.za> Message-ID: <1223118393.0.0.542108397821.issue4039@psf.upfronthosting.co.za> New submission from peppergrower : Currently, StringIO objects do not have __enter__ and __exit__ methods associated with them. As a result, the 'with' statement won't work properly on StringIO objects in a construction like the following, though they can otherwise be manipulated like files: with obj.open_file(...) as f: ... (I brought up this behavior first on comp.lang.python,* and the above example was borrowed from Hrvoje Niksic.) To allow StringIO objects to be used more interchangeably with actual file objects, could __enter__ and __exit__ methods be added? Thanks, peppergrower * http://groups.google.com/group/comp.lang.python/browse_thread/thread/6bdf65bce431e404/a5dc64f43147f4dd?lnk=gst ---------- components: Interpreter Core messages: 74309 nosy: peppergrower severity: normal status: open title: Add __enter__ and __exit__ methods to StringIO/cStringIO classes type: feature request versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 13:16:02 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 04 Oct 2008 11:16:02 +0000 Subject: [issue4039] Add __enter__ and __exit__ methods to StringIO/cStringIO classes In-Reply-To: <1223118393.0.0.542108397821.issue4039@psf.upfronthosting.co.za> Message-ID: <1223118962.8.0.465335127418.issue4039@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Certainly not for 2.5 or 2.6. Targetting this as 2.7. ---------- nosy: +loewis versions: +Python 2.7 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 13:16:28 2008 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 04 Oct 2008 11:16:28 +0000 Subject: [issue4015] [patch] make installed scripts executable on windows In-Reply-To: <1222949528.24.0.767744507339.issue4015@psf.upfronthosting.co.za> Message-ID: <1223118988.11.0.946909660715.issue4015@psf.upfronthosting.co.za> anatoly techtonik added the comment: 1. Associations still do not show Scripts/ among executable files in Run dialog. 2. Association works only for one version of properly installed Python. It won't work if Python is installed for different user, if extensions are not registered or if Python was copied from another machine. 3. Association will call only the latest Python when you may need to maintain several installations for your applications. 90% of Python software is still compiled only for Python 2.5 and when .py association is set for latest 2.6 users still need to have scripts located in 2.5 dist subdir to be executed with version 2.5 4. Some *nix-developed applications create Python Scripts/ without any extension at all Created .bat files guarantee that scripts will be executed with the version of Python they were installed for. In my opinion this options should be turned on by default even if made optional to allow users forget about platform differences. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 13:24:21 2008 From: report at bugs.python.org (STINNER Victor) Date: Sat, 04 Oct 2008 11:24:21 +0000 Subject: [issue4008] IDLE: checksyntax() doesn't support Unicode? In-Reply-To: <1222875475.18.0.22602254781.issue4008@psf.upfronthosting.co.za> Message-ID: <1223119461.35.0.379158883438.issue4008@psf.upfronthosting.co.za> STINNER Victor added the comment: IDLE opens the script many than once. There are two cases: (1) first open when IDLE read the file content to display it (2) second open on pressing F5 key (Run Module) to check the syntax (1) uses IOBinding and fails to open ISO-8859-1 file with UTF-8 locale. (2) uses ScriptBinding and fails to open UTF-8 file with ASCII locale. About the initial problem (idle-3.0rc1-quits-when-run.py), yes, I forgot to say that you have to run the module, sorry :-/ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 13:31:28 2008 From: report at bugs.python.org (STINNER Victor) Date: Sat, 04 Oct 2008 11:31:28 +0000 Subject: [issue4035] Support bytes for os.exec*() In-Reply-To: <1223077104.22.0.62328245443.issue4035@psf.upfronthosting.co.za> Message-ID: <1223119888.23.0.234638218956.issue4035@psf.upfronthosting.co.za> STINNER Victor added the comment: The fix can be changed to be specific to POSIX system: + if name == 'posix' \ + and isinstance(file, bytes): + encoding = sys.getfilesystemencoding() + PATH = (bytes(dir, encoding) for dir in PATH) My example was incorrect. The good example is: python -c "import os; os.execvp('pwd', ['pwd']) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 17:21:29 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 04 Oct 2008 15:21:29 +0000 Subject: [issue4040] ignored exceptions in generators (regression?) In-Reply-To: <1223133689.63.0.365168051222.issue4040@psf.upfronthosting.co.za> Message-ID: <1223133689.63.0.365168051222.issue4040@psf.upfronthosting.co.za> New submission from Benjamin Peterson : Given this code: def f(): for i in f(): yield i for i in f(): print i 2.6 gives: Exception RuntimeError: 'maximum recursion depth exceeded in __subclasscheck__' in ignored Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in ignored Traceback (most recent call last): File "", line 1, in ... File "", line 2, in f RuntimeError: maximum recursion depth exceeded 2.5 and 3.0 do not have this problem. ---------- messages: 74314 nosy: benjamin.peterson priority: high severity: normal status: open title: ignored exceptions in generators (regression?) versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 17:21:42 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 04 Oct 2008 15:21:42 +0000 Subject: [issue4040] ignored exceptions in generators (regression?) In-Reply-To: <1223133689.63.0.365168051222.issue4040@psf.upfronthosting.co.za> Message-ID: <1223133702.38.0.181788825182.issue4040@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- components: +Interpreter Core type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 17:49:27 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 04 Oct 2008 15:49:27 +0000 Subject: [issue4039] Add __enter__ and __exit__ methods to StringIO/cStringIO classes In-Reply-To: <1223118393.0.0.542108397821.issue4039@psf.upfronthosting.co.za> Message-ID: <1223135367.84.0.00268865192525.issue4039@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This is a duplicate of #1286. ---------- nosy: +benjamin.peterson resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 17:49:31 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 04 Oct 2008 15:49:31 +0000 Subject: [issue1286] fileinput, StringIO, and cStringIO do not support the with protocol In-Reply-To: <1192538556.96.0.72107595061.issue1286@psf.upfronthosting.co.za> Message-ID: <1223135371.38.0.871866509936.issue1286@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 20:20:31 2008 From: report at bugs.python.org (Winfried Plappert) Date: Sat, 04 Oct 2008 18:20:31 +0000 Subject: [issue4041] reference to rexec in __import__ In-Reply-To: <1223144431.92.0.531332933885.issue4041@psf.upfronthosting.co.za> Message-ID: <1223144431.92.0.531332933885.issue4041@psf.upfronthosting.co.za> New submission from Winfried Plappert : on the web page http://docs.python.org/library/functions.html, __import__ references rexec why and how one could use __import__. On the rexec page (http://docs.python.org/library/rexec.html) it says: "Deprecated since version 2.6". I think one should not really refer to deprecated functions in the current documentation. ---------- assignee: georg.brandl components: Documentation messages: 74316 nosy: georg.brandl, wplappert severity: normal status: open title: reference to rexec in __import__ versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 20:27:07 2008 From: report at bugs.python.org (Georg Brandl) Date: Sat, 04 Oct 2008 18:27:07 +0000 Subject: [issue4041] reference to rexec in __import__ In-Reply-To: <1223144431.92.0.531332933885.issue4041@psf.upfronthosting.co.za> Message-ID: <1223144827.38.0.0838138567127.issue4041@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r66793. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 20:33:32 2008 From: report at bugs.python.org (Georg Brandl) Date: Sat, 04 Oct 2008 18:33:32 +0000 Subject: [issue4000] Additional 2to3 documentation updates In-Reply-To: <1222748434.01.0.683191866382.issue4000@psf.upfronthosting.co.za> Message-ID: <1223145212.58.0.716952077265.issue4000@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed all of them in r66794. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 20:37:28 2008 From: report at bugs.python.org (Georg Brandl) Date: Sat, 04 Oct 2008 18:37:28 +0000 Subject: [issue4029] Documentation displays incorrectly in iexplore. In-Reply-To: <1223043449.43.0.741779453712.issue4029@psf.upfronthosting.co.za> Message-ID: <1223145448.73.0.544004394786.issue4029@psf.upfronthosting.co.za> Georg Brandl added the comment: I concur with Terry on all counts. Specifically: 1. How the underscores are displayed depends on the font you've selected as your monospace font. Replacing them with an image is ugly and will never look remotely nice. 2. I will fix the stylesheet if you can give me an example CSS that will have the same effect on modern browsers, and at the same time give a good appearance on IE6. 3. Thanks for noting, fixed the typo in r66795. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 4 22:28:37 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 04 Oct 2008 20:28:37 +0000 Subject: [issue3661] sys.call_tracing segfaults In-Reply-To: <1219606145.44.0.504923400807.issue3661@psf.upfronthosting.co.za> Message-ID: <1223152117.77.0.225652315449.issue3661@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Attaching patch. ---------- keywords: +needs review, patch Added file: http://bugs.python.org/file11702/fix_call_tracing_segfault.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 00:07:53 2008 From: report at bugs.python.org (Robert Yodlowski) Date: Sat, 04 Oct 2008 22:07:53 +0000 Subject: [issue4042] IDLE won't start in 2.6 final. A known fix was overlooked? In-Reply-To: <1223158073.65.0.65937344153.issue4042@psf.upfronthosting.co.za> Message-ID: <1223158073.65.0.65937344153.issue4042@psf.upfronthosting.co.za> New submission from Robert Yodlowski : I just installed the 2.6 final release on my fully updated Win XP system. When I tried to run IDLE I got the same... "IDLE's subprocess didn't make connection. Either IDLE can't start subprocess or personal firewall is blocking." ...fatal error message I got when I installed the last release candidate version on Sept 22, 2008. I put in a bug report at that time "[issue3943] IDLE won't start in 3.0rc1 "Subprocess didn't make connection"" but it was closed since the fix to LIB/idlelib/run.py (on line 76) in #3905 message 73496 by Georg Brandl fixes this problem. I believe that this known fix was overlooked when 2.6 final was released this week. ...Bob ---------- components: IDLE messages: 74321 nosy: rbtyod severity: normal status: open title: IDLE won't start in 2.6 final. A known fix was overlooked? type: crash versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 00:27:23 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 04 Oct 2008 22:27:23 +0000 Subject: [issue4042] IDLE won't start in 2.6 final. A known fix was overlooked? In-Reply-To: <1223158073.65.0.65937344153.issue4042@psf.upfronthosting.co.za> Message-ID: <1223159243.18.0.594675337916.issue4042@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: IDLE 2.6 final works for me. (I believe that #3905 did not apply to 2.6) Can you please open a command prompt, and start IDLE from there? If you installed python in the default location, the command is: C:\python26\python C:\python26\Lib\idlelib\idle You should see interesting error messages there. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 00:28:29 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 04 Oct 2008 22:28:29 +0000 Subject: [issue4042] IDLE won't start in 2.6 final. A known fix was overlooked? In-Reply-To: <1223158073.65.0.65937344153.issue4042@psf.upfronthosting.co.za> Message-ID: <1223159309.98.0.990405982783.issue4042@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Sorry, copy/paste error. The correct command is of course: C:\python26\python C:\python26\Lib\idlelib\idle.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 00:30:09 2008 From: report at bugs.python.org (Craig Holmquist) Date: Sat, 04 Oct 2008 22:30:09 +0000 Subject: [issue4043] Attempting to import deprecated modules in IDLE raises TypeError In-Reply-To: <1223159409.57.0.545310219567.issue4043@psf.upfronthosting.co.za> Message-ID: <1223159409.57.0.545310219567.issue4043@psf.upfronthosting.co.za> New submission from Craig Holmquist : In Python 2.6, attempting to import depecated modules in IDLE raises a TypeError exception. I verified this with sets, mimify, and MimeWriter. Here's the output for sets: >>> import sets Traceback (most recent call last): File "", line 1, in import sets File "C:\Python26\Lib\sets.py", line 85, in stacklevel=2) File "C:\Python26\Lib\warnings.py", line 29, in _show_warning file.write(formatwarning(message, category, filename, lineno, line)) TypeError: idle_formatwarning_subproc() takes exactly 4 arguments (5 given) The other modules give a similar trace. Normally, I wouldn't consider this a serious issue, but there are some major packages out there that still use deprecated modules such as these. For example, MySQLdb 1.2.2 and SQLAlchemy 4.7p1 import the sets module so they can't be used at all in IDLE. ---------- components: IDLE messages: 74324 nosy: craigh severity: normal status: open title: Attempting to import deprecated modules in IDLE raises TypeError type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 00:32:12 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 04 Oct 2008 22:32:12 +0000 Subject: [issue4042] IDLE won't start in 2.6 final. A known fix was overlooked? In-Reply-To: <1223158073.65.0.65937344153.issue4042@psf.upfronthosting.co.za> Message-ID: <1223159532.15.0.638059487925.issue4042@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 00:45:13 2008 From: report at bugs.python.org (Craig Holmquist) Date: Sat, 04 Oct 2008 22:45:13 +0000 Subject: [issue4043] Warnings in IDLE raise TypeError (such as attempting to import deprecated modules) In-Reply-To: <1223159409.57.0.545310219567.issue4043@psf.upfronthosting.co.za> Message-ID: <1223160313.91.0.306027454753.issue4043@psf.upfronthosting.co.za> Craig Holmquist added the comment: Actually, it looks like ANY warning will raise this error in IDLE. For example: >>> import warnings >>> warnings.warn('blah blah') Traceback (most recent call last): File "", line 1, in warnings.warn('blah blah') File "C:\Python26\Lib\warnings.py", line 29, in _show_warning file.write(formatwarning(message, category, filename, lineno, line)) TypeError: idle_formatwarning_subproc() takes exactly 4 arguments (5 given) ---------- title: Attempting to import deprecated modules in IDLE raises TypeError -> Warnings in IDLE raise TypeError (such as attempting to import deprecated modules) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 00:53:32 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 04 Oct 2008 22:53:32 +0000 Subject: [issue4034] traceback attribute error In-Reply-To: <1223076719.45.0.395696576555.issue4034@psf.upfronthosting.co.za> Message-ID: <1223160812.83.0.69478334322.issue4034@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Here's a patch. It looks like traceback just needs to use a struct sequence instead of providing tp_getattr its self. ---------- keywords: +needs review, patch nosy: +benjamin.peterson Added file: http://bugs.python.org/file11703/use_struct_member.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 00:54:16 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 04 Oct 2008 22:54:16 +0000 Subject: [issue3664] Pickler.dump from a badly initialized Pickler segfaults In-Reply-To: <1219609595.23.0.140986466622.issue3664@psf.upfronthosting.co.za> Message-ID: <1223160856.82.0.0533929084624.issue3664@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Here's the fix. The added check in Pickler_dump should prevent any segfaults due to __init__() errors. I also added the check proposed by Christian as a safe-guard in case a core developer adds a new method that doesn't check if the object was properly initialized. Added file: http://bugs.python.org/file11704/_pickle.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 01:14:45 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 04 Oct 2008 23:14:45 +0000 Subject: [issue3675] Python 2.6 can't read sets pickled with Python 3.0 In-Reply-To: <1219666544.55.0.587307324969.issue3675@psf.upfronthosting.co.za> Message-ID: <1223162085.48.0.832745269872.issue3675@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: I agree with Antoine, protocols <= 2 should remain compatible with Python 2.x or be deprecated. Keeping compatibility will require a hack, in addition to the proposed patch, in Pickler.save_global to map Python 3's module names to the ones of Python 2. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 01:30:07 2008 From: report at bugs.python.org (Greg Hazel) Date: Sat, 04 Oct 2008 23:30:07 +0000 Subject: [issue1565525] gc allowing tracebacks to eat up memory Message-ID: <1223163007.73.0.21848688563.issue1565525@psf.upfronthosting.co.za> Greg Hazel added the comment: Or, being able to remove the references to the locals and globals from the traceback would be sufficient. Something like this: try: raise Exception() except: t, v, tb = sys.exc_info() tbi = tb while tbi: tbi.tb_frame.f_locals = None tbi.tb_frame.f_globals = None tbi = tbi.tb_next # now "tb" is cleaned of references _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 01:31:43 2008 From: report at bugs.python.org (Greg Hazel) Date: Sat, 04 Oct 2008 23:31:43 +0000 Subject: [issue4034] traceback attribute error In-Reply-To: <1223076719.45.0.395696576555.issue4034@psf.upfronthosting.co.za> Message-ID: <1223163103.75.0.307806749818.issue4034@psf.upfronthosting.co.za> Greg Hazel added the comment: There seem to be some other exception type and string inconsistencies, but they are not new to Python 2.6 >>> tb.tb_frame = None Traceback (most recent call last): File "", line 1, in TypeError: 'traceback' object has only read-only attributes (assign to .tb_frame) >>> tb.tb_frame.f_locals = None Traceback (most recent call last): File "", line 1, in AttributeError: attribute 'f_locals' of 'frame' objects is not writable >>> tb.tb_frame.f_globals = None Traceback (most recent call last): File "", line 1, in TypeError: readonly attribute >>> dict.clear = "foo" Traceback (most recent call last): File "", line 1, in TypeError: can't set attributes of built-in/extension type 'dict' Should it be an AttributeError or TypeError? Should it be "read-only", readonly", "not writable" or "can't set"? Btw, here's the other ticket for the feature request: http://bugs.python.org/issue1565525 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 01:50:01 2008 From: report at bugs.python.org (Robert Yodlowski) Date: Sat, 04 Oct 2008 23:50:01 +0000 Subject: [issue4042] IDLE won't start in 2.6 final. A known fix was overlooked? In-Reply-To: <1223158073.65.0.65937344153.issue4042@psf.upfronthosting.co.za> Message-ID: <1223164201.35.0.889126436022.issue4042@psf.upfronthosting.co.za> Robert Yodlowski added the comment: Amaury, when I tried to run IDLE from the command line as you suggested I got: C:\>C:\python26\Lib\idlelib\idle.py IDLE Subprocess: socket error: An attempt was made to access a socket in a way forbidden by its access permissions, retrying.... IDLE Subprocess: socket error: An attempt was made to access a socket in a way forbidden by its access permissions, retrying.... IDLE Subprocess: socket error: An attempt was made to access a socket in a way forbidden by its access permissions, retrying.... IDLE Subprocess: Connection to IDLE GUI failed, exiting. ...followed by 2 error windows: Socket Error:An attempt was made to access a socket in a way forbidden by its access permissions and... IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection ...BUT when I try to run IDLE from the "all programs" menu it runs just fine - which it did NOT when I created today's bug report. To try to reproduce the original behavior, I first put back the unfixed version of run.py and IDLE STILL RAN FINE from the program menu I was VERY confused at this point and I completely uninstalled Python2.6 and reinstalled it from the same .msi installer I used before. After I reinstalled 2.6, IDLE again ran fine from the programs menu WITHOUT making the fix in run.py but NOT from the command line - producing the same error messages as at the top of this entry. Right now I am so confused I don't know what to do. I cannot reproduce the original problem I reported in this bug report and IDLE runs fine from the menu but not from the command line. It know that IDLE would not run from the programs menu until I changed run.py but once I did that, removing the fix seems to make no difference. (I've been careful to remove the run.pyc file each time.) I believe that the behavior I saw today with 2.6 was the same as I saw on Sept 22 with 3.0 when I submitted #3943 - and with the same confusing property where the fix is needed to make IDLE run but removing it makes no difference. I hope this makes sense to you. It doesn't to me. ...Bob _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 03:07:14 2008 From: report at bugs.python.org (A.M. Kuchling) Date: Sun, 05 Oct 2008 01:07:14 +0000 Subject: [issue1415508] optparse enable_interspersed_args disable_interspersed_args Message-ID: <1223168834.13.0.861043021563.issue1415508@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Docstring portion of the patch applied to the trunk in rev. 66804; the change will appear in Python 2.6.1 and 2.7. Thanks! ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 03:38:32 2008 From: report at bugs.python.org (Craig Holmquist) Date: Sun, 05 Oct 2008 01:38:32 +0000 Subject: [issue4043] Warnings in IDLE raise TypeError (such as attempting to import deprecated modules) In-Reply-To: <1223159409.57.0.545310219567.issue4043@psf.upfronthosting.co.za> Message-ID: <1223170712.08.0.703542927944.issue4043@psf.upfronthosting.co.za> Craig Holmquist added the comment: I should have checked this more carefully, but apparently you can still use the imported module after the exception. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 04:38:30 2008 From: report at bugs.python.org (Craig Holmquist) Date: Sun, 05 Oct 2008 02:38:30 +0000 Subject: [issue4043] Warnings in IDLE raise TypeError (such as attempting to import deprecated modules) In-Reply-To: <1223159409.57.0.545310219567.issue4043@psf.upfronthosting.co.za> Message-ID: <1223174310.97.0.575028140659.issue4043@psf.upfronthosting.co.za> Craig Holmquist added the comment: Okay, I think I've got it now: 1. If you import sets, it raises TypeError. However, if you import it a second time, it seems to work properly. 2. Trying to import a module that relies on the deprecated module (ie, sqlalchemy) fails no matter how many times it's imported. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 06:55:53 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 05 Oct 2008 04:55:53 +0000 Subject: [issue4042] IDLE won't start in 2.6 final. A known fix was overlooked? In-Reply-To: <1223164201.35.0.889126436022.issue4042@psf.upfronthosting.co.za> Message-ID: <48E848D4.1090305@v.loewis.de> Martin v. L?wis added the comment: > Amaury, when I tried to run IDLE from the command line as you suggested > I got: > > C:\>C:\python26\Lib\idlelib\idle.py This is not what Amaury suggested. He suggested that you put the path to python.exe before the path of idle.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 10:42:56 2008 From: report at bugs.python.org (Matthias Klose) Date: Sun, 05 Oct 2008 08:42:56 +0000 Subject: [issue1322] platform.dist() has unpredictable result under Linux In-Reply-To: <1193246464.1.0.269134020057.issue1322@psf.upfronthosting.co.za> Message-ID: <1223196176.68.0.423974261106.issue1322@psf.upfronthosting.co.za> Matthias Klose added the comment: /etc/lsb-release is not yet specified by the lsb. See https://lists.linux-foundation.org/pipermail/lsb-discuss/2008-March/004842.html https://lists.linux-foundation.org/pipermail/lsb-discuss/2008-March/004843.html https://lists.linux-foundation.org/pipermail/lsb-discuss/2008-March/004845.html ---------- nosy: +doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 11:01:50 2008 From: report at bugs.python.org (Mark Hammond) Date: Sun, 05 Oct 2008 09:01:50 +0000 Subject: [issue4038] py3k error in distutils file_copy exception handlers In-Reply-To: <1223081756.15.0.501609436342.issue4038@psf.upfronthosting.co.za> Message-ID: <1223197310.08.0.902228517017.issue4038@psf.upfronthosting.co.za> Mark Hammond added the comment: r66806 on the py3k branch. ---------- assignee: -> mhammond resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 11:25:54 2008 From: report at bugs.python.org (Winfried Plappert) Date: Sun, 05 Oct 2008 09:25:54 +0000 Subject: [issue3909] Building PDF documentation from tex files In-Reply-To: <1221842807.23.0.726390591277.issue3909@psf.upfronthosting.co.za> Message-ID: <1223198754.37.0.0311353253325.issue3909@psf.upfronthosting.co.za> Winfried Plappert added the comment: I have rerun the making of the PDFs with the make command. Everything looks fine now. I did not realize that pdflatex is called multiple times during the process of PDF creation. %.pdf: %.tex pdflatex '$<' pdflatex '$<' pdflatex '$<' -makeindex -s python.ist '$(basename $<).idx' -makeindex -s python.ist '$(basename mod$<).idx' pdflatex '$<' pdflatex '$<' Sorry, my fault and responsibility. Thanks, Winfried _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 12:11:09 2008 From: report at bugs.python.org (Miki Tebeka) Date: Sun, 05 Oct 2008 10:11:09 +0000 Subject: [issue4017] IDLE 2.6 broken on OSX (Leopard) In-Reply-To: <1222960590.08.0.635891151551.issue4017@psf.upfronthosting.co.za> Message-ID: <1223201469.64.0.74259154689.issue4017@psf.upfronthosting.co.za> Changes by Miki Tebeka : ---------- nosy: +tebeka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 14:19:42 2008 From: report at bugs.python.org (Martina Oefelein) Date: Sun, 05 Oct 2008 12:19:42 +0000 Subject: [issue4044] test_output_textcalendar fails on non-englisch locale In-Reply-To: <1223209182.04.0.559787210329.issue4044@psf.upfronthosting.co.za> Message-ID: <1223209182.04.0.559787210329.issue4044@psf.upfronthosting.co.za> New submission from Martina Oefelein : test_output_textcalendar (in test_calendar.py) fails if the environment variable LANG is set to a non-english locale. Python 3.0rc1 on MacOSX 10.5.5 $ LANG=de_DE.UTF-8 ./python.exe -E -bb ./Lib/test/regrtest.py -l test_calendar test_calendar test test_calendar failed -- errors occurred; run in verbose mode for details 1 test failed: test_calendar $ LANG=en_US.UTF-8 ./python.exe -E -bb ./Lib/test/regrtest.py -l test_calendar test_calendar 1 test OK. ---------- components: Tests messages: 74339 nosy: oefe severity: normal status: open title: test_output_textcalendar fails on non-englisch locale type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 14:33:39 2008 From: report at bugs.python.org (Martina Oefelein) Date: Sun, 05 Oct 2008 12:33:39 +0000 Subject: [issue4045] test_mboxmmdf_to_maildir fails on non-englisch locale In-Reply-To: <1223210018.98.0.954404111319.issue4045@psf.upfronthosting.co.za> Message-ID: <1223210018.98.0.954404111319.issue4045@psf.upfronthosting.co.za> New submission from Martina Oefelein : test_mboxmmdf_to_maildir (in test_mailbox.py) fails if the environment variable LANG is set to a non-english locale. Python 3.0rc1 on MacOSX 10.5.5 Majestix:Python-3.0rc1 martina$ LANG=en_US.UTF-8 ./python.exe -E -bb ./Lib/test/regrtest.py -l test_mailbox test_mailbox 1 test OK. Majestix:Python-3.0rc1 martina$ LANG=de_DE.UTF-8 ./python.exe -E -bb ./Lib/test/regrtest.py -l test_mailbox test_mailbox test test_mailbox failed -- Traceback (most recent call last): File "/Users/martina/Downloads/Python- 3.0rc1/Lib/test/test_mailbox.py", line 1389, in test_mboxmmdf_to_maildir self.assert_(msg.get_date() == 0.0, msg.get_date()) AssertionError: 1223209655.11 ---------- components: Tests messages: 74340 nosy: oefe severity: normal status: open title: test_mboxmmdf_to_maildir fails on non-englisch locale versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 14:33:50 2008 From: report at bugs.python.org (Martina Oefelein) Date: Sun, 05 Oct 2008 12:33:50 +0000 Subject: [issue4045] test_mboxmmdf_to_maildir fails on non-englisch locale In-Reply-To: <1223210018.98.0.954404111319.issue4045@psf.upfronthosting.co.za> Message-ID: <1223210030.87.0.989451731067.issue4045@psf.upfronthosting.co.za> Changes by Martina Oefelein : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 14:41:05 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 05 Oct 2008 12:41:05 +0000 Subject: [issue4017] IDLE 2.6 broken on OSX (Leopard) In-Reply-To: <1222960590.08.0.635891151551.issue4017@psf.upfronthosting.co.za> Message-ID: <1223210465.23.0.590257228086.issue4017@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I suspect this is my fault for linking the libraries incorrectly as I built the installer. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 14:46:49 2008 From: report at bugs.python.org (Miki Tebeka) Date: Sun, 05 Oct 2008 12:46:49 +0000 Subject: [issue4017] IDLE 2.6 broken on OSX (Leopard) In-Reply-To: <1222960590.08.0.635891151551.issue4017@psf.upfronthosting.co.za> Message-ID: <1223210809.21.0.183280205475.issue4017@psf.upfronthosting.co.za> Miki Tebeka added the comment: FWIW, installing MacPorts tcl and tk (8.5.4) didn't help _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 14:47:17 2008 From: report at bugs.python.org (Martina Oefelein) Date: Sun, 05 Oct 2008 12:47:17 +0000 Subject: [issue4046] test_formatdate_usegmt fails on non-englisch locale In-Reply-To: <1223210837.43.0.59197631848.issue4046@psf.upfronthosting.co.za> Message-ID: <1223210837.43.0.59197631848.issue4046@psf.upfronthosting.co.za> New submission from Martina Oefelein : test_formatdate_usegmt (in test_email.py) fails if the environment variable LANG is set to a non-english locale. Python 3.0rc1 on MacOSX 10.5.5 $ LANG=en_US.UTF-8 ./python.exe -E -bb ./Lib/test/regrtest.py -l test_email test_email 1 test OK. $ LANG=de_DE.UTF-8 ./python.exe -E -bb ./Lib/test/regrtest.py -l test_email test_email test test_email failed -- Traceback (most recent call last): File "/Users/martina/Downloads/Python- 3.0rc1/Lib/email/test/test_email.py", line 2139, in test_formatdate_usegmt time.strftime('%a, %d %b %Y %H:%M:%S -0000', time.gmtime(now))) AssertionError: 'Sun, 05 Oct 2008 12:44:04 -0000' != 'So, 05 Okt 2008 12:44:04 -0000' 1 test failed: test_email ---------- components: Tests messages: 74343 nosy: oefe severity: normal status: open title: test_formatdate_usegmt fails on non-englisch locale type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 15:15:46 2008 From: report at bugs.python.org (Martina Oefelein) Date: Sun, 05 Oct 2008 13:15:46 +0000 Subject: [issue4047] test_run_abort triggers CrashReporter on MacOS X In-Reply-To: <1223212546.3.0.400600313868.issue4047@psf.upfronthosting.co.za> Message-ID: <1223212546.3.0.400600313868.issue4047@psf.upfronthosting.co.za> New submission from Martina Oefelein : test_run_abort (in test_subprocess.py) causes the MaxOS X crash reporter dialog to pop up (at least when running from an interactive session). This might be unavoidable (the crash is part of the test); however, to avoid confusion, it should maybe pointed out in the README that this is expected behavior -- or skip the test by default? Python 3.0rc1 on MacOSX 10.5.5 ---------- components: Tests messages: 74344 nosy: oefe severity: normal status: open title: test_run_abort triggers CrashReporter on MacOS X type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 16:20:11 2008 From: report at bugs.python.org (Stijn van Drongelen) Date: Sun, 05 Oct 2008 14:20:11 +0000 Subject: [issue1610] test_socket.py fails In-Reply-To: <1197541033.39.0.809033429265.issue1610@psf.upfronthosting.co.za> Message-ID: <1223216411.72.0.869777705476.issue1610@psf.upfronthosting.co.za> Stijn van Drongelen added the comment: Reproducable with Python3.0rc1 on Debian lenny, only when nscd is running. Not a Python bug. ---------- nosy: +Tinctorius versions: +Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 18:40:51 2008 From: report at bugs.python.org (Roumen Petrov) Date: Sun, 05 Oct 2008 16:40:51 +0000 Subject: [issue4010] configure options don't trickle down to distutils In-Reply-To: <1222879433.22.0.765704464081.issue4010@psf.upfronthosting.co.za> Message-ID: <1223224851.44.0.0184841130311.issue4010@psf.upfronthosting.co.za> Roumen Petrov added the comment: Lets see method customize_compiler(from sysconfig.py) The method search variables 'CPP', 'LDFLAGS' and 'CPPFLAGS' only in environment. The variable CPP is not a Makefile variable. 'LDFLAGS' and 'CPPFLAGS' are makefile variables(macros). Usually makefile will export to commands a macro only if exists environment variable with same name. So to pass to distutils LDFLAGS is enough to to run as example "LDFLAGS=fake make". Issue3678 is about LDFLAGS for python shared library and now command start with $(LDSHARED) $(LDFLAGS) ... If we modify Makefile to use "...LDFLAGS=$(LDFLAGS) ... setup.py" customize_compiler will append LDFLAGS to LDSHARED. So this issue is about to use LDFLAGS for python modules. Another point is that configure script append LDFLAGS to LDSHARED only on certain platforms (all BSD based) and ignore all others. What is preferred patch: - a simple patch that just export LDFLAGS for setup.py; - a patch that export LDFLAGS for all python programs, i.e. in Makefile to append to RUNSHARED LDFLAGS=@LDFLAGS@ ; - a patch that append LDFLAGS to LDSHARED in configure for all platforms and remove use of LDFLAGS in Makefile and setup.py ? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 18:47:01 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 05 Oct 2008 16:47:01 +0000 Subject: [issue3288] float.as_integer_ratio method is not documented In-Reply-To: <1215254478.03.0.190528446429.issue3288@psf.upfronthosting.co.za> Message-ID: <1223225221.42.0.343587212276.issue3288@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Committed for Py3.0 in r66807 . ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 19:02:42 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 05 Oct 2008 17:02:42 +0000 Subject: [issue3935] bisect insort C implementation ignores methods on list subclasses In-Reply-To: <1222109684.93.0.997656752515.issue3935@psf.upfronthosting.co.za> Message-ID: <1223226162.42.0.409178872391.issue3935@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Don't think this is too late for Py3.0. ---------- assignee: rhettinger -> georg.brandl nosy: +georg.brandl resolution: -> accepted versions: +Python 2.7, Python 3.0 -Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 19:15:53 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 05 Oct 2008 17:15:53 +0000 Subject: [issue3724] math.log(x, 10) gives different result than math.log10(x) In-Reply-To: <1220013140.94.0.0541204512227.issue3724@psf.upfronthosting.co.za> Message-ID: <1223226953.53.0.103689450565.issue3724@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Mark, is some of the inaccuracy due to double rounding? Could we make the two argument form more accurate by allowing the compiler to generate code that uses full internal precision, log(n)/log(d), instead of prematurely forcing the intermediate results to a PyFloat? ---------- assignee: rhettinger -> marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 19:58:13 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 05 Oct 2008 17:58:13 +0000 Subject: [issue3412] Fraction and Decimal in the Tutorial In-Reply-To: <1216416969.62.0.493735551433.issue3412@psf.upfronthosting.co.za> Message-ID: <1223229493.54.0.873582804147.issue3412@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Added note in r66808. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 20:53:39 2008 From: report at bugs.python.org (Robert Yodlowski) Date: Sun, 05 Oct 2008 18:53:39 +0000 Subject: [issue4042] IDLE won't start in 2.6 final. A known fix was overlooked? In-Reply-To: <1223158073.65.0.65937344153.issue4042@psf.upfronthosting.co.za> Message-ID: <1223232819.95.0.69081672367.issue4042@psf.upfronthosting.co.za> Robert Yodlowski added the comment: Problem Solved. It was my firewall. When I ran IDLE from the command line (the RIGHT way this time), in addition to the error messages and popup windows that I got before, I also got a popup window from my firewall asking if I was willing to grant Python access permission. I granted permission and, when I tried starting IDLE again, everything worked just fine. Thank you, Amaury and Martin, for your help and your patience with me. ...Bob _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 21:16:25 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 05 Oct 2008 19:16:25 +0000 Subject: [issue4042] IDLE won't start in 2.6 final. A known fix was overlooked? In-Reply-To: <1223158073.65.0.65937344153.issue4042@psf.upfronthosting.co.za> Message-ID: <1223234185.64.0.106849193181.issue4042@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Closing as "works for me", then. ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 5 22:42:24 2008 From: report at bugs.python.org (A.M. Kuchling) Date: Sun, 05 Oct 2008 20:42:24 +0000 Subject: [issue3288] float.as_integer_ratio method is not documented In-Reply-To: <1215254478.03.0.190528446429.issue3288@psf.upfronthosting.co.za> Message-ID: <1223239344.67.0.671488047814.issue3288@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Should I backport the tutorial patch to the 2.6 tutorial? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 00:15:20 2008 From: report at bugs.python.org (David Binger) Date: Sun, 05 Oct 2008 22:15:20 +0000 Subject: [issue4048] parsermodule won't validate relative imports In-Reply-To: <1223244920.43.0.0525505327115.issue4048@psf.upfronthosting.co.za> Message-ID: <1223244920.43.0.0525505327115.issue4048@psf.upfronthosting.co.za> New submission from David Binger : The parser module validates st instances that it builds from list or tuple structures. This validation fails for parse trees that include relative imports because it fails to correctly count the dots that immediately follow the "from" token. Here is a test and a patch. This bug probably extends back to all Python 2 versions that support relative import, but I have not checked it. Fixing this has immediate value to me because the QPY package depends on the parser module to convert list structures into st instances. (In the long run, I wonder if the verification part of the sequence2st() function could be made optional or dropped, since the current pattern requires to parser module to be updated every time the language grammer changes.) ---------- components: Library (Lib) files: parserdot.diff keywords: patch messages: 74354 nosy: dbinger severity: normal status: open title: parsermodule won't validate relative imports type: behavior versions: Python 3.0 Added file: http://bugs.python.org/file11705/parserdot.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 01:50:12 2008 From: report at bugs.python.org (Malte Helmert) Date: Sun, 05 Oct 2008 23:50:12 +0000 Subject: [issue1040026] os.times() is bogus Message-ID: <1223250612.47.0.924241732082.issue1040026@psf.upfronthosting.co.za> Malte Helmert added the comment: David, not sure what you are commenting on. Are you commenting on one of the patches? The patches do contain those divisions, of course; you can also run the attached unit test to verify that the patches work for you. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 01:50:23 2008 From: report at bugs.python.org (Malte Helmert) Date: Sun, 05 Oct 2008 23:50:23 +0000 Subject: [issue1040026] os.times() is bogus Message-ID: <1223250623.85.0.092168015665.issue1040026@psf.upfronthosting.co.za> Changes by Malte Helmert : Removed file: http://bugs.python.org/file9497/test_times.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 01:50:32 2008 From: report at bugs.python.org (Malte Helmert) Date: Sun, 05 Oct 2008 23:50:32 +0000 Subject: [issue1040026] os.times() is bogus Message-ID: <1223250632.68.0.432779990828.issue1040026@psf.upfronthosting.co.za> Changes by Malte Helmert : Removed file: http://bugs.python.org/file9501/os_times.PATCH _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 01:50:49 2008 From: report at bugs.python.org (Malte Helmert) Date: Sun, 05 Oct 2008 23:50:49 +0000 Subject: [issue1040026] os.times() is bogus Message-ID: <1223250649.55.0.571215318499.issue1040026@psf.upfronthosting.co.za> Changes by Malte Helmert : Removed file: http://bugs.python.org/file9506/test_posix.PATCH _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 01:50:57 2008 From: report at bugs.python.org (Malte Helmert) Date: Sun, 05 Oct 2008 23:50:57 +0000 Subject: [issue1040026] os.times() is bogus Message-ID: <1223250657.89.0.417485980182.issue1040026@psf.upfronthosting.co.za> Changes by Malte Helmert : Removed file: http://bugs.python.org/file9515/test_posix2.PATCH _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 01:51:07 2008 From: report at bugs.python.org (Malte Helmert) Date: Sun, 05 Oct 2008 23:51:07 +0000 Subject: [issue1040026] os.times() is bogus Message-ID: <1223250667.64.0.207357692155.issue1040026@psf.upfronthosting.co.za> Changes by Malte Helmert : Removed file: http://bugs.python.org/file9516/test_posix3.PATCH _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 01:51:16 2008 From: report at bugs.python.org (Malte Helmert) Date: Sun, 05 Oct 2008 23:51:16 +0000 Subject: [issue1040026] os.times() is bogus Message-ID: <1223250676.41.0.795966900334.issue1040026@psf.upfronthosting.co.za> Changes by Malte Helmert : Removed file: http://bugs.python.org/file9517/test_posix4.PATCH _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 02:04:38 2008 From: report at bugs.python.org (David Hess) Date: Mon, 06 Oct 2008 00:04:38 +0000 Subject: [issue4048] parsermodule won't validate relative imports In-Reply-To: <1223244920.43.0.0525505327115.issue4048@psf.upfronthosting.co.za> Message-ID: <1223251478.8.0.109572629895.issue4048@psf.upfronthosting.co.za> David Hess added the comment: Confirmed the presence of this same problem in the source code of parsermodule.c in branches release25-maint and release26-maint. ---------- nosy: +david_k_hess versions: +Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 02:31:21 2008 From: report at bugs.python.org (Chris) Date: Mon, 06 Oct 2008 00:31:21 +0000 Subject: [issue4049] IDLE does not open at all In-Reply-To: <1223253081.14.0.0863464602504.issue4049@psf.upfronthosting.co.za> Message-ID: <1223253081.14.0.0863464602504.issue4049@psf.upfronthosting.co.za> New submission from Chris : IDLE just won't open in 2.6 for me. The command line works but not the GUI. It works in 2.5.2 though. I am a neophyte, any help is much appreciated. ---------- messages: 74357 nosy: Chris_L severity: normal status: open title: IDLE does not open at all versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 05:20:46 2008 From: report at bugs.python.org (Brodie Rao) Date: Mon, 06 Oct 2008 03:20:46 +0000 Subject: [issue4050] inspect.findsource() returns binary data for shared library modules In-Reply-To: <1223263246.04.0.311292342093.issue4050@psf.upfronthosting.co.za> Message-ID: <1223263246.04.0.311292342093.issue4050@psf.upfronthosting.co.za> New submission from Brodie Rao : Calling inspect.findsource() on a module whose __file__ attribute points to a shared library causes findsource() to return the binary's data: >>> import time >>> time.__file__ '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ lib-dynload/time.so' >>> import inspect >>> inspect.findsource(time) (['\xca\xfe\xba\xbe\x00\x00\x00\x04\x00\x00\x00\x12\x00\x00\x00\n', '\x00\x00\x10\x00\x00\x00Jt\x00... It should raise an error saying it can't retrieve the source. It doesn't do this because when it tries to find the source file it calls both getsourcefile() - and getfile() when that fails. It should call only getsourcefile() - which checks to see if __file__ points to a binary - and if the result is None, raise an error. I'm attaching a patch against trunk that fixes this. The issue affects 3.0, 2.6, 2.5, and probably previous versions. ---------- components: Library (Lib) files: inspect-findsource-binary.diff keywords: patch messages: 74358 nosy: brodierao severity: normal status: open title: inspect.findsource() returns binary data for shared library modules type: behavior versions: Python 2.5, Python 2.6, Python 3.0 Added file: http://bugs.python.org/file11706/inspect-findsource-binary.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 07:02:06 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 06 Oct 2008 05:02:06 +0000 Subject: [issue4049] IDLE does not open at all In-Reply-To: <1223253081.14.0.0863464602504.issue4049@psf.upfronthosting.co.za> Message-ID: <1223269326.14.0.125019706179.issue4049@psf.upfronthosting.co.za> Martin v. L?wis added the comment: What operating system are you using? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 07:52:46 2008 From: report at bugs.python.org (Rajanikanth Jammalamadaka) Date: Mon, 06 Oct 2008 05:52:46 +0000 Subject: [issue4049] IDLE does not open at all In-Reply-To: <1223253081.14.0.0863464602504.issue4049@psf.upfronthosting.co.za> Message-ID: <1223272366.67.0.563502651849.issue4049@psf.upfronthosting.co.za> Rajanikanth Jammalamadaka added the comment: Hi! Chris, I am assuming that you are using Vista. If you are..then you need to enable the Administrator user (following the instructions here: http://www.computerperformance.co.uk/vista/vista_administrator_activate. htm) and then install python for all users by logging in as the Administrator. Thanks, Raj ---------- nosy: +Raj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 08:50:50 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Mon, 06 Oct 2008 06:50:50 +0000 Subject: [issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line. In-Reply-To: <1205817752.04.0.892564898323.issue2382@psf.upfronthosting.co.za> Message-ID: <1223275850.67.0.522957441889.issue2382@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: >At least my "one unicode char is one space" suggestion corrects the case >of Western languages, and all messages with single-width characters. I'm not happy with this solution. ;-( >Doesn't the exact width depend on >the terminal capabilities? and fonts, and combining diacritics... I have to admit you are right. Nevertheless, I got coLinux(Debian) which has localed wcswidth(3), so I created another experimental patch. (py3k_adjust_cursor_at_syntax_error_v2.patch) The strategy is ... 1. Try to convert to unicode. If fails, nothing changed to offset. 2. If system has wcswidth(3), try that function 3. If system is windows, try WideCharToMultibyte with CP_ACP 4. If above 2/3 fails or system is others, use unicode length as offset (Amaury's suggestion) This patch ignores file encoding. Again, this patch is experimental, best effort, but maybe better than current state. P.S. I tested this patch on coLinux with ja_JP.UTF-8 locale and manual #define HAVE_WCSWIDTH 1 because I don't know how to change configure script. Added file: http://bugs.python.org/file11707/py3k_adjust_cursor_at_syntax_error_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 09:20:34 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Mon, 06 Oct 2008 07:20:34 +0000 Subject: [issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line. In-Reply-To: <1205817752.04.0.892564898323.issue2382@psf.upfronthosting.co.za> Message-ID: <1223277634.77.0.758206731164.issue2382@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Experimental patch was experimental, wcswidth(3) returns 1 for East Asian Ambiguous character. debian:~/python-dev/py3k# ./python /mnt/windows/a.py File "/mnt/windows/a.py", line 3 "?x?x" abc ^ should point 'c'. And another one debian:~/python-dev/py3k# export LANG=C debian:~/python-dev/py3k# ./python /mnt/windows/a.py File "/mnt/windows/a.py", line 3 "\u266ax\u212bx" abc ^ SyntaxError: invalid syntax Please forget my patch. :-( _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 12:28:46 2008 From: report at bugs.python.org (Ulrich Eckhardt) Date: Mon, 06 Oct 2008 10:28:46 +0000 Subject: [issue4051] use of TCHAR under win32 In-Reply-To: <1223288926.88.0.428745871562.issue4051@psf.upfronthosting.co.za> Message-ID: <1223288926.88.0.428745871562.issue4051@psf.upfronthosting.co.za> New submission from Ulrich Eckhardt : In several places, Python is using TCHAR-based win32 APIs which has several consequences: 1. The actually used function depends on the _UNICODE macro, while the using code often assumes that this macro is not defined. That means that not only the code changes when the macro is defined but that it simply breaks. 2. Using the ANSI-variants of functions causes overhead when a Unicode string has to be transcoded and possibly data loss, because the ANSI encoding can't represent the full Unicode range. Note that I'm assuming an NT based system (i.e. NT, win2k etc), because the systems where the ANSI encoding is native (win9x, ME(?) etc) have been dropped from the supported platforms. 3. The main reason for me wanting a build independent of TCHAR is a port to MS Windows CE, which doesn't support the ANSI encoding at all. This means that a TCHAR-clean build for desktop win32 is a necessary part of the port to CE, but even without the port it would be useful to skip the conversion overhead and at the same time gain functionality. Concerning the CE port, see this thread as a reference: http://mail.python.org/pipermail/python-dev/2008-September/082529.html Note: I'm adding this tracker item mainly in order to attach patches for review, so they don't get lost like it's possible on the mailinglist. ---------- components: Windows messages: 74363 nosy: eckhardt severity: normal status: open title: use of TCHAR under win32 versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 12:36:20 2008 From: report at bugs.python.org (Ulrich Eckhardt) Date: Mon, 06 Oct 2008 10:36:20 +0000 Subject: [issue4051] use of TCHAR under win32 In-Reply-To: <1223288926.88.0.428745871562.issue4051@psf.upfronthosting.co.za> Message-ID: <1223289380.23.0.789275078267.issue4051@psf.upfronthosting.co.za> Ulrich Eckhardt added the comment: Add a patch that fixes a warning. ---------- keywords: +patch Added file: http://bugs.python.org/file11708/Python-unicode-redefine-warning.0.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 13:30:40 2008 From: report at bugs.python.org (Gerard) Date: Mon, 06 Oct 2008 11:30:40 +0000 Subject: [issue4052] Build on 2.6 on AIX 5.3 fails (syntax error / undeclared identifier subtract) In-Reply-To: <1223292640.72.0.293945731017.issue4052@psf.upfronthosting.co.za> Message-ID: <1223292640.72.0.293945731017.issue4052@psf.upfronthosting.co.za> New submission from Gerard : I'm using an IBM compiler running in AIX 5.3. Compilation of Python 2.6 fails (see explanation below). Compilation of Python 2.5.2 is ok. /home/xyz/python/Python-2.6$ lslpp -L | grep vac vac.C 10.1.0.0 C F IBM XL C Compiler vac.aix53.lib 10.1.0.0 C F XL C for AIX Libraries for AIX vac.include 10.1.0.0 C F IBM XL C Compiler Include vac.lib 10.1.0.0 C F XL C for AIX Libraries vac.lic 10.1.0.0 C F XL C for AIX Licence Files vacpp.cmp.rte 10.1.0.0 C F IBM XL C/C++ Compiler vacpp.cmp.tools 10.1.0.0 C F IBM XL C/C++ Tools vacpp.licAgreement 10.1.0.0 C F IBM XL C++ Electronic License vacpp.memdbg.aix53.rte 10.1.0.0 C F IBM XL C/C++ User Heap/Memory vacpp.memdbg.rte 10.1.0.0 C F IBM XL C/C++ User Heap and Configure --prefix runs ok. Then, make fails: /home/xyz/python/Python-2.6$ make cc_r -qlanglvl=extc89 -c -DNDEBUG -O -I. -IInclude -I./Include -I/usr/local/include/ -DPy_BUILD_CORE -o Objects/frameobject.o Objects/frameobject.c "Objects/frameobject.c", line 520.9: 1506-046 (S) Syntax error. "Objects/frameobject.c", line 520.12: 1506-045 (S) Undeclared identifier subtract. make: The error code from the last command is 1. ---------- components: Build messages: 74365 nosy: gerard severity: normal status: open title: Build on 2.6 on AIX 5.3 fails (syntax error / undeclared identifier subtract) type: compile error versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 14:01:22 2008 From: report at bugs.python.org (T.Morin) Date: Mon, 06 Oct 2008 12:01:22 +0000 Subject: [issue2574] Add RFC 3768 SSM Multicast support to "socket" In-Reply-To: <1207599142.63.0.703836832788.issue2574@psf.upfronthosting.co.za> Message-ID: <1223294482.65.0.0541938014229.issue2574@psf.upfronthosting.co.za> T.Morin added the comment: I've applied the patch to the release26-maint branch, and I was able to properly compile, run and do some basic testing of the result. Find attached a patch applying cleanly to SVN release26-maint branch. ---------- versions: +Python 2.6 -Python 2.5 Added file: http://bugs.python.org/file11709/python-release26maint-multicast-ssm.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 15:01:58 2008 From: report at bugs.python.org (Govind) Date: Mon, 06 Oct 2008 13:01:58 +0000 Subject: [issue4053] str.split unintentionally strips char 'I' from the string In-Reply-To: <1223298118.61.0.171396290216.issue4053@psf.upfronthosting.co.za> Message-ID: <1223298118.61.0.171396290216.issue4053@psf.upfronthosting.co.za> New submission from Govind : I tried to process a text file (with UTF-8 encoding) which has contents like this: FILE=India asbds FILE=Indonasia ssgsds FILE=Africa DBGDGDFG When I use the below code: >>> f = open("e:\\temp\\file.txt", 'r') >>> lines = f.readlines() >>> for line in lines: if line.startswith("FILE="): print line.strip("FILE=") I get output as: ndia ndonasia Africa I is always stripped if it follows the substring that I want to strip off. Am I doing something wrong here or is this a bug in Python? -Govind ---------- components: Library (Lib) messages: 74367 nosy: Govind severity: normal status: open title: str.split unintentionally strips char 'I' from the string type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 15:04:30 2008 From: report at bugs.python.org (Govind) Date: Mon, 06 Oct 2008 13:04:30 +0000 Subject: [issue4054] str.split unintentionally strips char 'I' from the string In-Reply-To: <1223298270.23.0.44559787847.issue4054@psf.upfronthosting.co.za> Message-ID: <1223298270.23.0.44559787847.issue4054@psf.upfronthosting.co.za> New submission from Govind : I tried to process a text file (with UTF-8 encoding) which has contents like this: FILE=India asbds FILE=Indonasia ssgsds FILE=Africa DBGDGDFG When I use the below code: >>> f = open("e:\\temp\\file.txt", 'r') >>> lines = f.readlines() >>> for line in lines: if line.startswith("FILE="): print line.strip("FILE=") I get output as: ndia ndonasia Africa I is always stripped if it follows the substring that I want to strip off. Am I doing something wrong here or is this a bug in Python? -Govind ---------- files: file.txt messages: 74368 nosy: Govind severity: normal status: open title: str.split unintentionally strips char 'I' from the string type: behavior Added file: http://bugs.python.org/file11710/file.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 15:05:38 2008 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Oct 2008 13:05:38 +0000 Subject: [issue4053] str.split unintentionally strips char 'I' from the string In-Reply-To: <1223298118.61.0.171396290216.issue4053@psf.upfronthosting.co.za> Message-ID: <1223298338.61.0.612435759032.issue4053@psf.upfronthosting.co.za> STINNER Victor added the comment: Duplicate of issue4054. ---------- nosy: +haypo resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 15:09:09 2008 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Oct 2008 13:09:09 +0000 Subject: [issue4054] str.split unintentionally strips char 'I' from the string In-Reply-To: <1223298270.23.0.44559787847.issue4054@psf.upfronthosting.co.za> Message-ID: <1223298549.66.0.571137908735.issue4054@psf.upfronthosting.co.za> STINNER Victor added the comment: It's not a bug. Please read the documentation of the split() method: http://docs.python.org/library/stdtypes.html#str.split If you want to get the value after "=", use: value = line.split("FILE=", 1)[1] or: value = line[len('FILE='):] or: value = line.partition('FILE=')[2] or: etc. ---------- nosy: +haypo resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 15:46:04 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 06 Oct 2008 13:46:04 +0000 Subject: [issue4040] ignored exceptions in generators (regression?) In-Reply-To: <1223133689.63.0.365168051222.issue4040@psf.upfronthosting.co.za> Message-ID: <1223300764.72.0.0791907253307.issue4040@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This is not specific to generators, this is due to the fact that a lot of recursion checks have been added all over the place. When an internal function designed to ignore exceptions (for example PyErr_GivenExceptionMatches()) encounters such a recursion overflow, it ignores it and prints it out. Such a function designed to ignore exceptions can perfectly be called after a recursion overflow has already happened, and that's what you witness here: the first RuntimeError is raised, and soon enough that exception is given to PyErr_GivenExceptionMatches() (perhaps because `for` has to detected StopIteration's) where the recursion count overflows again (`__subclasscheck__` can incur recursion so there is a recursion guard), and the subsequent exception is ignored and printed out. 2.5 doesn't have the problem because many recursion checks have been added between 2.5 and 2.6. 3.0 doesn't have the problem because its recursion checking code tries to be smart (but it has other problems). See the message I've sent to python-dev some time ago: http://mail.python.org/pipermail/python-dev/2008-August/082106.html ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 15:56:47 2008 From: report at bugs.python.org (rwmjones) Date: Mon, 06 Oct 2008 13:56:47 +0000 Subject: [issue1597850] Cross compiling patches for MINGW Message-ID: <1223301407.49.0.938051580572.issue1597850@psf.upfronthosting.co.za> rwmjones added the comment: I'm trying to use this patch to cross-compile Python under Fedora, using the Fedora-MinGW project (http://fedoraproject.org/wiki/MinGW) IMHO the documentation is confusing. It sounds from the docs like CC_FOR_BUILD should be the native system compiler -- eg. all the examples show CC_FOR_BUILD=gcc But I didn't get very far at all doing that. It seems that what you mean is CC_FOR_BUILD=i686-pc-mingw32-gcc (ie. the cross-compiler). Also the extra patches added by lkcl are necessary to get posixmodules.c to compile. I'm trying 2.5.2 at the moment, and while I haven't succeeded getting it all compiled yet, it's very definitely necessary to fix posixmodules.c ---------- nosy: +rwmjones _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 16:48:14 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 06 Oct 2008 14:48:14 +0000 Subject: [issue4018] "for me" installer problem on x64 Vista In-Reply-To: <1222963572.56.0.515590438992.issue4018@psf.upfronthosting.co.za> Message-ID: <1223304494.1.0.498872521005.issue4018@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Here is a patch that fixes the problem as proposed. An installer built with that patch is available from http://www.dcl.hpi.uni-potsdam.de/home/loewis/u/python-3.0.14158.msi ---------- keywords: +patch Added file: http://bugs.python.org/file11711/vista.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 16:52:28 2008 From: report at bugs.python.org (Luke Kenneth Casson Leighton) Date: Mon, 06 Oct 2008 14:52:28 +0000 Subject: [issue1597850] Cross compiling patches for MINGW Message-ID: <1223304748.48.0.964897670514.issue1597850@psf.upfronthosting.co.za> Luke Kenneth Casson Leighton added the comment: ok. what's not explained, and isn't clear, is exactly whether you're supposed to - or even _capable_ of - cross-compiling the _entire_ python sourcecode base with mingw32, or whether you're supposed to get _just_ the python.exe interpreter, and, maybe if you're lucky, libpython.a (or libpython.dll - whatever). i got quite a long way, as you can see, in cross-compiling posixmodule.c _by mistake_ - before realising that the whole python sourcecode base is completely inadequately set up for cross-compiling, but is specialised "hard-coded" to compile python under msvc _only_. so, when doing the cross-compile, it was actually being detected as a _unix_ compile, not a _win32_ compile. #define WIN32 wasn't even being listened to. the end result was that entire areas of posixmodule.c were being compiled when they shouldn't have been. later, i tried to correctly #define WIN32 (or whatever was required), only to find that the mingw32 libraries don't support many of the necessary functions. for example, it's assumed that crypto libraries exist, and many other things. all in all, it didn't go too well :) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 17:00:22 2008 From: report at bugs.python.org (Jesse Noller) Date: Mon, 06 Oct 2008 15:00:22 +0000 Subject: [issue4028] Problem compiling the multiprocessing module on sunos5 In-Reply-To: <1223039660.71.0.470025758339.issue4028@psf.upfronthosting.co.za> Message-ID: <1223305222.76.0.0947595409626.issue4028@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- assignee: -> jnoller nosy: +jnoller priority: -> normal versions: +Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 17:02:28 2008 From: report at bugs.python.org (Jesse Noller) Date: Mon, 06 Oct 2008 15:02:28 +0000 Subject: [issue3876] multiprocessing does not compile on *BSD and potentialy other systems In-Reply-To: <1221541852.59.0.453473189868.issue3876@psf.upfronthosting.co.za> Message-ID: <1223305348.58.0.238217756674.issue3876@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- assignee: -> jnoller nosy: +jnoller priority: -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 17:04:54 2008 From: report at bugs.python.org (Jesse Noller) Date: Mon, 06 Oct 2008 15:04:54 +0000 Subject: [issue3876] multiprocessing does not compile on systems which do not define sem_timedwait In-Reply-To: <1221541852.59.0.453473189868.issue3876@psf.upfronthosting.co.za> Message-ID: <1223305494.69.0.098190430462.issue3876@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- title: multiprocessing does not compile on *BSD and potentialy other systems -> multiprocessing does not compile on systems which do not define sem_timedwait _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 17:08:43 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 06 Oct 2008 15:08:43 +0000 Subject: [issue1597850] Cross compiling patches for MINGW Message-ID: <1223305723.11.0.336611059372.issue1597850@psf.upfronthosting.co.za> Martin v. L?wis added the comment: So what's the status of this? Who is still interested in seeing what patches considered? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 17:12:16 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 06 Oct 2008 15:12:16 +0000 Subject: [issue3740] PEP 3121 --- module state is not nul-initalized as claimed in the PEP In-Reply-To: <1220109289.56.0.0975805859845.issue3740@psf.upfronthosting.co.za> Message-ID: <1223305936.81.0.766766825275.issue3740@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Here is a patch that should fix this. ---------- keywords: +needs review, patch priority: critical -> release blocker Added file: http://bugs.python.org/file11712/init.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 17:12:51 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 06 Oct 2008 15:12:51 +0000 Subject: [issue4018] "for me" installer problem on x64 Vista In-Reply-To: <1222963572.56.0.515590438992.issue4018@psf.upfronthosting.co.za> Message-ID: <1223305972.0.0.592031748715.issue4018@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- keywords: +needs review priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 17:15:32 2008 From: report at bugs.python.org (rwmjones) Date: Mon, 06 Oct 2008 15:15:32 +0000 Subject: [issue1597850] Cross compiling patches for MINGW Message-ID: <1223306132.11.0.326199191663.issue1597850@psf.upfronthosting.co.za> rwmjones added the comment: I'm very slowly working up a patch here (again 2.5.2). Since I haven't actually got even python.exe compiled yet I can't promise anything, but you never know ... _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 17:20:18 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 06 Oct 2008 15:20:18 +0000 Subject: [issue4014] Python-2.6-py2.6.egg-info contains Alpha reference In-Reply-To: <1222945413.86.0.0834970306858.issue4014@psf.upfronthosting.co.za> Message-ID: <1223306418.09.0.172913152792.issue4014@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Ok, I have now removed the Alpha designation, in r66814, r66815, and r66816. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 17:25:51 2008 From: report at bugs.python.org (Steve Lee) Date: Mon, 06 Oct 2008 15:25:51 +0000 Subject: [issue4018] "for me" installer problem on x64 Vista In-Reply-To: <1222963572.56.0.515590438992.issue4018@psf.upfronthosting.co.za> Message-ID: <1223306751.93.0.231867806065.issue4018@psf.upfronthosting.co.za> Steve Lee added the comment: Works for me on Vista, Not tried on XP. Seems a reasonable temporary compromise though we are now stopping all possibility of an 'all' install but as noted there is probably little need for it when application installers are created. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 18:10:44 2008 From: report at bugs.python.org (Facundo Batista) Date: Mon, 06 Oct 2008 16:10:44 +0000 Subject: [issue1202] zlib.crc32() and adler32() return value In-Reply-To: <1190719871.47.0.233788425538.issue1202@psf.upfronthosting.co.za> Message-ID: <1223309444.43.0.0899092256305.issue1202@psf.upfronthosting.co.za> Facundo Batista added the comment: Let me reopen this, I think we have an issue with this fix. The conclusion of this discussion so far is that in 3.0 the crc32 will behave like the standard, which is a good thing (tm), but in 2.6 it will not: it should return a signed integer. I agree with this outcome! The documentation for 2.6, the commit message for the fix and what it's said here states that: "2.6 always returns signed, 2**31...2**31-1 come back as negative integers." This is *not* actually happening: >>> s = "*"*100000 >>> print zlib.crc32(s) # 2.6, 32 bits -872059092 >>> print zlib.crc32(s) # 2.6, 64 bits 3422908204 The problem in the code is, IMHO, that the "32b rounding" is being forced by assigning the result to an int (Modules/zlibmodule.c, line 929), but this "rounding" does not actually work for 64b (because the int has 64 bit, and even as it's signed, the number stays big and positive). Thank you! ---------- nosy: +facundobatista resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 18:36:35 2008 From: report at bugs.python.org (Ignacio Vazquez-Abrams) Date: Mon, 06 Oct 2008 16:36:35 +0000 Subject: [issue4055] Documentation on website is missing section numbers In-Reply-To: <1223310995.33.0.795249867798.issue4055@psf.upfronthosting.co.za> Message-ID: <1223310995.33.0.795249867798.issue4055@psf.upfronthosting.co.za> New submission from Ignacio Vazquez-Abrams : The documentation on the website seems to have lost the numbers identifying the various sections. It was useful to point a user to e.g. ?3.6.2 of the libref in order to guide them to the string interpolation documentation. This is now no longer possible, and instead the user must hunt around for the appropriate section. This is a severe usability hit against the documentation. ---------- assignee: georg.brandl components: Documentation messages: 74381 nosy: georg.brandl, ivazquez severity: normal status: open title: Documentation on website is missing section numbers type: performance versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 18:38:26 2008 From: report at bugs.python.org (=?utf-8?q?Jes=C3=BAs_Cea_Avi=C3=B3n?=) Date: Mon, 06 Oct 2008 16:38:26 +0000 Subject: [issue2960] bsddb/test/test_replication.py bus error, segfault, assertion error, pass In-Reply-To: <1211685483.73.0.203518027491.issue2960@psf.upfronthosting.co.za> Message-ID: <1223311106.69.0.971195797315.issue2960@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Greg, is this issue still pending?. Can we close it?. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 19:41:57 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 06 Oct 2008 17:41:57 +0000 Subject: [issue3439] math.frexp and obtaining the bit size of a large integer In-Reply-To: <1216920044.56.0.218954878238.issue3439@psf.upfronthosting.co.za> Message-ID: <1223314917.1.0.667565377721.issue3439@psf.upfronthosting.co.za> Terry J. Reedy added the comment: To add support to the proposal: there is currently yet another thread on c.l.p on how to calculate numbits efficiently. The OP needs it for prototyping cryptographic algorithms and found Python-level code slower than he wanted. ---------- nosy: +tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 19:53:07 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 06 Oct 2008 17:53:07 +0000 Subject: [issue1202] zlib.crc32() and adler32() return value In-Reply-To: <1190719871.47.0.233788425538.issue1202@psf.upfronthosting.co.za> Message-ID: <1223315587.06.0.576188670854.issue1202@psf.upfronthosting.co.za> Gregory P. Smith added the comment: An int is 32-bits on all popular platforms. Anyways i'll double check things. What platforms did you run your test on? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 21:10:40 2008 From: report at bugs.python.org (Ian Bicking) Date: Mon, 06 Oct 2008 19:10:40 +0000 Subject: [issue4056] :Class: causes exception In-Reply-To: <1223320240.78.0.644228584964.issue4056@psf.upfronthosting.co.za> Message-ID: <1223320240.78.0.644228584964.issue4056@psf.upfronthosting.co.za> New submission from Ian Bicking : I used a reference like :Class:`something` (note the capitalization) and got this exception: Traceback (most recent call last): File "/home/ianb/src/env/lib/python2.4/site-packages/sphinx/__init__.py", line 135, in main app.builder.build_update() File "/home/ianb/src/env/lib/python2.4/site-packages/sphinx/builder.py", line 201, in build_update summary='targets for %d source files that are ' File "/home/ianb/src/env/lib/python2.4/site-packages/sphinx/builder.py", line 241, in build self.write(docnames, updated_docnames, method) File "/home/ianb/src/env/lib/python2.4/site-packages/sphinx/builder.py", line 276, in write doctree = self.env.get_and_resolve_doctree(docname, self) File "/home/ianb/src/env/lib/python2.4/site-packages/sphinx/environment.py", line 779, in get_and_resolve_doctree self.resolve_references(doctree, docname, builder) File "/home/ianb/src/env/lib/python2.4/site-packages/sphinx/environment.py", line 998, in resolve_references raise RuntimeError('unknown xfileref node encountered: %s' % node) RuntimeError: unknown xfileref node encountered: deliverance.rules.Drop ---------- assignee: georg.brandl components: Documentation tools (Sphinx) messages: 74385 nosy: georg.brandl, ianb severity: normal status: open title: :Class: causes exception _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 21:24:44 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 06 Oct 2008 19:24:44 +0000 Subject: [issue4051] use of TCHAR under win32 In-Reply-To: <1223288926.88.0.428745871562.issue4051@psf.upfronthosting.co.za> Message-ID: <1223321084.12.0.147760442782.issue4051@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Please create a separate tracker item per individual change (or per group by enourmously similar changes). Each change will be reviewed separately, and will get accepted or rejected separately. This specific patch (Python-unicode-redefine-warning) is fine, but I'd rather wait until after the release of Python 3.0, in order to be able to merge the changes better into the 3k branch. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 21:26:13 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 06 Oct 2008 19:26:13 +0000 Subject: [issue4052] Build on 2.6 on AIX 5.3 fails (syntax error / undeclared identifier subtract) In-Reply-To: <1223292640.72.0.293945731017.issue4052@psf.upfronthosting.co.za> Message-ID: <1223321173.01.0.814822459741.issue4052@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This has been fixed in r66739. ---------- nosy: +loewis resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 21:28:03 2008 From: report at bugs.python.org (Miki Tebeka) Date: Mon, 06 Oct 2008 19:28:03 +0000 Subject: [issue4057] Popen(..., cwd=...) does not set PWD environment variable In-Reply-To: <1223321283.05.0.79921922605.issue4057@psf.upfronthosting.co.za> Message-ID: <1223321283.05.0.79921922605.issue4057@psf.upfronthosting.co.za> New submission from Miki Tebeka : [21:26] pwd-bug $cat m #!/usr/bin/env python from subprocess import Popen Popen(["./t"], cwd="./p") [21:26] pwd-bug $cat p/t #!/usr/bin/env python from os import environ print environ["PWD"] [21:26] pwd-bug $python m /Users/mtebeka/playground/pwd-bug The output should be /Users/mtebeka/playground/pwd-bug/p ---------- messages: 74388 nosy: tebeka severity: normal status: open title: Popen(..., cwd=...) does not set PWD environment variable versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 21:40:10 2008 From: report at bugs.python.org (Robert Lehmann) Date: Mon, 06 Oct 2008 19:40:10 +0000 Subject: [issue4058] markup in What's New in 2.6 In-Reply-To: <1223322009.26.0.795305514424.issue4058@psf.upfronthosting.co.za> Message-ID: <1223322009.26.0.795305514424.issue4058@psf.upfronthosting.co.za> New submission from Robert Lehmann : The markup in the Doc/whatsnew/2.6.rst document is somewhat messy in some places. I fixed indentation (spaces to tabs -- made some things readable in the docutils output but not in the source), code samples ("->" notation to Python prompt) and some minor things (which are too small for issues on their own). ---------- assignee: georg.brandl components: Documentation files: whatsnew.2.6.patch keywords: patch messages: 74389 nosy: georg.brandl, lehmannro severity: normal status: open title: markup in What's New in 2.6 type: feature request versions: Python 2.6 Added file: http://bugs.python.org/file11713/whatsnew.2.6.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 22:18:11 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 06 Oct 2008 20:18:11 +0000 Subject: [issue3740] PEP 3121 --- module state is not nul-initalized as claimed in the PEP In-Reply-To: <1220109289.56.0.0975805859845.issue3740@psf.upfronthosting.co.za> Message-ID: <1223324291.16.0.905582519688.issue3740@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I'm ok with that patch. ---------- keywords: -needs review nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 23:21:08 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 06 Oct 2008 21:21:08 +0000 Subject: [issue2744] Fix test_cProfile In-Reply-To: <1209770110.61.0.304892387875.issue2744@psf.upfronthosting.co.za> Message-ID: <1223328068.36.0.254195299833.issue2744@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Done in r66817. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 23:32:38 2008 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Oct 2008 21:32:38 +0000 Subject: [issue3574] compile() cannot decode Latin-1 source encodings In-Reply-To: <1218933580.53.0.0614369271998.issue3574@psf.upfronthosting.co.za> Message-ID: <1223328758.85.0.461257364487.issue3574@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11698/tokenizer_iso-8859-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 23:42:05 2008 From: report at bugs.python.org (Robert Lehmann) Date: Mon, 06 Oct 2008 21:42:05 +0000 Subject: [issue4059] sqlite3 docs incomplete In-Reply-To: <1223329325.4.0.307083135526.issue4059@psf.upfronthosting.co.za> Message-ID: <1223329325.4.0.307083135526.issue4059@psf.upfronthosting.co.za> New submission from Robert Lehmann : The sqlite3 documentation misses Row and Cursor.description. Additionally it does not use the best markup in all places (missing links, basically, and forgotten .. class:: statements). A patch is attached. ---------- assignee: georg.brandl components: Documentation files: sqlite3.patch keywords: patch messages: 74392 nosy: georg.brandl, lehmannro severity: normal status: open title: sqlite3 docs incomplete versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file11714/sqlite3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 23:48:35 2008 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Oct 2008 21:48:35 +0000 Subject: [issue3574] compile() cannot decode Latin-1 source encodings In-Reply-To: <1218933580.53.0.0614369271998.issue3574@psf.upfronthosting.co.za> Message-ID: <1223329715.92.0.524719789932.issue3574@psf.upfronthosting.co.za> STINNER Victor added the comment: My patch version 2 included an "unrelated" fix for the issue2384. Added file: http://bugs.python.org/file11715/python3_bytes_filename-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 23:49:07 2008 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Oct 2008 21:49:07 +0000 Subject: [issue3574] compile() cannot decode Latin-1 source encodings In-Reply-To: <1218933580.53.0.0614369271998.issue3574@psf.upfronthosting.co.za> Message-ID: <1223329747.34.0.590000323487.issue3574@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11715/python3_bytes_filename-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 23:49:17 2008 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Oct 2008 21:49:17 +0000 Subject: [issue3574] compile() cannot decode Latin-1 source encodings In-Reply-To: <1218933580.53.0.0614369271998.issue3574@psf.upfronthosting.co.za> Message-ID: <1223329757.8.0.381805427331.issue3574@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file11716/tokenizer_iso-8859-1-patch3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 23:53:33 2008 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Oct 2008 21:53:33 +0000 Subject: [issue2384] [Py3k] line number is wrong after encoding declaration In-Reply-To: <1205825319.07.0.115749100037.issue2384@psf.upfronthosting.co.za> Message-ID: <1223330013.42.0.490991661685.issue2384@psf.upfronthosting.co.za> STINNER Victor added the comment: benjamin was afraid by the comment /* dirty hack */ in my previous comment. After reading tokenizer.c again and again, I can say that the fix is correct: the file is closed and then re-opened by fp_setreadl() (using io.open()), and so the file cursor goes back to the file start. Added file: http://bugs.python.org/file11717/tokenizer-coding-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 6 23:58:37 2008 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Oct 2008 21:58:37 +0000 Subject: [issue4008] IDLE: checksyntax() doesn't support Unicode? In-Reply-To: <1222875475.18.0.22602254781.issue4008@psf.upfronthosting.co.za> Message-ID: <1223330317.18.0.53429883003.issue4008@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11677/idle_encoding-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 00:06:07 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Mon, 06 Oct 2008 22:06:07 +0000 Subject: [issue2744] Fix test_cProfile In-Reply-To: <1209770110.61.0.304892387875.issue2744@psf.upfronthosting.co.za> Message-ID: <1223330767.54.0.0824763469201.issue2744@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Have you verified the numbers? They don't look right to me. The problem is the 2nd argument of cProfile's constructor has a different semantic meaning than the one for profile.py. For profile.py, it is used to set the "bias" (I presume it means the overhead) of the profiler. But for cProfile, it's the unit (in seconds?) of timer used. Personally, I have no idea which semantic should be preferred. So perhaps, the best thing to do for now is remove the second argument from the cls.profilerclass() call in test_profile.ProfileTest: class ProfileTest: ... def do_profiling(cls): ... prof = cls.profilerclass(timer, 0.001) ... _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 00:08:31 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 06 Oct 2008 22:08:31 +0000 Subject: [issue2744] Fix test_cProfile In-Reply-To: <1209770110.61.0.304892387875.issue2744@psf.upfronthosting.co.za> Message-ID: <1223330911.41.0.541783813935.issue2744@psf.upfronthosting.co.za> Benjamin Peterson added the comment: No, I didn't look too hard at it; I just got it scraping along, so I can forward port a fix for it. I'll reopen this, so you can take more action, so you wish. :) ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 00:10:31 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Mon, 06 Oct 2008 22:10:31 +0000 Subject: [issue2744] Fix test_cProfile In-Reply-To: <1209770110.61.0.304892387875.issue2744@psf.upfronthosting.co.za> Message-ID: <1223331031.9.0.684417665342.issue2744@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Unassigning myself as I don't have the time to fix this properly. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 00:10:39 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Mon, 06 Oct 2008 22:10:39 +0000 Subject: [issue2744] Fix test_cProfile In-Reply-To: <1209770110.61.0.304892387875.issue2744@psf.upfronthosting.co.za> Message-ID: <1223331039.11.0.824154777357.issue2744@psf.upfronthosting.co.za> Changes by Alexandre Vassalotti : ---------- assignee: alexandre.vassalotti -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 00:26:37 2008 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Oct 2008 22:26:37 +0000 Subject: [issue3623] _json: fix raise_errmsg(), py_encode_basestring_ascii() and linecol() In-Reply-To: <1219273124.72.0.104841129313.issue3623@psf.upfronthosting.co.za> Message-ID: <1223331997.22.0.609317170741.issue3623@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file11718/json_test.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 00:27:10 2008 From: report at bugs.python.org (Trent Mick) Date: Mon, 06 Oct 2008 22:27:10 +0000 Subject: [issue4060] PyUnicode_DecodeUTF16(..., byteorder=0) gets it wrong on Mac OS X/PowerPC In-Reply-To: <1223332030.39.0.313145041612.issue4060@psf.upfronthosting.co.za> Message-ID: <1223332030.39.0.313145041612.issue4060@psf.upfronthosting.co.za> New submission from Trent Mick : Revision 63955 removed a block from configure.in (and effectively from pyconfig.h.in) having to do with endianness that results in an incorrect setting for "WORDS_BIGENDIAN" in Universal builds on Mac OS X. The removed part was this: > AH_VERBATIM([WORDS_BIGENDIAN], > [ > /* Define to 1 if your processor stores words with the most significant byte > first (like Motorola and SPARC, unlike Intel and VAX). > > The block below does compile-time checking for endianness on platforms > that use GCC and therefore allows compiling fat binaries on OSX by using > '-arch ppc -arch i386' as the compile flags. The phrasing was choosen > such that the configure-result is used on systems that don't use GCC. > */ > #ifdef __BIG_ENDIAN__ > #define WORDS_BIGENDIAN 1 > #else > #ifndef __LITTLE_ENDIAN__ > #undef WORDS_BIGENDIAN > #endif > #endif]) This used to allow "WORDS_BIGENDIAN" to be correct for all parts of a universal Python build done via `gcc -arch i386 -arch ppc ...`. This was originally added for issue 1471883 (see msg50040 for a discussion of this particular bit). The result of this bug is that Python extensions using either of the following to get native byte ordering for UTF-16 decoding: PyUnicode_DecodeUTF16(..., byteorder=0); PyUnicode_DecodeUTF16Stateful(..., byteorder=0, ...); on Mac OS X/PowerPC with a universal build built on Intel hardware (most such builds) will get the wrong byte-ordering. The fix is to restore that section to configure.in and re-run autoconf and autoheader. Ronald, Was there are particular reason that this block was removed from configure.in (and pyconfig.h.in)? I'd like to hear comments from either Ronald or Martin, and then I can commit the fix. ---------- components: Unicode messages: 74398 nosy: loewis, ronaldoussoren, trentm severity: normal status: open title: PyUnicode_DecodeUTF16(..., byteorder=0) gets it wrong on Mac OS X/PowerPC type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 00:31:29 2008 From: report at bugs.python.org (Trent Mick) Date: Mon, 06 Oct 2008 22:31:29 +0000 Subject: [issue4060] PyUnicode_DecodeUTF16(..., byteorder=0) gets it wrong on Mac OS X/PowerPC In-Reply-To: <1223332030.39.0.313145041612.issue4060@psf.upfronthosting.co.za> Message-ID: <1223332289.52.0.091745162663.issue4060@psf.upfronthosting.co.za> Trent Mick added the comment: This also shows up in the byte ordering that Python uses to encode utf-16: $ uname -a Darwin sphinx 8.11.0 Darwin Kernel Version 8.11.0: Wed Oct 10 18:26:00 PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC Power Macintosh powerpc $ python2.6 -c "import codecs; codecs.open('26.txt', 'w', 'utf-16').write('hi')" $ od -cx 26.txt 0000000 377 376 h \0 i \0 fffe 6800 6900 0000006 $ /usr/bin/python -c "import codecs; codecs.open('system.txt', 'w', 'utf-16').write('hi')" $ od -cx system.txt 0000000 376 377 \0 h \0 i feff 0068 0069 0000006 The BOM here ensures, of course, that this is still valid UTF-16 content, but the difference in behaviour here btwn Python versions might not be intended. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 00:40:35 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 06 Oct 2008 22:40:35 +0000 Subject: [issue4060] PyUnicode_DecodeUTF16(..., byteorder=0) gets it wrong on Mac OS X/PowerPC In-Reply-To: <1223332030.39.0.313145041612.issue4060@psf.upfronthosting.co.za> Message-ID: <1223332835.0.0.208940431826.issue4060@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Does this also affect sys.byteorder and the struct module ? I think those would be more important to get right than the UTF-16 codec, since this only uses the native byte ordering for increased performance and compatibility with other OS tools. Since UTF-16 is not wide-spread on Mac OS X, it's not so much an issue... it would be on Windows. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 00:41:48 2008 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Oct 2008 22:41:48 +0000 Subject: [issue1565525] gc allowing tracebacks to eat up memory Message-ID: <1223332908.3.0.696904418973.issue1565525@psf.upfronthosting.co.za> STINNER Victor added the comment: Similar issue: issue4034 proposes to be able to set tb.tb_frame=None. It's easy to implement this, I can write a patch for this. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 00:47:14 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 06 Oct 2008 22:47:14 +0000 Subject: =?utf-8?q?[issue4060]_PyUnicode=5FDecodeUTF16(..., =09byteorder=3D0)_gets_it_wrong_on_Mac_OS_X/PowerPC?= In-Reply-To: <1223332030.39.0.313145041612.issue4060@psf.upfronthosting.co.za> Message-ID: <48EA9570.2010902@egenix.com> Marc-Andre Lemburg added the comment: BTW: Does this simplified approach really work for Python on Mac OS X: On 2008-10-07 00:27, Trent Mick wrote: >> The block below does compile-time checking for endianness on > platforms >> that use GCC and therefore allows compiling fat binaries on OSX by > using >> '-arch ppc -arch i386' as the compile flags. The phrasing was > choosen >> such that the configure-result is used on systems that don't use > GCC. For most other tools that require configure tests regarding endianness on Mac OS X, the process of building a universal binary goes something like this: http://developer.apple.com/opensource/buildingopensourceuniversal.html ie. you run the whole process twice and then combine the results using lipo. ---------- title: PyUnicode_DecodeUTF16(..., byteorder=0) gets it wrong on Mac OS X/PowerPC -> PyUnicode_DecodeUTF16(..., byteorder=0) gets it wrong on Mac OS X/PowerPC _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 00:48:33 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 06 Oct 2008 22:48:33 +0000 Subject: [issue3758] "make check" suggest a testing target under GNU coding standards In-Reply-To: <1220362449.51.0.882466438238.issue3758@psf.upfronthosting.co.za> Message-ID: <1223333313.86.0.252200660273.issue3758@psf.upfronthosting.co.za> Brett Cannon added the comment: 2.7 through r66819, 2.6 through r66820, and 3.0 through r66821. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 00:49:40 2008 From: report at bugs.python.org (Trent Mick) Date: Mon, 06 Oct 2008 22:49:40 +0000 Subject: =?utf-8?q?[issue4060]_PyUnicode=5FDecodeUTF16(..., =09byteorder=3D0)_gets_it_wrong_on_Mac_OS_X/PowerPC?= In-Reply-To: <1223332030.39.0.313145041612.issue4060@psf.upfronthosting.co.za> Message-ID: <1223333380.89.0.378239096351.issue4060@psf.upfronthosting.co.za> Trent Mick added the comment: > Does this also affect sys.byteorder and the struct module ? Doesn't seem to affect sys.byteorder: $ /usr/bin/python -c "import sys; print sys.byteorder" big $ python2.6 -c "import sys; print sys.byteorder" big > I think those would be more important to get right than the UTF-16 > codec, since this only uses the native byte ordering for increased > performance and compatibility with other OS tools. Since UTF-16 is not > wide-spread on Mac OS X, it's not so much an issue... It is an issue for Python extensions that use that API. For example, it is the cause of recent Komodo builds not starting Mac OS X/PowerPC (http://bugs.activestate.com/show_bug.cgi?id=79366) because the PyXPCOM extension and embedded Python 2.6 build was getting UTF-16 data mixed up when talking with Mozilla APIs. it would be on > Windows. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 00:52:25 2008 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Oct 2008 22:52:25 +0000 Subject: [issue4034] traceback attribute error In-Reply-To: <1223076719.45.0.395696576555.issue4034@psf.upfronthosting.co.za> Message-ID: <1223333545.52.0.359177177629.issue4034@psf.upfronthosting.co.za> STINNER Victor added the comment: Instead of converting tb_frame attribute to read only, I prefer to allow the user to clear the traceback to free some memory bytes. So I wrote a different patch. marge$ ./python Python 2.7a0 (trunk:66786M, Oct 7 2008, 00:48:32) >>> try: ... a ... except: ... import sys ... t, v, tb = sys.exc_info() ... >>> tb >>> tb.tb_frame >>> tb.tb_frame=42 >>> tb.tb_frame 42 >>> tb.tb_frame=None >>> ---------- nosy: +haypo Added file: http://bugs.python.org/file11719/traceback_tb_frame_setter.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 00:52:50 2008 From: report at bugs.python.org (Trent Mick) Date: Mon, 06 Oct 2008 22:52:50 +0000 Subject: =?utf-8?q?[issue4060]_PyUnicode=5FDecodeUTF16(..., =09byteorder=3D0)_gets_it_wrong_on_Mac_OS_X/PowerPC?= In-Reply-To: <1223332030.39.0.313145041612.issue4060@psf.upfronthosting.co.za> Message-ID: <1223333570.49.0.524749814907.issue4060@psf.upfronthosting.co.za> Trent Mick added the comment: > BTW: Does this simplified approach really work for Python on Mac OS X It works for Python 2.5: http://svn.python.org/view/*checkout*/python/branches/release25-maint/configure.in?rev=66299 search for "BIGENDIAN". _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 00:53:22 2008 From: report at bugs.python.org (Trent Mick) Date: Mon, 06 Oct 2008 22:53:22 +0000 Subject: =?utf-8?q?[issue4060]_PyUnicode=5FDecodeUTF16(..., =09byteorder=3D0)_gets_it_wrong_on_Mac_OS_X/PowerPC?= In-Reply-To: <1223332030.39.0.313145041612.issue4060@psf.upfronthosting.co.za> Message-ID: <1223333602.84.0.947937125255.issue4060@psf.upfronthosting.co.za> Changes by Trent Mick : ---------- keywords: +patch Added file: http://bugs.python.org/file11720/issue4060_macosx_endian.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 00:59:06 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 06 Oct 2008 22:59:06 +0000 Subject: =?utf-8?q?[issue4060]_PyUnicode=5FDecodeUTF16(..., _=09byteorder=3D0)_gets_it_wrong_on_Mac_OS_X/PowerPC?= In-Reply-To: <1223333570.49.0.524749814907.issue4060@psf.upfronthosting.co.za> Message-ID: <48EA9838.2050801@egenix.com> Marc-Andre Lemburg added the comment: On 2008-10-07 00:52, Trent Mick wrote: > Trent Mick added the comment: > >> BTW: Does this simplified approach really work for Python on Mac OS X > > It works for Python 2.5: > > http://svn.python.org/view/*checkout*/python/branches/release25-maint/configure.in?rev=66299 > > search for "BIGENDIAN". Thanks... didn't see that the settings enables a compile-time check. ---------- title: PyUnicode_DecodeUTF16(..., byteorder=0) gets it wrong on Mac OS X/PowerPC -> PyUnicode_DecodeUTF16(..., byteorder=0) gets it wrong on Mac OS X/PowerPC _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 01:02:12 2008 From: report at bugs.python.org (Mehmet Yozcu) Date: Mon, 06 Oct 2008 23:02:12 +0000 Subject: [issue4061] summing two numbers-strange answer In-Reply-To: <1223334132.73.0.738465062828.issue4061@psf.upfronthosting.co.za> Message-ID: <1223334132.73.0.738465062828.issue4061@psf.upfronthosting.co.za> New submission from Mehmet Yozcu : I don't know what's wrong but when I write on the IDLE 2.3+6.3 it gives an answer like 8.59999999996 or similar when I write on the IDLE print 2.3+6.3 the answer is 8.6 as I expected I tried these two commands on the DrPython IDE;the result was the same. Below, I copy-past everything on the consol screen with detail of my system configuration. And I ask if someone can help me with this? Thank you in advance. mehmet at mehmet-desktop:~$ python Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> 2.3+6.3 8.5999999999999996 >>> print 2.3+6.3 8.6 >>> ---------- messages: 74408 nosy: mhmtyozcu001 severity: normal status: open title: summing two numbers-strange answer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 01:03:19 2008 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Oct 2008 23:03:19 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> Message-ID: <1223334199.08.0.284251242706.issue3187@psf.upfronthosting.co.za> STINNER Victor added the comment: Would it possible to close this issue since os.listdir() is fixed and many other related functions (posix, posixpath, ntpath, macpath, etc.) are also fixed? I propose to open new issues for new bugs since this issue becomes a little big long :) Eg. see new issues #4035 and #4036! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 01:07:13 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 06 Oct 2008 23:07:13 +0000 Subject: [issue4061] summing two numbers-strange answer In-Reply-To: <1223334132.73.0.738465062828.issue4061@psf.upfronthosting.co.za> Message-ID: <1223334433.36.0.332183862237.issue4061@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This is a result of poor floating-point precision: >>> 2.3 2.2999999999999998 >>> 6.3 6.2999999999999998 See http://docs.python.org/tutorial/floatingpoint.html for more information. ---------- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 01:09:09 2008 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Oct 2008 23:09:09 +0000 Subject: [issue4061] summing two numbers-strange answer In-Reply-To: <1223334132.73.0.738465062828.issue4061@psf.upfronthosting.co.za> Message-ID: <1223334549.6.0.438579751864.issue4061@psf.upfronthosting.co.za> STINNER Victor added the comment: Use Decimal to get an exact result: >>> from decimal import Decimal >>> print Decimal('2.3') + Decimal('6.3') 8.6 ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 01:13:22 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 06 Oct 2008 23:13:22 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <1223334199.08.0.284251242706.issue3187@psf.upfronthosting.co.za> Message-ID: <48EA9B8F.10707@v.loewis.de> Martin v. L?wis added the comment: > Would it possible to close this issue since os.listdir() is fixed and > many other related functions (posix, posixpath, ntpath, macpath, etc.) > are also fixed? IIUC, these fixes are still not complete: they lack documentation changes. Of course, it would have been better if the original patches already contained the necessary documentation and test suite changes. See msg74271 for what Guido considers the lacking documentation; you may find that other aspects also need documentation. As for test cases: it seems that those got waived, in the hurry. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 01:28:01 2008 From: report at bugs.python.org (Orestis Markou) Date: Mon, 06 Oct 2008 23:28:01 +0000 Subject: [issue4062] Reference to non-existent __version__ in ast module In-Reply-To: <1223335681.88.0.292034788645.issue4062@psf.upfronthosting.co.za> Message-ID: <1223335681.88.0.292034788645.issue4062@psf.upfronthosting.co.za> New submission from Orestis Markou : The docs for the ast module refer to a __version__ number, that should track the Subversion id. However, this doesn't exist: >>>import ast >>>ast.__version__ Traceback (most recent call last): File "", line 1, in AttributeError: 'module' object has no attribute '__version__' Looking at ast.py, nothing of that sort is there in the first place. ---------- assignee: georg.brandl components: Documentation messages: 74413 nosy: georg.brandl, orestis severity: normal status: open title: Reference to non-existent __version__ in ast module type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 01:34:57 2008 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Oct 2008 23:34:57 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <48EA9B8F.10707@v.loewis.de> Message-ID: <200810070135.14040.victor.stinner@haypocalc.com> STINNER Victor added the comment: Le Tuesday 07 October 2008 01:13:22 Martin v. L?wis, vous avez ?crit?: > IIUC, these fixes are still not complete: they lack documentation > changes. (...) Of course, it would have been better if the original patches > already contained the necessary documentation and test suite changes. Most (or all) patches include new tests about bytes. Here is a patch for os.rst documentation about listdir(), getcwdb() and readlink(). > See msg74271 for what Guido considers the lacking documentation; > you may find that other aspects also need documentation. I wrote a long document about bytes for filenames but not only. I'm still waiting for some contributors or reviewers: http://wiki.python.org/moin/Python3UnicodeDecodeError > As for test cases: it seems that those got waived, in the hurry. Can you be more precise? Which tests have to be improved/rewritten? Added file: http://bugs.python.org/file11721/library_os_doc.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: library_os_doc.patch URL: From report at bugs.python.org Tue Oct 7 02:26:19 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 07 Oct 2008 00:26:19 +0000 Subject: [issue3574] compile() cannot decode Latin-1 source encodings In-Reply-To: <1218933580.53.0.0614369271998.issue3574@psf.upfronthosting.co.za> Message-ID: <1223339179.46.0.794566312092.issue3574@psf.upfronthosting.co.za> Brett Cannon added the comment: So I tried the patch (I attached my version with different comments in the header file and removed some redundant change in whitespacing), and test_sys consistently fails for me: test_current_frames (__main__.SysModuleTest) AssertionError: '' != 'g456()' And this is after a ``make distclean`` and a new compile. This failure doesn't occur on a clean checkout made after a 'distclean'. ---------- assignee: brett.cannon -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 02:26:56 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 07 Oct 2008 00:26:56 +0000 Subject: [issue3574] compile() cannot decode Latin-1 source encodings In-Reply-To: <1218933580.53.0.0614369271998.issue3574@psf.upfronthosting.co.za> Message-ID: <1223339216.27.0.725630796242.issue3574@psf.upfronthosting.co.za> Changes by Brett Cannon : Added file: http://bugs.python.org/file11722/alt_latin_1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 03:43:49 2008 From: report at bugs.python.org (Mehmet Yozcu) Date: Tue, 07 Oct 2008 01:43:49 +0000 Subject: [issue4061] summing two numbers-strange answer In-Reply-To: <1223334549.6.0.438579751864.issue4061@psf.upfronthosting.co.za> Message-ID: Mehmet Yozcu added the comment: Dear Victor Stinner; Thank you very much for your answer. That was very helpful Best Wishes 2008/10/7 STINNER Victor : > > STINNER Victor added the comment: > > Use Decimal to get an exact result: >>>> from decimal import Decimal >>>> print Decimal('2.3') + Decimal('6.3') > 8.6 > > ---------- > nosy: +haypo > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 03:46:14 2008 From: report at bugs.python.org (Mehmet Yozcu) Date: Tue, 07 Oct 2008 01:46:14 +0000 Subject: [issue4061] summing two numbers-strange answer In-Reply-To: <1223334433.36.0.332183862237.issue4061@psf.upfronthosting.co.za> Message-ID: Mehmet Yozcu added the comment: Dear Benjamin Peterson; Thank you very much for your answer. That was very helpful Best Wishes 2008/10/7 Benjamin Peterson : > > Benjamin Peterson added the comment: > > This is a result of poor floating-point precision: > >>>> 2.3 > 2.2999999999999998 >>>> 6.3 > 6.2999999999999998 > > See http://docs.python.org/tutorial/floatingpoint.html for more information. > > ---------- > nosy: +benjamin.peterson > resolution: -> invalid > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 03:54:32 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 07 Oct 2008 01:54:32 +0000 Subject: [issue4061] summing two numbers-strange answer In-Reply-To: <1223334132.73.0.738465062828.issue4061@psf.upfronthosting.co.za> Message-ID: <1223344472.75.0.390968967279.issue4061@psf.upfronthosting.co.za> Raymond Hettinger added the comment: FWIW, what you're seeing is related to "representation error" not "poor precision". The numbers 2.3, 6.3, and 8.6 cannot be exactly represented in binary floating point. When you think about it, this is no more surprising than knowing the fractions 1/3 and 2/3 cannot be exactly represented in either decimal or binary floating point. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 04:00:17 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 07 Oct 2008 02:00:17 +0000 Subject: [issue4061] summing two numbers-strange answer In-Reply-To: <1223344472.75.0.390968967279.issue4061@psf.upfronthosting.co.za> Message-ID: <1afaf6160810061900h2e58248fk4b72cdeb55263abd@mail.gmail.com> Benjamin Peterson added the comment: On Mon, Oct 6, 2008 at 8:54 PM, Raymond Hettinger wrote: > > Raymond Hettinger added the comment: > > FWIW, what you're seeing is related to "representation error" not "poor > precision". The numbers 2.3, 6.3, and 8.6 cannot be exactly represented > in binary floating point. When you think about it, this is no more > surprising than knowing the fractions 1/3 and 2/3 cannot be exactly > represented in either decimal or binary floating point. Please excuse my poor terminology! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 04:03:57 2008 From: report at bugs.python.org (Skip Montanaro) Date: Tue, 07 Oct 2008 02:03:57 +0000 Subject: [issue4010] configure options don't trickle down to distutils In-Reply-To: <1222879433.22.0.765704464081.issue4010@psf.upfronthosting.co.za> Message-ID: <1223345037.35.0.461063072245.issue4010@psf.upfronthosting.co.za> Skip Montanaro added the comment: I checked in r66823 to add the -R flag extraction like Brett's -L extraction. I'll leave the issue open while folks discuss Roumen's proposal. I have no particular desire to delve deeper into distutils. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 04:33:18 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 07 Oct 2008 02:33:18 +0000 Subject: [issue3895] _lsprof issue In-Reply-To: <1221705166.83.0.0369639810422.issue3895@psf.upfronthosting.co.za> Message-ID: <1223346798.6.0.160435802417.issue3895@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Forward ported in r66827. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 05:46:48 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Tue, 07 Oct 2008 03:46:48 +0000 Subject: [issue3623] _json: fix raise_errmsg(), py_encode_basestring_ascii() and linecol() In-Reply-To: <1219273124.72.0.104841129313.issue3623@psf.upfronthosting.co.za> Message-ID: <1223351208.45.0.522219453996.issue3623@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: The patch looks good to me. You may want to fix the refleak in the PyList_Append() calls (I counted 4) too: if (PyList_Append(chunks, chunk)) { goto bail; } should be: if (PyList_Append(chunks, chunk)) { Py_DECREF(chunk); goto bail; } Also, line 384 and 548: Py_DECREF(chunks); chunks = NULL; should changed to Py_CLEAR(chunks); ---------- nosy: +alexandre.vassalotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 07:07:21 2008 From: report at bugs.python.org (David W. Lambert) Date: Tue, 07 Oct 2008 05:07:21 +0000 Subject: [issue4029] Documentation displays incorrectly in iexplore. In-Reply-To: <1223145448.73.0.544004394786.issue4029@psf.upfronthosting.co.za> Message-ID: <84B204FFB016BA4984227335D8257FBA21F266@CVCV0XI05.na.corning.com> David W. Lambert added the comment: I installed google chrome. The manual display is absolutely beautiful. Thanks for your good work! Proofreader Dave. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 08:13:06 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 07 Oct 2008 06:13:06 +0000 Subject: =?utf-8?q?[issue4060]_PyUnicode=5FDecodeUTF16(..., _=09byteorder=3D0)_gets_it_wrong_on_Mac_OS_X/PowerPC?= In-Reply-To: <1223332030.39.0.313145041612.issue4060@psf.upfronthosting.co.za> Message-ID: <1223359985.99.0.238345541124.issue4060@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The issue was introduced while moving universal-binary specific trickery from pyconfig.h.in to a separate header file. Obviously I must have been drunk at the time, because I didn't move the WORDS_BIGENDIAN bits correctly. The attached patch in "pymacconfig.h.patch" adds detection of WORDS_BIGENDIAN to pymacconfig.h, the header where the other pyconfig.h overrides for universal builds are as well. Background: this work was done while adding support for 4-way universal builds, that is x86, x86_64, ppc and ppc64. This required many more updates to pyconfig.h, most of which couldn't be done in a clean platform-independent way. That's why I (tried to) move the setting of pyconfig.h values that are affected by the current architecture to Include/pymacconfig.h. NOTE: I haven't tested my patch yet, I'll do a full test round later today. Added file: http://bugs.python.org/file11723/pymacconfig.h.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 09:06:42 2008 From: report at bugs.python.org (Trent Mick) Date: Tue, 07 Oct 2008 07:06:42 +0000 Subject: [issue4060] PyUnicode_DecodeUTF16(..., byteorder=0) gets it wrong on Mac OS X/PowerPC In-Reply-To: <1223359985.99.0.238345541124.issue4060@psf.upfronthosting.co.za> Message-ID: <6db0ea510810070006rbe0290dk9bc744d607a39bf3@mail.gmail.com> Trent Mick added the comment: > Added file: http://bugs.python.org/file11723/pymacconfig.h.patch I'll test that on my end tomorrow -- though it looks like it will work fine. Thanks. ---------- title: PyUnicode_DecodeUTF16(..., byteorder=0) gets it wrong on Mac OS X/PowerPC -> PyUnicode_DecodeUTF16(..., byteorder=0) gets it wrong on Mac OS X/PowerPC _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 09:12:23 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 07 Oct 2008 07:12:23 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <200810070135.14040.victor.stinner@haypocalc.com> Message-ID: <48EB0BCE.80503@v.loewis.de> Martin v. L?wis added the comment: > Most (or all) patches include new tests about bytes. Here is a patch for > os.rst documentation about listdir(), getcwdb() and readlink(). Thanks! Committed as r66829. I've added additional documentation in r66830, which should complete Guido's list of things to be documented. So the issue can be closed now. >> See msg74271 for what Guido considers the lacking documentation; >> you may find that other aspects also need documentation. > > I wrote a long document about bytes for filenames but not only. I'm still > waiting for some contributors or reviewers: > http://wiki.python.org/moin/Python3UnicodeDecodeError We should discuss that on python-dev, of course - the question is whether additional documentation patches are needed in response to this specific change. >> As for test cases: it seems that those got waived, in the hurry. > > Can you be more precise? Which tests have to be improved/rewritten? I was probably looking at the wrong patches (such as getcwd_bytes.patch, merge_os_getcwd_getcwdu.patch, etc); I now see that the final patch did have tests. I recommend that patches that get superseded by other patches are removed from the issue. The won't be deleted; it's still possible to navigate to them through the History at the bottom of the issue. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 09:12:43 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 07 Oct 2008 07:12:43 +0000 Subject: [issue3187] os.listdir can return byte strings In-Reply-To: <1214303307.09.0.102277146744.issue3187@psf.upfronthosting.co.za> Message-ID: <1223363563.01.0.291485913217.issue3187@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 09:40:23 2008 From: report at bugs.python.org (=?utf-8?q?Mattias_Br=C3=A4ndstr=C3=B6m?=) Date: Tue, 07 Oct 2008 07:40:23 +0000 Subject: [issue3876] multiprocessing does not compile on systems which do not define sem_timedwait In-Reply-To: <1221541852.59.0.453473189868.issue3876@psf.upfronthosting.co.za> Message-ID: <1223365223.6.0.457268851084.issue3876@psf.upfronthosting.co.za> Mattias Br?ndstr?m added the comment: When trying to build Python 2.6 on AIX 5.2 the following error message: ( The steps I have taken prior to this are: 1. export PATH=/usr/bin/:/usr/vacpp/bin/ 2. ./configure --with-gcc=xlc_r --with-cxx=xlC_r --disable-ipv6 3. make ) ./Modules/ld_so_aix xlc_r -bI:Modules/python.exp build/temp.aix-5.2- 2.6/home/mabr/Python-2.6/Modules/_multiprocessing/multiprocessing.o build/temp.aix-5.2-2.6/home/mabr/Python- 2.6/Modules/_multiprocessing/socket_connection.o build/temp.aix-5.2- 2.6/home/mabr/Python-2.6/Modules/_multiprocessing/semaphore.o - L/usr/local/lib -o build/lib.aix-5.2-2.6/_multiprocessing.so ld: 0711-317 ERROR: Undefined symbol: .sem_timedwait ld: 0711-317 ERROR: Undefined symbol: .CMSG_SPACE ld: 0711-317 ERROR: Undefined symbol: .CMSG_LEN ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. *** WARNING: renaming "_multiprocessing" since importing it failed: No such file or directory error: No such file or directory make: The error code from the last command is 1. ---------- nosy: +brasse _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 10:21:17 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 07 Oct 2008 08:21:17 +0000 Subject: [issue3574] compile() cannot decode Latin-1 source encodings In-Reply-To: <1218933580.53.0.0614369271998.issue3574@psf.upfronthosting.co.za> Message-ID: <1223367677.51.0.788395695099.issue3574@psf.upfronthosting.co.za> STINNER Victor added the comment: test_sys failure is fixed by the issue #2384. ---------- dependencies: +[Py3k] line number is wrong after encoding declaration _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 11:09:13 2008 From: report at bugs.python.org (Collin Winter) Date: Tue, 07 Oct 2008 09:09:13 +0000 Subject: [issue3448] Multi-process 2to3 In-Reply-To: <1217019998.69.0.231122552254.issue3448@psf.upfronthosting.co.za> Message-ID: <1223370553.57.0.324674522357.issue3448@psf.upfronthosting.co.za> Collin Winter added the comment: Benjamin, what "complexity" did you encounter when trying to use lib2to3 in your own work? Unless there's a concrete use-case where the mere existence of multiprocessing support (as opposed to actually enabling that support) made a tangible project harder, I say we leave it in. I can't imagine someone making the conscious choice to slow down their own lib2to3-based refactoring tool by 2x; if those people appear later, we'll deal with their concerns at that time. Nick: if you don't have time to make this work in 2.6, I can do so. The patch will also need doc fixes and tests, though the core functionality is fine. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 11:16:03 2008 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 07 Oct 2008 09:16:03 +0000 Subject: [issue3944] faster long multiplication In-Reply-To: <1222165559.78.0.447355238601.issue3944@psf.upfronthosting.co.za> Message-ID: <1223370963.45.0.584915490482.issue3944@psf.upfronthosting.co.za> Mark Dickinson added the comment: It looks as though changing PyLong_SHIFT to 30 everywhere is much simpler than I feared. Here's a short patch that does exactly that. It: - changes the definitions in longintrepr.h - changes marshal.c to write digits as longs, not shorts - adds some casts to longobject.c (most of which should really have been there already---clearly Python's never encountered a machine where ints are only 2 bytes long, even though the standard seems to permit it). With this patch, all tests pass on my machine with the exception of the getsizeof tests in test_sys; and sys.getsizeof is working fine---it's the tests that need to be changed. Still to do: - use uint64 and uint32 instead of unsigned long long and unsigned long, when available; this avoids wasting lots of space on platforms where a long is 64 bits. - provide fallback definitions for platforms that don't have any 64-bit type available - (?)expose the value of PyLong_SHIFT to Python somewhere (in sys?); then the getsizeof tests could use this value to determine whether a digit is expected to take 2 bytes or 4 (or ...) Added file: http://bugs.python.org/file11724/30bit.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 11:17:05 2008 From: report at bugs.python.org (Thomas Guettler) Date: Tue, 07 Oct 2008 09:17:05 +0000 Subject: [issue4063] sphinx: make all-pdf does not exist. In-Reply-To: <1223371025.23.0.890988080219.issue4063@psf.upfronthosting.co.za> Message-ID: <1223371025.23.0.890988080219.issue4063@psf.upfronthosting.co.za> New submission from Thomas Guettler : Hi, after sphinx-quickstart and running "make latex" I get: Build finished; the LaTeX files are in build/latex. Run `make all-pdf' or `make all-ps' in that directory to run these through user at host:...> LANG=C make all-pdf make: *** No rule to make target `all-pdf'. Stop. Sphinx Version 0.4.2 ---------- assignee: georg.brandl components: Documentation tools (Sphinx) messages: 74431 nosy: georg.brandl, guettli severity: normal status: open title: sphinx: make all-pdf does not exist. versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 11:41:46 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 07 Oct 2008 09:41:46 +0000 Subject: [issue4064] distutils.util.get_platform() is wrong for universal builds on macosx In-Reply-To: <1223372506.67.0.0695437695796.issue4064@psf.upfronthosting.co.za> Message-ID: <1223372506.67.0.0695437695796.issue4064@psf.upfronthosting.co.za> New submission from Ronald Oussoren : When using a universal build of python on macosx distutils.util.get_platform should use "fat" for the machine architecture, instead of the architecture of the current machine. That's not what's currently happening: $ python26 -c 'from distutils.util import get_platform; print get_platform()' macosx-10.3-ppc $ ---------- components: Distutils messages: 74432 nosy: ronaldoussoren severity: normal status: open title: distutils.util.get_platform() is wrong for universal builds on macosx versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 11:42:59 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 07 Oct 2008 09:42:59 +0000 Subject: [issue4064] distutils.util.get_platform() is wrong for universal builds on macosx In-Reply-To: <1223372506.67.0.0695437695796.issue4064@psf.upfronthosting.co.za> Message-ID: <1223372579.73.0.741462613002.issue4064@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The attached patch fixes this issue. ---------- keywords: +patch Added file: http://bugs.python.org/file11725/issue4064-fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 11:43:22 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 07 Oct 2008 09:43:22 +0000 Subject: [issue4064] distutils.util.get_platform() is wrong for universal builds on macosx In-Reply-To: <1223372506.67.0.0695437695796.issue4064@psf.upfronthosting.co.za> Message-ID: <1223372602.49.0.863402287433.issue4064@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- priority: -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 12:10:10 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 07 Oct 2008 10:10:10 +0000 Subject: [issue3433] Mac, 3.0 framework install error with fink cp In-Reply-To: <1216867410.47.0.735334999055.issue3433@psf.upfronthosting.co.za> Message-ID: <1223374210.6.0.478994022453.issue3433@psf.upfronthosting.co.za> Ronald Oussoren added the comment: IMHO the best fix would be to use "/bin/cp" instead of plain "cp". It is not possible to use $(INSTALL) here because this step does a recursive copy. NOTE: The same fix should also be applied to the trunk and release26-maint branch. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 12:10:19 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 07 Oct 2008 10:10:19 +0000 Subject: [issue3433] Mac, 3.0 framework install error with fink cp In-Reply-To: <1216867410.47.0.735334999055.issue3433@psf.upfronthosting.co.za> Message-ID: <1223374219.87.0.301027813837.issue3433@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 12:49:48 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 07 Oct 2008 10:49:48 +0000 Subject: [issue2384] [Py3k] line number is wrong after encoding declaration In-Reply-To: <1205825319.07.0.115749100037.issue2384@psf.upfronthosting.co.za> Message-ID: <1223376588.58.0.565943993071.issue2384@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Your patch does the correct thing, however an explanation of the -1 value would be welcome. Something like: /* The file has been reopened; parsing will restart from * the beginning of the file, we have to reset the line number. * But this function has been called from inside tok_nextc() which * will increment lineno before it returns. So we set it -1 so that * the next call to tok_nextc() will start with tok->lineno == 0. */ Or we could change the place of the tok->lineno++ in tok_nextc() so that it is called before the call to decoding_fgets(); other changes will be needed. Then, I think that your test is not correct: What is the meaning of the following line? sys.exit(traceback.tb_lineno(sys.exc_info()[2])) (the module "traceback" has no attribute "tp_lineno") I presume that you intended something like: traceback.print_exc() sys.exit(sys.exc_info()[2].tb_lineno) and test at some point that "process.returncode == lineno" ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 12:52:52 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 07 Oct 2008 10:52:52 +0000 Subject: [issue4065] _multiprocessing doesn't build on macosx 10.3 In-Reply-To: <1223376772.75.0.564119782301.issue4065@psf.upfronthosting.co.za> Message-ID: <1223376772.75.0.564119782301.issue4065@psf.upfronthosting.co.za> New submission from Ronald Oussoren : I'm trying to build python 2.6 on a Mac OS X 10.3 system. This fails to build the multiprocessing extension due to a missing definition of "struct iovec". It turns out that you have to include to get that definition on OSX 10.3. Adding '#include ' to multiprocessing.h enables building the extension on OSX 10.3, but is probably not the right solution. ---------- components: Extension Modules messages: 74436 nosy: ronaldoussoren priority: low severity: normal status: open title: _multiprocessing doesn't build on macosx 10.3 type: compile error versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 13:38:44 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 07 Oct 2008 11:38:44 +0000 Subject: [issue3448] Multi-process 2to3 In-Reply-To: <1217019998.69.0.231122552254.issue3448@psf.upfronthosting.co.za> Message-ID: <1223379524.12.0.700209017883.issue3448@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I suggest that when using lib2to3 as a library, multiprocessing is not enabled by default; there may be uses of the library that are incompatible with multiprocessing. It may be enabled by default when using it from the command line (or the lib2to3.main module). But which default number of processes would this use? Concerning the patch itself: - the line "from processing import Process" seems suspect. - Did you consider using something as simple as: pool = multiprocessing.Pool(self.options.num_processes) pool.map(self.refactor_file, fullnames) It should do all the job: start processes, queue tasks, wait for results. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 14:05:08 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 07 Oct 2008 12:05:08 +0000 Subject: [issue2276] distutils out-of-date for runtime_library_dirs flag on OS X In-Reply-To: <1205290203.53.0.517851484238.issue2276@psf.upfronthosting.co.za> Message-ID: <1223381108.51.0.721355466948.issue2276@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Do you mean the -rpath option? Note that this is (IMHO) less useful than on other systems because the linked-to library needs to have a specific link path (@rpath/mylib.dylib). It can be useful for linking extentions though. Using this feature requires OSX 10.5, AFAIK it is not supported on earlier releases of OSX. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 14:06:10 2008 From: report at bugs.python.org (=?utf-8?q?Mattias_Br=C3=A4ndstr=C3=B6m?=) Date: Tue, 07 Oct 2008 12:06:10 +0000 Subject: [issue3876] multiprocessing does not compile on systems which do not define sem_timedwait In-Reply-To: <1221541852.59.0.453473189868.issue3876@psf.upfronthosting.co.za> Message-ID: <1223381170.4.0.538221828301.issue3876@psf.upfronthosting.co.za> Mattias Br?ndstr?m added the comment: Here is a small patch that lets me build on AIX 5.2. Added file: http://bugs.python.org/file11726/aix-patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 14:08:03 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 07 Oct 2008 12:08:03 +0000 Subject: [issue4064] distutils.util.get_platform() is wrong for universal builds on macosx In-Reply-To: <1223372506.67.0.0695437695796.issue4064@psf.upfronthosting.co.za> Message-ID: <1223381283.79.0.163922419923.issue4064@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- keywords: +needs review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 14:18:23 2008 From: report at bugs.python.org (Nat) Date: Tue, 07 Oct 2008 12:18:23 +0000 Subject: [issue4017] IDLE 2.6 broken on OSX (Leopard) In-Reply-To: <1222960590.08.0.635891151551.issue4017@psf.upfronthosting.co.za> Message-ID: <1223381903.39.0.742285688753.issue4017@psf.upfronthosting.co.za> Nat added the comment: I asked a slightly different question (related to tkinter in general on OS 10.4.11), but the symptoms were remarkably similar - perhaps the solution is as well? http://groups.google.com/group/comp.lang.python/browse_thread/thread/1114b05318a5507e/a7c269e62b4f0434#a7c269e62b4f0434 Worth a try? ---------- nosy: +njw23 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 14:21:47 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 07 Oct 2008 12:21:47 +0000 Subject: [issue3975] PyTraceBack_Print() doesn't respect # coding: xxx header In-Reply-To: <1222441949.55.0.46817952378.issue3975@psf.upfronthosting.co.za> Message-ID: <1223382107.41.0.485181053992.issue3975@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > The line is not displayed (why? no idea) Well, it's difficult to re-open ... ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 14:33:00 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 07 Oct 2008 12:33:00 +0000 Subject: [issue4060] PyUnicode_DecodeUTF16(..., byteorder=0) gets it wrong on Mac OS X/PowerPC In-Reply-To: <1223332030.39.0.313145041612.issue4060@psf.upfronthosting.co.za> Message-ID: <1223382780.08.0.44353191376.issue4060@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Annoyingly enough my patch isn't good enough, it turns out that ctypes has introduced a SIZEOF__BOOL definition in configure.in and that needs special caseing as well. pymacconfig.h.patch2 fixes that issue as well. Do you have access to a PPC G5 system? I've determined the correct value of SIZEOF__BOOL for that platform by reading the assembly code for a small test program and hence am not 100% sure that sizeof(_Bool) actually is 1 on that architecture. One other annoying issue cropped up: regrtest.py consistently hangs in test_signal (with 100% CPU usage) when I run it in rossetta (PPC emulator). I'll test this on an actual PPC machine as well, this might well be an issue with the PPC emulator. Added file: http://bugs.python.org/file11727/pymacconfig.h.patch2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 15:06:01 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 07 Oct 2008 13:06:01 +0000 Subject: [issue3975] PyTraceBack_Print() doesn't respect # coding: xxx header In-Reply-To: <1222441949.55.0.46817952378.issue3975@psf.upfronthosting.co.za> Message-ID: <1223384761.41.0.362907022937.issue3975@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The patch goes in the good direction, here are some remarks: - The two calls to open() are missing the O_BINARY flag, necessary on Windows to avoid newline translation. This may be important for some codecs. - the GIL should be released around calls to open(); searching the whole sys.path can be long. Besides this, the "char* filename" is relevant only on utf8-encoded filesystems, and will not work on windows with non-ascii filenames. But this is another issue. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 15:13:51 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 07 Oct 2008 13:13:51 +0000 Subject: [issue4004] missing newline in "Could not convert argument %s to string" error message In-Reply-To: <1222814316.77.0.949437896792.issue4004@psf.upfronthosting.co.za> Message-ID: <1223385231.37.0.190919668667.issue4004@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The patch is good, and consistent with all usages of fprintf(stderr) in pythonrun.c, for example. Please also add \n to fprintf(stderr, "out of memory"); in both python.c and frozenmain.c ---------- nosy: +amaury.forgeotdarc resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 15:17:12 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 07 Oct 2008 13:17:12 +0000 Subject: [issue3740] PEP 3121 --- module state is not nul-initalized as claimed in the PEP In-Reply-To: <1220109289.56.0.0975805859845.issue3740@psf.upfronthosting.co.za> Message-ID: <1223385432.32.0.0540446293607.issue3740@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Thanks! Committed as r66831 ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 15:23:14 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 07 Oct 2008 13:23:14 +0000 Subject: [issue4004] missing newline in "Could not convert argument %s to string" error message In-Reply-To: <1222814316.77.0.949437896792.issue4004@psf.upfronthosting.co.za> Message-ID: <1223385794.04.0.928319499572.issue4004@psf.upfronthosting.co.za> Martin v. L?wis added the comment: What's the purpose of the additional YY substring? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 15:34:08 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 07 Oct 2008 13:34:08 +0000 Subject: [issue4004] missing newline in "Could not convert argument %s to string" error message In-Reply-To: <1222814316.77.0.949437896792.issue4004@psf.upfronthosting.co.za> Message-ID: <1223386448.9.0.434454237476.issue4004@psf.upfronthosting.co.za> STINNER Victor added the comment: @amaury.forgeotdarc: Done for "out of memory". @loewis: Oops, it's an error. I removed the YY. So here is a new patch. Added file: http://bugs.python.org/file11728/argv_error_newline-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 15:37:41 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 07 Oct 2008 13:37:41 +0000 Subject: [issue4060] PyUnicode_DecodeUTF16(..., byteorder=0) gets it wrong on Mac OS X/PowerPC In-Reply-To: <1223332030.39.0.313145041612.issue4060@psf.upfronthosting.co.za> Message-ID: <1223386661.78.0.0945758943811.issue4060@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I agree with Trent that this is a bug, and I agree with the second patch (pymacconfig.h.patch2). Mark-Andre, sys.byteorder is not affected because detects the byte order at run-time, not at compile-time. Likewise, in the struct module, several code paths rely on dynamic determination of the endianness, such as _PyLong_FromByteArray, the float packing, and the whichtable function. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 15:43:36 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 07 Oct 2008 13:43:36 +0000 Subject: [issue4035] Support bytes for os.exec*() In-Reply-To: <1223077104.22.0.62328245443.issue4035@psf.upfronthosting.co.za> Message-ID: <1223387016.73.0.659255086383.issue4035@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Can you come up with a test case? Also, it would probably be good to document what parameters can have what datatypes in the exec family of functions. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 15:50:11 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 07 Oct 2008 13:50:11 +0000 Subject: [issue3975] PyTraceBack_Print() doesn't respect # coding: xxx header In-Reply-To: <1223384761.41.0.362907022937.issue3975@psf.upfronthosting.co.za> Message-ID: <200810071550.28747.victor.stinner@haypocalc.com> STINNER Victor added the comment: Le Tuesday 07 October 2008 15:06:01 Amaury Forgeot d'Arc, vous avez ?crit?: > - The two calls to open() are missing the O_BINARY flag, necessary on > Windows to avoid newline translation. This may be important for some > codecs. Oops, I always forget Windows specific options :-/ > - the GIL should be released around calls to open(); searching the whole > sys.path can be long. Ok, O_BINARY and GIL fixed. I just realized that sys.path is considered as a bytes string (PyBytes_Check) whereas Python3 uses an unicode string! ['', '/home/haypo/prog/python-ptrace', (...)] >>> sys.path.append(b'bytes'); sys.path ['', '/home/haypo/prog/python-ptrace', '(...)', b'bytes'] Oops, so it's possible to mix strings and bytes. But the normal case is a list of unicode strings. Another fix is needed :-/ I don't know how to get into "if (fd < 0)" (code using sys.path). Any clue? > Besides this, the "char* filename" is relevant only on utf8-encoded > filesystems, and will not work on windows with non-ascii filenames. But > this is another issue. I don't know the Windows API enough to answer. Doesn't Python provide "high level" functions to open a file? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 16:19:54 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 07 Oct 2008 14:19:54 +0000 Subject: [issue4035] Support bytes for os.exec*() In-Reply-To: <1223077104.22.0.62328245443.issue4035@psf.upfronthosting.co.za> Message-ID: <1223389194.75.0.313788004432.issue4035@psf.upfronthosting.co.za> STINNER Victor added the comment: The patch is incomplete. It allows bytes for the arguments but not for the environment variables: posix_execve() in Modules/posixmodule.c uses: PyArg_Parse(key "s", &k) PyArg_Parse(val "s", &v) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 16:26:15 2008 From: report at bugs.python.org (Marcin Bachry) Date: Tue, 07 Oct 2008 14:26:15 +0000 Subject: [issue4066] smtplib SMTP_SSL._get_socket doesn't return a value In-Reply-To: <1223389575.89.0.292427308742.issue4066@psf.upfronthosting.co.za> Message-ID: <1223389575.89.0.292427308742.issue4066@psf.upfronthosting.co.za> New submission from Marcin Bachry : SMTP.connect method expects _get_socket() method to return socket object: self.sock = self._get_socket(host, port, self.timeout) but overriden _get_socket() method in SMTP_SSL class doesnt' have return statement (it sets self.sock instead). Hence I get SMTPServerDisconnected exception when I try to send mail over ssl. The same seems to apply to LMTP class. ---------- components: Library (Lib) files: smtplib.diff keywords: patch messages: 74452 nosy: marcin.bachry severity: normal status: open title: smtplib SMTP_SSL._get_socket doesn't return a value type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file11729/smtplib.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 16:37:56 2008 From: report at bugs.python.org (Marcin Bachry) Date: Tue, 07 Oct 2008 14:37:56 +0000 Subject: [issue4067] ast.fix_missing_locations() breaks if node doesn't have "_attributes" variable In-Reply-To: <1223390276.15.0.153059354273.issue4067@psf.upfronthosting.co.za> Message-ID: <1223390276.15.0.153059354273.issue4067@psf.upfronthosting.co.za> New submission from Marcin Bachry : ast.fix_missing_locations() fails if any node is missing "_attributes" instance variable - but it's the case of some fundamental nodes like "alias" or "identifier". When I run simple test: import ast with open(__file__) as fp: tree = ast.parse(fp.read()) ast.fix_missing_locations(tree) I get: $ python2.6 /tmp/test.py Traceback (most recent call last): File "/tmp/test.py", line 5, in ast.fix_missing_locations(tree) File "/usr/local/lib/python2.6/ast.py", line 133, in fix_missing_locations _fix(node, 1, 0) File "/usr/local/lib/python2.6/ast.py", line 132, in _fix _fix(child, lineno, col_offset) File "/usr/local/lib/python2.6/ast.py", line 132, in _fix _fix(child, lineno, col_offset) File "/usr/local/lib/python2.6/ast.py", line 121, in _fix if 'lineno' in node._attributes: AttributeError: 'alias' object has no attribute '_attributes' ---------- components: Library (Lib) files: ast.diff keywords: patch messages: 74453 nosy: marcin.bachry severity: normal status: open title: ast.fix_missing_locations() breaks if node doesn't have "_attributes" variable type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file11730/ast.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 16:43:05 2008 From: report at bugs.python.org (=?utf-8?q?Gerhard_H=C3=A4ring?=) Date: Tue, 07 Oct 2008 14:43:05 +0000 Subject: [issue4068] Backport fix for issue 3312 In-Reply-To: <1223390585.08.0.984761019312.issue4068@psf.upfronthosting.co.za> Message-ID: <1223390585.08.0.984761019312.issue4068@psf.upfronthosting.co.za> New submission from Gerhard H?ring : This is a backport of Georg Brandl's fix for issue #3312. ---------- assignee: ghaering files: 253_backport_fix_issue3312.diff keywords: patch, patch messages: 74454 nosy: ghaering priority: normal severity: normal status: open title: Backport fix for issue 3312 type: crash versions: Python 2.5.3 Added file: http://bugs.python.org/file11731/253_backport_fix_issue3312.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 16:55:01 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 07 Oct 2008 14:55:01 +0000 Subject: [issue3975] PyTraceBack_Print() doesn't respect # coding: xxx header In-Reply-To: <1222441949.55.0.46817952378.issue3975@psf.upfronthosting.co.za> Message-ID: <1223391301.29.0.502666459592.issue3975@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > Ok, O_BINARY and GIL fixed. which patch? ;-) > I just realized that sys.path is considered as a bytes string > (PyBytes_Check) whereas Python3 uses an unicode string! > > ['', '/home/haypo/prog/python-ptrace', (...)] > >>> sys.path.append(b'bytes'); sys.path > ['', '/home/haypo/prog/python-ptrace', '(...)', b'bytes'] > > Oops, so it's possible to mix strings and bytes. But the normal case is a list > of unicode strings. Another fix is needed :-/ You could do like the import function, which converts unicode with the fs encoding. See the code in import.c, below "PyList_GetItem(path, i)" > I don't know how to get into "if (fd < 0)" (code using sys.path). > Any clue? The .pyc stores the full path of the .py, at compilation time. If the directory is moved, or accessed with another name (via mounts or soft links), the traceback displays the filename as stored in the .pyc file, but the content can still be displayed. It does not work every time, though, for example when the directory is shared between Windows & Unix. > > Besides this, the "char* filename" is relevant only on utf8-encoded > > filesystems, and will not work on windows with non-ascii filenames. > > But this is another issue. > > I don't know the Windows API enough to answer. Windows interprets the char* variables with its system-set "mbcs" encoding. On my machine, it is equivalent to the cp1252 encoding (almost equivalent latin-1). Since the 'filename' comes from a call to _PyUnicode_AsString(tb->tb_frame->f_code->co_filename), it will be wrong with any accented letter. > Doesn't Python provide "high level" functions to open a file? io.open()? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 17:00:36 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 07 Oct 2008 15:00:36 +0000 Subject: [issue3975] PyTraceBack_Print() doesn't respect # coding: xxx header In-Reply-To: <1222441949.55.0.46817952378.issue3975@psf.upfronthosting.co.za> Message-ID: <1223391636.39.0.683034290344.issue3975@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file11732/traceback_unicode-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 17:00:38 2008 From: report at bugs.python.org (Bill Janssen) Date: Tue, 07 Oct 2008 15:00:38 +0000 Subject: [issue2276] distutils out-of-date for runtime_library_dirs flag on OS X In-Reply-To: <1205290203.53.0.517851484238.issue2276@psf.upfronthosting.co.za> Message-ID: <1223391638.89.0.698887549705.issue2276@psf.upfronthosting.co.za> Bill Janssen added the comment: Yes, we were looking at using this for linking PyLucene's JCC extension. I believe we came up with a different way of doing it. It would still be useful to have distutils.unixccompiler.runtime_library_dir_option() updated to understand the right flags for Leopard. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 17:00:57 2008 From: report at bugs.python.org (Han-Wen Nienhuys) Date: Tue, 07 Oct 2008 15:00:57 +0000 Subject: [issue1597850] Cross compiling patches for MINGW Message-ID: <1223391657.35.0.891179032701.issue1597850@psf.upfronthosting.co.za> Han-Wen Nienhuys added the comment: I'm still interested in this, but the last time I did anything, I jumped through all the hoops (see conversation here), and not a single change was put into trunk. I'm not very enthousiastic about spending a lot time on this again. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 17:03:55 2008 From: report at bugs.python.org (Han-Wen Nienhuys) Date: Tue, 07 Oct 2008 15:03:55 +0000 Subject: [issue1597850] Cross compiling patches for MINGW Message-ID: <1223391835.13.0.417001535974.issue1597850@psf.upfronthosting.co.za> Han-Wen Nienhuys added the comment: @Luke the compiling strategy for Python (IIRC) is to compile everything, including modules that will never work, and use compiler errors as a signal to not include a module in the result. this is what I end up with for 2.4 ./usr/bin/libpython2.4.dll ./usr/bin/imageop.dll ./usr/bin/_codecs_hk.dll ./usr/bin/_codecs_jp.dll ./usr/bin/_heapq.dll ./usr/bin/_random.dll ./usr/bin/cPickle.dll ./usr/bin/cStringIO.dll ./usr/bin/regex.dll ./usr/bin/collections.dll ./usr/bin/_locale.dll ./usr/bin/_testcapi.dll ./usr/bin/_codecs_tw.dll ./usr/bin/pyexpat.dll ./usr/bin/_hotshot.dll ./usr/bin/mmap.dll ./usr/bin/math.dll ./usr/bin/binascii.dll ./usr/bin/array.dll ./usr/bin/smtpd.py ./usr/bin/cmath.dll ./usr/bin/audioop.dll ./usr/bin/_codecs_kr.dll ./usr/bin/parser.dll ./usr/bin/itertools.dll ./usr/bin/_csv.dll _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 17:07:08 2008 From: report at bugs.python.org (Daniel Stutzbach) Date: Tue, 07 Oct 2008 15:07:08 +0000 Subject: [issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters In-Reply-To: <1210441054.55.0.264831714691.issue2810@psf.upfronthosting.co.za> Message-ID: <1223392028.9.0.446121066512.issue2810@psf.upfronthosting.co.za> Changes by Daniel Stutzbach : ---------- versions: +Python 2.5.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 17:23:50 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 07 Oct 2008 15:23:50 +0000 Subject: =?utf-8?q?[issue4060]_PyUnicode=5FDecodeUTF16(..., =09byteorder=3D0)_gets_it_wrong_on_Mac_OS_X/PowerPC?= In-Reply-To: <1223382780.08.0.44353191376.issue4060@psf.upfronthosting.co.za> Message-ID: <48EB7F00.2080703@egenix.com> Marc-Andre Lemburg added the comment: On 2008-10-07 14:33, Ronald Oussoren wrote: > Ronald Oussoren added the comment: > > Annoyingly enough my patch isn't good enough, it turns out that ctypes > has introduced a SIZEOF__BOOL definition in configure.in and that needs > special caseing as well. > > pymacconfig.h.patch2 fixes that issue as well. Do you have access to a > PPC G5 system? I've determined the correct value of SIZEOF__BOOL for > that platform by reading the assembly code for a small test program and > hence am not 100% sure that sizeof(_Bool) actually is 1 on that > architecture. Using this helper: #include main() { printf("sizeof(_Bool)=%i bytes\n", sizeof(_Bool)); } I get: sizeof(_Bool)=4 bytes on a G4 PPC. Seems strange to me, but reasonable since it is defined like this in stdbool.h: #if __STDC_VERSION__ < 199901L && __GNUC__ < 3 typedef int _Bool; #endif ---------- title: PyUnicode_DecodeUTF16(..., byteorder=0) gets it wrong on Mac OS X/PowerPC -> PyUnicode_DecodeUTF16(..., byteorder=0) gets it wrong on Mac OS X/PowerPC _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 17:45:30 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 07 Oct 2008 15:45:30 +0000 Subject: [issue3975] PyTraceBack_Print() doesn't respect # coding: xxx header In-Reply-To: <1222441949.55.0.46817952378.issue3975@psf.upfronthosting.co.za> Message-ID: <1223394330.82.0.103594259377.issue3975@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I still have remarks about traceback_unicode-3.patch, that I did not see before: - (a minor thing) PyMem_FREE(found_encoding) could appear only once, just after PyFile_FromFd. - I feel it dangerous to call the PyUnicode_AS_UNICODE() macro without checking that PyFile_GetLine() actually returned a PyUnicode object. - If the "truncated" variable is NULL, an exception has been set; it is necessary to exit the function. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 17:58:34 2008 From: report at bugs.python.org (Carl Friedrich Bolz) Date: Tue, 07 Oct 2008 15:58:34 +0000 Subject: [issue4069] set.remove raises confusing KeyError In-Reply-To: <1223395114.41.0.0284557162772.issue4069@psf.upfronthosting.co.za> Message-ID: <1223395114.41.0.0284557162772.issue4069@psf.upfronthosting.co.za> New submission from Carl Friedrich Bolz : When trying to remove a set from a set, the KeyError that is raised is confusing: Python 2.6 (r26:66714, Oct 7 2008, 13:23:57) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> s = set([frozenset([1, 2]), frozenset([2, 3])]) >>> s.remove(set([3, 4])) Traceback (most recent call last): File "", line 1, in KeyError: frozenset([]) I understand that s.remove(set(...)) turns the set into a frozenset, but I was expecting this converted frozenset to be attached to the KeyError, not an empty set. ---------- components: Interpreter Core messages: 74461 nosy: cfbolz severity: normal status: open title: set.remove raises confusing KeyError type: behavior versions: Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 18:08:28 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 07 Oct 2008 16:08:28 +0000 Subject: [issue4063] sphinx: make all-pdf does not exist. In-Reply-To: <1223371025.23.0.890988080219.issue4063@psf.upfronthosting.co.za> Message-ID: <1223395708.12.0.396626599709.issue4063@psf.upfronthosting.co.za> Georg Brandl added the comment: Are you sure you're doing "make all-pdf" in the build/latex directory? ---------- resolution: -> works for me status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 18:29:02 2008 From: report at bugs.python.org (Trent Mick) Date: Tue, 07 Oct 2008 16:29:02 +0000 Subject: [issue4060] PyUnicode_DecodeUTF16(..., byteorder=0) gets it wrong on Mac OS X/PowerPC In-Reply-To: <48EB7F00.2080703@egenix.com> Message-ID: <6db0ea510810070928y51d35074i84c7ec18db8d03d8@mail.gmail.com> Trent Mick added the comment: > I get: > > sizeof(_Bool)=4 bytes > > on a G4 PPC. Same thing on a G5 PPC: $ cat main.c #include int main(void) { printf("sizeof(_Bool) is %d\n", sizeof(_Bool)); } $ gcc main.c $ ./a.out sizeof(_Bool) is 4 ---------- title: PyUnicode_DecodeUTF16(..., byteorder=0) gets it wrong on Mac OS X/PowerPC -> PyUnicode_DecodeUTF16(..., byteorder=0) gets it wrong on Mac OS X/PowerPC _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 18:40:25 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 07 Oct 2008 16:40:25 +0000 Subject: [issue4069] set.remove raises confusing KeyError In-Reply-To: <1223395114.41.0.0284557162772.issue4069@psf.upfronthosting.co.za> Message-ID: <1223397625.71.0.702013547491.issue4069@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The KeyError initially contains the correct frozenset, but its content is swapped with the original set object (yes, like C++ std::set::swap(), this mutates the frozenset!). Attached a patch with unit test. The exception now shows the original key: KeyError: {3, 4} ---------- keywords: +needs review, patch nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file11733/set_remove.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 18:43:50 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 07 Oct 2008 16:43:50 +0000 Subject: [issue4069] set.remove raises confusing KeyError In-Reply-To: <1223395114.41.0.0284557162772.issue4069@psf.upfronthosting.co.za> Message-ID: <1223397830.06.0.644079437842.issue4069@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 19:41:47 2008 From: report at bugs.python.org (Jean Brouwers) Date: Tue, 07 Oct 2008 17:41:47 +0000 Subject: [issue2218] Enhanced hotshot profiler with high-resolution timer In-Reply-To: <1204501511.28.0.993763550383.issue2218@psf.upfronthosting.co.za> Message-ID: <1223401307.19.0.626703772354.issue2218@psf.upfronthosting.co.za> Changes by Jean Brouwers : ---------- versions: +Python 2.5.3 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 19:42:07 2008 From: report at bugs.python.org (Jean Brouwers) Date: Tue, 07 Oct 2008 17:42:07 +0000 Subject: [issue2281] Enhanced cPython profiler with high-resolution timer In-Reply-To: <1205359008.42.0.436050296007.issue2281@psf.upfronthosting.co.za> Message-ID: <1223401327.78.0.46045786772.issue2281@psf.upfronthosting.co.za> Changes by Jean Brouwers : ---------- versions: +Python 2.5.3 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 19:42:16 2008 From: report at bugs.python.org (Armin Ronacher) Date: Tue, 07 Oct 2008 17:42:16 +0000 Subject: [issue4067] ast.fix_missing_locations() breaks if node doesn't have "_attributes" variable In-Reply-To: <1223390276.15.0.153059354273.issue4067@psf.upfronthosting.co.za> Message-ID: <1223401336.09.0.215000193908.issue4067@psf.upfronthosting.co.za> Armin Ronacher added the comment: The root of the problem is that ast.AST doesn't have _fields or _attributes. I think the better solution is to add these attributes to the root class which makes it easier to work with these objects. I attached a diff for asdl_c.py which fixes that problem by adding attributes to the AST class. Run `python Parser/asdl_c.py -h Python Parser/Python.asdl` to regenerate the Python-ast.c file. Can someone review the diff? ---------- nosy: +aronacher Added file: http://bugs.python.org/file11734/asdl_c.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 19:44:11 2008 From: report at bugs.python.org (Jean Brouwers) Date: Tue, 07 Oct 2008 17:44:11 +0000 Subject: [issue3163] module struct support for ssize_t and size_t In-Reply-To: <1214071551.33.0.650558563727.issue3163@psf.upfronthosting.co.za> Message-ID: <1223401451.22.0.123649197587.issue3163@psf.upfronthosting.co.za> Changes by Jean Brouwers : ---------- versions: +Python 2.5.3 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 19:47:07 2008 From: report at bugs.python.org (Jean Brouwers) Date: Tue, 07 Oct 2008 17:47:07 +0000 Subject: [issue3163] module struct support for ssize_t and size_t In-Reply-To: <1214071551.33.0.650558563727.issue3163@psf.upfronthosting.co.za> Message-ID: <1223401627.48.0.827125612796.issue3163@psf.upfronthosting.co.za> Changes by Jean Brouwers : ---------- versions: +Python 2.7 -Python 2.5.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 19:47:28 2008 From: report at bugs.python.org (Jean Brouwers) Date: Tue, 07 Oct 2008 17:47:28 +0000 Subject: [issue2281] Enhanced cPython profiler with high-resolution timer In-Reply-To: <1205359008.42.0.436050296007.issue2281@psf.upfronthosting.co.za> Message-ID: <1223401648.18.0.862268526823.issue2281@psf.upfronthosting.co.za> Changes by Jean Brouwers : ---------- versions: +Python 2.7 -Python 2.5.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 19:47:41 2008 From: report at bugs.python.org (Jean Brouwers) Date: Tue, 07 Oct 2008 17:47:41 +0000 Subject: [issue2218] Enhanced hotshot profiler with high-resolution timer In-Reply-To: <1204501511.28.0.993763550383.issue2218@psf.upfronthosting.co.za> Message-ID: <1223401661.89.0.53549583666.issue2218@psf.upfronthosting.co.za> Changes by Jean Brouwers : ---------- versions: +Python 2.7 -Python 2.5.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 19:55:40 2008 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Tue, 07 Oct 2008 17:55:40 +0000 Subject: [issue2218] Enhanced hotshot profiler with high-resolution timer In-Reply-To: <1204501511.28.0.993763550383.issue2218@psf.upfronthosting.co.za> Message-ID: <1223402140.1.0.618430763243.issue2218@psf.upfronthosting.co.za> Fred L. Drake, Jr. added the comment: May I ask what the reasoning is for further developing hotshot as part of the core? My understanding, based on discussions on python-dev, is that hotshot is being deprecated in favor of cProfile. If hotshot still provides functionality that's interesting (and it may), perhaps it makes sense to maintain and improve it in a separate distribution. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 19:56:04 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 07 Oct 2008 17:56:04 +0000 Subject: [issue4069] set.remove raises confusing KeyError In-Reply-To: <1223395114.41.0.0284557162772.issue4069@psf.upfronthosting.co.za> Message-ID: <1223402164.51.0.93278620079.issue4069@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Patch looks fine. I see no need to backport to 2.5 though. ---------- assignee: rhettinger -> amaury.forgeotdarc keywords: -needs review resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 20:03:49 2008 From: report at bugs.python.org (Kent Johnson) Date: Tue, 07 Oct 2008 18:03:49 +0000 Subject: [issue4017] IDLE 2.6 broken on OSX (Leopard) In-Reply-To: <1222960590.08.0.635891151551.issue4017@psf.upfronthosting.co.za> Message-ID: <1223402629.38.0.201564011478.issue4017@psf.upfronthosting.co.za> Changes by Kent Johnson : ---------- nosy: +kjohnson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 21:29:21 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 07 Oct 2008 19:29:21 +0000 Subject: =?utf-8?q?[issue4064]_distutils.util.get=5Fplatform()_is=09wrong_for_universal_builds_on_macosx?= In-Reply-To: <1223372506.67.0.0695437695796.issue4064@psf.upfronthosting.co.za> Message-ID: <48EBB88D.4040803@v.loewis.de> Martin v. L?wis added the comment: > When using a universal build of python on macosx > distutils.util.get_platform should use "fat" for the machine > architecture, instead of the architecture of the current machine. Can you please explain why it should do so? Where do these architecture names come from? ---------- nosy: +loewis title: distutils.util.get_platform() is wrong for universal builds on macosx -> distutils.util.get_platform() is wrong for universal builds on macosx _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 21:32:34 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 07 Oct 2008 19:32:34 +0000 Subject: [issue4065] _multiprocessing doesn't build on macosx 10.3 In-Reply-To: <1223376772.75.0.564119782301.issue4065@psf.upfronthosting.co.za> Message-ID: <1223407954.79.0.123059652048.issue4065@psf.upfronthosting.co.za> Martin v. L?wis added the comment: What does sendmsg(2) say what to include? What about writev(2)? (the latter, on Linux, says that sys/uio.h is indeed the correct header) ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 21:43:37 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 07 Oct 2008 19:43:37 +0000 Subject: [issue4067] ast.fix_missing_locations() breaks if node doesn't have "_attributes" variable In-Reply-To: <1223390276.15.0.153059354273.issue4067@psf.upfronthosting.co.za> Message-ID: <1223408617.63.0.429961382334.issue4067@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: empty_tuple should be DECREF'ed at the end of the function. Otherwise the patch is fine. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 21:44:15 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 07 Oct 2008 19:44:15 +0000 Subject: [issue4068] Backport fix for issue 3312 In-Reply-To: <1223390585.08.0.984761019312.issue4068@psf.upfronthosting.co.za> Message-ID: <1223408655.19.0.205088914904.issue4068@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Looks fine to me. Please apply (don't forget a NEWS entry). ---------- nosy: +loewis resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 21:49:27 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 07 Oct 2008 19:49:27 +0000 Subject: [issue1597850] Cross compiling patches for MINGW In-Reply-To: <1223391835.13.0.417001535974.issue1597850@psf.upfronthosting.co.za> Message-ID: <48EBBD44.6080703@v.loewis.de> Martin v. L?wis added the comment: > the compiling strategy for Python (IIRC) is to compile everything, > including modules that will never work, and use compiler errors as a > signal to not include a module in the result. I don't think this can work in the cross-compilation case, though (or the entire setup.py part of it can't really work). It uses the target's python binary to run setup.py, compiles the modules, and then tries to load them. In a cross-compilation case, you can't run the target python binary, and even if you use a host python instead, you can't load the target extension modules (unless the "cross" compilation is for the same microprocessor and operating system - a case I'm not very much interested in). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 21:52:57 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 07 Oct 2008 19:52:57 +0000 Subject: =?utf-8?q?[issue4064]_distutils.util.get=5Fplatform()_is=09wrong_for_universal_builds_on_macosx?= In-Reply-To: <1223372506.67.0.0695437695796.issue4064@psf.upfronthosting.co.za> Message-ID: <1223409177.13.0.996871973371.issue4064@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The basic idea is that the architecture bit of get_platform() should tell you something about the archicture for which a build is valid. That's why 'i386' or 'ppc' is not very useful for a universal build. The original author of the universal binary support choose 'fat' as the architecture designator for universal builds ("fat binaries"). Somewhere along the way the calculation of the architecture string got messed up, resulting in the current situation. That is, the current situation is not as designed by the original author of the universal binary support code. Another reason for fixing this is that setuptools uses the platform designator of the current system and a downloaded binary archive to determine if the two are compatible. In the current situation univeral binary distributions built on a PPC system don't work on an i386 system (as far as setuptools is concerned). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 21:54:18 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 07 Oct 2008 19:54:18 +0000 Subject: [issue4060] PyUnicode_DecodeUTF16(..., byteorder=0) gets it wrong on Mac OS X/PowerPC In-Reply-To: <6db0ea510810070928y51d35074i84c7ec18db8d03d8@mail.gmail.com> Message-ID: <02977A9C-EA5E-4E9B-B840-A506E04DBD3D@mac.com> Ronald Oussoren added the comment: On 7 Oct, 2008, at 18:29, Trent Mick wrote: > > Trent Mick added the comment: > >> I get: >> >> sizeof(_Bool)=4 bytes >> >> on a G4 PPC. > > Same thing on a G5 PPC: > > $ cat main.c > #include > > int main(void) { > printf("sizeof(_Bool) is %d\n", sizeof(_Bool)); > } > $ gcc main.c What if you compile using 'gcc -arch ppc64 main.c'? Ronald _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 21:56:27 2008 From: report at bugs.python.org (Roumen Petrov) Date: Tue, 07 Oct 2008 19:56:27 +0000 Subject: [issue1597850] Cross compiling patches for MINGW Message-ID: <1223409387.6.0.715888193773.issue1597850@psf.upfronthosting.co.za> Roumen Petrov added the comment: I found the patch cross-2.5.1.patch as too limited. I'm interesting in this topic and I post patch in issue3871 that continue work from issue841454 and issue1412448. ---------- nosy: +rpetrov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 22:06:32 2008 From: report at bugs.python.org (Roumen Petrov) Date: Tue, 07 Oct 2008 20:06:32 +0000 Subject: [issue1597850] Cross compiling patches for MINGW Message-ID: <1223409992.37.0.26805682867.issue1597850@psf.upfronthosting.co.za> Roumen Petrov added the comment: Martin meaning of target and host is different. There is no reason to use "Canadian Cross": build->host->target. It is about more simple cross-compilation case: build->host. About loading of modules in build environment: some OS-es can run binaries from other OS-es. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 22:13:29 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 07 Oct 2008 20:13:29 +0000 Subject: [issue4064] distutils.util.get_platform() is wrong for universal builds on macosx In-Reply-To: <1223409177.13.0.996871973371.issue4064@psf.upfronthosting.co.za> Message-ID: <48EBC2E7.7030500@v.loewis.de> Martin v. L?wis added the comment: > Somewhere along the way the calculation of the architecture string got > messed up, resulting in the current situation. That is, the current > situation is not as designed by the original author of the universal > binary support code. Ok, what *is* the desired way of naming architectures on that system? Is that documented somewhere? ---------- title: distutils.util.get_platform() is wrong for universal builds on macosx -> distutils.util.get_platform() is wrong for universal builds on macosx _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 22:15:51 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 07 Oct 2008 20:15:51 +0000 Subject: [issue3677] importing from UNC roots doesn't work In-Reply-To: <1219676428.29.0.220923454973.issue3677@psf.upfronthosting.co.za> Message-ID: <1223410551.66.0.498284265839.issue3677@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Kristjan, you suggested this issue for consideration for 2.5.3. Is there an actual patch to apply? If not, the issue should get forwarded to 2.7 (and then to 2.8, and so on, until somebody actually comes up with a patch). ---------- nosy: +loewis versions: +Python 2.5.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 22:17:58 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 07 Oct 2008 20:17:58 +0000 Subject: [issue3367] Uninitialized value read in parsetok.c In-Reply-To: <1216153264.95.0.467111480464.issue3367@psf.upfronthosting.co.za> Message-ID: <1223410678.14.0.53470332535.issue3367@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Kristj?n, you suggested this patch to be considered for 2.5.3. It seems the patch is incorrect. Can you provide a correct one? ---------- nosy: +loewis versions: +Python 2.5.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 22:23:10 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 07 Oct 2008 20:23:10 +0000 Subject: [issue1597850] Cross compiling patches for MINGW In-Reply-To: <1223409992.37.0.26805682867.issue1597850@psf.upfronthosting.co.za> Message-ID: <48EBC52B.2080805@v.loewis.de> Martin v. L?wis added the comment: > Martin meaning of target and host is different. > There is no reason to use "Canadian Cross": build->host->target. > It is about more simple cross-compilation case: build->host. Terminology issues aside, I hope people still will understand my objection. I meant it this way: - host system: system hosting Python build process - target system: system intended to run resulting Python executable Whether that conforms to autoconf should be irrelevant, as long as we aren't talking about configure.in changes. > About loading of modules in build environment: some OS-es can run > binaries from other OS-es. Sure. However, I don't think this is the general case for cross-compilation, and I don't think cross-compilation support in Python should assume this is possible. Instead, cross-compilation should assume that build system and target system have anything in common (except that target headers and for-target cross tools are installed on the build system). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 22:23:48 2008 From: report at bugs.python.org (Roumen Petrov) Date: Tue, 07 Oct 2008 20:23:48 +0000 Subject: [issue4051] use of TCHAR under win32 In-Reply-To: <1223288926.88.0.428745871562.issue4051@psf.upfronthosting.co.za> Message-ID: <1223411028.83.0.583668414049.issue4051@psf.upfronthosting.co.za> Roumen Petrov added the comment: What about to substitute UNICODE macro as example with RAWUNICODE in the source ? ---------- nosy: +rpetrov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 22:34:10 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 07 Oct 2008 20:34:10 +0000 Subject: [issue4051] use of TCHAR under win32 In-Reply-To: <1223411028.83.0.583668414049.issue4051@psf.upfronthosting.co.za> Message-ID: <48EBC7BE.9090609@v.loewis.de> Martin v. L?wis added the comment: > What about to substitute UNICODE macro as example with RAWUNICODE in the > source ? That would work as well. As it stands, the macro names are equivalent to the ones in pickle.py, which is a useful property to have. So I'm in favor of the proposed change. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 22:43:51 2008 From: report at bugs.python.org (Roumen Petrov) Date: Tue, 07 Oct 2008 20:43:51 +0000 Subject: [issue1597850] Cross compiling patches for MINGW Message-ID: <1223412231.48.0.584978208417.issue1597850@psf.upfronthosting.co.za> Roumen Petrov added the comment: Now in mingw case the common is "python posix build system". If the cross-compilation work what is problem to build in native environment? Personally I prefer to build in cross environment. It is convenient. There is no problem to run python tests in the native environment. In emulated environment most of the python test run smoothly. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 22:44:20 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 07 Oct 2008 20:44:20 +0000 Subject: [issue4069] set.remove raises confusing KeyError In-Reply-To: <1223395114.41.0.0284557162772.issue4069@psf.upfronthosting.co.za> Message-ID: <1223412260.58.0.213051498174.issue4069@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Committed r66836 (trunk) and r66837 (2.6). This will merge nicely into py3k. Hello Carl Friedrich, and thanks for the report! ---------- resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 23:07:16 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 07 Oct 2008 21:07:16 +0000 Subject: [issue4004] missing newline in "Could not convert argument %s to string" error message In-Reply-To: <1222814316.77.0.949437896792.issue4004@psf.upfronthosting.co.za> Message-ID: <1223413636.12.0.930909211968.issue4004@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Committed as r66838. ---------- resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 23:07:39 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 07 Oct 2008 21:07:39 +0000 Subject: [issue3448] Multi-process 2to3 In-Reply-To: <1217019998.69.0.231122552254.issue3448@psf.upfronthosting.co.za> Message-ID: <1223413659.44.0.219622844985.issue3448@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I'm not opposed to having the support available. I just don't what it enabled by default. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 23:12:44 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Tue, 07 Oct 2008 21:12:44 +0000 Subject: [issue3873] Unpickling is really slow In-Reply-To: <1221496652.57.0.686468497967.issue3873@psf.upfronthosting.co.za> Message-ID: <1223413964.64.0.936201901491.issue3873@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: The solution is to add a read buffer to Unpickler (Pickler already has a write buffer, so that why it is unaffected). I believe this would mitigate much of the (quite large) Python function call overhead. cPickle has a performance hack to make it uses cStringIO and PyFile directly (via C function calls). In Python 3, the hack was removed since cStringIO.h and fileobject.h aren't public anymore. This explains the 0.02s deviation you are getting for dump speed. ---------- nosy: +alexandre.vassalotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 23:18:09 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 07 Oct 2008 21:18:09 +0000 Subject: [issue3994] import fixer misses some symbols In-Reply-To: <1222672392.58.0.438026225401.issue3994@psf.upfronthosting.co.za> Message-ID: <1223414289.09.0.373201025643.issue3994@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- nosy: +nedds _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 23:25:42 2008 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 07 Oct 2008 21:25:42 +0000 Subject: [issue3367] Uninitialized value read in parsetok.c In-Reply-To: <1216153264.95.0.467111480464.issue3367@psf.upfronthosting.co.za> Message-ID: <1223414742.97.0.729598118958.issue3367@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Now that the 'easy' keyword is absent, I'm afraid this is out of my depth. I'll run purify again and try to find the exact repro case. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 23:29:30 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 07 Oct 2008 21:29:30 +0000 Subject: [issue3367] Uninitialized value read in parsetok.c In-Reply-To: <1216153264.95.0.467111480464.issue3367@psf.upfronthosting.co.za> Message-ID: <1223414970.45.0.879270310607.issue3367@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Ok, un-targetting it from 2.5.3 for now. ---------- versions: -Python 2.5.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 23:29:43 2008 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 07 Oct 2008 21:29:43 +0000 Subject: [issue3677] importing from UNC roots doesn't work In-Reply-To: <1219676428.29.0.220923454973.issue3677@psf.upfronthosting.co.za> Message-ID: <1223414983.52.0.87227628173.issue3677@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: No, not really. Again, I refer to defect 954115 by glchapman. And note that those functions added there are actually not used. I was hoping that there was someone here more familiar with importing on PC. I'll go and see if the old defect still applies and if there is perhaps a more general fix to be made. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 7 23:46:59 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 07 Oct 2008 21:46:59 +0000 Subject: [issue3677] importing from UNC roots doesn't work In-Reply-To: <1219676428.29.0.220923454973.issue3677@psf.upfronthosting.co.za> Message-ID: <1223416019.34.0.737402619465.issue3677@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Ok, un-targetting this from 2.5.3 then. Usage of IsUNCRoot disappeared as part of r42230, which dropped usage of the C library for stat implementations. This only affects os.stat, though, so I don't see the relation to this issue. For the record: What *exactly* is the problem? I.e. specifically, what do you do, what happens, what do you expect to happen instead? ---------- versions: -Python 2.5.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 00:33:06 2008 From: report at bugs.python.org (Roumen Petrov) Date: Tue, 07 Oct 2008 22:33:06 +0000 Subject: [issue4070] python tests failure if builddir <> sourcedir In-Reply-To: <1223418786.48.0.948441318912.issue4070@psf.upfronthosting.co.za> Message-ID: <1223418786.48.0.948441318912.issue4070@psf.upfronthosting.co.za> New submission from Roumen Petrov : The proposed patch add possibility to run python tests if python is build outside source tree on POSIX systems. ---------- components: Tests files: python-trunk-DIST.patch keywords: patch messages: 74492 nosy: rpetrov severity: normal status: open title: python tests failure if builddir <> sourcedir versions: Python 2.7 Added file: http://bugs.python.org/file11735/python-trunk-DIST.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 00:45:53 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 07 Oct 2008 22:45:53 +0000 Subject: [issue3975] PyTraceBack_Print() doesn't respect # coding: xxx header In-Reply-To: <1222441949.55.0.46817952378.issue3975@psf.upfronthosting.co.za> Message-ID: <1223419553.15.0.747749167272.issue3975@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks for your remarks amaury. I improved my patch: - PyMem_FREE(found_encoding) is called just after PyFile_FromFd() - Create static subfunction _Py_FindSourceFile(): find a file in sys.path - Consider that sys.path contains only unicode (and not bytes) string - Clear exception on "truncated = PyUnicode_FromUnicode(p, len);" error, but continue the execution - I added PyUnicode_check(lineobj) - Replace open(filename) by open(namebuf) (while searching the full path of the file) <= fix a regression introduced by my patch Should I stop on the first error instead of using PyErr_Clear()? I would like to display the traceback even if an function failed. Sum up of the patch version 4: - use open(O_RDONLY | O_BINARY) + PyFile_FromFd() instead of fopen() - open the file in unicode mode using the Python encoding found in the "#coding:..." header - consider sys.path as a list of unicode strings (and not of bytes strings) I used _PyUnicode_AsStringAndSize() to convert unicode to string to be consistent with tb_printinternal(). As you noticed, it uses UTF-8 which should is on Windows :-/ I propose to open a new issue when this one will be closed :-) Added file: http://bugs.python.org/file11736/traceback_unicode-4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 01:06:11 2008 From: report at bugs.python.org (Trent Mick) Date: Tue, 07 Oct 2008 23:06:11 +0000 Subject: [issue4060] PyUnicode_DecodeUTF16(..., byteorder=0) gets it wrong on Mac OS X/PowerPC In-Reply-To: <02977A9C-EA5E-4E9B-B840-A506E04DBD3D@mac.com> Message-ID: <6db0ea510810071606qc1b55d7lfff6ddba55de10d@mail.gmail.com> Trent Mick added the comment: > What if you compile using 'gcc -arch ppc64 main.c'? $ gcc -arch ppc64 main.c $ ./a.out sizeof(_Bool) is 1 As you figured out. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 01:12:18 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 07 Oct 2008 23:12:18 +0000 Subject: [issue3677] importing from UNC roots doesn't work In-Reply-To: <1219676428.29.0.220923454973.issue3677@psf.upfronthosting.co.za> Message-ID: <1223421138.53.0.553879031015.issue3677@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I think this is stat(2) problem on windows. Please try following test program. #include #include #include void test(const char *path) { struct stat st; printf("%s %d %d\n", path, stat(path, &st), GetFileAttributes(path)); } int main() { test("e:\\shared"); test("e:\\shared\\"); /* issue1293 */ test("e:\\shared\\a.py"); test("\\\\whiterab-c2znlh\\shared"); /* this issue */ test("\\\\whiterab-c2znlh\\shared\\"); test("\\\\whiterab-c2znlh\\shared\\a.py"); } And this is result. e:\shared 0 16 e:\shared\ -1 16 e:\shared\a.py 0 32 \\whiterab-c2znlh\shared -1 16 \\whiterab-c2znlh\shared\ 0 16 \\whiterab-c2znlh\shared\a.py 0 32 As discussed in issue1293, stat(2) fails for the normal folder path with trailing slash, and also fails for the UNC folder path without trailing slash. I'm using VC6, but same behavior on VC9? trunk/Python/import.c(3160) and trunk/Modules/zipimport.c(99) is using stat(2). I'll create patch to prove my observation. :-) ---------- nosy: +ocean-city _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 01:14:38 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 07 Oct 2008 23:14:38 +0000 Subject: [issue3677] importing from UNC roots doesn't work In-Reply-To: <1219676428.29.0.220923454973.issue3677@psf.upfronthosting.co.za> Message-ID: <1223421278.43.0.110327369538.issue3677@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Ah, of cource, please change path to fit you environment. > test prog _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 01:22:07 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 07 Oct 2008 23:22:07 +0000 Subject: [issue2384] [Py3k] line number is wrong after encoding declaration In-Reply-To: <1205825319.07.0.115749100037.issue2384@psf.upfronthosting.co.za> Message-ID: <1223421727.63.0.621780939997.issue2384@psf.upfronthosting.co.za> STINNER Victor added the comment: @amaury: Ok, I added your long comment in tokenizer.c. You're also right about the strange code in the test. I reused ocean-city's test. "sys.exc_info()[2].tb_lineno" raises an additional (useless) error. So I simplified the code to use only "raise RuntimeError(...)" with the try/except/else. Since tokenizer.c is hard to understand, I don't wnat to change the code of tok_nextc(). Added file: http://bugs.python.org/file11737/traceback_unicode-4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 01:22:12 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 07 Oct 2008 23:22:12 +0000 Subject: [issue2384] [Py3k] line number is wrong after encoding declaration In-Reply-To: <1205825319.07.0.115749100037.issue2384@psf.upfronthosting.co.za> Message-ID: <1223421732.57.0.359362072236.issue2384@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11625/tokenizer-coding-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 01:22:16 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 07 Oct 2008 23:22:16 +0000 Subject: [issue2384] [Py3k] line number is wrong after encoding declaration In-Reply-To: <1205825319.07.0.115749100037.issue2384@psf.upfronthosting.co.za> Message-ID: <1223421736.93.0.999535925693.issue2384@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11717/tokenizer-coding-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 01:22:27 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 07 Oct 2008 23:22:27 +0000 Subject: [issue2384] [Py3k] line number is wrong after encoding declaration In-Reply-To: <1205825319.07.0.115749100037.issue2384@psf.upfronthosting.co.za> Message-ID: <1223421747.2.0.65512734475.issue2384@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11609/test_traceback-gbk.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 01:23:18 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 07 Oct 2008 23:23:18 +0000 Subject: [issue2384] [Py3k] line number is wrong after encoding declaration In-Reply-To: <1205825319.07.0.115749100037.issue2384@psf.upfronthosting.co.za> Message-ID: <1223421798.18.0.0765291581698.issue2384@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11737/traceback_unicode-4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 01:23:48 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 07 Oct 2008 23:23:48 +0000 Subject: [issue2384] [Py3k] line number is wrong after encoding declaration In-Reply-To: <1205825319.07.0.115749100037.issue2384@psf.upfronthosting.co.za> Message-ID: <1223421828.19.0.38151015358.issue2384@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file11738/tokenizer-coding-4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 01:44:00 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 07 Oct 2008 23:44:00 +0000 Subject: [issue2384] [Py3k] line number is wrong after encoding declaration In-Reply-To: <1205825319.07.0.115749100037.issue2384@psf.upfronthosting.co.za> Message-ID: <1223423040.7.0.597851900836.issue2384@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This issue depends on #3975 to properly display tracebacks from python files with encoding. ---------- dependencies: +PyTraceBack_Print() doesn't respect # coding: xxx header _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 02:07:36 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 08 Oct 2008 00:07:36 +0000 Subject: [issue3975] PyTraceBack_Print() doesn't respect # coding: xxx header In-Reply-To: <1222441949.55.0.46817952378.issue3975@psf.upfronthosting.co.za> Message-ID: <1223424456.32.0.970274893416.issue3975@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: One last thing: there is a path where lineobj is not freed (when PyUnicode_Check(lineobj) is false); I suggest to move Py_XDECREF(lineobj) just before the final return statement. Reference counting is fun ;-) > Should I stop on the first error instead of using PyErr_Clear()? > I would like to display the traceback even if an function failed. You are right. Common failures should clear the error and return 0. In your patch, there is one remaining place, the call to PyFile_GetLine(). More fun will arise when my Windows terminal (encoding=cp1252) will try to display Chinese characters. Let's pretend this is yet another issue. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 02:11:30 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Wed, 08 Oct 2008 00:11:30 +0000 Subject: [issue3677] importing from UNC roots doesn't work In-Reply-To: <1219676428.29.0.220923454973.issue3677@psf.upfronthosting.co.za> Message-ID: <1223424690.54.0.000543148028879.issue3677@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: zipimport.c seems fine, because stat(2) succeeds for UNC file. It fails for UNC folder. (zip file is absolutely file) Already fix for issue1293 was in, so maybe I should create the patch for that direction but... anyway this issue seems to be fixed by my patch. I also confirmed the test script in http://bugs.python.org/msg56523 works. ---------- keywords: +patch Added file: http://bugs.python.org/file11739/not_use_stat_in_import_on_windows.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 02:12:49 2008 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 Oct 2008 00:12:49 +0000 Subject: [issue3975] PyTraceBack_Print() doesn't respect # coding: xxx header In-Reply-To: <1222441949.55.0.46817952378.issue3975@psf.upfronthosting.co.za> Message-ID: <1223424769.55.0.632048825041.issue3975@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11612/traceback_unicode.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 02:12:52 2008 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 Oct 2008 00:12:52 +0000 Subject: [issue3975] PyTraceBack_Print() doesn't respect # coding: xxx header In-Reply-To: <1222441949.55.0.46817952378.issue3975@psf.upfronthosting.co.za> Message-ID: <1223424772.35.0.26076929208.issue3975@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11633/traceback_unicode-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 02:12:54 2008 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 Oct 2008 00:12:54 +0000 Subject: [issue3975] PyTraceBack_Print() doesn't respect # coding: xxx header In-Reply-To: <1222441949.55.0.46817952378.issue3975@psf.upfronthosting.co.za> Message-ID: <1223424774.9.0.517944074471.issue3975@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11732/traceback_unicode-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 02:14:09 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Wed, 08 Oct 2008 00:14:09 +0000 Subject: [issue3677] importing from UNC roots doesn't work In-Reply-To: <1219676428.29.0.220923454973.issue3677@psf.upfronthosting.co.za> Message-ID: <1223424849.56.0.629736758773.issue3677@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file11739/not_use_stat_in_import_on_windows.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 02:14:24 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Wed, 08 Oct 2008 00:14:24 +0000 Subject: [issue3677] importing from UNC roots doesn't work In-Reply-To: <1219676428.29.0.220923454973.issue3677@psf.upfronthosting.co.za> Message-ID: <1223424864.71.0.273696630432.issue3677@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : Added file: http://bugs.python.org/file11740/not_use_stat_in_import_on_windows.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 02:18:38 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Wed, 08 Oct 2008 00:18:38 +0000 Subject: [issue3677] importing from UNC roots doesn't work In-Reply-To: <1219676428.29.0.220923454973.issue3677@psf.upfronthosting.co.za> Message-ID: <1223425118.14.0.493638246765.issue3677@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Just humble thought... If we can replace stat(2) + S_ISDIR/S_ISREG check with GetFileAttributesEx, maybe we are safe for this kind of problem, and can solve issue3099 same time? :-) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 02:27:15 2008 From: report at bugs.python.org (Jason Day) Date: Wed, 08 Oct 2008 00:27:15 +0000 Subject: [issue4071] ntpath.abspath can fail on Win Server 2008 (64-bit) In-Reply-To: <1223425635.48.0.940202056696.issue4071@psf.upfronthosting.co.za> Message-ID: <1223425635.48.0.940202056696.issue4071@psf.upfronthosting.co.za> New submission from Jason Day : On my system (Windows Server 2008 SP1 - 64-bit, Python 2.5.2 - 32-bit), simple actions like: >>> help(help) # Or any function or >>> import tempfile >>> f = tempfile.mktemp() result in this (rather confusing) error: TypeError: _getfullpathname() argument 1 must be (buffer overflow), not str Apparently, _getfullpathname() chokes on certain paths if they are not supplied as unicode. Locally, I was able to work around the issue by changing the call to _getfullpathname in ntpath.abspath to: path = str(_getfullpathname(unicode(path))) ---------- components: Windows messages: 74502 nosy: JDay severity: normal status: open title: ntpath.abspath can fail on Win Server 2008 (64-bit) type: crash versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 02:38:30 2008 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 Oct 2008 00:38:30 +0000 Subject: [issue4035] Support bytes for os.exec*() In-Reply-To: <1223077104.22.0.62328245443.issue4035@psf.upfronthosting.co.za> Message-ID: <1223426310.7.0.0589492614965.issue4035@psf.upfronthosting.co.za> STINNER Victor added the comment: Improved patch: - support bytes in the env dictionary using the file system default encoding - support bytes for program arguments but only on a POSIX system Document is not updated yet. Added file: http://bugs.python.org/file11741/os_exec_bytes-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 02:39:37 2008 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 Oct 2008 00:39:37 +0000 Subject: [issue4035] Support bytes for os.exec*() In-Reply-To: <1223077104.22.0.62328245443.issue4035@psf.upfronthosting.co.za> Message-ID: <1223426377.8.0.468786249764.issue4035@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11695/os_exec_bytes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 02:42:47 2008 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 Oct 2008 00:42:47 +0000 Subject: [issue4036] Support bytes for subprocess.Popen() In-Reply-To: <1223077515.41.0.60688229915.issue4036@psf.upfronthosting.co.za> Message-ID: <1223426567.35.0.586365476631.issue4036@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11696/os_exec_bytes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 02:42:56 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 08 Oct 2008 00:42:56 +0000 Subject: [issue4071] ntpath.abspath can fail on Win Server 2008 (64-bit) In-Reply-To: <1223425635.48.0.940202056696.issue4071@psf.upfronthosting.co.za> Message-ID: <1223426576.52.0.789095238318.issue4071@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The (buffer overflow) message indicates that the argument is too long to be converted. In your case, it seems that the path is longer than MAX_PATH=255 characters. What is the value of the argument of _getfullpathname()? ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 02:43:40 2008 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 Oct 2008 00:43:40 +0000 Subject: [issue4036] Support bytes for subprocess.Popen() In-Reply-To: <1223077515.41.0.60688229915.issue4036@psf.upfronthosting.co.za> Message-ID: <1223426620.51.0.560267862584.issue4036@psf.upfronthosting.co.za> STINNER Victor added the comment: Oops, I attached the wrong patch :-/ ---------- dependencies: +Support bytes for os.exec*() Added file: http://bugs.python.org/file11742/subprocess-bytes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 02:49:57 2008 From: report at bugs.python.org (Mark Hammond) Date: Wed, 08 Oct 2008 00:49:57 +0000 Subject: [issue4072] build_py support for lib2to3 is stale In-Reply-To: <1223426997.83.0.795530448507.issue4072@psf.upfronthosting.co.za> Message-ID: <1223426997.83.0.795530448507.issue4072@psf.upfronthosting.co.za> New submission from Mark Hammond : The way build_py uses lib2to3 is out of date. Instead of a dummy Options object a dict should be used, and it seems the 'fixers' must explicitly be loaded. I'm afraid I don't have a specific patch as I don't have a good test case, but the lib2to3 code needs to look something like: from lib2to3.refactor import RefactoringTool, get_fixers_from_package fixers = get_fixers_from_package('lib2to3.fixes') options = dict(doctests_only=False, fix=[], list_fixes=[], print_function=False, verbose=False, write=True) r = RefactoringTool(fixers, options) r.refactor(self.updated_files) ---------- components: Distutils messages: 74506 nosy: loewis, mhammond severity: normal status: open title: build_py support for lib2to3 is stale versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 02:55:47 2008 From: report at bugs.python.org (Mark Hammond) Date: Wed, 08 Oct 2008 00:55:47 +0000 Subject: [issue4073] distutils build_scripts and install_data commands need 2to3 support In-Reply-To: <1223427347.42.0.185462217727.issue4073@psf.upfronthosting.co.za> Message-ID: <1223427347.42.0.185462217727.issue4073@psf.upfronthosting.co.za> New submission from Mark Hammond : The distutils commands 'build_scripts' and 'install_data' both may end up installing .py files. Such .py file should be able tobe run through lib2to3 in the same way supported by build_py. pywin32 has ended up with something like: class my_build_scripts(build_scripts): def copy_file(self, src, dest): dest, copied = build_scripts.copy_file(self, src, dest) # 2to3 if not self.dry_run and copied: refactor_filenames([dest]) return dest, copied where 'refactor_filenames' is (basically) the lib2to3 block from build_py moved to a utility function. ---------- components: Distutils messages: 74507 nosy: loewis, mhammond severity: normal status: open title: distutils build_scripts and install_data commands need 2to3 support type: feature request versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 03:21:31 2008 From: report at bugs.python.org (Jason Day) Date: Wed, 08 Oct 2008 01:21:31 +0000 Subject: [issue4071] ntpath.abspath can fail on Win Server 2008 (64-bit) In-Reply-To: <1223426576.52.0.789095238318.issue4071@psf.upfronthosting.co.za> Message-ID: <494F0521440A5B4CBFE04D8A570B9F2309A6B46C3F@bt-exchange.BlueTech.local> Jason Day added the comment: Running help() or mktemp() causes _getfullpathname to be called with the whole system path (791 characters). If you pass that to _getfullpathname as str it throws the aforementioned TypeError. If it's passed as unicode, it returns an empty string. The offending _getfullpathname call occurs on the first call to one of these methods. Future calls to either do not call it (unless, of course, the first failed). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 03:54:38 2008 From: report at bugs.python.org (Nick Edds) Date: Wed, 08 Oct 2008 01:54:38 +0000 Subject: [issue3994] import fixer misses some symbols In-Reply-To: <1222672392.58.0.438026225401.issue3994@psf.upfronthosting.co.za> Message-ID: <1223430878.71.0.347366832108.issue3994@psf.upfronthosting.co.za> Nick Edds added the comment: I'll look in to it. Just give me a couple of days. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 04:23:13 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Wed, 08 Oct 2008 02:23:13 +0000 Subject: [issue4071] ntpath.abspath can fail on Win Server 2008 (64-bit) In-Reply-To: <1223425635.48.0.940202056696.issue4071@psf.upfronthosting.co.za> Message-ID: <1223432593.29.0.594370875926.issue4071@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: According to http://msdn.microsoft.com/en-us/library/aa364963.aspx, current implementation have several problems. >In the ANSI version of this function, the name is limited to MAX_PATH >characters. To extend this limit to 32,767 wide characters, call the >Unicode version of the function and prepend "\\?\" to the path. :-( >If the lpBuffer buffer is too small to contain the path, the return >value is the size, in TCHARs, of the buffer that is required to hold >the path and the terminating null character. We should allocate new buffer with this size and retry like already doing for GetCurrentDirectory. And one decision problem... What should we do when too long str is passed to ntpath._getfullpathname? Report overflow error? Or convert to unicode and retry with GetFullPathNameW? Hmm.... ---------- nosy: +ocean-city _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 05:08:04 2008 From: report at bugs.python.org (Andres Riancho) Date: Wed, 08 Oct 2008 03:08:04 +0000 Subject: [issue1028088] Cookies without values are silently ignored (by design?) Message-ID: <1223435284.45.0.175239932546.issue1028088@psf.upfronthosting.co.za> Andres Riancho added the comment: Sorry to bother you guys after so much time, but I think that there is at least one bit of the RFC that isn't respected by this "name=value" thing... If we look at the RFC we'll see this: cookie-av = "Comment" "=" value | "Domain" "=" value | "Max-Age" "=" value | "Path" "=" value | "Secure" | "Version" "=" 1*DIGIT As you may have noticed, "Secure" doesn't have any values. Also, (but out of the RFC) there is a commonly used cookie flag named "HttpOnly" [0], which would be nice to correctly parse also. Should _CookiePattern be modified to address this issue? [0] http://www.owasp.org/index.php/HTTPOnly ---------- nosy: +andresriancho _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 06:00:52 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 08 Oct 2008 04:00:52 +0000 Subject: [issue4074] Building a list of tuples has non-linear performance In-Reply-To: <1223438452.4.0.926419942993.issue4074@psf.upfronthosting.co.za> Message-ID: <1223438452.4.0.926419942993.issue4074@psf.upfronthosting.co.za> New submission from Gregory P. Smith : The attached script simply loops building a list of tuples. It has horrible performance as the list gets larger compared to something appending simple objects like ints to the list. % python tuple_gc_hell.py ~ ... 1000000 1.3615500927 2000000 2.95893096924 3000000 4.53531980515 4000000 5.62795209885 5000000 7.70974612236 ... The time it takes to execute grows linearly with the number of tuples already appended to the list. Turning on gc.debug(gc.DEBUG_STATS) shows why as does running python under a profiler: % cumulative self self total time seconds seconds calls s/call s/call name 27.85 115.84 115.84 14270 0.01 0.02 collect 21.19 204.01 88.17 1115120314 0.00 0.00 tupletraverse 13.14 258.65 54.64 1655624731 0.00 0.00 visit_reachable 10.72 303.25 44.60 1655624731 0.00 0.00 visit_decref 5.97 328.10 24.85 338 0.07 1.10 PyEval_EvalFrame It appears the cyclic gc is rechecking all of these tuples repeatedly. disabling gc during the loop or using a very high gc.set_threshold hides the problem. ---------- components: Interpreter Core files: tuple_gc_hell.py messages: 74512 nosy: gregory.p.smith priority: normal severity: normal status: open title: Building a list of tuples has non-linear performance type: performance versions: Python 2.5, Python 2.6, Python 2.7 Added file: http://bugs.python.org/file11743/tuple_gc_hell.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 07:09:34 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 08 Oct 2008 05:09:34 +0000 Subject: [issue4074] Building a list of tuples has non-linear performance In-Reply-To: <1223438452.4.0.926419942993.issue4074@psf.upfronthosting.co.za> Message-ID: <1223442574.9.0.285487796076.issue4074@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This is a known problem; see the GC discussions in June for an example, e.g. http://mail.python.org/pipermail/python-dev/2008-June/080579.html ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 08:02:14 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 08 Oct 2008 06:02:14 +0000 Subject: [issue4064] distutils.util.get_platform() is wrong for universal builds on macosx In-Reply-To: <48EBC2E7.7030500@v.loewis.de> Message-ID: Ronald Oussoren added the comment: On 7 Oct, 2008, at 22:13, Martin v. L?wis wrote: > > Martin v. L?wis added the comment: > >> Somewhere along the way the calculation of the architecture string >> got >> messed up, resulting in the current situation. That is, the current >> situation is not as designed by the original author of the universal >> binary support code. > > Ok, what *is* the desired way of naming architectures on that system? > Is that documented somewhere? It is not documented anywhere but in the code, but this is the intended behaviour: * A single architecture build (what you would build on any other unix platform) uses the architecture string of the architecture it was build for (that is, "i386", "ppc", "x86_64" or "ppc64") * A 32-bit universal build uses "fat" as the architecture string, regardless of the architecture of the machine we're running on. As an exception: OS X 10.3.9 machines are treated as if we're on a single architecture build because the compiler on that platform doesn't support building fat binaries. * A 4-way universal build (that is, including all architectures supported by OSX) uses "universal" as the architecture string. We (Bob Ippolitto and I) had some discussion about the architecture strings when we were working on support for universal binaries and rejected my initial suggestion of using "i386,ppc" instead of "fat" because that would be unwieldy. Ronald _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 08:55:34 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 08 Oct 2008 06:55:34 +0000 Subject: [issue4064] distutils.util.get_platform() is wrong for universal builds on macosx In-Reply-To: Message-ID: <48EC5963.5060002@v.loewis.de> Martin v. L?wis added the comment: > It is not documented anywhere but in the code These also appear in file names of bdist commands, right? So I think it should be documented. > We (Bob Ippolitto and I) had some discussion about the architecture > strings when > we were working on support for universal binaries and rejected my > initial suggestion > of using "i386,ppc" instead of "fat" because that would be unwieldy. OK. I wonder how you will call fat 64-bit binaries (i.e. ppc64 and amd64), but I can live with that semantics as long as it's documented (I actually question that it is documented in the code. If somebody would put "-arch Itanium" in her CFLAGS, which might be supported in 10.9, it would infer that the architecture is "fat"). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 08:58:35 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 08 Oct 2008 06:58:35 +0000 Subject: [issue4072] build_py support for lib2to3 is stale In-Reply-To: <1223426997.83.0.795530448507.issue4072@psf.upfronthosting.co.za> Message-ID: <1223449115.14.0.672775757958.issue4072@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Here is a patch. I also include a test case, which is intended to go into the Demo directory. ---------- keywords: +patch Added file: http://bugs.python.org/file11744/build_py.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 09:00:06 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 08 Oct 2008 07:00:06 +0000 Subject: [issue4072] build_py support for lib2to3 is stale In-Reply-To: <1223426997.83.0.795530448507.issue4072@psf.upfronthosting.co.za> Message-ID: <1223449206.86.0.624116691348.issue4072@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- keywords: +needs review Added file: http://bugs.python.org/file11745/test2to3.tar.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 09:00:53 2008 From: report at bugs.python.org (Thomas Guettler) Date: Wed, 08 Oct 2008 07:00:53 +0000 Subject: [issue4063] sphinx: make all-pdf does not exist. In-Reply-To: <1223371025.23.0.890988080219.issue4063@psf.upfronthosting.co.za> Message-ID: <1223449253.38.0.493711574058.issue4063@psf.upfronthosting.co.za> Thomas Guettler added the comment: Dear georg, I am sorry that I wasted your time. Yes, I ignored the part '..in that directory'. I couldn't find a way to close this ticket, also I am logging in. Do you need special privileges for this? Nevertheless, thank you for "Sphinx". Thomas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 09:30:01 2008 From: report at bugs.python.org (Georg Brandl) Date: Wed, 08 Oct 2008 07:30:01 +0000 Subject: [issue4063] sphinx: make all-pdf does not exist. In-Reply-To: <1223371025.23.0.890988080219.issue4063@psf.upfronthosting.co.za> Message-ID: <1223451001.3.0.516180223097.issue4063@psf.upfronthosting.co.za> Georg Brandl added the comment: Yes, closing tickets (and changing metadata like priority) is only possible for developers. ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 10:03:43 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 08 Oct 2008 08:03:43 +0000 Subject: [issue4071] ntpath.abspath can fail on Win Server 2008 (64-bit) In-Reply-To: <1223425635.48.0.940202056696.issue4071@psf.upfronthosting.co.za> Message-ID: <1223453023.36.0.211251981024.issue4071@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > Running help() or mktemp() causes _getfullpathname to be called > with the whole system path (791 characters) I am not sure to understand. Do you mean the whole PATH environment variable? I doubt that it is passed to _getfullpathname. Or do you have very long paths for one directory? the TEMP environment variable, for example? I'd be curious to see its value. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 10:32:08 2008 From: report at bugs.python.org (rwmjones) Date: Wed, 08 Oct 2008 08:32:08 +0000 Subject: [issue1597850] Cross compiling patches for MINGW Message-ID: <1223454728.7.0.0728647985894.issue1597850@psf.upfronthosting.co.za> rwmjones added the comment: Just to clarify, in the MinGW case we are interested in: "build" = Fedora Linux, usually i386 or x86-64 (but not always) "host" = Windows i386 We can, to a limited extent, run the host binaries on the build system, using Wine (the Windows emulator). This doesn't always work, and in any case is usually regarded as the wrong thing to do because Wine is a very large and complicated build dependency which requires, amongst other things, a working X server. Also since Wine doesn't run on anything which is not x86-like, if we have to run Wine during the build then we cannot cross-compile from other Fedora build systems, specifically ppc and sparc. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 10:46:07 2008 From: report at bugs.python.org (=?utf-8?q?Gerhard_H=C3=A4ring?=) Date: Wed, 08 Oct 2008 08:46:07 +0000 Subject: [issue4068] Backport fix for issue 3312 In-Reply-To: <1223390585.08.0.984761019312.issue4068@psf.upfronthosting.co.za> Message-ID: <1223455567.43.0.172665373051.issue4068@psf.upfronthosting.co.za> Gerhard H?ring added the comment: Thanks, committed in revision 66843. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 11:07:07 2008 From: report at bugs.python.org (Jason Day) Date: Wed, 08 Oct 2008 09:07:07 +0000 Subject: [issue4071] ntpath.abspath can fail on Win Server 2008 (64-bit) In-Reply-To: <1223453023.36.0.211251981024.issue4071@psf.upfronthosting.co.za> Message-ID: <494F0521440A5B4CBFE04D8A570B9F2309A6B07346@bt-exchange.BlueTech.local> Jason Day added the comment: > I am not sure to understand. Do you mean the whole PATH environment > variable? I doubt that it is passed to _getfullpathname. > Or do you have very long paths for one directory? the TEMP environment > variable, for example? I'd be curious to see its value. I don't have it offhand, but it was the whole PATH environment variable, complete with semicolons. That's probably the *real* bug. Whatever was passing that into abspath didn't seem to mind getting back an empty string (although that may have been further processed in the function, I didn't follow past the call to _getfullpathname). > And one decision problem... What should we do when too long str is > passed to ntpath._getfullpathname? Report overflow error? Or convert to > unicode and retry with GetFullPathNameW? Hmm.... abspath should be able to be called with str or unicode of arbitrary lengths. Consumers of it shouldn't have to be concerned with the platform implementation when it can be smoothed over by the module. Whether this is done in abspath or _getfullpathname probably isn't too important, since end-users generally shouldn't be calling _getfullpathname, directly. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 12:08:47 2008 From: report at bugs.python.org (Roumen Petrov) Date: Wed, 08 Oct 2008 10:08:47 +0000 Subject: [issue1597850] Cross compiling patches for MINGW Message-ID: <1223460527.32.0.256408372996.issue1597850@psf.upfronthosting.co.za> Roumen Petrov added the comment: Hi rwmjones, Please, could you test patch from issue3871 - python modules are build as setup.py is run from python found on the build system. So I don't expect issue with ppc and sparc. Minor issue is pgen.exe - work around touch grammar files. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 12:51:42 2008 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 Oct 2008 10:51:42 +0000 Subject: [issue3975] PyTraceBack_Print() doesn't respect # coding: xxx header In-Reply-To: <1222441949.55.0.46817952378.issue3975@psf.upfronthosting.co.za> Message-ID: <1223463102.62.0.630828513223.issue3975@psf.upfronthosting.co.za> STINNER Victor added the comment: > More fun will arise when my Windows terminal (encoding=cp1252) > will try to display Chinese characters. Let's pretend this is > yet another issue. I tried the patch using a script with unicode characters (character not representable in ISO-8859-1 like polish characters ? and ?). Result in an UTF-8 terminal (my default locale): Traceback (most recent call last): File "unicode.py", line 2, in raise ValueError("unicode: ??") ValueError: unicode: ?? => correct Result in an ISO-8859-1 terminal (I changed the encoding in my Konsole configuration): Traceback (most recent call last): File "unicode.py", line 2, in raise ValueError("unicode: \u0141\u0142") ValueError: unicode: \u0141\u0142 => correct Why does it work? It's because PyErr_Display() uses sys.stderr instead of sys.stdout and sys.stderr uses a different unicode error mechanism: >>> import sys >>> sys.stdout.errors 'strict' >>> sys.stderr.errors 'backslashreplace' Which is a great idea :-) You can try on Windows using the new attached file unicode.py. Added file: http://bugs.python.org/file11746/unicode.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 13:15:28 2008 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 Oct 2008 11:15:28 +0000 Subject: [issue3975] PyTraceBack_Print() doesn't respect # coding: xxx header In-Reply-To: <1222441949.55.0.46817952378.issue3975@psf.upfronthosting.co.za> Message-ID: <1223464528.82.0.0971986633341.issue3975@psf.upfronthosting.co.za> STINNER Victor added the comment: @amaury: Oops, yes, I introduced a refleak in the version 4 with the PyUnicode_Check(). Instead of just moved Py_(X)RECREF(lineobj);, I could not not resist to refactor the code to remove one more indentation level (I prefer if (...) return; instead of if (...) { very long block; }). Changes in version 5: - rename 'namebuf' buffer to 'buf', it's used for the filename and to display the indentation space (strcpy(buf, ' ');). - move Py_DECREF(fob); at the end of the GetLine loop - return on lineobj error I think that the new version is easier to read than the current code because they are few indentation and no more local variables (if (...) { local var; ... }) Added file: http://bugs.python.org/file11747/traceback_unicode-5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 13:15:34 2008 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 Oct 2008 11:15:34 +0000 Subject: [issue3975] PyTraceBack_Print() doesn't respect # coding: xxx header In-Reply-To: <1222441949.55.0.46817952378.issue3975@psf.upfronthosting.co.za> Message-ID: <1223464534.39.0.468015664876.issue3975@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11736/traceback_unicode-4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 13:15:54 2008 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 Oct 2008 11:15:54 +0000 Subject: [issue3975] PyTraceBack_Print() doesn't respect # coding: xxx header In-Reply-To: <1222441949.55.0.46817952378.issue3975@psf.upfronthosting.co.za> Message-ID: <1223464554.08.0.159374870314.issue3975@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11747/traceback_unicode-5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 13:16:04 2008 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 Oct 2008 11:16:04 +0000 Subject: [issue3975] PyTraceBack_Print() doesn't respect # coding: xxx header In-Reply-To: <1222441949.55.0.46817952378.issue3975@psf.upfronthosting.co.za> Message-ID: <1223464564.82.0.626355229318.issue3975@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file11748/traceback_unicode-5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 13:54:15 2008 From: report at bugs.python.org (Facundo Batista) Date: Wed, 08 Oct 2008 11:54:15 +0000 Subject: [issue1028088] Cookies without values are silently ignored (by design?) Message-ID: <1223466855.7.0.142567885208.issue1028088@psf.upfronthosting.co.za> Changes by Facundo Batista : ---------- nosy: +facundobatista _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 15:02:47 2008 From: report at bugs.python.org (Mark Hammond) Date: Wed, 08 Oct 2008 13:02:47 +0000 Subject: [issue4072] build_py support for lib2to3 is stale In-Reply-To: <1223426997.83.0.795530448507.issue4072@psf.upfronthosting.co.za> Message-ID: <1223470967.58.0.992708098205.issue4072@psf.upfronthosting.co.za> Mark Hammond added the comment: r=me - thanks. ---------- keywords: -needs review resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 15:13:27 2008 From: report at bugs.python.org (Ulrich Eckhardt) Date: Wed, 08 Oct 2008 13:13:27 +0000 Subject: [issue4075] Use WCHAR variant of OutputDebugString In-Reply-To: <1223471607.48.0.166278298943.issue4075@psf.upfronthosting.co.za> Message-ID: <1223471607.48.0.166278298943.issue4075@psf.upfronthosting.co.za> New submission from Ulrich Eckhardt : The attached patch converts the call to OutputDebugString() with a 'TCHAR' parameter (which boils down to a 'char') to one using a 'WCHAR' parameter, allowing the code to be compiled under MS Windows CE, which doesn't have the 'char' version. ---------- components: Windows files: Python-OutputDebugStringW.0.patch keywords: patch messages: 74527 nosy: eckhardt severity: normal status: open title: Use WCHAR variant of OutputDebugString type: feature request versions: Python 2.7 Added file: http://bugs.python.org/file11749/Python-OutputDebugStringW.0.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 16:09:36 2008 From: report at bugs.python.org (Dan OD) Date: Wed, 08 Oct 2008 14:09:36 +0000 Subject: [issue4076] Cannot build non-framework tkinter Python on Mac OS X.5 In-Reply-To: <1223474975.98.0.266450450683.issue4076@psf.upfronthosting.co.za> Message-ID: <1223474975.98.0.266450450683.issue4076@psf.upfronthosting.co.za> New submission from Dan OD : On a Mac running OS X 10.5: As per previous releases, I have set up _tkinter in Modules/Setup.dist with a unix X11 Tcl/Tk build variables. I then run ./configure && make This builds _tkinter with (wrongly) the Mac Tcl framework (ie not X11) building '_tkinter' extension gcc-4.2 -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict- prototypes -DWITH_APPINIT=1 - I/System/Library/Frameworks/Tcl.framework/Headers - I/System/Library/Frameworks/Tcl.framework/Versions/Current/PrivateHeader s -I/System/Library/Frameworks/Tk.framework/Headers - I/System/Library/Frameworks/Tk.framework/Versions/Current/PrivateHeaders -I/usr/X11R6/include -I. -I/Users/djo35/src/Python-3.0rc1/./Include -I. -IInclude -I./Include -I/usr/local/include -I/Users/djo35/src/Python- 3.0rc1/Include -I/Users/djo35/src/Python-3.0rc1 -c /Users/djo35/src/Python-3.0rc1/Modules/_tkinter.c -o build/temp.macosx- 10.3-i386-3.0/Users/djo35/src/Python-3.0rc1/Modules/_tkinter.o - framework Tk I would like this to build a unix tkinter.so - is this possible? I can't find a reference in the 3k documentation. Thanks, Dan ---------- components: Build messages: 74528 nosy: indiedan severity: normal status: open title: Cannot build non-framework tkinter Python on Mac OS X.5 type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 16:39:47 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 08 Oct 2008 14:39:47 +0000 Subject: [issue4075] Use WCHAR variant of OutputDebugString In-Reply-To: <1223471607.48.0.166278298943.issue4075@psf.upfronthosting.co.za> Message-ID: <1223476787.2.0.181077607219.issue4075@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The alloca() function should be avoided here: the function may be called in extreme conditions, like stack overflow. I suggest to use a small static buffer (50 chars?), and call OutputDebugStringW in a loop. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 16:49:49 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 08 Oct 2008 14:49:49 +0000 Subject: [issue4071] ntpath.abspath can fail on Win Server 2008 (64-bit) In-Reply-To: <1223425635.48.0.940202056696.issue4071@psf.upfronthosting.co.za> Message-ID: <1223477389.13.0.956999048127.issue4071@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > I don't have it offhand, but it was the whole PATH environment > variable, complete with semicolons. That's probably the *real* bug. Indeed. Do you happen to have the complete traceback of the failing tempfile.mktemp() call? I don't see where it can use the PATH environment variable. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 17:50:26 2008 From: report at bugs.python.org (Ulrich Eckhardt) Date: Wed, 08 Oct 2008 15:50:26 +0000 Subject: [issue4077] Py_FatalError cleanup patch In-Reply-To: <1223481025.87.0.784441664166.issue4077@psf.upfronthosting.co.za> Message-ID: <1223481025.87.0.784441664166.issue4077@psf.upfronthosting.co.za> New submission from Ulrich Eckhardt : This patch does two things: * It removes trailing newlines from the arguments given to Py_FatalError() because a trailing newline is already added automatically. * It fixes the declaration in ffi.c to take a 'const char*'. ---------- components: None files: Python-FatalError-no-newline.0.patch keywords: patch messages: 74531 nosy: eckhardt severity: normal status: open title: Py_FatalError cleanup patch type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file11750/Python-FatalError-no-newline.0.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 18:44:59 2008 From: report at bugs.python.org (Georg Brandl) Date: Wed, 08 Oct 2008 16:44:59 +0000 Subject: [issue4055] Documentation on website is missing section numbers In-Reply-To: <1223310995.33.0.795249867798.issue4055@psf.upfronthosting.co.za> Message-ID: <1223484299.29.0.868675067367.issue4055@psf.upfronthosting.co.za> Georg Brandl added the comment: I disagree that missing section numbers are a severe usability hit. Especially in the context that the new docs are constantly updated, there's no telling when section numbers will shift, misleading those who only navigate by section number. In contrast, a link is persistent and usually also quicker to get to. That said, I acknowledge the wish for section numbers, and there is an issue entry about it in the tracker for the Sphinx project, which is used to build the new docs, at . Closing this one as duplicate. ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 18:45:22 2008 From: report at bugs.python.org (Georg Brandl) Date: Wed, 08 Oct 2008 16:45:22 +0000 Subject: [issue3288] float.as_integer_ratio method is not documented In-Reply-To: <1215254478.03.0.190528446429.issue3288@psf.upfronthosting.co.za> Message-ID: <1223484322.58.0.821075334747.issue3288@psf.upfronthosting.co.za> Georg Brandl added the comment: Would be nice, yes. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 18:45:59 2008 From: report at bugs.python.org (Georg Brandl) Date: Wed, 08 Oct 2008 16:45:59 +0000 Subject: [issue4056] :Class: causes exception In-Reply-To: <1223320240.78.0.644228584964.issue4056@psf.upfronthosting.co.za> Message-ID: <1223484359.79.0.0345189881935.issue4056@psf.upfronthosting.co.za> Georg Brandl added the comment: [Sphinx issues are now tracked at http://code.google.com/p/sphinx -- moved the issue there.] ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 18:47:46 2008 From: report at bugs.python.org (Georg Brandl) Date: Wed, 08 Oct 2008 16:47:46 +0000 Subject: [issue3909] Building PDF documentation from tex files In-Reply-To: <1221842807.23.0.726390591277.issue3909@psf.upfronthosting.co.za> Message-ID: <1223484466.92.0.977061157472.issue3909@psf.upfronthosting.co.za> Georg Brandl added the comment: OK, no problem. I should have thought about that sooner. Happy TeXing :) ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 18:52:57 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 08 Oct 2008 16:52:57 +0000 Subject: [issue4077] Py_FatalError cleanup patch In-Reply-To: <1223481025.87.0.784441664166.issue4077@psf.upfronthosting.co.za> Message-ID: <1223484777.39.0.108198500377.issue4077@psf.upfronthosting.co.za> Changes by Amaury Forgeot d'Arc : ---------- assignee: -> amaury.forgeotdarc keywords: +easy nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 19:17:50 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 08 Oct 2008 17:17:50 +0000 Subject: [issue3975] PyTraceBack_Print() doesn't respect # coding: xxx header In-Reply-To: <1222441949.55.0.46817952378.issue3975@psf.upfronthosting.co.za> Message-ID: <1223486270.29.0.333275787122.issue3975@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The code is indeed easier to follow. I don't have any more remark, thanks to you perseverance! Now, is there some unit test we could provide? #2384 depends on this issue, it should be easy to extract a small test case. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 19:20:32 2008 From: report at bugs.python.org (Georg Brandl) Date: Wed, 08 Oct 2008 17:20:32 +0000 Subject: [issue4059] sqlite3 docs incomplete In-Reply-To: <1223329325.4.0.307083135526.issue4059@psf.upfronthosting.co.za> Message-ID: <1223486432.98.0.138613021337.issue4059@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, committed as r66854. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 19:31:17 2008 From: report at bugs.python.org (Georg Brandl) Date: Wed, 08 Oct 2008 17:31:17 +0000 Subject: [issue4058] markup in What's New in 2.6 In-Reply-To: <1223322009.26.0.795305514424.issue4058@psf.upfronthosting.co.za> Message-ID: <1223487077.81.0.964859742211.issue4058@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, committed as r66855. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 19:37:41 2008 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 Oct 2008 17:37:41 +0000 Subject: [issue3975] PyTraceBack_Print() doesn't respect # coding: xxx header In-Reply-To: <1222441949.55.0.46817952378.issue3975@psf.upfronthosting.co.za> Message-ID: <1223487461.31.0.279103652999.issue3975@psf.upfronthosting.co.za> STINNER Victor added the comment: My patch for #2384 contains a testcase which require #3975 and #2384 to be fixed (you have to apply both patches to test it). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 20:04:46 2008 From: report at bugs.python.org (Sidnei da Silva) Date: Wed, 08 Oct 2008 18:04:46 +0000 Subject: [issue4078] asyncore fixes are not backwards compatible In-Reply-To: <1223489086.17.0.537265261375.issue4078@psf.upfronthosting.co.za> Message-ID: <1223489086.17.0.537265261375.issue4078@psf.upfronthosting.co.za> New submission from Sidnei da Silva : I am working on getting Zope to run (or at least, start) with Python 2.6. It actually starts right now after applying some patches, which is amazing on itself, but it dies right away due to changes in asyncore that break Zope's internal version of medusa. I've opened a bug against Zope on Launchpad, but someone suggested that it might actually be a bug in python, in the sense that it changed asyncore in a backwards-incompatible way. I wouldn't go that far, since I think it's more likely that Zope's version of medusa is poking into asyncore internals instead. Here's the bug, for reference: https://bugs.launchpad.net/zope2/+bug/280020 I suspect a change similar to this will need to be applied to medusa: http://codereview.appspot.com/744/diff/1/23 I'm puzzled though as to why the change is incompatible. I would have expected at least some kind of deprecation warning on Python 2.5. Either way, if you think the issue needs to be fixed in medusa feel free to close this bug. ---------- components: Library (Lib) messages: 74540 nosy: sidnei severity: normal status: open title: asyncore fixes are not backwards compatible type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 20:21:29 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 08 Oct 2008 18:21:29 +0000 Subject: [issue4078] asyncore fixes are not backwards compatible In-Reply-To: <1223489086.17.0.537265261375.issue4078@psf.upfronthosting.co.za> Message-ID: <1223490089.31.0.18799953772.issue4078@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola, josiah.carlson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 20:29:59 2008 From: report at bugs.python.org (Sidnei da Silva) Date: Wed, 08 Oct 2008 18:29:59 +0000 Subject: [issue4079] new urllib2.Request 'timeout' attribute needs to have a default In-Reply-To: <1223490599.12.0.198174561396.issue4079@psf.upfronthosting.co.za> Message-ID: <1223490599.12.0.198174561396.issue4079@psf.upfronthosting.co.za> New submission from Sidnei da Silva : 'urllib2' has introduced a configurable 'timeout' setting by assigning to the 'timeout' attribute of the urllib2.Request object. However the implementation is flawed: - the 'timeout' attribute is set in OpenerDirector.open() and nowhere else - if someone overrides OpenerDirector.open() (btw: mechanize does this), then the 'timeout' attribute will never be set, breaking other parts of the code which require the 'timeout' attribute to be present. A simple workaround for this would be to do one or more of: a) define the 'timeout' attribute as socket._GLOBAL_DEFAULT_TIMEOUT at class-level b) initialize the 'timeout' attribute on urllib2.Request.__init__() ---------- components: Library (Lib) messages: 74541 nosy: sidnei severity: normal status: open title: new urllib2.Request 'timeout' attribute needs to have a default type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 20:40:53 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 08 Oct 2008 18:40:53 +0000 Subject: [issue4075] Use WCHAR variant of OutputDebugString In-Reply-To: <1223471607.48.0.166278298943.issue4075@psf.upfronthosting.co.za> Message-ID: <1223491253.71.0.899563699346.issue4075@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I agree that a static buffer should be used. I think calling it in a loop is overkill. Instead, if an overrun occurs, adding "(truncated)" should be good enough. I could find only a single caller that doesn't pass a static string (_Py_NegativeRefcount), where I think 50 characters are still plenty. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 20:47:48 2008 From: report at bugs.python.org (Georg Brandl) Date: Wed, 08 Oct 2008 18:47:48 +0000 Subject: [issue3935] bisect insort C implementation ignores methods on list subclasses In-Reply-To: <1222109684.93.0.997656752515.issue3935@psf.upfronthosting.co.za> Message-ID: <1223491668.73.0.896878942227.issue3935@psf.upfronthosting.co.za> Georg Brandl added the comment: OK, committed as r66856, should get merged to 3.0 soon. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 21:25:35 2008 From: report at bugs.python.org (Leo M) Date: Wed, 08 Oct 2008 19:25:35 +0000 Subject: [issue4017] IDLE 2.6 broken on OSX (Leopard) In-Reply-To: <1222960590.08.0.635891151551.issue4017@psf.upfronthosting.co.za> Message-ID: <1223493935.05.0.740011539538.issue4017@psf.upfronthosting.co.za> Leo M added the comment: Hello. First time here, beginner at Python. I have verified that the Google tip link in the previous to fix IDLE works for me. Post in question: ** [Kevin's post of 6.Oct, 02:58] You can avoid this problem by building Python yourself and putting /Library/Frameworks first on the search path for Tcl/Tk. Look in setup.py in the source code, around line 1438 (in the 'detect_tkinter_darwin' function), and either comment out /System/Library or put it underneath /Library/Frameworks. This is what the official build from Python.org should do--look first in /Library/Frameworks and then fall back on /System/Library/Frameworks. I'm not sure why it doesn't. ** In setup.py, I simply put /Library/Frameworks/ first as outlined above, and then did a config-make-install of the Framework version of Python. IDLE now does not silently fail now, but runs as 'expected'. -Leo Marihart Python Newb, Somewhat more experienced shell guy ---------- nosy: +leoofborg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 22:28:16 2008 From: report at bugs.python.org (Pawel Prokop) Date: Wed, 08 Oct 2008 20:28:16 +0000 Subject: [issue4080] pyunit - display time of each test case - patch In-Reply-To: <1223497696.14.0.913391715353.issue4080@psf.upfronthosting.co.za> Message-ID: <1223497696.14.0.913391715353.issue4080@psf.upfronthosting.co.za> New submission from Pawel Prokop : I've needed to measure each unit test running time to measure the performance changing of each functionality that every test case tests. Latest version of pyunit has only displayed summary running time of the suite, so I've implemented small enhancement to unittest.py that (in verbose mode) shows time of each test case run. Maybe that would be usefull for anybody else? ---------- components: None files: pyunit_time.patch keywords: patch messages: 74545 nosy: pprokop severity: normal status: open title: pyunit - display time of each test case - patch type: feature request versions: 3rd party Added file: http://bugs.python.org/file11751/pyunit_time.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 22:39:01 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 08 Oct 2008 20:39:01 +0000 Subject: [issue4072] build_py support for lib2to3 is stale In-Reply-To: <1223426997.83.0.795530448507.issue4072@psf.upfronthosting.co.za> Message-ID: <1223498341.0.0.112310493857.issue4072@psf.upfronthosting.co.za> Benjamin Peterson added the comment: The options dictionary only supports the "print_function" as of now, and that's default by false anyway. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 22:42:19 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 08 Oct 2008 20:42:19 +0000 Subject: [issue3714] nntplib module broken by str to unicode conversion In-Reply-To: <1219932621.55.0.439111476187.issue3714@psf.upfronthosting.co.za> Message-ID: <1223498539.06.0.714454884082.issue3714@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- priority: critical -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 22:42:25 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 08 Oct 2008 20:42:25 +0000 Subject: [issue3725] telnetlib module broken by str to unicode conversion In-Reply-To: <1220013826.6.0.647840298479.issue3725@psf.upfronthosting.co.za> Message-ID: <1223498545.92.0.0699661150433.issue3725@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- priority: critical -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 22:42:34 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 08 Oct 2008 20:42:34 +0000 Subject: [issue3727] poplib module broken by str to unicode conversionhttp://bugs.python.org/issue3727 In-Reply-To: <1220018390.31.0.482710376741.issue3727@psf.upfronthosting.co.za> Message-ID: <1223498554.31.0.0303379190826.issue3727@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- priority: -> release blocker title: poplib module broken by str to unicode conversion -> poplib module broken by str to unicode conversionhttp://bugs.python.org/issue3727 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 22:42:48 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 08 Oct 2008 20:42:48 +0000 Subject: [issue3727] poplib module broken by str to unicode conversion In-Reply-To: <1220018390.31.0.482710376741.issue3727@psf.upfronthosting.co.za> Message-ID: <1223498568.33.0.260265272874.issue3727@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- title: poplib module broken by str to unicode conversionhttp://bugs.python.org/issue3727 -> poplib module broken by str to unicode conversion _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 22:44:35 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 08 Oct 2008 20:44:35 +0000 Subject: [issue4078] asyncore fixes are not backwards compatible In-Reply-To: <1223489086.17.0.537265261375.issue4078@psf.upfronthosting.co.za> Message-ID: <1223498675.09.0.805003495565.issue4078@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> josiahcarlson nosy: +josiahcarlson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 23:21:07 2008 From: report at bugs.python.org (Josiah Carlson) Date: Wed, 08 Oct 2008 21:21:07 +0000 Subject: [issue4078] asyncore fixes are not backwards compatible In-Reply-To: <1223489086.17.0.537265261375.issue4078@psf.upfronthosting.co.za> Message-ID: <1223500867.58.0.139835853968.issue4078@psf.upfronthosting.co.za> Josiah Carlson added the comment: Zope's medusa was relying on internal details of asyncore (the ac_out_buffer attribute), which is no longer applicable. It also seems as though much of medusa itself borrows from asynchat.async_chat, which suggests that it should subclass there. ---------- resolution: -> wont fix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 23:47:53 2008 From: report at bugs.python.org (Andres Riancho) Date: Wed, 08 Oct 2008 21:47:53 +0000 Subject: [issue1028088] Cookies without values are silently ignored (by design?) Message-ID: <1223502473.2.0.00513753283935.issue1028088@psf.upfronthosting.co.za> Andres Riancho added the comment: The RFC I'm talking about is: http://www.ietf.org/rfc/rfc2109.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 8 23:57:09 2008 From: report at bugs.python.org (Jason Day) Date: Wed, 08 Oct 2008 21:57:09 +0000 Subject: [issue4071] ntpath.abspath fails for long str paths In-Reply-To: <1223425635.48.0.940202056696.issue4071@psf.upfronthosting.co.za> Message-ID: <1223503029.08.0.161552918754.issue4071@psf.upfronthosting.co.za> Changes by Jason Day : ---------- title: ntpath.abspath can fail on Win Server 2008 (64-bit) -> ntpath.abspath fails for long str paths _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 00:00:12 2008 From: report at bugs.python.org (Jason Day) Date: Wed, 08 Oct 2008 22:00:12 +0000 Subject: [issue4071] ntpath.abspath can fail on Win Server 2008 (64-bit) In-Reply-To: <1223477389.13.0.956999048127.issue4071@psf.upfronthosting.co.za> Message-ID: <494F0521440A5B4CBFE04D8A570B9F2309A6AD8FEF@bt-exchange.BlueTech.local> Jason Day added the comment: > Indeed. Do you happen to have the complete traceback of the failing > tempfile.mktemp() call? I don't see where it can use the PATH > environment variable. The problem was that somehow, on our systems, the TEMP environmental variable had been copied over with PATH. Most likely some batch file tried to store a copy of PATH, without realizing the significance of TEMP. [groan] Anyway, I still think that it's a bug that abspath() can't be called with a perfectly good str path, because of limitations with the windows api. I edited the bug title to reflect the actual bug. The str path length could be checked and upgraded to the Unicode version, if necessary (or try again with the unicode version, in the case of an exception). I think it's important to ensure that when abspath() is called with str, it returns str, even if it was upgraded to the unicode call. ---------- title: ntpath.abspath fails for long str paths -> ntpath.abspath can fail on Win Server 2008 (64-bit) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 00:18:01 2008 From: report at bugs.python.org (Nick Edds) Date: Wed, 08 Oct 2008 22:18:01 +0000 Subject: [issue3994] import fixer misses some symbols In-Reply-To: <1222672392.58.0.438026225401.issue3994@psf.upfronthosting.co.za> Message-ID: <1223504281.56.0.107407187139.issue3994@psf.upfronthosting.co.za> Nick Edds added the comment: The problem is that fix_imports doesn't look at matches that are nested within matches. So the _winreg.OpenKey part gets fixed, but the _winreg.HKEY_LOCAL_MACHINE does not because it is nested within the other node. I didn't make fix_imports so I don't know what the intention was for not matching nested matches. When I removed that restriction, the fixer works as expected. It also does not cause any of 2to3's tests to fail nor does it have a noticeable impact on 2to3's runtime, so I'm tempted to say that this is the fix to make, but I don't want to commit to it until I've heard from it's author about it. I added Collin to the Nosy List, so hopefully he can comment on the reasoning behind the restriction. ---------- nosy: +collinwinter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 00:28:39 2008 From: report at bugs.python.org (Tim Delaney) Date: Wed, 08 Oct 2008 22:28:39 +0000 Subject: [issue4081] Error copying directory to _static in Sphinx In-Reply-To: <1223504918.57.0.382949560871.issue4081@psf.upfronthosting.co.za> Message-ID: <1223504918.57.0.382949560871.issue4081@psf.upfronthosting.co.za> New submission from Tim Delaney : If there is a directory to be copied to _static, Sphinx first attempts to delete any directory by the same name in the _static directory. See attached sphinx_static_exc.txt for the exception. The simplest fix is to change the call (line 595, Sphinx 0.4.2) to:: shutil.rmtree(targetname) to:: shutil.rmtree(targetname, ignore_errors=True) It would also be preferable if instead of blindly doing rmtree/copytree, only updated files be copied to _static. ---------- assignee: georg.brandl components: Documentation tools (Sphinx) files: sphinx_static_exc.txt messages: 74551 nosy: georg.brandl, tcdelaney severity: normal status: open title: Error copying directory to _static in Sphinx type: crash Added file: http://bugs.python.org/file11752/sphinx_static_exc.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 00:31:59 2008 From: report at bugs.python.org (Tim Delaney) Date: Wed, 08 Oct 2008 22:31:59 +0000 Subject: [issue4081] Error copying directory to _static in Sphinx In-Reply-To: <1223504918.57.0.382949560871.issue4081@psf.upfronthosting.co.za> Message-ID: <1223505119.58.0.502698847665.issue4081@psf.upfronthosting.co.za> Tim Delaney added the comment: Oops - didn't complete my thought. The issue is that if the directory does not already exist, the attached exception is raised. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 01:05:19 2008 From: report at bugs.python.org (Mark Hammond) Date: Wed, 08 Oct 2008 23:05:19 +0000 Subject: [issue1284316] Win32: Security problem with default installation directory Message-ID: <1223507119.31.0.620964739918.issue1284316@psf.upfronthosting.co.za> Changes by Mark Hammond : ---------- nosy: +mhammond _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 01:51:51 2008 From: report at bugs.python.org (Christian Heimes) Date: Wed, 08 Oct 2008 23:51:51 +0000 Subject: [issue4082] python2.6 -m site doesn't run site._script() any more In-Reply-To: <1223509911.91.0.368315833446.issue4082@psf.upfronthosting.co.za> Message-ID: <1223509911.91.0.368315833446.issue4082@psf.upfronthosting.co.za> New submission from Christian Heimes : python2.6 -m site used to print some status information to the console. python3.0 -m site and python2.5 -m site are still working as expected. An initial debug session showed that the site module isn't imported a second time under the name __main__. I suspect a regression in runpy or related code. ---------- components: Library (Lib) messages: 74553 nosy: christian.heimes priority: normal severity: normal status: open title: python2.6 -m site doesn't run site._script() any more versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 01:52:02 2008 From: report at bugs.python.org (Christian Heimes) Date: Wed, 08 Oct 2008 23:52:02 +0000 Subject: [issue4082] python2.6 -m site doesn't run site._script() any more In-Reply-To: <1223509911.91.0.368315833446.issue4082@psf.upfronthosting.co.za> Message-ID: <1223509922.0.0.931537153758.issue4082@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 01:57:31 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 08 Oct 2008 23:57:31 +0000 Subject: [issue4082] python2.6 -m site doesn't run site._script() any more In-Reply-To: <1223509911.91.0.368315833446.issue4082@psf.upfronthosting.co.za> Message-ID: <1223510251.39.0.619543684979.issue4082@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I concur with the Christian's analysis: $ python2.6 -m site $ python2.6 -S -m site [output....] ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 04:11:38 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 09 Oct 2008 02:11:38 +0000 Subject: [issue4082] python2.6 -m site doesn't run site._script() any more In-Reply-To: <1223509911.91.0.368315833446.issue4082@psf.upfronthosting.co.za> Message-ID: <1223518298.47.0.0968766985752.issue4082@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 07:39:11 2008 From: report at bugs.python.org (Hugh Gibson) Date: Thu, 09 Oct 2008 05:39:11 +0000 Subject: [issue3001] RLock's are SLOW In-Reply-To: <1212074891.45.0.23606216758.issue3001@psf.upfronthosting.co.za> Message-ID: <1223530751.2.0.596667723237.issue3001@psf.upfronthosting.co.za> Hugh Gibson added the comment: > I doubt subclassability of RLock matters but who knows, people do code > things. I've recently done this to implement potential deadlock detection. I keep a record of the sequences of acquired locks, find unique sequences, then check for conflicts between each sequence. There's not much overhead and it highlighted some potential deadlocks where lock A and B were acquired AB in one route through code and BA in another route. The algorithm is a simplified version of that used in Linux - see http://www.mjmwired.net/kernel/Documentation/lockdep-design.txt Hugh ---------- nosy: +hgibson50 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 09:02:03 2008 From: report at bugs.python.org (Jason Day) Date: Thu, 09 Oct 2008 07:02:03 +0000 Subject: [issue4071] ntpath.abspath fails for long str paths In-Reply-To: <1223425635.48.0.940202056696.issue4071@psf.upfronthosting.co.za> Message-ID: <1223535723.33.0.157876517095.issue4071@psf.upfronthosting.co.za> Changes by Jason Day : ---------- title: ntpath.abspath can fail on Win Server 2008 (64-bit) -> ntpath.abspath fails for long str paths _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 09:40:33 2008 From: report at bugs.python.org (Davi Post) Date: Thu, 09 Oct 2008 07:40:33 +0000 Subject: [issue4083] try statement in language reference not updated for v2.6 In-Reply-To: <1223538033.46.0.0709872608111.issue4083@psf.upfronthosting.co.za> Message-ID: <1223538033.46.0.0709872608111.issue4083@psf.upfronthosting.co.za> New submission from Davi Post : Language Reference for the try statement does not show changes for v2.6, specifically the "PEP 3110: Exception-Handling Changes". At least, the grammar should include the "except ... as" syntax. http://docs.python.org/reference/compound_stmts.html#try http://docs.python.org/whatsnew/2.6.html#pep-3110-exception-handling- changes http://www.python.org/dev/peps/pep-3110/#compatibility ---------- assignee: georg.brandl components: Documentation messages: 74556 nosy: davipo, georg.brandl severity: normal status: open title: try statement in language reference not updated for v2.6 type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 10:43:17 2008 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 09 Oct 2008 08:43:17 +0000 Subject: [issue4084] Decimal.max(NaN, x) gives incorrect results when x is finite and long In-Reply-To: <1223541797.81.0.999567661015.issue4084@psf.upfronthosting.co.za> Message-ID: <1223541797.81.0.999567661015.issue4084@psf.upfronthosting.co.za> New submission from Mark Dickinson : Here's a snippet from Python 2.6: >>> from decimal import Decimal, getcontext >>> getcontext().prec = 3 >>> Decimal('NaN').max(Decimal('1234')) Decimal('sNaN234') The result here should be Decimal('1.23E+3')---the specification says that the result of comparing a quiet NaN with a finite value should be that finite value, rounded according to the context. This also affects min, max_mag and min_mag. The cause is that non-NaNs are incorrectly being passed to the _fix_nan method. The attached patch fixes this, and adds new testcases to extra.decTest to stop it happening again. It would be good to get this fix into 3.0, if possible. I think it should also be backported to 2.5.3. ---------- assignee: facundobatista files: decimal_maxbug.patch keywords: patch messages: 74557 nosy: facundobatista, marketdickinson priority: normal severity: normal status: open title: Decimal.max(NaN, x) gives incorrect results when x is finite and long type: behavior versions: Python 2.5.3, Python 2.6, Python 2.7, Python 3.0 Added file: http://bugs.python.org/file11753/decimal_maxbug.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 10:49:31 2008 From: report at bugs.python.org (Roumen Petrov) Date: Thu, 09 Oct 2008 08:49:31 +0000 Subject: [issue4075] Use WCHAR variant of OutputDebugString In-Reply-To: <1223471607.48.0.166278298943.issue4075@psf.upfronthosting.co.za> Message-ID: <1223542171.62.0.443285152015.issue4075@psf.upfronthosting.co.za> Roumen Petrov added the comment: Which CE version ? Is the patch required for previous/next CE version ? If the CE can't work with char why the compiler don't threat strings as wide characters always ? ---------- nosy: +rpetrov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 11:18:26 2008 From: report at bugs.python.org (Ulrich Eckhardt) Date: Thu, 09 Oct 2008 09:18:26 +0000 Subject: [issue4075] Use WCHAR variant of OutputDebugString In-Reply-To: <1223471607.48.0.166278298943.issue4075@psf.upfronthosting.co.za> Message-ID: <1223543906.76.0.688737803235.issue4075@psf.upfronthosting.co.za> Ulrich Eckhardt added the comment: Roumen, just and explanation on the TCHAR/WCHAR/CHAR issue under win32... In the old days, DOS/Windows was built with 8-bit characters using codepages. So functions like CreateFile() took a char string that used the current local codepage as encoding. Now, since NT 4 (maybe even 3) the internally used char type is a 16-bit type. In order to ease conversion, the function CreateFile() was removed (it still exists in oldnames.lib) and replaced with CreateFileW() and CreateFileA(), which explicitly take either a codepage-encoded 8-bit string or a UCS2/UTF-16 16-bit string. Under win9x, CreateFileW() actually tried to convert to the internally used 8-bit character type, while under NT, CreateFileA() converted from the codepage to the UTF-16 character type. Now, under CE, which is an embedded OS, neither the (legacy/obsolete/deprecated) codepages nor the according CreateFileA() functions exist. They simply have been removed to save space and because they are of limited functionality anyway. Which CE version? All of them, since at least CE3 (CE6 is current). Why not treat all strings as wide string? Because that would actually change the existing meaning of them and make it harder to impossible to create code that is portable. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 11:27:55 2008 From: report at bugs.python.org (David Jones) Date: Thu, 09 Oct 2008 09:27:55 +0000 Subject: [issue4085] 2.5.2 whatsnew document corrupts names, by having broken HTML, at least on the Web. In-Reply-To: <1223544475.01.0.800485054454.issue4085@psf.upfronthosting.co.za> Message-ID: <1223544475.01.0.800485054454.issue4085@psf.upfronthosting.co.za> New submission from David Jones : Consider the web page: http://www.python.org/doc/2.5.2/whatsnew/acks.html (the problem appears throughout the whatsnew document, but that page happens to be short and have more than one instance). On my browser, Safari 3.1.2 on Intel OS X 10.4.11, Martin von L?wis has his name corrupted, as does Lars Gust?bel. The problem seems to be because whilst the page is encoded in utf-8 the web server does not transmit a Content-Type header that specifies utf-8: $ curl -I http://www.python.org/doc/2.5.2/whatsnew/acks.html HTTP/1.1 200 OK Date: Thu, 09 Oct 2008 08:51:22 GMT Server: Apache/2.2.3 (Debian) DAV/2 SVN/1.4.2 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_wsgi/2.0 Python/2.4.4 Last-Modified: Fri, 22 Feb 2008 12:58:18 GMT ETag: "12c008-1336-c6b00e80" Accept-Ranges: bytes Content-Length: 4918 Content-Type: text/html Shouldn't that be "Content-Type: text/html; charset=UTF-8"? Yeah, probably. Shouldn't the browser be using the meta tag in the HTML file itself? Probably, but your broken HTML is preventing Safari from parsing the tag correctly. Specifically: $ curl http://www.python.org/doc/2.5.2/whatsnew/acks.html | grep rel=.first. The title attribute of that link element is incorrect. It features a single-quote inside a single-quoted string. Oopsie. I don't think Safari should be so mean, but bad HTML is bad HTML. Taking a local copy and fixing that title attribute (by using double quotes for example) causes the page to render just fine. ---------- assignee: georg.brandl components: Documentation messages: 74560 nosy: drj, georg.brandl severity: normal status: open title: 2.5.2 whatsnew document corrupts names, by having broken HTML, at least on the Web. type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 11:50:11 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 09 Oct 2008 09:50:11 +0000 Subject: [issue4085] 2.5.2 whatsnew document corrupts names, by having broken HTML, at least on the Web. In-Reply-To: <1223544475.01.0.800485054454.issue4085@psf.upfronthosting.co.za> Message-ID: <1223545811.05.0.577700871554.issue4085@psf.upfronthosting.co.za> Georg Brandl added the comment: Your analysis is correct -- the HTML is invalid. However, this problem doesn't occur in new documentation since we don't use the system used until 2.5 anymore. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 11:59:26 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 09 Oct 2008 09:59:26 +0000 Subject: [issue3727] poplib module broken by str to unicode conversion In-Reply-To: <1220018390.31.0.482710376741.issue3727@psf.upfronthosting.co.za> Message-ID: <1223546366.53.0.626696162581.issue3727@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: As for issue #3911 this is another module for which an actual test suite would be very necessary. ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 12:06:11 2008 From: report at bugs.python.org (Christian Boos) Date: Thu, 09 Oct 2008 10:06:11 +0000 Subject: [issue3741] DISTUTILS_USE_SDK set causes msvc9compiler.py to raise an exception In-Reply-To: <1220202889.53.0.172923498575.issue3741@psf.upfronthosting.co.za> Message-ID: <1223546771.62.0.225665839243.issue3741@psf.upfronthosting.co.za> Christian Boos added the comment: Hit the same issue, which is actually only a typo, as self.__path is used nowhere. diff -r 4d10dcbd5f63 Lib/distutils/msvc9compiler.py --- a/Lib/distutils/msvc9compiler.py Thu Oct 09 11:19:40 2008 +0200 +++ b/Lib/distutils/msvc9compiler.py Thu Oct 09 12:01:27 2008 +0200 @@ -316,7 +316,7 @@ self.__version = VERSION self.__root = r"Software\Microsoft\VisualStudio" # self.__macros = MACROS - self.__path = [] + self.__paths = [] # target platform (.plat_name is consistent with 'bdist') self.plat_name = None self.__arch = None # deprecated name ---------- nosy: +cboos _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 12:24:17 2008 From: report at bugs.python.org (The Lawnmower man) Date: Thu, 09 Oct 2008 10:24:17 +0000 Subject: [issue1905] PythonLauncher not working correctly on OS X 10.5/Leopad In-Reply-To: <1201012501.41.0.744457037048.issue1905@psf.upfronthosting.co.za> Message-ID: <1223547857.62.0.842178327067.issue1905@psf.upfronthosting.co.za> The Lawnmower man added the comment: Sorry, but I still have the same problem as Kevin Walzer and I can't understand the solution proposed by Ronald Oussoren. Where is the patch? How can I install it? What I am supposed to do? Thank you very much! ---------- nosy: +thelawnmowerman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 13:03:07 2008 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 09 Oct 2008 11:03:07 +0000 Subject: [issue4082] python2.6 -m site doesn't run site._script() any more In-Reply-To: <1223509911.91.0.368315833446.issue4082@psf.upfronthosting.co.za> Message-ID: <1223550187.73.0.755444929138.issue4082@psf.upfronthosting.co.za> Nick Coghlan added the comment: Platform? It works fine for me (system python is 2.5, local python is trunk - the tildes aren't actually in the printout, I subbed them in for my home directory): ~/devel/python$ python -m site sys.path = [ '~/devel/python', '/usr/lib/python25.zip', '/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2', '/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-dynload', '/usr/local/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages/PIL', '/var/lib/python-support/python2.5', '/var/lib/python-support/python2.5/gtk-2.0', ] ncoghlan at pseudopolis:~/devel/python$ ./python -m site sys.path = [ '~/devel/python', '/usr/local/lib/python27.zip', '~/devel/python/Lib', '~/devel/python/Lib/plat-linux2', '~/devel/python/Lib/lib-tk', '~/devel/python/Lib/lib-old', '~/devel/python/Modules', '~/devel/python/build/lib.linux-i686-2.7', ] USER_BASE: '/home/ncoghlan/.local' (exists) USER_SITE: '/home/ncoghlan/.local/lib/python2.7/site-packages' (doesn't exist) ENABLE_USER_SITE: True _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 13:03:28 2008 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 09 Oct 2008 11:03:28 +0000 Subject: [issue4082] python2.6 -m site doesn't run site._script() any more In-Reply-To: <1223509911.91.0.368315833446.issue4082@psf.upfronthosting.co.za> Message-ID: <1223550208.79.0.634741244606.issue4082@psf.upfronthosting.co.za> Changes by Nick Coghlan : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 13:03:41 2008 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 09 Oct 2008 11:03:41 +0000 Subject: [issue4082] python2.6 -m site doesn't run site._script() any more In-Reply-To: <1223509911.91.0.368315833446.issue4082@psf.upfronthosting.co.za> Message-ID: <1223550221.84.0.839602518092.issue4082@psf.upfronthosting.co.za> Nick Coghlan added the comment: Platform? It works fine for me (system python is 2.5, local python is trunk - the tildes aren't actually in the printout, I subbed them in for my home directory): ~/devel/python$ python -m site sys.path = [ '~/devel/python', '/usr/lib/python25.zip', '/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2', '/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-dynload', '/usr/local/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages/PIL', '/var/lib/python-support/python2.5', '/var/lib/python-support/python2.5/gtk-2.0', ] ~/devel/python$ ./python -m site sys.path = [ '~/devel/python', '/usr/local/lib/python27.zip', '~/devel/python/Lib', '~/devel/python/Lib/plat-linux2', '~/devel/python/Lib/lib-tk', '~/devel/python/Lib/lib-old', '~/devel/python/Modules', '~/devel/python/build/lib.linux-i686-2.7', ] USER_BASE: '/home/ncoghlan/.local' (exists) USER_SITE: '/home/ncoghlan/.local/lib/python2.7/site-packages' (doesn't exist) ENABLE_USER_SITE: True _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 13:04:04 2008 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 09 Oct 2008 11:04:04 +0000 Subject: [issue4082] python2.6 -m site doesn't run site._script() any more In-Reply-To: <1223509911.91.0.368315833446.issue4082@psf.upfronthosting.co.za> Message-ID: <1223550244.25.0.666061545112.issue4082@psf.upfronthosting.co.za> Changes by Nick Coghlan : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 13:04:27 2008 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 09 Oct 2008 11:04:27 +0000 Subject: [issue4082] python2.6 -m site doesn't run site._script() any more In-Reply-To: <1223509911.91.0.368315833446.issue4082@psf.upfronthosting.co.za> Message-ID: <1223550267.17.0.191210536091.issue4082@psf.upfronthosting.co.za> Nick Coghlan added the comment: Platform? It works fine for me (system python is 2.5, local python is trunk - the tildes aren't actually in the printout, I subbed them in for my home directory): ~/devel/python$ python -m site sys.path = [ '~/devel/python', '/usr/lib/python25.zip', '/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2', '/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-dynload', '/usr/local/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages/PIL', '/var/lib/python-support/python2.5', '/var/lib/python-support/python2.5/gtk-2.0', ] ncoghlan at pseudopolis:~/devel/python$ ./python -m site sys.path = [ '~/devel/python', '/usr/local/lib/python27.zip', '~/devel/python/Lib', '~/devel/python/Lib/plat-linux2', '~/devel/python/Lib/lib-tk', '~/devel/python/Lib/lib-old', '~/devel/python/Modules', '~/devel/python/build/lib.linux-i686-2.7', ] USER_BASE: '~/.local' (exists) USER_SITE: '~/.local/lib/python2.7/site-packages' (doesn't exist) ENABLE_USER_SITE: True _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 13:04:48 2008 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 09 Oct 2008 11:04:48 +0000 Subject: [issue4082] python2.6 -m site doesn't run site._script() any more In-Reply-To: <1223509911.91.0.368315833446.issue4082@psf.upfronthosting.co.za> Message-ID: <1223550288.82.0.51246298967.issue4082@psf.upfronthosting.co.za> Changes by Nick Coghlan : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 13:05:27 2008 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 09 Oct 2008 11:05:27 +0000 Subject: [issue4082] python2.6 -m site doesn't run site._script() any more In-Reply-To: <1223509911.91.0.368315833446.issue4082@psf.upfronthosting.co.za> Message-ID: <1223550327.93.0.895351813048.issue4082@psf.upfronthosting.co.za> Nick Coghlan added the comment: Platform? It works fine for me (system python is 2.5, local python is trunk - the tildes aren't actually in the printout, I subbed them in for my home directory): ~/devel/python$ python -m site sys.path = [ '~/devel/python', '/usr/lib/python25.zip', '/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2', '/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-dynload', '/usr/local/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages/PIL', '/var/lib/python-support/python2.5', '/var/lib/python-support/python2.5/gtk-2.0', ] ~/devel/python$ ./python -m site sys.path = [ '~/devel/python', '/usr/local/lib/python27.zip', '~/devel/python/Lib', '~/devel/python/Lib/plat-linux2', '~/devel/python/Lib/lib-tk', '~/devel/python/Lib/lib-old', '~/devel/python/Modules', '~/devel/python/build/lib.linux-i686-2.7', ] USER_BASE: '~/.local' (exists) USER_SITE: '~/.local/lib/python2.7/site-packages' (doesn't exist) ENABLE_USER_SITE: True _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 13:19:22 2008 From: report at bugs.python.org (Christian Heimes) Date: Thu, 09 Oct 2008 11:19:22 +0000 Subject: [issue4082] python2.6 -m site doesn't run site._script() any more In-Reply-To: <1223509911.91.0.368315833446.issue4082@psf.upfronthosting.co.za> Message-ID: <1223551162.9.0.324506775923.issue4082@psf.upfronthosting.co.za> Christian Heimes added the comment: It's an *installation* of Python 2.6.0 (r26:66714, Oct 2 2008) on Ubuntu Linux AMD64. The feature is broken on the release26-maint branch but it works fine on the trunk. ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 13:27:26 2008 From: report at bugs.python.org (Skip Montanaro) Date: Thu, 09 Oct 2008 11:27:26 +0000 Subject: [issue4086] support %z format in time.strftime and _strptime? In-Reply-To: <1223551646.15.0.164355592546.issue4086@psf.upfronthosting.co.za> Message-ID: <1223551646.15.0.164355592546.issue4086@psf.upfronthosting.co.za> New submission from Skip Montanaro : While responding to a c.l.py question just now I discovered that numeric timezone offsets don't appear to be supported by either the time.strftime function or the _strptime module. I noticed on my Mac's strftime(3) man page that it supports a %Z format for TZ names and a %z format for numeric tz offsets. It seems Python should as well. ---------- messages: 74570 nosy: skip.montanaro priority: normal severity: normal status: open title: support %z format in time.strftime and _strptime? type: feature request versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 13:31:12 2008 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 09 Oct 2008 11:31:12 +0000 Subject: [issue4082] python2.6 -m site doesn't run site._script() any more In-Reply-To: <1223509911.91.0.368315833446.issue4082@psf.upfronthosting.co.za> Message-ID: <1223551872.19.0.559483810211.issue4082@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'm setting up a 2.6 working area now - we'll see what's to be seen once I have that up and running. None of the runpy or pkgutil stuff has been touched in months though (since PEP 366 was implemented), so I'm a little puzzled how it could be working on the trunk and not on the 2.6 maintenance branch. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 13:40:33 2008 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 09 Oct 2008 11:40:33 +0000 Subject: [issue4082] python2.6 -m site doesn't run site._script() any more In-Reply-To: <1223509911.91.0.368315833446.issue4082@psf.upfronthosting.co.za> Message-ID: <1223552433.93.0.804658154679.issue4082@psf.upfronthosting.co.za> Nick Coghlan added the comment: No joy. 32-bit Ubuntu here, and "./python -m site" works fine on the 2.6 branch, as does "python2.6 -m site" after a "make altinstall". Is this an installation you built yourself, or was it packaged by someone else? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 13:57:16 2008 From: report at bugs.python.org (Christian Heimes) Date: Thu, 09 Oct 2008 11:57:16 +0000 Subject: [issue4082] python2.6 -m site doesn't run site._script() any more In-Reply-To: <1223509911.91.0.368315833446.issue4082@psf.upfronthosting.co.za> Message-ID: <1223553436.41.0.607156804542.issue4082@psf.upfronthosting.co.za> Christian Heimes added the comment: I build the installation myself and used "make altinstall", too. Even the latest checkout of the 2.6 branch fails to print the site information. $ ./configure ... $ make ... $ ./python -m site $ ./python -m platform Linux-2.6.24-19-generic-x86_64-with-debian-lenny-sid $ uname -a Linux hamiller 2.6.24-19-generic #1 SMP Wed Aug 20 17:53:40 UTC 2008 x86_64 GNU/Linux $ LC_ALL=C svn info . Path: . URL: svn+ssh://pythondev at svn.python.org/python/branches/release26-maint Repository Root: svn+ssh://pythondev at svn.python.org Repository UUID: 6015fed2-1504-0410-9fe1-9d1591cc4771 Revision: 66863 Node Kind: directory Schedule: normal Last Changed Author: georg.brandl Last Changed Rev: 66859 Last Changed Date: 2008-10-08 21:28:36 +0200 (Wed, 08 Oct 2008) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 14:17:46 2008 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 09 Oct 2008 12:17:46 +0000 Subject: [issue4082] python2.6 -m site doesn't run site._script() any more In-Reply-To: <1223509911.91.0.368315833446.issue4082@psf.upfronthosting.co.za> Message-ID: <1223554666.43.0.248217156188.issue4082@psf.upfronthosting.co.za> Nick Coghlan added the comment: Hmm, that makes for absolutely identical base systems except that mine is i686 where yours is x86_64. What do you see if you stick some debugging messages at module level in site.py? (e.g. printing out __name__) (I'll be going offline shortly - I'll have another look tomorrow night, but since I can't reproduce this locally I'm probably not going to be much help in figuring out where it is losing the plot) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 14:20:38 2008 From: report at bugs.python.org (Christian Heimes) Date: Thu, 09 Oct 2008 12:20:38 +0000 Subject: [issue4082] python2.6 -m site doesn't run site._script() any more In-Reply-To: <1223509911.91.0.368315833446.issue4082@psf.upfronthosting.co.za> Message-ID: <1223554838.66.0.0671046277797.issue4082@psf.upfronthosting.co.za> Christian Heimes added the comment: I already added a print __name__ right before the if __name__ == "__main__" block. Python 2.5, trunk and 3.0 print: site __main__ while Python 2.6 just prints: site Christian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 15:39:44 2008 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 09 Oct 2008 13:39:44 +0000 Subject: [issue4087] equality involving Decimals is not transitive; strange set behaviour results In-Reply-To: <1223559584.24.0.470688627133.issue4087@psf.upfronthosting.co.za> Message-ID: <1223559584.24.0.470688627133.issue4087@psf.upfronthosting.co.za> New submission from Mark Dickinson : The Decimal module breaks transitivity of equality: Decimal(2) == 2 and 2 == float(2), but Decimal(2) != float(2). The Python set and dict implementations rely on transitivity of equality for correct operation. These two facts together give some strange results when playing with sets and dicts involving Decimals and floats. For example (with Python 2.6): >>> s = set([Decimal(2), float(2)]) >>> t = set([2]) >>> s | t == t | s False >>> len(s | t) 2 >>> len(t | s) 1 Other strange examples, and possible solutions, were discussed recently on comp.lang.python; see the thread starting at: http://mail.python.org/pipermail/python-list/2008-September/508859.html Possible solutions: (1) Document the problem, making it clear in the language reference that correct set operation relies on transitivity of equality, and adding a note to the decimal documentation indicating that mixing floats and Decimals in a container is asking for trouble. (2) Fix up Decimal so that equal numeric objects compare equal; this would also involve fixing the hash operation. To me, this goes against the philosophy of keeping the Decimal module close to the specification. (3) Terry Reedy suggested (in the c.l.python thread linked to above) a simpler version of (2): allow Decimal(i) == float(i) or Decimal(i) == Fraction(i) to return True for all integers i. (Decimal('0.5') == 0.5 would still return False.) This fixes transitivity, and has the advantage of not requiring any changes to the hash functions: hash(Decimal(i)) == hash(float(i)) is already true for all integers i. My own preference would be simply to document the problem; it doesn't seem like something that's going to affect that vast majority of Python users. Raymond, Facundo: any thoughts? ---------- messages: 74576 nosy: facundobatista, marketdickinson, rhettinger, tjreedy priority: normal severity: normal status: open title: equality involving Decimals is not transitive; strange set behaviour results type: behavior versions: Python 2.6, Python 2.7, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 16:20:29 2008 From: report at bugs.python.org (Ulrich Eckhardt) Date: Thu, 09 Oct 2008 14:20:29 +0000 Subject: [issue4075] Use WCHAR variant of OutputDebugString In-Reply-To: <1223471607.48.0.166278298943.issue4075@psf.upfronthosting.co.za> Message-ID: <1223562029.49.0.346920565809.issue4075@psf.upfronthosting.co.za> Ulrich Eckhardt added the comment: Actually, even _Py_NegativeRefcount() passes a statically sized buffer with 300 chars. Other than that, there is get_ref_type() which uses one with 350 chars, but AFAICT, that's the largest one. Attached accordingly modified patch. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 16:25:53 2008 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 09 Oct 2008 14:25:53 +0000 Subject: [issue3724] math.log(x, 10) gives different result than math.log10(x) In-Reply-To: <1220013140.94.0.0541204512227.issue3724@psf.upfronthosting.co.za> Message-ID: <1223562353.73.0.239453336814.issue3724@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Mark, is some of the inaccuracy due to double rounding? No, I don't think so; at least, not in the sense of rounding the same value twice (with different precisions). I get similar results on my Core 2 Duo machine, which should be immune to x87 style problems (because Apple's gcc turns sse instructions on by default, I guess). It's just a result of three separate rounds: one for each log, and one for the result of the division. > Could we make the two argument form more accurate by allowing the > compiler to generate code that uses full internal precision, > log(n)/log(d), instead of prematurely forcing the intermediate results > to a PyFloat? Seems to me that would only work on older x86 hardware, unless we deliberately use long double in place of double for the intermediate results. Personally, I don't think it's worth the effort of fixing this: the result of log(x, 10) is accurate to within a few ulps anyway, which should be plenty good enough for any well-coded numerical work: any numerically aware programmer should be well aware that it's dangerous to rely on floating-point operations giving exact results. And in any case there's always log10. As a separate issue, it may be worth exposing C99's log2 function in some future version of Python. This, presumably, can be relied upon always to give exact results for powers of 2, which could be useful in some applications. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 16:56:26 2008 From: report at bugs.python.org (Dan OD) Date: Thu, 09 Oct 2008 14:56:26 +0000 Subject: [issue4076] Cannot build non-framework tkinter Python on Mac OS X.5 In-Reply-To: <1223474975.98.0.266450450683.issue4076@psf.upfronthosting.co.za> Message-ID: <1223564186.05.0.245808759897.issue4076@psf.upfronthosting.co.za> Dan OD added the comment: Confusion - apologies - please remove this report. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 17:15:17 2008 From: report at bugs.python.org (David Ripton) Date: Thu, 09 Oct 2008 15:15:17 +0000 Subject: [issue4012] Minor errors in multiprocessing docs In-Reply-To: <1222910620.56.0.617350560863.issue4012@psf.upfronthosting.co.za> Message-ID: <1223565317.19.0.296875249822.issue4012@psf.upfronthosting.co.za> David Ripton added the comment: Also, two of the example code blurbs in that page still refer to the module as "processing" instead of "multiprocessing". (Search for "import processing" to find them.) ---------- nosy: +dripton _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 17:23:58 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 09 Oct 2008 15:23:58 +0000 Subject: [issue4088] Patch to implement a real poplib test suite In-Reply-To: <1223565838.71.0.340118865105.issue4088@psf.upfronthosting.co.za> Message-ID: <1223565838.71.0.340118865105.issue4088@psf.upfronthosting.co.za> New submission from Giampaolo Rodola' : poplib module is currently lacking a test suite which actually connects to a server and uses the POP3 class methods and facilities. Bug #3727, discovered just a bunch of days before the stable release of Python 3.0 is an example of how much a test suite is necessary. As done in #3939 for the ftplib module, in attachment I provide a test suite which implements an asyncore-based dummy POP3 server which sends fixed response codes that I used to test all the relevant POP3 class methods. Tests for the POP3_SSL class are also included. Although not that useful (IMHO) I didn't remove the old tests about timeouts. Tested successfully against Python 2.6 on Windows XP SP3, Debian Etch and FreeBSD 7.0. ---------- components: Tests files: test_poplib.patch keywords: patch messages: 74581 nosy: benjamin.peterson, facundobatista, giampaolo.rodola, gvanrossum severity: normal status: open title: Patch to implement a real poplib test suite versions: Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file11754/test_poplib.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 17:40:43 2008 From: report at bugs.python.org (Manuel) Date: Thu, 09 Oct 2008 15:40:43 +0000 Subject: [issue4089] linking python2.6.dll crash on windows xp In-Reply-To: <1223566843.64.0.613878157863.issue4089@psf.upfronthosting.co.za> Message-ID: <1223566843.64.0.613878157863.issue4089@psf.upfronthosting.co.za> New submission from Manuel : On some machines, the application (makehuman, an open source software) crash, immediately, as soon the user try to double click on the exe. The problem happen with the version compiled using python 2.6, while the one compiled with 2.5 work fine. We have asked to our users to try the installation of Visual C++ 2005 Redistributable Package, but this hasn't fixed the crash. Both binary files (compiled using gcc and debug symbols with 2.5 and with 2.6) are here: http://www.makehuman.org/tmp/makehuman_test_python25_and_python26.zip Furthermore: Installing full python2.6 it work. Unistalling full python2.6 it don't work. Installing python26 and deleting C:/python26 folder (without unistall it), it work again... thx, Manuel ---------- components: Windows messages: 74582 nosy: Manuel severity: normal status: open title: linking python2.6.dll crash on windows xp type: crash versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 17:48:37 2008 From: report at bugs.python.org (Manuel) Date: Thu, 09 Oct 2008 15:48:37 +0000 Subject: [issue4089] linking python2.6.dll crash on windows xp In-Reply-To: <1223566843.64.0.613878157863.issue4089@psf.upfronthosting.co.za> Message-ID: <1223567317.85.0.676448497785.issue4089@psf.upfronthosting.co.za> Manuel added the comment: gdb output from one of our users: ------------------------------------ warning: LDR: LdrpWalkImportDescriptor() failed to probe python26.dll for its manifest, ntstatus 0xc0150002 Program received signal SIGSEGV, Segmentation fault. Program received signal SIGSEGV, Segmentation fault. Program received signal SIGSEGV, Segmentation fault. Program exited with code 030000000005. You can't do that without a process to debug. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 18:02:09 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 09 Oct 2008 16:02:09 +0000 Subject: [issue4089] linking python2.6.dll crash on windows xp In-Reply-To: <1223566843.64.0.613878157863.issue4089@psf.upfronthosting.co.za> Message-ID: <1223568129.56.0.00598415147213.issue4089@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 18:13:03 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 09 Oct 2008 16:13:03 +0000 Subject: [issue3724] math.log(x, 10) gives different result than math.log10(x) In-Reply-To: <1220013140.94.0.0541204512227.issue3724@psf.upfronthosting.co.za> Message-ID: <1223568783.29.0.383456398412.issue3724@psf.upfronthosting.co.za> Raymond Hettinger added the comment: +1 on a log2 function, especially one that has been generalized to work with long integers. It would help with the "numbits" problem that comes-up all the time. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 18:17:27 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 09 Oct 2008 16:17:27 +0000 Subject: [issue4090] Documenting set comparisons and operations In-Reply-To: <1223569047.14.0.973921550653.issue4090@psf.upfronthosting.co.za> Message-ID: <1223569047.14.0.973921550653.issue4090@psf.upfronthosting.co.za> New submission from Terry J. Reedy : RefMan Expressions Comparisons has a subsection headed "Comparison of objects of the same type depends on the type" with entries for numbers, bytes, strings, tuples, lists, mappings, and most_other (compared by id). Sets (and dict views) are missing. While sets are similar to dicts, they are different because they also have order comparisons. A problem in defining comparisons for sets is that the usual definitions depend on equality comparisons of the members involved being, as usual, reflexive, symmetric, and transitive. But float('nan') is irreflexive. For integral value i, int(i), float(i) or Fraction(i), and Decimal(i) are (currently) jointly intransitive. See http://bugs.python.org/issue4087 Even without these issues, users are free to write __eq__ methods however they want. So I suggest something like the following: "If equality among the set members involved is reflexive, symmetric, and transitive as defined in mathematics, set comparisons have the usual definitions in terms of set inclusion. Otherwise, they are undefined." If dict equality had been defined in terms of equality of the set of (key,value) pairs, it would have the same problem. The algorithmic definition in terms of ordered lists works fine, however. I also suggest a warning be added at the top of the set section in the Lib. Ref. Something like: "The usual definitions of set operations, given below, depend on equality testing between the members involved being reflexive, symmetric, and transitive. If this is not true, results are undefined." ---------- assignee: georg.brandl components: Documentation messages: 74585 nosy: georg.brandl, tjreedy severity: normal status: open title: Documenting set comparisons and operations versions: Python 2.6, Python 2.7, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 18:45:10 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 09 Oct 2008 16:45:10 +0000 Subject: [issue4087] equality involving Decimals is not transitive; strange set behaviour results In-Reply-To: <1223559584.24.0.470688627133.issue4087@psf.upfronthosting.co.za> Message-ID: <1223570710.43.0.388584196256.issue4087@psf.upfronthosting.co.za> Terry J. Reedy added the comment: There are two issues involved: 1. documenting set behavior 2. what to do, if anything, about Decimals and other numbers Since users are free to create similar problems, and since sets are missing from the Reference section on comparisons, I opened a separate set documentation issue http://bugs.python.org/issue4090 leaving this as a Decimal-other_number equality issue. The root of the problem is that all members of s are members of t and vice versa. This should make s and t equal, but they are not. This also breaks the definitions of issubset (<=), issuperset (>=), union (|), and symmetric_difference (^) as shown in the c.l.p thread. Transitivity is also fundamental in logic and the rule of substitution. So I strongly prefer that it be preserved in Python as released. Another way to restore transitivity is (4) make Decimal(1) != int(1) just as Decimal(1) != float(1). Having a Decimal be equal in value to just one of two things that are equal in value is incoherent, and leads to incoherent results. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 19:05:06 2008 From: report at bugs.python.org (Facundo Batista) Date: Thu, 09 Oct 2008 17:05:06 +0000 Subject: [issue4087] equality involving Decimals is not transitive; strange set behaviour results In-Reply-To: <1223559584.24.0.470688627133.issue4087@psf.upfronthosting.co.za> Message-ID: <1223571906.4.0.244882588374.issue4087@psf.upfronthosting.co.za> Facundo Batista added the comment: (Ok, remember that I'm not a "numeric" guy before start hitting me, :p ) I think that if we have Decimal(1)==1, and 1==1.0, to have Decimal(1)==1.0. We always rejected comparison with "unsupported types", but having this situation, I'd propose to put something like the following at the beggining of __eq__() and similars: def __eq__(self, other): if isinstance(other, float) and int(other)==other: other = int(other) What do you think? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 19:14:47 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 09 Oct 2008 17:14:47 +0000 Subject: [issue4087] Document the effects of NotImplemented on == and != In-Reply-To: <1223559584.24.0.470688627133.issue4087@psf.upfronthosting.co.za> Message-ID: <1223572487.29.0.569530191348.issue4087@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Recommend not "doing anything" about decimals and other numbers. What you're seeing is a predictable consequence of NotImplemented being returned by some but not all cross type comparisons. IMO, it is perfectly reasonable that both decimals and floats can be compared to integers but not to each other. Integers are a "universal donor" in this respect but the two float types are not. It is true that equality should be transitive but the same cannot be said for the *ability of types* to be compared. Unfortunately, the == operator masks what is going on by returning False instead of raising a NotImplementedError. IOW, it the apparant loss of transitivity when "float(2) == Decimal(2)" returns False is an illusion; instead, the False return means that the types cannot be compared at all. If any doc changes are made with respect to this issue, it should be in the docs for the == and != operators and for NotImplemented. ---------- assignee: -> georg.brandl components: +Documentation nosy: +georg.brandl priority: normal -> low title: equality involving Decimals is not transitive; strange set behaviour results -> Document the effects of NotImplemented on == and != _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 19:19:41 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 09 Oct 2008 17:19:41 +0000 Subject: [issue4090] Documenting set comparisons and operations In-Reply-To: <1223569047.14.0.973921550653.issue4090@psf.upfronthosting.co.za> Message-ID: <1223572781.24.0.310975138284.issue4090@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I don't think this is necessary. The ordering operators for sets are already documented to mean subset/superset comparisons. Will look at it a bit more and possibly add a parenthetical note reminding people that superset/superset are not total orderings. ---------- assignee: georg.brandl -> rhettinger nosy: +rhettinger priority: -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 20:06:29 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 09 Oct 2008 18:06:29 +0000 Subject: [issue4087] Document the effects of NotImplemented on == and != In-Reply-To: <1223559584.24.0.470688627133.issue4087@psf.upfronthosting.co.za> Message-ID: <1223575589.53.0.431081191007.issue4087@psf.upfronthosting.co.za> Terry J. Reedy added the comment: If Decimal(2) == float(2) were to raise an error, set([Decimal(2), float(2)]) would fail, as I would argue it ought to, and the set anomalies would disappear. ---------- assignee: georg.brandl -> priority: low -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 20:13:27 2008 From: report at bugs.python.org (Thomas Heller) Date: Thu, 09 Oct 2008 18:13:27 +0000 Subject: [issue4072] build_py support for lib2to3 is stale In-Reply-To: <1223426997.83.0.795530448507.issue4072@psf.upfronthosting.co.za> Message-ID: <1223576007.55.0.191067831251.issue4072@psf.upfronthosting.co.za> Changes by Thomas Heller : ---------- nosy: +theller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 20:14:42 2008 From: report at bugs.python.org (Thomas Heller) Date: Thu, 09 Oct 2008 18:14:42 +0000 Subject: [issue4073] distutils build_scripts and install_data commands need 2to3 support In-Reply-To: <1223427347.42.0.185462217727.issue4073@psf.upfronthosting.co.za> Message-ID: <1223576082.58.0.162643869078.issue4073@psf.upfronthosting.co.za> Changes by Thomas Heller : ---------- nosy: +theller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 20:20:23 2008 From: report at bugs.python.org (Thomas Heller) Date: Thu, 09 Oct 2008 18:20:23 +0000 Subject: [issue4091] python dll not installed in windows system directory In-Reply-To: <1223576423.68.0.448178359444.issue4091@psf.upfronthosting.co.za> Message-ID: <1223576423.68.0.448178359444.issue4091@psf.upfronthosting.co.za> New submission from Thomas Heller : Python 2.6 final and Python 3.0 rc1 do NOT install the python dlls into the windows system directory, even when installing 'for all users' and with admin rights. This causes problems with COM objects implemented in Python. Observed on Windows XP SP3. ---------- components: Installation messages: 74591 nosy: theller severity: normal status: open title: python dll not installed in windows system directory type: behavior versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 20:37:00 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 09 Oct 2008 18:37:00 +0000 Subject: [issue4075] Use WCHAR variant of OutputDebugString In-Reply-To: <1223542171.62.0.443285152015.issue4075@psf.upfronthosting.co.za> Message-ID: <48EE4F45.3040609@v.loewis.de> Martin v. L?wis added the comment: > If the CE can't work with char why the compiler don't threat strings as > wide characters always ? I think this question is pointless - we don't have the power to change how CE works. You might question whether Ulrich's analysis of the issue is accurate (I think it is), or whether Python should support CE at all (I think it should). FWIW, the compiler *does* "work with char", and it needs to do so to support a byte type. It's just that the CE APIs don't support char (at least, some of them apparently don't). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 20:37:39 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Thu, 09 Oct 2008 18:37:39 +0000 Subject: [issue4071] ntpath.abspath fails for long str paths In-Reply-To: <1223425635.48.0.940202056696.issue4071@psf.upfronthosting.co.za> Message-ID: <1223577459.46.0.813505611264.issue4071@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I think attached patch "fix_getfullpathname.patch" will fix unicode issue at least. For ansi issue, I followed the manner of win32_chdir for now. After some investigation, GetFullPathNameA fails if output size is more than MAX_PATH even if input size is less than MAX_PATH. I feel it's difficult check this before invoking GetFullPathNameA. This is test for unicode issue. ///////////////////////////////////////////////////////// import unittest import ntpath import os class TestCase(unittest.TestCase): def test_getfullpathname(self): for count in xrange(1, 1000): name = u"x" * count path = ntpath._getfullpathname(name) self.assertEqual(os.path.basename(path), name) if __name__ == '__main__': unittest.main() ---------- keywords: +patch versions: +Python 2.6, Python 3.0 Added file: http://bugs.python.org/file11755/fix_getfullpathname.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 20:39:54 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Thu, 09 Oct 2008 18:39:54 +0000 Subject: [issue4071] ntpath.abspath fails for long str paths In-Reply-To: <1223425635.48.0.940202056696.issue4071@psf.upfronthosting.co.za> Message-ID: <1223577594.1.0.0873037079235.issue4071@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: >I feel it's difficult to check this before invoking GetFullPathNameA. And error number via GetLastError() is vogus, sometimes 0, sometimes others. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 20:44:12 2008 From: report at bugs.python.org (Aaron Brady) Date: Thu, 09 Oct 2008 18:44:12 +0000 Subject: [issue4092] inspect.getargvalues return type not ArgInfo In-Reply-To: <1223577852.4.0.573977291018.issue4092@psf.upfronthosting.co.za> Message-ID: <1223577852.4.0.573977291018.issue4092@psf.upfronthosting.co.za> New submission from Aaron Brady : Python 2.6 (r26:66721, Oct 2 2008, 11:35:03) [MSC v.1500 32 bit (Intel)] on win 32 Type "help", "copyright", "credits" or "license" for more information. >>> import inspect >>> type( inspect.getargvalues( inspect.currentframe() ) ) Docs say: inspect.getargvalues(frame) ... Changed in version 2.6: Returns a named tuple ArgInfo(args, varargs, keywords, locals). The code defines an ArgInfo type, but doesn't instantiate it in the return, as shown here: return args, varargs, varkw, frame.f_locals ---------- components: Library (Lib) messages: 74595 nosy: castironpi severity: normal status: open title: inspect.getargvalues return type not ArgInfo type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 20:56:00 2008 From: report at bugs.python.org (John J Lee) Date: Thu, 09 Oct 2008 18:56:00 +0000 Subject: [issue2190] MozillaCookieJar ignore HttpOnly cookies In-Reply-To: <1203957546.34.0.123660895963.issue2190@psf.upfronthosting.co.za> Message-ID: <1223578560.2.0.705225845423.issue2190@psf.upfronthosting.co.za> Changes by John J Lee : ---------- nosy: +jjlee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 21:25:40 2008 From: report at bugs.python.org (Roumen Petrov) Date: Thu, 09 Oct 2008 19:25:40 +0000 Subject: [issue4075] Use WCHAR variant of OutputDebugString In-Reply-To: <1223471607.48.0.166278298943.issue4075@psf.upfronthosting.co.za> Message-ID: <1223580340.9.0.376682586296.issue4075@psf.upfronthosting.co.za> Roumen Petrov added the comment: My experience with windows CE ends with version about 3.1X. I couldn't remember wide character support on this version. PythonCE project use xxxA functions for CE .NET 4.20 platform. "Pointless" question is for compiler flags and is not related with the OS. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 21:40:34 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 09 Oct 2008 19:40:34 +0000 Subject: [issue4076] Cannot build non-framework tkinter Python on Mac OS X.5 In-Reply-To: <1223474975.98.0.266450450683.issue4076@psf.upfronthosting.co.za> Message-ID: <1223581234.08.0.520863435231.issue4076@psf.upfronthosting.co.za> Changes by Amaury Forgeot d'Arc : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 21:48:07 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 09 Oct 2008 19:48:07 +0000 Subject: [issue4091] python dll not installed in windows system directory In-Reply-To: <1223576423.68.0.448178359444.issue4091@psf.upfronthosting.co.za> Message-ID: <1223581687.71.0.8778505826.issue4091@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The following lines in msi.py seem to be the cause of the change: #dlldir = PyDirectory(db, cab, root, srcdir, "DLLDIR", ".") #install python30.dll into root dir for now dlldir = root They were added by r61109: Bundle msvcr90.dll as a "private assembly". I don't know if simply restoring the previous value will work in every case: If the C Run-Time is installed "privately", then python26.dll must stay in c:\python26. (And I thought that manifests and side-by-side assemblies were supposed to solve the "DLL hell") ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 22:19:40 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 09 Oct 2008 20:19:40 +0000 Subject: [issue4074] Building a list of tuples has non-linear performance In-Reply-To: <1223438452.4.0.926419942993.issue4074@psf.upfronthosting.co.za> Message-ID: <1223583580.91.0.427937185061.issue4074@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Someone should try implementing Martin's suggestion one day :) ---------- nosy: +pitrou versions: +Python 3.1 -Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 22:21:11 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 09 Oct 2008 20:21:11 +0000 Subject: [issue4093] add gc/memory management tests to pybench In-Reply-To: <1223583671.55.0.378027083511.issue4093@psf.upfronthosting.co.za> Message-ID: <1223583671.55.0.378027083511.issue4093@psf.upfronthosting.co.za> New submission from Antoine Pitrou : Issue #4074 suggests to me that maybe pybench should have some gc and/or memory management tests. Marc-Andre, what do you think? ---------- components: Demos and Tools messages: 74599 nosy: lemburg, pitrou priority: normal severity: normal status: open title: add gc/memory management tests to pybench type: feature request versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 22:30:57 2008 From: report at bugs.python.org (Nick Edds) Date: Thu, 09 Oct 2008 20:30:57 +0000 Subject: [issue3994] import fixer misses some symbols In-Reply-To: <1222672392.58.0.438026225401.issue3994@psf.upfronthosting.co.za> Message-ID: <1223584257.68.0.32705613378.issue3994@psf.upfronthosting.co.za> Nick Edds added the comment: Here is a patch with a new test case. I don't know if we should apply it until we've heard from Collin though. The old version of fix_imports fails the new test, but this version, which allows matching of nodes nested within matches, passes the new test I added for nesting, as well as all of the other 2to3 tests. ---------- keywords: +patch Added file: http://bugs.python.org/file11756/fix_imports_bug.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 22:48:59 2008 From: report at bugs.python.org (Martin Marcher) Date: Thu, 09 Oct 2008 20:48:59 +0000 Subject: [issue4094] "Future statements" Doc from 2.6 refers to 2.5 In-Reply-To: <1223585339.1.0.142071058322.issue4094@psf.upfronthosting.co.za> Message-ID: <1223585339.1.0.142071058322.issue4094@psf.upfronthosting.co.za> New submission from Martin Marcher : http://docs.python.org/reference/simple_stmts.html#future-statements says this: """ The features recognized by Python 2.5 are absolute_import, division, generators, nested_scopes and with_statement. generators and nested_scopes are redundant in Python version 2.3 and above because they are always enabled. """ shouldn't it mention the features recognized by Python 2.6? ---------- assignee: georg.brandl components: Documentation messages: 74601 nosy: georg.brandl, martin.marcher severity: normal status: open title: "Future statements" Doc from 2.6 refers to 2.5 versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 22:52:54 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 09 Oct 2008 20:52:54 +0000 Subject: [issue4091] python dll not installed in windows system directory In-Reply-To: <1223576423.68.0.448178359444.issue4091@psf.upfronthosting.co.za> Message-ID: <1223585574.66.0.0822704712421.issue4091@psf.upfronthosting.co.za> Martin v. L?wis added the comment: > (And I thought that manifests and side-by-side assemblies were > supposed to solve the "DLL hell") I'm now convinced that they make things worse, to the degree that certain deployments that used to work cannot be longer made to work (e.g. the Python setup of having DLLs and executables in different directories). This was one of the reasons why I resisted Python switching to VS 2005, and hesitant to accept the switch to VS 2008. It is telling that the MS merge module for the CRT automatically sets ALLUSERS=1, refusing even to consider non-admin installs. Going forward with py3k, we should try to drop even more dependencies on the C library, and then perhaps try to link statically for the rest. ---------- assignee: -> loewis nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 22:55:00 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 09 Oct 2008 20:55:00 +0000 Subject: [issue4094] "Future statements" Doc from 2.6 refers to 2.5 In-Reply-To: <1223585339.1.0.142071058322.issue4094@psf.upfronthosting.co.za> Message-ID: <1223585700.49.0.733381001913.issue4094@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks for the report! Fixed in r66866. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 23:19:58 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 09 Oct 2008 21:19:58 +0000 Subject: [issue4093] add gc/memory management tests to pybench In-Reply-To: <1223583671.55.0.378027083511.issue4093@psf.upfronthosting.co.za> Message-ID: <1223587198.5.0.202117556279.issue4093@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: I'm not sure whether pybench is the right tool for this. Note that pybench disables GC per default for exactly the reasons causing #4074 :-) pybench already has a --with-gc switch, so it's possible to benchmark with or without GC and see the differences. Regarding memory management: The exact amount of used memory is hard to determine from within a process due to the way e.g. Linux or other modern OSes manage memory. We'd have to use special low-level system APIs to access the true amount of allocated memory on each platform. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 23:24:56 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 09 Oct 2008 21:24:56 +0000 Subject: [issue4075] Use WCHAR variant of OutputDebugString In-Reply-To: <1223580340.9.0.376682586296.issue4075@psf.upfronthosting.co.za> Message-ID: <48EE76A5.6050304@v.loewis.de> Martin v. L?wis added the comment: > "Pointless" question is for compiler flags and is not related with the OS. I don't think the compiler has any such flag that you might consider useful. Do you have a specific flag in mind? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 23:26:56 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 09 Oct 2008 21:26:56 +0000 Subject: [issue4093] add gc/memory management tests to pybench In-Reply-To: <1223587198.5.0.202117556279.issue4093@psf.upfronthosting.co.za> Message-ID: <1223587612.16985.8.camel@fsol> Antoine Pitrou added the comment: > Note that pybench disables GC per default for exactly the reasons > causing #4074 :-) I know, I was thinking to enable the GC only in the GC-specific test of course. The idea is to have a test stressing the GC heavily, such as the example code in #4074. The reason I suggest doing it in pybench is that it offers existing facilities for measuring execution times, agregating results etc. > Regarding memory management: The exact amount of used memory is hard to > determine from within a process due to the way e.g. Linux or other > modern OSes manage memory. I was not thinking about measuring the amount of used memory but rather the time spent in specific tests which would focus on the CPU cost of memory allocation rather than computation or control flow. Something like allocating lots of strings or tuples of various sizes, then releasing them in various orders. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 9 23:33:39 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Thu, 09 Oct 2008 21:33:39 +0000 Subject: [issue4071] ntpath.abspath fails for long str paths In-Reply-To: <1223425635.48.0.940202056696.issue4071@psf.upfronthosting.co.za> Message-ID: <1223588019.43.0.794284424333.issue4071@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Or, if PyArg_ParseTuple overflowed or GetFullPathNameA failed, (not check GetLastError() because it's vogus) try GetFullPathNameW like attached file "quick_hack_for_getfullpathname.patch". This inverses flow if (unicode_file_names()) { /* unicode */ } /* ascii */ # Maybe it would be nice if convert_to_unicode() functionality is built in PyArg_ParseTuple. (inverse of "et") Be care, this is quick hack, so maybe buggy. I confirmed test_os and test_ntpath passed though. ///////////////////////////////////////////////////// import unittest import ntpath import os class TestCase(unittest.TestCase): def test_getfullpathname(self): for c in ('x', u'x'): for count in xrange(1, 1000): name = c * count path = ntpath._getfullpathname(name) self.assertEqual(os.path.basename(path), name) if __name__ == '__main__': unittest.main() Added file: http://bugs.python.org/file11757/quick_hack_for_getfullpathname.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 00:36:27 2008 From: report at bugs.python.org (Mark Hammond) Date: Thu, 09 Oct 2008 22:36:27 +0000 Subject: [issue4091] python dll not installed in windows system directory In-Reply-To: <1223576423.68.0.448178359444.issue4091@psf.upfronthosting.co.za> Message-ID: <1223591787.43.0.143716126984.issue4091@psf.upfronthosting.co.za> Changes by Mark Hammond : ---------- nosy: +mhammond _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 00:41:22 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Thu, 09 Oct 2008 22:41:22 +0000 Subject: [issue4071] ntpath.abspath fails for long str paths In-Reply-To: <1223425635.48.0.940202056696.issue4071@psf.upfronthosting.co.za> Message-ID: <1223592082.2.0.848666952804.issue4071@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : Added file: http://bugs.python.org/file11758/quick_hack_for_getfullpathname_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 00:41:33 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Thu, 09 Oct 2008 22:41:33 +0000 Subject: [issue4071] ntpath.abspath fails for long str paths In-Reply-To: <1223425635.48.0.940202056696.issue4071@psf.upfronthosting.co.za> Message-ID: <1223592093.36.0.165412437192.issue4071@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file11757/quick_hack_for_getfullpathname.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 01:01:16 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 09 Oct 2008 23:01:16 +0000 Subject: [issue4093] add gc/memory management tests to pybench In-Reply-To: <1223587612.16985.8.camel@fsol> Message-ID: <48EE8D3A.7090109@egenix.com> Marc-Andre Lemburg added the comment: I'll follow up on this next week. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 01:29:13 2008 From: report at bugs.python.org (John J Lee) Date: Thu, 09 Oct 2008 23:29:13 +0000 Subject: [issue1028088] Cookies without values are silently ignored (by design?) Message-ID: <1223594953.05.0.146383194578.issue1028088@psf.upfronthosting.co.za> John J Lee added the comment: You haven't said what the specific problem is. Note that the SimpleCookie class really represents a set of cookies, and the Morsel class represents a single cookie. It seems that setting special value-less cookie-attributes like "secure" works: Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import Cookie >>> c = Cookie.SimpleCookie("spam=eggs; foo=bar") >>> c.output() 'Set-Cookie: foo=bar\r\nSet-Cookie: spam=eggs' >>> c["foo"]["secure"] = 1 >>> c.output() 'Set-Cookie: foo=bar; secure\r\nSet-Cookie: spam=eggs' HttpOnly support was added here: http://bugs.python.org/issue1638033 However, I don't know why BaseCookie.load() treats "secure" or "HttpOnly" specially at all -- those names are not special in Cookie: heders. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 01:39:24 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 09 Oct 2008 23:39:24 +0000 Subject: [issue3975] PyTraceBack_Print() doesn't respect # coding: xxx header In-Reply-To: <1222441949.55.0.46817952378.issue3975@psf.upfronthosting.co.za> Message-ID: <1223595564.88.0.883345372213.issue3975@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Committed r66867, together with #2384. Thanks for your perseverance ;-) ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 01:45:28 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 09 Oct 2008 23:45:28 +0000 Subject: [issue2384] [Py3k] line number is wrong after encoding declaration In-Reply-To: <1205825319.07.0.115749100037.issue2384@psf.upfronthosting.co.za> Message-ID: <1223595928.09.0.844438480888.issue2384@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Committed r66867. I had to considerably change the unit tests, because the subprocess output is not utf-8 encoded; it's not even the same as sys.stdout, because the spawned process uses a PIPE, not a terminal: on my winXP, the main interpreter uses cp437, but the subprocess says cp1252. So I first run a 'python -c "print(sys.stdout.encoding)"' in the same conditions just to retrieve the encoding. fun fun. I hope this still works on Unixes, will watch the buildbots. ---------- resolution: -> fixed status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 01:52:49 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 09 Oct 2008 23:52:49 +0000 Subject: [issue2384] [Py3k] line number is wrong after encoding declaration In-Reply-To: <1205825319.07.0.115749100037.issue2384@psf.upfronthosting.co.za> Message-ID: <1223596369.77.0.421488408052.issue2384@psf.upfronthosting.co.za> Changes by Amaury Forgeot d'Arc : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 02:20:11 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 10 Oct 2008 00:20:11 +0000 Subject: [issue4087] Document the effects of NotImplemented on == and != In-Reply-To: <1223559584.24.0.470688627133.issue4087@psf.upfronthosting.co.za> Message-ID: <1223598011.03.0.930891117446.issue4087@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'll take up the doc fix for the current state of affairs. A change from returning NotImplemented to raising NotImplementedError would need be a separate feature request or PEP. Alternatively, we could decide to allow decimal/float comparisons -- the float can be converted to a decimal exactly and compared exactly -- it would be slow but it would work and have precise semantics. Am resetting the priority back to low because the current behavior is exactly what is supposed to happen. It is an automatic consequence of how we use NotImplemented and the decision to allow integer/float and integer/decimal comparisons but not float/decimal comparisons. There is not bug here, just something that offends ones sensibilities. ---------- assignee: -> rhettinger priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 02:32:57 2008 From: report at bugs.python.org (Michael Mysinger) Date: Fri, 10 Oct 2008 00:32:57 +0000 Subject: [issue4070] python tests failure if builddir <> sourcedir In-Reply-To: <1223418786.48.0.948441318912.issue4070@psf.upfronthosting.co.za> Message-ID: <1223598777.02.0.462084190953.issue4070@psf.upfronthosting.co.za> Michael Mysinger added the comment: Just an FYI that I had an error in test_distutils that this patch fixed. I was not doing anything abnormal. Just building from the 2.6 source distribution, making a arch specific sub-directory, using ../configure, make, and then make test. The original error happened on both x86_64 and i686 platforms. Hopefully the eventual fix makes it into 2.6.1. ---------- nosy: +mmysinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 04:15:33 2008 From: report at bugs.python.org (Andres Riancho) Date: Fri, 10 Oct 2008 02:15:33 +0000 Subject: [issue1028088] Cookies without values are silently ignored (by design?) Message-ID: <1223604933.33.0.220705517332.issue1028088@psf.upfronthosting.co.za> Andres Riancho added the comment: My problem, and the problem if the original bug reporter (sirilyan) is that the load method ignores names that don't have values. Quoting the original bug report: >>> import Cookie >>> q = Cookie.SimpleCookie("pie=good; broken; other=thing") >>> q The original bug report suggested raising a warning or something. I don't like that idea too much. What I would like to see is the "secure" cookie parameter, which BY RFC has no value, be parsed as expected. Right now is you .load() a cookie that looks like this: "a=b; secure" and then you want to write that cookie back, you loose the secure parameter! dz0 at brick:~$ python Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import Cookie >>> C = Cookie.SimpleCookie() >>> C.load("chips=ahoy; vienna=finger") >>> print C Set-Cookie: chips=ahoy Set-Cookie: vienna=finger >>> C.load("chips=ahoy; vienna=finger; secure") >>> print C Set-Cookie: chips=ahoy Set-Cookie: vienna=finger >>> I'm not sure if I'm being clear enough, please tell me if you need me to rewrite something, or use other examples. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 04:57:39 2008 From: report at bugs.python.org (Nick Edds) Date: Fri, 10 Oct 2008 02:57:39 +0000 Subject: [issue3448] Multi-process 2to3 In-Reply-To: <1217019998.69.0.231122552254.issue3448@psf.upfronthosting.co.za> Message-ID: <1223607459.08.0.921780440077.issue3448@psf.upfronthosting.co.za> Nick Edds added the comment: I had very little experience with the processing module prior to the creation of this patch, and because pool objects are listed last in the documentation, I did not read about them because I saw a way to achieve what I wanted using Process. But having looked at the documentation for Pool, I think you are correct that it would be a much cleaner solution to the problem, as I was essentially implementing a Pool myself. I will post a new patch to reflect this change tomorrow. I will also submit the patch to take advantage of the fact that the multiprocessing module is included in Python2.6, as opposed to my prior patch which was designed for Python2.5 which required the user to get the processing module. And in the patch, as before, multiprocess will not be default, but it will be something the user can enable via the command line. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 08:03:51 2008 From: report at bugs.python.org (Nobody/Anonymous) Date: Fri, 10 Oct 2008 06:03:51 +0000 Subject: [issue4095] Delivery Status In-Reply-To: <20081010060347.AD74078547@psf.upfronthosting.co.za> Message-ID: <20081010060347.AD74078547@psf.upfronthosting.co.za> New submission from Nobody/Anonymous: --- The following addresses had delivery problems --- (5.1.1 ... User unknown) ---------- files: deliverystatus.txt, unnamed messages: 74616 nosy: nobody severity: normal status: open title: Delivery Status Added file: http://bugs.python.org/file11759/deliverystatus.txt Added file: http://bugs.python.org/file11760/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded message was scrubbed... From: unknown sender Subject: no subject Date: no date Size: 2077 URL: From report at bugs.python.org Fri Oct 10 08:13:15 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 10 Oct 2008 06:13:15 +0000 Subject: [issue4095] Delivery Status In-Reply-To: <20081010060347.AD74078547@psf.upfronthosting.co.za> Message-ID: <1223619195.21.0.166678886512.issue4095@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 09:22:52 2008 From: report at bugs.python.org (Matthias Klose) Date: Fri, 10 Oct 2008 07:22:52 +0000 Subject: [issue4096] Lib/lib2to3/*.pickle are shipped / modified in the build In-Reply-To: <1223623372.4.0.845692129772.issue4096@psf.upfronthosting.co.za> Message-ID: <1223623372.4.0.845692129772.issue4096@psf.upfronthosting.co.za> New submission from Matthias Klose : the files Lib/lib2to3/Grammar2.6.0.final.0.pickle Lib/lib2to3/PatternGrammar2.6.0.final.0.pickle are created/modfied during a build/test cycle. Is this expected, should these be included in the release at all? ---------- messages: 74617 nosy: doko severity: normal status: open title: Lib/lib2to3/*.pickle are shipped / modified in the build type: feature request versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 09:27:30 2008 From: report at bugs.python.org (Ulrich Eckhardt) Date: Fri, 10 Oct 2008 07:27:30 +0000 Subject: [issue4075] Use WCHAR variant of OutputDebugString In-Reply-To: <1223471607.48.0.166278298943.issue4075@psf.upfronthosting.co.za> Message-ID: <1223623650.79.0.191110048927.issue4075@psf.upfronthosting.co.za> Ulrich Eckhardt added the comment: "PythonCE project use xxxA functions for CE .NET 4.20 platform." Look again. The PythonCE project adds a header and sourcefile (wince_compatibility.h/c) which adds these functions. In other words, it doesn't use the xxxA functions of the win32 API (which don't exist under CE) but its own replacements. I was thinking of going that way too, but in the end decided against it unless absolutely necessary. The point is that this approach allowed minimal changes to the Python code which still had to support the xxxA variants for win9x. However, since IIRC 2.6 support for win9x has been dropped, so now it makes much more sense to use the WCHAR APIs which is what all supported MS Windows versions use internally anyway. This allows code to work under CE unchanged, avoids unnecessary conversions and provides better Unicode support. BTW: in case somebody actually wants to resurrect the win9x support, there is a library from Microsoft that provides the xxxW functions for that platform. Of course that's not a cure but just a band-aid with reduced functionality, but at least it's possible. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 09:50:11 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 10 Oct 2008 07:50:11 +0000 Subject: [issue4096] Lib/lib2to3/*.pickle are shipped / modified in the build In-Reply-To: <1223623372.4.0.845692129772.issue4096@psf.upfronthosting.co.za> Message-ID: <1223625011.42.0.765892861192.issue4096@psf.upfronthosting.co.za> Martin v. L?wis added the comment: They should be present in the installation (and I believe "make install" will create them). Whether or not they are included in the source distribution is not important, IMO. I'm puzzled that they are modifed - this should not happen, unless something's wrong with the time stamps. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 10:33:04 2008 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 Oct 2008 08:33:04 +0000 Subject: [issue3574] compile() cannot decode Latin-1 source encodings In-Reply-To: <1218933580.53.0.0614369271998.issue3574@psf.upfronthosting.co.za> Message-ID: <1223627584.65.0.690708075662.issue3574@psf.upfronthosting.co.za> STINNER Victor added the comment: Amaury applied my both patches for issues #2384 and #3975. So all tests now pass with python trunk + alt_latin_1.diff. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 10:54:38 2008 From: report at bugs.python.org (pinkisntwell) Date: Fri, 10 Oct 2008 08:54:38 +0000 Subject: [issue4097] Traceback doesn't run back all the way In-Reply-To: <1223628877.95.0.314236437557.issue4097@psf.upfronthosting.co.za> Message-ID: <1223628877.95.0.314236437557.issue4097@psf.upfronthosting.co.za> New submission from pinkisntwell : I just got an exception and the traceback wouldn't go all the way to the statement that threw the exception. I found that out by using the debugger. Contrast the traceback: http://tinyurl.com/5xglde with the debugger output (notice the arrow pointing to the last statement the traceback showed and how the execution went on beyond it): http://tinyurl.com/3fjgrl ---------- components: None messages: 74621 nosy: pinkisntwell severity: normal status: open title: Traceback doesn't run back all the way type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 10:57:36 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 10 Oct 2008 08:57:36 +0000 Subject: [issue4090] Documenting set comparisons and operations In-Reply-To: <1223569047.14.0.973921550653.issue4090@psf.upfronthosting.co.za> Message-ID: <1223629056.86.0.678536778673.issue4090@psf.upfronthosting.co.za> Mark Dickinson added the comment: [Raymond] > I don't think this is necessary. I disagree. I think some sort of warning is necessary; it doesn't need to be particularly prominent, but it should be there. Almost *all* expectations are broken for sets in the absence of transitivity of equality for the set elements. Consider the following (Python 2.6) snippet involving a set s: >>> s.remove(17) >>> 17 in s True An element is removed from a set s, and yet it's still present after the removal! Doesn't this deserve an explanation somewhere? In case you haven't guessed, here's what s is: >>> s set([Fraction(17, 1), Decimal('17')]) Regardless of whether one wants to call this a bug or not, I think it's sufficiently unintuitive and surprising that it should be documented. Terry's suggestion and wordings for the reference and library warnings look good to me. ---------- nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 11:03:33 2008 From: report at bugs.python.org (Manuel) Date: Fri, 10 Oct 2008 09:03:33 +0000 Subject: [issue4089] linking python2.6.dll crash on windows xp In-Reply-To: <1223566843.64.0.613878157863.issue4089@psf.upfronthosting.co.za> Message-ID: <1223629413.7.0.281839209938.issue4089@psf.upfronthosting.co.za> Manuel added the comment: We have fixed the problem installing this: http://www.microsoft.com/downloads/details.aspx?FamilyID=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en Anyway, before consider the bug solved, we need to test this solution on different computers. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 11:24:44 2008 From: report at bugs.python.org (Torsten Rottmann) Date: Fri, 10 Oct 2008 09:24:44 +0000 Subject: [issue4098] surprised by default list parameter In-Reply-To: <1223630684.29.0.595274599249.issue4098@psf.upfronthosting.co.za> Message-ID: <1223630684.29.0.595274599249.issue4098@psf.upfronthosting.co.za> New submission from Torsten Rottmann : The attached file produced the following result: ______________________ trott$ python2.5 p6.py [] [1234] ______________________ I expected both times the empty list since the print statement prints just a defaulted parameter ("e") which was defaulted to an empty list literal ("[]") and never set by supplying an actual class parameter. The object property "entries" appears to be shared by both instances. Why? ---------- components: Build files: p6.py messages: 74624 nosy: trott severity: normal status: open title: surprised by default list parameter type: behavior versions: Python 2.5, Python 2.5.3, Python 2.6 Added file: http://bugs.python.org/file11761/p6.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 11:58:40 2008 From: report at bugs.python.org (Manuel) Date: Fri, 10 Oct 2008 09:58:40 +0000 Subject: [issue4089] linking python2.6.dll crash on windows xp In-Reply-To: <1223566843.64.0.613878157863.issue4089@psf.upfronthosting.co.za> Message-ID: <1223632720.29.0.284951148524.issue4089@psf.upfronthosting.co.za> Manuel added the comment: Yes. This bug can be closed. The use of python26.dll require last Microsoft Visual C++ 2008 Redistributable Package. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 12:05:58 2008 From: report at bugs.python.org (Ulrich Eckhardt) Date: Fri, 10 Oct 2008 10:05:58 +0000 Subject: [issue4098] surprised by default list parameter In-Reply-To: <1223630684.29.0.595274599249.issue4098@psf.upfronthosting.co.za> Message-ID: <1223633158.31.0.0243450383349.issue4098@psf.upfronthosting.co.za> Ulrich Eckhardt added the comment: http://effbot.org/pyfaq/why-are-default-values-shared-between-objects.htm The same recently cropped up on the users mailinglist under the topic "default value in __init__". ---------- nosy: +eckhardt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 12:20:29 2008 From: report at bugs.python.org (Torsten Rottmann) Date: Fri, 10 Oct 2008 10:20:29 +0000 Subject: [issue4098] surprised by default list parameter In-Reply-To: <1223630684.29.0.595274599249.issue4098@psf.upfronthosting.co.za> Message-ID: <1223634029.43.0.896918964527.issue4098@psf.upfronthosting.co.za> Torsten Rottmann added the comment: OK. I've read the Python Reference Manual 7.6 "Function Definition". It "explains" why this happens. BUT: Why can`t the compiler make a copy of the default object, if it's mutable (e.g. a list)? This can't be that difficult. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 13:22:26 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 10 Oct 2008 11:22:26 +0000 Subject: [issue4098] surprised by default list parameter In-Reply-To: <1223630684.29.0.595274599249.issue4098@psf.upfronthosting.co.za> Message-ID: <1223637746.17.0.325971672715.issue4098@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Yes, the default value expression could be evaluated each time the function is called without the parameter. But it would be another language. Default values are computed once, and this is a Python feature. It can be useful, for example to cache computations, or to achieve "early binding" in nested functions, as explained in the suggested FAQ. ---------- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 13:57:10 2008 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 Oct 2008 11:57:10 +0000 Subject: [issue4097] Traceback doesn't run back all the way In-Reply-To: <1223628877.95.0.314236437557.issue4097@psf.upfronthosting.co.za> Message-ID: <1223639830.25.0.574042691842.issue4097@psf.upfronthosting.co.za> STINNER Victor added the comment: Can you write an example to reproduce your traceback? You don't give enough informations to see what is the type of your variable, which modules are used, etc. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 14:10:21 2008 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 Oct 2008 12:10:21 +0000 Subject: [issue3724] math.log(x, 10) gives different result than math.log10(x) In-Reply-To: <1220013140.94.0.0541204512227.issue3724@psf.upfronthosting.co.za> Message-ID: <1223640621.59.0.702771083711.issue3724@psf.upfronthosting.co.za> STINNER Victor added the comment: About large integers which can not be converted to float (too big!): it would be nice if math.log2() and/or math.log10() works which such numbers. But it would better if you know if the functions used the FPU or not (only integers). Idea: - logX(int)->int: don't use FPU - logX(float)->float: use FPU - logX(int)->float: use FPU What should be the default type for logX(int)? People expects float when using logX(). Note: logX() means math.log(), math.log2() and/or math.log10(). ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 14:22:20 2008 From: report at bugs.python.org (Facundo Batista) Date: Fri, 10 Oct 2008 12:22:20 +0000 Subject: [issue4087] Document the effects of NotImplemented on == and != In-Reply-To: <1223559584.24.0.470688627133.issue4087@psf.upfronthosting.co.za> Message-ID: <1223641340.41.0.196539272218.issue4087@psf.upfronthosting.co.za> Facundo Batista added the comment: 2008/10/9 Raymond Hettinger : > Alternatively, we could decide to allow decimal/float > comparisons -- the float can be converted to a decimal > exactly and compared exactly -- it would be slow but > it would work and have precise semantics. -0 Note that this could lead to surprising behaviours, when doing these comparations... Decimal("1.1")==1.1 will be true, buy maybe Decimal("1.235445687")==1.235445687 will not (I didn't try if this particular comparison will fail, but hope you get the idea). This is why I suggested the other way... we now allow comparison to integers, let's allow comparisons when the floats are equal to the integers, and no more. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 14:37:21 2008 From: report at bugs.python.org (=?utf-8?q?Bartosz_Radaczy=C5=84ski?=) Date: Fri, 10 Oct 2008 12:37:21 +0000 Subject: [issue4099] dir on a compiled re does not show pattern as a part of the list In-Reply-To: <1223642241.74.0.837602325601.issue4099@psf.upfronthosting.co.za> Message-ID: <1223642241.74.0.837602325601.issue4099@psf.upfronthosting.co.za> New submission from Bartosz Radaczy?ski : It does not show a few other things that are listed here: http://www.python.org/doc/2.5.2/lib/re-objects.html ---------- components: Regular Expressions messages: 74632 nosy: bartoszr severity: normal status: open title: dir on a compiled re does not show pattern as a part of the list type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 14:47:39 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 10 Oct 2008 12:47:39 +0000 Subject: [issue4099] dir on a compiled re does not show pattern as a part of the list In-Reply-To: <1223642241.74.0.837602325601.issue4099@psf.upfronthosting.co.za> Message-ID: <1223642859.88.0.543677584606.issue4099@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This was corrected on the py3k branch by #3247, r64672. In this change, each file is independent; some of them could be backported to the trunk. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 15:12:25 2008 From: report at bugs.python.org (=?utf-8?q?Bartosz_Radaczy=C5=84ski?=) Date: Fri, 10 Oct 2008 13:12:25 +0000 Subject: [issue4099] dir on a compiled re does not show pattern as a part of the list In-Reply-To: <1223642241.74.0.837602325601.issue4099@psf.upfronthosting.co.za> Message-ID: <1223644345.72.0.185913586948.issue4099@psf.upfronthosting.co.za> Bartosz Radaczy?ski added the comment: Cool. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 16:53:38 2008 From: report at bugs.python.org (roland rehmnert) Date: Fri, 10 Oct 2008 14:53:38 +0000 Subject: [issue4100] xml.etree.ElementTree does not read xml-text over page bonderies In-Reply-To: <1223650418.42.0.473297107812.issue4100@psf.upfronthosting.co.za> Message-ID: <1223650418.42.0.473297107812.issue4100@psf.upfronthosting.co.za> New submission from roland rehmnert : xml text fields are not read properly when it is encountered in a 'start' event. During a 'start'-event elem.text returns None, if the text string cross a page boundary of the file. (this is platform dependent and a typical value is 8K (8192 byte)). This line cause an error if the page size is 8192. this is a text where X has position 8192 in the file In most cases this erroneous behaviour can be avoid when elem.tree always returns the proper value at the 'end'-event. Two files are submitted: bug.py: An excerpted file that produced an error with the submitted xml file. bug.xml: An xml file, a little bit more then 8200 bytes. In can of the page size is greater than 8K.. file should be enlarged. Important is however that the text should cross the page boundary. Tags and attributes and attribute values as well are OK I might have misunderstood the documentation of etree, because there are situations that I have not tested. /roland ---------- components: Library (Lib) messages: 74635 nosy: roland severity: normal status: open title: xml.etree.ElementTree does not read xml-text over page bonderies type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 16:54:19 2008 From: report at bugs.python.org (roland rehmnert) Date: Fri, 10 Oct 2008 14:54:19 +0000 Subject: [issue4100] xml.etree.ElementTree does not read xml-text over page bonderies In-Reply-To: <1223650418.42.0.473297107812.issue4100@psf.upfronthosting.co.za> Message-ID: <1223650459.76.0.118190129063.issue4100@psf.upfronthosting.co.za> Changes by roland rehmnert : Added file: http://bugs.python.org/file11762/bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 16:54:51 2008 From: report at bugs.python.org (roland rehmnert) Date: Fri, 10 Oct 2008 14:54:51 +0000 Subject: [issue4100] xml.etree.ElementTree does not read xml-text over page bonderies In-Reply-To: <1223650418.42.0.473297107812.issue4100@psf.upfronthosting.co.za> Message-ID: <1223650491.55.0.479103592963.issue4100@psf.upfronthosting.co.za> Changes by roland rehmnert : Added file: http://bugs.python.org/file11763/bug.xml _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 19:21:48 2008 From: report at bugs.python.org (Thomas Heller) Date: Fri, 10 Oct 2008 17:21:48 +0000 Subject: [issue4089] linking python2.6.dll crash on windows xp In-Reply-To: <1223566843.64.0.613878157863.issue4089@psf.upfronthosting.co.za> Message-ID: <1223659308.2.0.625477718499.issue4089@psf.upfronthosting.co.za> Changes by Thomas Heller : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 19:23:31 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 10 Oct 2008 17:23:31 +0000 Subject: [issue4090] Documenting set comparisons and operations In-Reply-To: <1223569047.14.0.973921550653.issue4090@psf.upfronthosting.co.za> Message-ID: <1223659411.49.0.449053225229.issue4090@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'll update the note in the Ref Manual section on comparisons. The docs on sets, dicts, and other containers need to remain clean. I object to littering the docs with these kind of "omg danger" messages. For beginners using the docs to learn what a container does, these kind of notes are hard to understand, raise unnecessary worries about the robustness of the language, and don't provide actionable information. For advanced users like yourselves, it doesn't help either. All it does is provide some minimal satisfaction that your favorite annoying oddity is in the docs. Also, the set/dict docs are the wrong place to discuss the issue. They happen to be the arbitrary tool you chose to demonstrate an issue that properly relates to comparisons in Python. Since the very beginning, it has been possible to create comparisons that violate our mental invariants for containers. You can feed a partial or random ordering to sort. Mertz has an article on oddities arising from identity versus equality. A rich comparison can return a vector but get collapsed into a boolean by the == operator. You can get hash functions that don't correspond to equality, etc. There are tricks with NaN being identical to itself but not equal to itself. If these things get noted at all, it should be in the docs for numbers and nans or comparisons. It makes no sense to try to add a comment to every possible place that has an equality invariant that can be fooled. For example, it is not hard to produce a list example where len(s)==1 and s[0] != x and x in s, just set x=float('nan') and s=[x]. But, of course, we're not going to clutter the list docs with this nonsense. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 20:15:53 2008 From: report at bugs.python.org (John J Lee) Date: Fri, 10 Oct 2008 18:15:53 +0000 Subject: [issue1028088] Cookies without values are silently ignored (by design?) Message-ID: <1223662553.46.0.432817205683.issue1028088@psf.upfronthosting.co.za> John J Lee added the comment: I was responding to your comment of 2008-10-08 03:08, not to the opening comment. I already responded to the opening comment. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 20:21:07 2008 From: report at bugs.python.org (Andres Riancho) Date: Fri, 10 Oct 2008 18:21:07 +0000 Subject: [issue1028088] Cookies without values are silently ignored (by design?) Message-ID: <1223662867.22.0.612502645355.issue1028088@psf.upfronthosting.co.za> Andres Riancho added the comment: - Problem: The secure flag of cookies is ignored by the load method. - Why is it related to this issue? Because the secure flag is a name without a value: pie=good; other=thing; secure - Why is it bad? Because the RFC says that we should parse it. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 20:36:26 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 10 Oct 2008 18:36:26 +0000 Subject: [issue4090] Documenting set comparisons and operations In-Reply-To: <1223569047.14.0.973921550653.issue4090@psf.upfronthosting.co.za> Message-ID: <1223663786.58.0.662485028695.issue4090@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Para 1: Thank you. Pars 2: I understand and accept your concern. Para 3. You are right odd comparisons are the root of several problems. Following you suggestion, let's at least add one blanket, cover-our-asses warning at the bottom of the comparison section. Example: "Warning: if comparisons among container members violate the usual rules, container operations may give unexpected or anomalous results." Possibly add "We will not try to document the various possibilities." I think something at the bottom of lib ref/numbers, possibly pointing to Nan != Nan (which some users will not know about), would also be a good idea. ---- Just to finish Mark's example >>> s = {fractions.Fraction(17,1), decimal.Decimal(17)} >>> s-{17} set() Subtracting a set with one member removes two members and gives a different answer than just removing that member. But this is more an issue for 4087 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 20:40:09 2008 From: report at bugs.python.org (John J Lee) Date: Fri, 10 Oct 2008 18:40:09 +0000 Subject: [issue1028088] Cookies without values are silently ignored (by design?) Message-ID: <1223664009.65.0.371786404465.issue1028088@psf.upfronthosting.co.za> John J Lee added the comment: The Cookie: header does not have a "secure flag" (The Set-Cookie: header does). I don't strongly object to the issue identified in the original comment being fixed. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 21:57:34 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 10 Oct 2008 19:57:34 +0000 Subject: [issue4087] Document the effects of NotImplemented on == and != In-Reply-To: <1223559584.24.0.470688627133.issue4087@psf.upfronthosting.co.za> Message-ID: <1223668654.17.0.0770237228198.issue4087@psf.upfronthosting.co.za> Terry J. Reedy added the comment: More sensibility offenders: >>> s = {fractions.Fraction(17,1), decimal.Decimal(17)} >>> s-{17} set() Removing one thing removes two. >>> s.remove(17) >>> 17 in s True Removing something leaves it there. >>> s {Fraction(17, 1)} # random choice Removing one thing and subtracting the set with that one thing give different results. >>> s = {decimal.Decimal(17), fractions.Fraction(17,1)} >>> s.remove(17) >>> s {Decimal('17')} The behavior of 'set' s depends on the order items are added. > Facundo's suggested code: if isinstance(other, float) and int(other)==other: other = int(other) would be more efficient, I assume as if isinstance(other,float): ifloat = int(other) if other == ifloat: other = ifloat or if the CAPI has an efficient 'float_isint' function that accesses the bits of a float, as the C equivalent of if isinstance(other, float) and float_isint(other): other = int(other) I remember float-Decimal comparison being rejected/deferred in part for being problematical for fractional values. That is why I suggested implementing it, at least for the present, for integral floats (and Fractions) only, which are relatively easy to detect. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 22:24:42 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 10 Oct 2008 20:24:42 +0000 Subject: [issue3574] compile() cannot decode Latin-1 source encodings In-Reply-To: <1218933580.53.0.0614369271998.issue3574@psf.upfronthosting.co.za> Message-ID: <1223670282.77.0.0504615498091.issue3574@psf.upfronthosting.co.za> Brett Cannon added the comment: Yep, it passes for me now. Martin, have any objection to this patch? ---------- assignee: -> loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 23:11:25 2008 From: report at bugs.python.org (Antoine d'Otreppe) Date: Fri, 10 Oct 2008 21:11:25 +0000 Subject: [issue4101] Missing type in "types" module In-Reply-To: <1223673085.31.0.428507703643.issue4101@psf.upfronthosting.co.za> Message-ID: <1223673085.31.0.428507703643.issue4101@psf.upfronthosting.co.za> New submission from Antoine d'Otreppe : Hello There's a type missing in the standard "types" modules (or I didn't find it, in what case I apologize for this useless posting) Consider this code: --- WrapperDescriptorType = None class Meta(type): def __init__(cls, *args, **kwargs): global WrapperDescriptorType type.__init__(cls, *args, **kwargs) WrapperDescriptorType = type(cls.__init__) class A: __metaclass__ = Meta --- I could not find WrapperDescriptorType in types module. btw, I have to pass this descriptor to another function. But in fact I don't need the wrapper but the real method. How to get it ? ---------- components: Library (Lib) messages: 74643 nosy: Antoine d'Otreppe severity: normal status: open title: Missing type in "types" module type: feature request versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 23:21:01 2008 From: report at bugs.python.org (Mikhail Gusarov) Date: Fri, 10 Oct 2008 21:21:01 +0000 Subject: [issue4102] sphinx: ansi color even on dumb terminal In-Reply-To: <1223673661.93.0.815684986423.issue4102@psf.upfronthosting.co.za> Message-ID: <1223673661.93.0.815684986423.issue4102@psf.upfronthosting.co.za> New submission from Mikhail Gusarov : Debian bug #501629 (http://bugs.debian.org/cgi-bin/bugreport.cgi? bug=501629). Both sphinx-build and sphinx-quicksetup attempt (and fail) to use ansi color sequences, even when TERM=dumb (for example, when run from an emacs shell buffer, or m-x compile. This produces garbage, like this: ^[[01mSphinx v0.4.2, building linkcheck^[[39;49;00m While it does look like I can add -N in the generated Makefile, and thus this is only a wishlist item since I have a workaround - it really shouldn't generate color unless it has *some* indication that it might work - even mooching off of $LSCOLORS would be better than doing it blindly, though it should be enough to look at a TERM or TERMCAP property - or perhaps indirectly via curses.has_colors() which does appear to be able to tell "xterm" from "dumb" successfully. ---------- messages: 74644 nosy: dottedmag severity: normal status: open title: sphinx: ansi color even on dumb terminal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 23:26:39 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 10 Oct 2008 21:26:39 +0000 Subject: [issue4100] xml.etree.ElementTree does not read xml-text over page bonderies In-Reply-To: <1223650418.42.0.473297107812.issue4100@psf.upfronthosting.co.za> Message-ID: <1223673999.05.0.675413858535.issue4100@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Minimum script to reproduce this issue is "bug.py" I've attached. And I think this issue can be fixed with "fix_cross_boundary_on_ElementTree.patch". I'll attach the test case for this issue as "test.py". (I wanted to intergrate test into test_xml_etree_c.py, but it uses doctest which I don't know about) ///////////////////////// // Cause of issue TreeBuilder#start() and TreeBuilder#end() are handlers driven by self._parser.feed(data) in iterparse.next(), and iterparse stores elements returned by these functions. But element is not initialized at the moment. No one can determine element.text when start tag is found, and element.tail when end tag is found vise versa. We can say "the element is initialized" when encountered next element or TreeBuilder is closed. So, iterparse's _events queue may contain uninitialized elements, so my patch waits until the element will be initialized. ---------- components: +XML nosy: +ocean-city versions: +Python 2.6, Python 3.0 Added file: http://bugs.python.org/file11764/bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 23:27:12 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 10 Oct 2008 21:27:12 +0000 Subject: [issue4100] xml.etree.ElementTree does not read xml-text over page bonderies In-Reply-To: <1223650418.42.0.473297107812.issue4100@psf.upfronthosting.co.za> Message-ID: <1223674032.19.0.918441654707.issue4100@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : ---------- keywords: +patch Added file: http://bugs.python.org/file11765/fix_cross_boundary_on_ElementTree.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 23:27:30 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 10 Oct 2008 21:27:30 +0000 Subject: [issue4100] xml.etree.ElementTree does not read xml-text over page bonderies In-Reply-To: <1223650418.42.0.473297107812.issue4100@psf.upfronthosting.co.za> Message-ID: <1223674050.89.0.960598311064.issue4100@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : Added file: http://bugs.python.org/file11766/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 23:32:57 2008 From: report at bugs.python.org (Mikhail Gusarov) Date: Fri, 10 Oct 2008 21:32:57 +0000 Subject: [issue4103] sphinx: latexwriter uses undefined 'excdescni' environment In-Reply-To: <1223674377.15.0.736293209348.issue4103@psf.upfronthosting.co.za> Message-ID: <1223674377.15.0.736293209348.issue4103@psf.upfronthosting.co.za> New submission from Mikhail Gusarov : Debian bug#501763 (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=501763): when using the autodoc extension similiar to this template: .. automodule:: mvpa.misc.exceptions :members: :undoc-members: :show-inheritance: :noindex: the generated latex code cannot be compiled, as it uses an undefined environment. ! LaTeX Error: Environment excdescni undefined. This is supposed to be the corresponding env to 'excdesc' for exception descriptions that should not end up in the index. It looks like this has simply been forgotten, as e.g. funcdescni is part of texinputs/sphinx.sty Looking at http://svn.python.org/projects/doctools/trunk/sphinx/texinputs/ sphinx.sty I'd say, that the problem is still present in the current SVN trunk. ---------- assignee: georg.brandl components: Documentation messages: 74646 nosy: dottedmag, georg.brandl severity: normal status: open title: sphinx: latexwriter uses undefined 'excdescni' environment type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 23:34:14 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 10 Oct 2008 21:34:14 +0000 Subject: [issue4101] Missing type in "types" module In-Reply-To: <1223673085.31.0.428507703643.issue4101@psf.upfronthosting.co.za> Message-ID: <1223674454.25.0.741411209006.issue4101@psf.upfronthosting.co.za> Benjamin Peterson added the comment: At the moment, we're not adding things to the type module because it may eventually go away. Since WrapperDescriptorType implements the descriptor protocol you can get the __init__ method just by using it. ---------- nosy: +benjamin.peterson resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 23:35:36 2008 From: report at bugs.python.org (Antoine d'Otreppe) Date: Fri, 10 Oct 2008 21:35:36 +0000 Subject: [issue4104] Namespace inconsistency In-Reply-To: <1223674536.22.0.160836227089.issue4104@psf.upfronthosting.co.za> Message-ID: <1223674536.22.0.160836227089.issue4104@psf.upfronthosting.co.za> New submission from Antoine d'Otreppe : Hello See the following code and comments for explanation ;) (Try it with interactive mode) --- >>> class A: ... class B: ... pass >>> A >>> A.B >>> B NameError: B is not defined --- This seems to be inconsistent, as Python represents A.B as __main__.B, but B is not accessable from __main__ Maybe this could be better: --- >>> A.B ^ --- ---------- components: Interpreter Core messages: 74648 nosy: Antoine d'Otreppe severity: normal status: open title: Namespace inconsistency type: feature request versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 23:40:50 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 10 Oct 2008 21:40:50 +0000 Subject: [issue4104] Namespace inconsistency In-Reply-To: <1223674536.22.0.160836227089.issue4104@psf.upfronthosting.co.za> Message-ID: <1223674850.82.0.280687335683.issue4104@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This is because type_repr looks at the __module__ attribute to determine the location. Fixing this would probably require adding a __nestedclass__ attribute. However, nested classes aren't used very much, so it's not urgent by any means. ---------- nosy: +benjamin.peterson priority: -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 10 23:44:51 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 10 Oct 2008 21:44:51 +0000 Subject: [issue4102] sphinx: ansi color even on dumb terminal In-Reply-To: <1223673661.93.0.815684986423.issue4102@psf.upfronthosting.co.za> Message-ID: <1223675091.46.0.134248170895.issue4102@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> georg.brandl nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 11 00:03:31 2008 From: report at bugs.python.org (Roumen Petrov) Date: Fri, 10 Oct 2008 22:03:31 +0000 Subject: [issue4010] configure options don't trickle down to distutils In-Reply-To: <1222879433.22.0.765704464081.issue4010@psf.upfronthosting.co.za> Message-ID: <1223676211.58.0.283454328421.issue4010@psf.upfronthosting.co.za> Roumen Petrov added the comment: I don't have rights to derive a new issue. May be a new new title about distutils and makefile integration is more appropriate. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 11 00:12:22 2008 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 10 Oct 2008 22:12:22 +0000 Subject: [issue4105] Renamed PyGILState_Acquire to PyGILState_Ensure in Docs/c-api/init.rst In-Reply-To: <1223676742.05.0.929533149054.issue4105@psf.upfronthosting.co.za> Message-ID: <1223676742.05.0.929533149054.issue4105@psf.upfronthosting.co.za> New submission from Guilherme Polo : I see the comment in Include/pystate.h got fixed, but this other in Docs/c-api/init.rst didn't ---------- files: PyGILState_Acquire=>PyGILState_Ensure.diff keywords: patch messages: 74651 nosy: gpolo severity: normal status: open title: Renamed PyGILState_Acquire to PyGILState_Ensure in Docs/c-api/init.rst versions: Python 2.6, Python 3.0 Added file: http://bugs.python.org/file11767/PyGILState_Acquire=>PyGILState_Ensure.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 11 00:23:53 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 10 Oct 2008 22:23:53 +0000 Subject: [issue4105] Renamed PyGILState_Acquire to PyGILState_Ensure in Docs/c-api/init.rst In-Reply-To: <1223676742.05.0.929533149054.issue4105@psf.upfronthosting.co.za> Message-ID: <1223677433.49.0.708798336309.issue4105@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks. Fixed in r66874. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 11 00:39:09 2008 From: report at bugs.python.org (Roumen Petrov) Date: Fri, 10 Oct 2008 22:39:09 +0000 Subject: [issue4051] use of TCHAR under win32 In-Reply-To: <1223288926.88.0.428745871562.issue4051@psf.upfronthosting.co.za> Message-ID: <1223678349.63.0.380245698264.issue4051@psf.upfronthosting.co.za> Roumen Petrov added the comment: For the protocol I attach part for PythonCE-2.5-20061219.patch. Both patches address UNICODE name clash in Modules/cPickle.c. For windows programs UNICODE is more commonly used define and may be python C-code only has to avoid issues like this one. I couldn't found where python C-code use so called "TCHAR meaning" and the first sentence from comment in Ulrich patch looks irrelevant to the issue. Also Ulrich patch is far from complete "TCHAR" implementation in python. May be issue title has to be changed to address more precise problem. Added file: http://bugs.python.org/file11768/PythonCE-2.5-20061219-cPickle.c-patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 11 01:06:31 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 10 Oct 2008 23:06:31 +0000 Subject: [issue3677] importing from UNC roots doesn't work In-Reply-To: <1219676428.29.0.220923454973.issue3677@psf.upfronthosting.co.za> Message-ID: <1223679991.96.0.000152237507434.issue3677@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : ---------- components: +Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 11 01:09:20 2008 From: report at bugs.python.org (Roumen Petrov) Date: Fri, 10 Oct 2008 23:09:20 +0000 Subject: [issue4075] Use WCHAR variant of OutputDebugString In-Reply-To: <1223471607.48.0.166278298943.issue4075@psf.upfronthosting.co.za> Message-ID: <1223680160.15.0.971124716167.issue4075@psf.upfronthosting.co.za> Roumen Petrov added the comment: I couldn't find in MSDN flags for Windows CE compilers similar to the GCC compiler that change representation of strings in C-code. The Microsoft recommend so called TCHAR technology that depend from UNICODE define I answer itself. >From MSDN isn't so clear what is status of CE version 6.0 - R2?. The documentation of CE 5.0 looks complete, include details for compiler, migration guide. About wince_compatibility.h/c - it is just a part of the patch (PythonCE-2.5-20061219). If we look in the complete patch we see changes like GetLocaleInfo->GetLocaleInfoA(_localemodule.c) but windll.kernel32.GetProcAddress->cdll.coredll.GetProcAddressW (test_random_things.py). Another change (posixmodule.c) CRYPTACQUIRECONTEXTA->CRYPTACQUIRECONTEXT. So we see changes from xxx to xxxA, xxx to xxxW, xxxA to xxx (!). If this patch required for CE 5.0 ? If not why to change now for may upcoming 6.0 ? If the python switch to W functions then the issue will be resolved. Without general switch to W functions and to wide strings we need to convert every time from single chat to wide char. Is this acceptable in general ? (for the particular case yes - the method is called rarely). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 11 02:55:26 2008 From: report at bugs.python.org (A.M. Kuchling) Date: Sat, 11 Oct 2008 00:55:26 +0000 Subject: [issue1886] Permit to easily use distutils "--formats=tar, gztar, bztar" on all systems In-Reply-To: <1200950920.27.0.810221024065.issue1886@psf.upfronthosting.co.za> Message-ID: <1223686526.48.0.526988063308.issue1886@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- assignee: -> akuchling nosy: +akuchling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 11 03:04:42 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 11 Oct 2008 01:04:42 +0000 Subject: [issue4100] xml.etree.ElementTree does not read xml-text over page bonderies In-Reply-To: <1223650418.42.0.473297107812.issue4100@psf.upfronthosting.co.za> Message-ID: <1223687082.03.0.315644395793.issue4100@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file11765/fix_cross_boundary_on_ElementTree.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 11 03:50:30 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 11 Oct 2008 01:50:30 +0000 Subject: [issue4100] xml.etree.ElementTree does not read xml-text over page bonderies In-Reply-To: <1223650418.42.0.473297107812.issue4100@psf.upfronthosting.co.za> Message-ID: <1223689830.49.0.290363294383.issue4100@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : Added file: http://bugs.python.org/file11769/fix_cross_boundary_on_ElementTree_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 11 03:50:41 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 11 Oct 2008 01:50:41 +0000 Subject: [issue4100] xml.etree.ElementTree does not read xml-text over page bonderies In-Reply-To: <1223650418.42.0.473297107812.issue4100@psf.upfronthosting.co.za> Message-ID: <1223689841.04.0.515026958736.issue4100@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file11766/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 11 03:51:05 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 11 Oct 2008 01:51:05 +0000 Subject: [issue4100] xml.etree.ElementTree does not read xml-text over page bonderies In-Reply-To: <1223650418.42.0.473297107812.issue4100@psf.upfronthosting.co.za> Message-ID: <1223689865.15.0.607697350981.issue4100@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : Added file: http://bugs.python.org/file11770/test_v2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 11 04:05:16 2008 From: report at bugs.python.org (STINNER Victor) Date: Sat, 11 Oct 2008 02:05:16 +0000 Subject: [issue3799] Byte/string inconsistencies between different dbm modules In-Reply-To: <1220738372.55.0.492476136204.issue3799@psf.upfronthosting.co.za> Message-ID: <1223690716.4.0.978975256552.issue3799@psf.upfronthosting.co.za> STINNER Victor added the comment: For information, Python3 trunk fails on: test.support.TestFailed: Traceback (most recent call last): File "Lib/test/test_dbm.py", line 157, in test_keys self.assert_('xxx' not in self.d) TypeError: gdbm key must be bytes, not str ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 11 05:30:22 2008 From: report at bugs.python.org (Skip Montanaro) Date: Sat, 11 Oct 2008 03:30:22 +0000 Subject: [issue4106] multiprocessing occasionally spits out exception during shutdown In-Reply-To: <1223695822.85.0.145044917765.issue4106@psf.upfronthosting.co.za> Message-ID: <1223695822.85.0.145044917765.issue4106@psf.upfronthosting.co.za> New submission from Skip Montanaro : I worked up a simple example of using the external processing module (0.52) for a friend at work today. I noticed some cases where it raised exceptions during exit. Not all the time, but not infrequently either. This evening I tweaked it for the 2.6 multiprocessing module's API and tried it out. I ran it in a large loop: for i in $(range 500) ; do echo '!'$i python test_proc.py end | egrep '!' Most of the time all I see are the '!' lines from the echo command. Every once in awhile I see a traceback though. For example: Exception in thread QueueFeederThread (most likely raised during interpreter shutdown): Traceback (most recent call last): File "/Users/skip/local/lib/python2.7/threading.py", line 522, in __bootstrap_inner File "/Users/skip/local/lib/python2.7/threading.py", line 477, in run File "/Users/skip/local/lib/python2.7/multiprocessing/queues.py", line 233, in _feed : 'NoneType' object is not callable This occurred once in approximately 1500 runs of the script (three times through the above shell loop). The script used to trigger this exception is attached. ---------- components: Library (Lib) files: test_proc.py messages: 74656 nosy: skip.montanaro priority: normal severity: normal status: open title: multiprocessing occasionally spits out exception during shutdown type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file11771/test_proc.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 11 05:31:33 2008 From: report at bugs.python.org (Skip Montanaro) Date: Sat, 11 Oct 2008 03:31:33 +0000 Subject: [issue4106] multiprocessing occasionally spits out exception during shutdown In-Reply-To: <1223695822.85.0.145044917765.issue4106@psf.upfronthosting.co.za> Message-ID: <1223695893.16.0.911031664321.issue4106@psf.upfronthosting.co.za> Skip Montanaro added the comment: Oh, the range command used in the shell for loop is analogous to Python's range() builtin function. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 11 14:28:27 2008 From: report at bugs.python.org (Skip Montanaro) Date: Sat, 11 Oct 2008 12:28:27 +0000 Subject: [issue4106] multiprocessing occasionally spits out exception during shutdown In-Reply-To: <1223695822.85.0.145044917765.issue4106@psf.upfronthosting.co.za> Message-ID: <1223728107.28.0.646230879771.issue4106@psf.upfronthosting.co.za> Skip Montanaro added the comment: Got another one just now, but with just the note about the exception in the queue feeder thread. The traceback was swallowed. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 11 14:36:13 2008 From: report at bugs.python.org (Skip Montanaro) Date: Sat, 11 Oct 2008 12:36:13 +0000 Subject: [issue4106] multiprocessing occasionally spits out exception during shutdown In-Reply-To: <1223695822.85.0.145044917765.issue4106@psf.upfronthosting.co.za> Message-ID: <1223728573.75.0.409480636463.issue4106@psf.upfronthosting.co.za> Skip Montanaro added the comment: Final comment before I see some feedback from the experts. I have this code in the worker function's loop: # quick pause to allow other stuff to happen a bit randomly t = 0.1 * random.random() time.sleep(t) If I eliminate the sleep altogether pretty much all hell breaks loose. As I reduce the sleep time it gets noisier and noisier. I switched to a fixed sleep time and reduced it as far as time.sleep(0.00015625) At that point it was complaining about killing worker processes on many of the runs, maybe 1 out of every 5 or 10 runs. I suppose the moral of the story is to not use multiprocessing except when you have long-running tasks. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 11 17:55:04 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 11 Oct 2008 15:55:04 +0000 Subject: [issue4032] distutils cannot recognize ".dll.a" as library on cygwin In-Reply-To: <1223055534.39.0.439061882395.issue4032@psf.upfronthosting.co.za> Message-ID: <1223740504.25.0.469189024135.issue4032@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : ---------- title: disutils cannot recognize ".dll.a" as library on cygwin -> distutils cannot recognize ".dll.a" as library on cygwin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 11 19:25:00 2008 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Sat, 11 Oct 2008 17:25:00 +0000 Subject: [issue1633953] re.compile("(.*$){1,4}", re.MULTILINE) fails Message-ID: <1223745900.93.0.792478546958.issue1633953@psf.upfronthosting.co.za> Jeffrey C. Jacobs added the comment: On first blush, this issue sounds quite similar to issue 2537, but I have been looking at different scenarios and found that there is a subtle difference because, grammatically: (?m)(?:.*$)(.*$) is the same as: (?m)(.*$){2} Yet the former compiles while the later raises the exception you list below. Thus, I think the issue YOU raise is indeed related to the redundant repeat operator issue numbered 2537, BUT, when I match an expression with the alternate form, I get an empty string in my capture group, since in a range repeat over a capture group, only the last group is captured, while the entire expression matches only the first line, without the end-line character. Thus, the other thing to remember is that ^ and $ are zero-width matches, so when you write .*$, you are saying match up to, but not including, the end of the line. If you immediately follow that with another .*$, you will start from the point "up to, but not including, the end of the line", which means the next character is an end of line. Thus, when you reach the second .*$, you capture nothing because the .* is allowed to be zero-length and you still haven't advanced PAST the end of the line. As a working alternative, you could write r'(?m)(?:(.*$)[\r\n]*){1,4}' , since this would give you your 1-4 lines, but also consume the carriage return and line feed characters to get you to the next line. Since we don't want to change the meaning of $ and ^ to make them capturing (custom POSIX character classes may make 'capturing' a new line character easier), and the 'redundant repeat operator' is already listed as a bug (your expression is essentially saying (.*){1,4}$ because it does not capture the new-line character(s) and thus has a redundant repeat operation in the range repeat expression), I'm willing to call this a repeat (technically repeated by as this issue is older) of issue 2537. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 11 19:26:03 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 11 Oct 2008 17:26:03 +0000 Subject: [issue4088] Patch to implement a real poplib test suite In-Reply-To: <1223565838.71.0.340118865105.issue4088@psf.upfronthosting.co.za> Message-ID: <1223745963.25.0.808803507917.issue4088@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks for the patch; it's look good. Applied in r66878. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 11 20:14:41 2008 From: report at bugs.python.org (Thomas Heller) Date: Sat, 11 Oct 2008 18:14:41 +0000 Subject: [issue4075] Use WCHAR variant of OutputDebugString In-Reply-To: <1223471607.48.0.166278298943.issue4075@psf.upfronthosting.co.za> Message-ID: <1223748881.04.0.658573712642.issue4075@psf.upfronthosting.co.za> Changes by Thomas Heller : ---------- nosy: +theller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 11 21:31:46 2008 From: report at bugs.python.org (Collin Winter) Date: Sat, 11 Oct 2008 19:31:46 +0000 Subject: [issue1107887] Speed up function calls/can add more introspection info Message-ID: <1223753506.6.0.742340999597.issue1107887@psf.upfronthosting.co.za> Changes by Collin Winter : ---------- nosy: +collinwinter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 12 12:03:47 2008 From: report at bugs.python.org (jamesie) Date: Sun, 12 Oct 2008 10:03:47 +0000 Subject: [issue4107] Backticks still mentioned in documentation In-Reply-To: <1223805827.76.0.682079742301.issue4107@psf.upfronthosting.co.za> Message-ID: <1223805827.76.0.682079742301.issue4107@psf.upfronthosting.co.za> New submission from jamesie : At the following part of the first sentence should be ommited: "and by string conversions (reverse quotes)" ---------- assignee: georg.brandl components: Documentation messages: 74662 nosy: georg.brandl, jamesie severity: normal status: open title: Backticks still mentioned in documentation versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 12 13:02:15 2008 From: report at bugs.python.org (Matteo Bertini) Date: Sun, 12 Oct 2008 11:02:15 +0000 Subject: [issue4017] IDLE 2.6 broken on OSX (Leopard) In-Reply-To: <1222960590.08.0.635891151551.issue4017@psf.upfronthosting.co.za> Message-ID: <1223809335.46.0.472425710768.issue4017@psf.upfronthosting.co.za> Matteo Bertini added the comment: I have the same error as in msg74221 RuntimeError: tk.h version (8.4) doesn't match libtk.a version (8.5) Some workaround not involving a full rebuild? ---------- nosy: +naufraghi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 12 14:51:38 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 12 Oct 2008 12:51:38 +0000 Subject: [issue4107] Backticks still mentioned in documentation In-Reply-To: <1223805827.76.0.682079742301.issue4107@psf.upfronthosting.co.za> Message-ID: <1223815898.93.0.0625295986917.issue4107@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks! Fixed in r66880. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 12 15:41:32 2008 From: report at bugs.python.org (taskinoor hasan sajid) Date: Sun, 12 Oct 2008 13:41:32 +0000 Subject: [issue4108] robotparser.py fail when more than one User-Agent: * is present In-Reply-To: <1223818892.29.0.704490324988.issue4108@psf.upfronthosting.co.za> Message-ID: <1223818892.29.0.704490324988.issue4108@psf.upfronthosting.co.za> New submission from taskinoor hasan sajid : Check the robots.txt file from mathworld. --> http://mathworld.wolfram.com/robots.txt It contains 2 User-Agent: * lines. >From http://www.robotstxt.org/norobots-rfc.txt "These name tokens are used in User-agent lines in /robots.txt to identify to which specific robots the record applies. The robot must obey the first record in /robots.txt that contains a User- Agent line whose value contains the name token of the robot as a substring. The name comparisons are case-insensitive. If no such record exists, it should obey the first record with a User-agent line with a "*" value, if present. If no record satisfied either condition, or no records are present at all, access is unlimited." But it seems that our robotparser is obeying the 2nd one. the problem occures because robotparser assumes that no robots.txt will contain two * user-agent. it should not have two two such line, but in reality many site may have two. So i have changed robotparser.py as follow: def _add_entry(self, entry): if "*" in entry.useragents: # the default entry is considered last if self.default_entry == None: # this check is added self.default_entry = entry else: self.entries.append(entry) And at the end of parse(self, lines) method if state==2: # self.entries.append(entry) self._add_entry(entry) # necessary if there is no new line at end and last User-Agent is * ---------- components: Library (Lib) messages: 74665 nosy: thsajid severity: normal status: open title: robotparser.py fail when more than one User-Agent: * is present versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 12 15:56:42 2008 From: report at bugs.python.org (Eric Atienza) Date: Sun, 12 Oct 2008 13:56:42 +0000 Subject: [issue4109] Wrong UnboundLocalError with += operator In-Reply-To: <1223819802.24.0.226294192921.issue4109@psf.upfronthosting.co.za> Message-ID: <1223819802.24.0.226294192921.issue4109@psf.upfronthosting.co.za> New submission from Eric Atienza : the following code : def test(): code='' def sub(n): for i in range(n): code+=str(i) sub(5) sub(10) return code >>> test() Traceback (most recent call last): File "", line 1, in File "", line 6, in test File "", line 5, in sub UnboundLocalError: local variable 'code' referenced before assignment error came from the += operator. Tested for code initialized to '', to 0 I guess it's the same for all inline operators. I agree that global variables CANNOT be assigned, it's ok. But += (and I guess *= etc) operators are not assignements, and are not different from .append(), or .extend() methods. I was expecting += to work the same as append() method ---------- components: Interpreter Core messages: 74666 nosy: atienza severity: normal status: open title: Wrong UnboundLocalError with += operator type: behavior versions: Python 2.5.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 12 16:05:20 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 12 Oct 2008 14:05:20 +0000 Subject: [issue4109] Wrong UnboundLocalError with += operator In-Reply-To: <1223819802.24.0.226294192921.issue4109@psf.upfronthosting.co.za> Message-ID: <1223820320.01.0.122614528305.issue4109@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Is code a global variable? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 12 16:08:37 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 12 Oct 2008 14:08:37 +0000 Subject: [issue4109] Wrong UnboundLocalError with += operator In-Reply-To: <1223819802.24.0.226294192921.issue4109@psf.upfronthosting.co.za> Message-ID: <1223820517.22.0.447500101786.issue4109@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Inplace operators ("+=", "-=" etc) are assignments since in the case of immutable types like str code += "some string" is equivalent to code = code + "some string" ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 12 17:39:32 2008 From: report at bugs.python.org (David Peckham) Date: Sun, 12 Oct 2008 15:39:32 +0000 Subject: [issue3876] multiprocessing does not compile on systems which do not define sem_timedwait In-Reply-To: <1221541852.59.0.453473189868.issue3876@psf.upfronthosting.co.za> Message-ID: <1223825972.87.0.287534388908.issue3876@psf.upfronthosting.co.za> Changes by David Peckham : ---------- nosy: +dave.peckham _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 12 17:58:54 2008 From: report at bugs.python.org (John) Date: Sun, 12 Oct 2008 15:58:54 +0000 Subject: [issue4110] A minor slip while typing In-Reply-To: <1223827133.93.0.666045879056.issue4110@psf.upfronthosting.co.za> Message-ID: <1223827133.93.0.666045879056.issue4110@psf.upfronthosting.co.za> New submission from John : Hello, please let me focus your attention to a little slip that was made while typing a code example in the Python 3.0 documentation. Please visit the link http://docs.python.org/dev/3.0/library/functions.html?highlight=property#property and note the 3rd code example which starts like this: class C(object): def __init__(self): self._x = None This is probably a slip, because it should better be like this: class C(object): def __init__(self): self._x = None And since this is the only method with such coding style used, it's probably a slip. Please fix this if you have the time to do so. After all, it's not a very time-consuming thing to do. P.S.: I have discovered that the code example class C(object): def __init__(self): self._x = None was used from the documentation of Python 2.5.x which is class C(object): def __init__(self): self._x = None def getx(self): return self._x def setx(self, value): self._x = value def delx(self): del self._x x = property(getx, setx, delx, "I'm the 'x' property.") but the author of the documentation forgot to put the part self._x = None in a new line and indent the code block. This slip is present in the documentation for both Python 2.6 and Python 3.0. Please fix it if it is doable. Thanks. ---------- assignee: georg.brandl components: Documentation messages: 74669 nosy: georg.brandl, vinetou severity: normal status: open title: A minor slip while typing versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 12 18:08:15 2008 From: report at bugs.python.org (Brett Hoerner) Date: Sun, 12 Oct 2008 16:08:15 +0000 Subject: [issue4111] Add DTrace probes In-Reply-To: <1223827695.04.0.0893695004368.issue4111@psf.upfronthosting.co.za> Message-ID: <1223827695.04.0.0893695004368.issue4111@psf.upfronthosting.co.za> New submission from Brett Hoerner : It would be great if the main Python distribution supported DTrace on (Open)Solaris / FreeBSD / OS X. I've attached a patch against 2.6 that instruments function calls. It's from the ed scripts included in Apple's Python distribution: http://developer.apple.com/opensource/index.html (PSF License) It is imperfect because I wasn't sure how to do the equivalent of IFDEF in the Makefile.pre.in, as you can see this patch will make ceval.o depend on pydtrace.h, which depends on having a local `dtrace` command. The rest of the patch properly uses IFDEFs. ---------- components: Build, Installation files: python-2.6-dtrace.diff keywords: patch messages: 74670 nosy: bretthoerner severity: normal status: open title: Add DTrace probes type: feature request versions: Python 2.6 Added file: http://bugs.python.org/file11772/python-2.6-dtrace.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 12 19:22:58 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 12 Oct 2008 17:22:58 +0000 Subject: [issue4110] A minor slip while typing In-Reply-To: <1223827133.93.0.666045879056.issue4110@psf.upfronthosting.co.za> Message-ID: <1223832178.1.0.283595225021.issue4110@psf.upfronthosting.co.za> Georg Brandl added the comment: Duplicate of #4002. ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 12 19:23:02 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 12 Oct 2008 17:23:02 +0000 Subject: [issue4104] Namespace inconsistency In-Reply-To: <1223674536.22.0.160836227089.issue4104@psf.upfronthosting.co.za> Message-ID: <1223832182.18.0.567655803714.issue4104@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I'm tempted to close this as "won't fix". ---------- nosy: +loewis resolution: -> wont fix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 12 19:34:39 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 12 Oct 2008 17:34:39 +0000 Subject: [issue4104] Namespace inconsistency In-Reply-To: <1223674536.22.0.160836227089.issue4104@psf.upfronthosting.co.za> Message-ID: <1223832879.24.0.531087483468.issue4104@psf.upfronthosting.co.za> Georg Brandl added the comment: Me too. There are too many cases where class statements can be executed to get this right. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 12 19:36:32 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 12 Oct 2008 17:36:32 +0000 Subject: [issue4051] use of TCHAR under win32 In-Reply-To: <1223678349.63.0.380245698264.issue4051@psf.upfronthosting.co.za> Message-ID: <48F2359B.6070003@v.loewis.de> Martin v. L?wis added the comment: > I couldn't found where python C-code use so called "TCHAR meaning" and > the first sentence from comment in Ulrich patch looks irrelevant to the > issue. I was confused by Ulrich's terminology at first, also (claiming that Python doesn't use TCHAR, so how could it depend on it); I now think Ulrich is nearly correct. E.g. in 2.6, we call, in posixmodule.c, CreateProcess. Now, CreateProcess is defined in the SDK as #ifdef UNICODE #define CreateProcess CreateProcessW #else #define CreateProcess CreateProcessA #endif // !UNICODE However, it is *documented* as BOOL WINAPI CreateProcess( __in_opt LPCTSTR lpApplicationName, __inout_opt LPTSTR lpCommandLine, __in_opt LPSECURITY_ATTRIBUTES lpProcessAttributes, __in_opt LPSECURITY_ATTRIBUTES lpThreadAttributes, __in BOOL bInheritHandles, __in DWORD dwCreationFlags, __in_opt LPVOID lpEnvironment, __in_opt LPCTSTR lpCurrentDirectory, __in LPSTARTUPINFO lpStartupInfo, __out LPPROCESS_INFORMATION lpProcessInformation ); So according to the documentation, this is a function that takes TCHAR parameters, hence it is a "TCHAR-based (windows) API". The fact that the Windows SDK actually defines it differently is a technical hack; for all practical purposes, it behaves as if it really was a TCHAR API. > Also Ulrich patch is far from complete "TCHAR" implementation in python. See msg74386. > May be issue title has to be changed to address more precise problem. Certainly. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 12 19:37:39 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 12 Oct 2008 17:37:39 +0000 Subject: [issue4051] UNICODE macro in cPickle conflicts with Windows define In-Reply-To: <1223288926.88.0.428745871562.issue4051@psf.upfronthosting.co.za> Message-ID: <1223833059.73.0.934012500498.issue4051@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- title: use of TCHAR under win32 -> UNICODE macro in cPickle conflicts with Windows define _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 12 19:40:57 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 12 Oct 2008 17:40:57 +0000 Subject: [issue4075] Use WCHAR variant of OutputDebugString In-Reply-To: <1223680160.15.0.971124716167.issue4075@psf.upfronthosting.co.za> Message-ID: <48F236A7.1050801@v.loewis.de> Martin v. L?wis added the comment: > If the python switch to W functions then the issue will be resolved. Python should use the *W functions wherever possible. > Without general switch to W functions and to wide strings we need to > convert every time from single chat to wide char. Is this acceptable in > general ? Most certainly. If we call the *A function instead, it will convert to *W itself, so it's no loss if we do it right away (and we may save a copy in some cases). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 12 20:03:37 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 12 Oct 2008 18:03:37 +0000 Subject: [issue4104] Namespace inconsistency In-Reply-To: <1223674536.22.0.160836227089.issue4104@psf.upfronthosting.co.za> Message-ID: <1223834617.18.0.0997460681715.issue4104@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 12 20:48:20 2008 From: report at bugs.python.org (Brett Cannon) Date: Sun, 12 Oct 2008 18:48:20 +0000 Subject: [issue4111] Add DTrace probes In-Reply-To: <1223827695.04.0.0893695004368.issue4111@psf.upfronthosting.co.za> Message-ID: <1223837300.85.0.399227850101.issue4111@psf.upfronthosting.co.za> Brett Cannon added the comment: At one point we were told Apple would try to backport their dtrace instrumentation. I don't know what the status of that is, but it obviously has not happened. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 10:50:25 2008 From: report at bugs.python.org (roland rehmnert) Date: Mon, 13 Oct 2008 08:50:25 +0000 Subject: [issue4100] xml.etree.ElementTree does not read xml-text over page bonderies In-Reply-To: <1223650418.42.0.473297107812.issue4100@psf.upfronthosting.co.za> Message-ID: <1223887825.66.0.880282532683.issue4100@psf.upfronthosting.co.za> roland rehmnert added the comment: We had to be careful how we should handle this. http://effbot.org/zone/element-iterparse.htm A note on this site says following : Note: The tree builder and the event generator are not necessarily synchronized; the latter usually lags behind a bit. This means that when you get a ?start? event for an element, the builder may already have filled that element with content. You cannot rely on this, though ? a ?start? event can only be used to inspect the attributes, not the element content. For more details, see this http://mail.python.org/pipermail/xml-sig/2005-January/010838.html. I do understand that it might be so that elem.text is undefined at start. I have not investigated how iterparse handle this situation over boundaries: text text text _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 11:20:14 2008 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 13 Oct 2008 09:20:14 +0000 Subject: [issue2751] Regression for executing packages In-Reply-To: <1209861378.3.0.693402002548.issue2751@psf.upfronthosting.co.za> Message-ID: <1223889614.96.0.899217049351.issue2751@psf.upfronthosting.co.za> Nick Coghlan added the comment: (Adding some additional details regarding the reasons why this became an error again in 2.6) The ImportError when attempting to execute a package was lost during the conversion from the C-based implementation in 2.4 to the runpy module based implementation as part of 2.5. Packages really aren't meant to be executable with -m - it gets messy since__init__ is able to modify the way module lookups work within the package, and there are various other package specific details related to relative imports that don't apply when dealing with normal modules. That said, executing "-m pkg.__init__" with Python 2.6 will generally have the same effect as doing "-m pkg" with Python 2.5 (it keeps the import machinery happy since the package gets imported normally first, and so long as pkg.__init__ can cope with being first imported normally for the package initialisation and then run as '__main__' it should also work as a script). Anyone that would like to see the ability to execute packages restored should feel free to create a RFE issue for it, but it would take a fairly detailed analysis of the import system to convince me that doing so doesn't break any of the interpreter internals. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 12:14:39 2008 From: report at bugs.python.org (Pernici Mario) Date: Mon, 13 Oct 2008 10:14:39 +0000 Subject: [issue3451] Asymptotically faster divmod and str(long) In-Reply-To: <1217121065.64.0.642253571203.issue3451@psf.upfronthosting.co.za> Message-ID: <1223892879.46.0.243395379095.issue3451@psf.upfronthosting.co.za> Pernici Mario added the comment: In this patch I added to the patch by Mark in issue 3944 the code in the previous patch, modified to release memory in case of exceptions. Benchmark for division on Athlon 64 3800+ with respect to Python3.0: (1) Python with patch 30bit.patch (2) Python with this patch up to 1000 digits (1) and (2) perform in the same way digits (1) (2) 2000 4x 5x 4000 4x 7x 10000 4x 10x 20000 4x 13x 100000 4x 27x ---------- keywords: +patch Added file: http://bugs.python.org/file11773/longobject2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 12:36:19 2008 From: report at bugs.python.org (=?utf-8?q?Boye_H=C3=B8verstad?=) Date: Mon, 13 Oct 2008 10:36:19 +0000 Subject: [issue4112] Subprocess: Popen'ed children hang due to open pipes In-Reply-To: <1223894179.31.0.303015562598.issue4112@psf.upfronthosting.co.za> Message-ID: <1223894179.31.0.303015562598.issue4112@psf.upfronthosting.co.za> New submission from Boye H?verstad : subprocess.Popen.wait() hangs if you have spawned multiple child processes that do not terminate until their standard input is closed ('cat' is example of such a process). This happens on POSIX platforms. I'm using Python 2.5.1, but I believe the issue is present in the SVN trunk version of subprocess as well. Here is a test program: -------------------------- import subprocess, sys p1 = subprocess.Popen("cat", bufsize=0, stdin=subprocess.PIPE) p2 = subprocess.Popen("cat", bufsize=0, stdin=subprocess.PIPE) p1.stdin.close() ret = p1.wait() print >>sys.stderr, "Child 1 wait completed with ret", ret p2.stdin.close() ret = p2.wait() print >>sys.stderr, "Child 2 wait completed with ret", ret, "Bye bye" -------------------------- The call to p1.wait() will never return. If p2.wait is called first, the program terminates cleanly. p1 never terminates because p1.stdin is duplicated in the (second) child process when the parent process forks as part of the call to p2 = subprocess.Popen(). The line p1.stdin.close() thus has no effect. I am not sure whether this is a bug or deliberate design, but the behavior above seems a bit weird to me, and it took me quite some time to figure out what happened. However, the proposed fix below of course has side effects that may be undesirable. wait() will not hang if the "close on exec" flag is set on the subprocess pipes. Conveniently, the method _set_cloexec_flag already exists to do this, so the fix amounts to calling this from Popen._get_handles: elif stdin == PIPE: p2cread, p2cwrite = os.pipe() self._set_cloexec_flag(p2cwrite) The last line is the added one, similar lines must be added for stdout and stderr. Alternatively, the test program above will terminate cleanly if "p1._set_cloexec_flag(p1.stdin)" is added before the creation of p2. ---------- components: Library (Lib) messages: 74680 nosy: boye severity: normal status: open title: Subprocess: Popen'ed children hang due to open pipes type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 13:34:22 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 13 Oct 2008 11:34:22 +0000 Subject: [issue4018] "for me" installer problem on x64 Vista In-Reply-To: <1222963572.56.0.515590438992.issue4018@psf.upfronthosting.co.za> Message-ID: <1223897662.61.0.23136714321.issue4018@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Thanks for the confirmation. Committed as r66881, r66882, and r66883. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 13:43:31 2008 From: report at bugs.python.org (=?utf-8?q?Jes=C3=BAs_Cea_Avi=C3=B3n?=) Date: Mon, 13 Oct 2008 11:43:31 +0000 Subject: [issue1700288] Armin's method cache optimization updated for Python 2.6 Message-ID: <1223898211.04.0.576640296473.issue1700288@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 13:45:15 2008 From: report at bugs.python.org (Andrew Stribblehill) Date: Mon, 13 Oct 2008 11:45:15 +0000 Subject: [issue4113] functools.partial(), no __name__; wrong __doc__ In-Reply-To: <1223898315.71.0.950281538816.issue4113@psf.upfronthosting.co.za> Message-ID: <1223898315.71.0.950281538816.issue4113@psf.upfronthosting.co.za> New submission from Andrew Stribblehill : When I partially apply a function using functools.partial(), the resultant function doesn't have the same name as the original function (it has no __name__) and its docstring is that of functools.partial() rather than that of the function that was partially applied. Transcript: Python 2.6 (r26:66714, Oct 13 2008, 10:32:02) [GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >> import functools >>> def sum(a,b,c): ... return a+b+c ... >>> functools.partial(sum,1) >>> p = functools.partial(sum, 1) >>> p.__name__ Traceback (most recent call last): File "", line 1, in AttributeError: 'functools.partial' object has no attribute '__name__' >>> p(2,3) 6 >>> sum.__name__ 'sum' >>> sum.__doc__ >>> p.__doc__ 'partial(func, *args, **keywords) - new function with partial application\n\tof the given arguments and keywords.\n' ---------- components: Extension Modules messages: 74682 nosy: stribb severity: normal status: open title: functools.partial(), no __name__; wrong __doc__ type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 13:45:16 2008 From: report at bugs.python.org (=?utf-8?q?Jes=C3=BAs_Cea_Avi=C3=B3n?=) Date: Mon, 13 Oct 2008 11:45:16 +0000 Subject: [issue1685986] Method cache Message-ID: <1223898316.04.0.161024016629.issue1685986@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 13:46:22 2008 From: report at bugs.python.org (=?utf-8?q?Jes=C3=BAs_Cea_Avi=C3=B3n?=) Date: Mon, 13 Oct 2008 11:46:22 +0000 Subject: [issue1878] class attribute cache failure (regression) In-Reply-To: <1200850858.46.0.900672455163.issue1878@psf.upfronthosting.co.za> Message-ID: <1223898382.78.0.648763930765.issue1878@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 13:57:09 2008 From: report at bugs.python.org (=?utf-8?q?Jes=C3=BAs_Cea_Avi=C3=B3n?=) Date: Mon, 13 Oct 2008 11:57:09 +0000 Subject: [issue1381] cmath is numerically unsound In-Reply-To: <1194116338.25.0.15025018351.issue1381@psf.upfronthosting.co.za> Message-ID: <1223899029.64.0.18906940709.issue1381@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 14:12:46 2008 From: report at bugs.python.org (=?utf-8?q?Jes=C3=BAs_Cea_Avi=C3=B3n?=) Date: Mon, 13 Oct 2008 12:12:46 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1223899966.35.0.866436561907.issue2819@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 14:41:32 2008 From: report at bugs.python.org (=?utf-8?q?Jes=C3=BAs_Cea_Avi=C3=B3n?=) Date: Mon, 13 Oct 2008 12:41:32 +0000 Subject: [issue1683368] object.__init__ shouldn't allow args/kwds Message-ID: <1223901692.08.0.438774975138.issue1683368@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 15:06:04 2008 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Mon, 13 Oct 2008 13:06:04 +0000 Subject: [issue214033] re incompatibility in sre Message-ID: <1223903164.31.0.976149775834.issue214033@psf.upfronthosting.co.za> Jeffrey C. Jacobs added the comment: The duplicate zero-or-one repeat operator bug described in this issue originally no longer exists in python 2.6. However, Trent Mick brings up a fair point in that expressions of the form (x*)? generate an error (issue 1456280) when internally the '?' should be passively stripped from the expression by the Python Regular Expression Compiler because it is redundant. The same goes for expressions of the form (x*)* (issue 2537). Also, there is a problem with expressions of the form (x*){n,m} (issue 1633953), since the x* matches as much as it can, and thus it sees the range repeat operation as redundant -- in this case I think the range repeat should have the effect of matching (x*)(x*)(x*)... n to m times, but since the first time matches everything, the subsequent matches all match zero-width expressions following the first one. I am tracking all of these issues under Item 33 of Issue 2636. The are the 3 known redundant repeat issues, but this one, the zero-or- one followed by zero-or-one is AFAICT fixed in python 2.6 as the expression originally listed now passes compile. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 15:09:23 2008 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Mon, 13 Oct 2008 13:09:23 +0000 Subject: [issue1456280] Traceback error when compiling Regex Message-ID: <1223903363.61.0.492056684483.issue1456280@psf.upfronthosting.co.za> Jeffrey C. Jacobs added the comment: This is another version of the redundant repeat issue defined in issues 2537 and 1633953 and although not described by the original report for issue 214033, the comments further down that issue also describe a similar situation. In this case, the problem arises from the '[(](?P[^)]*)?[)]' portion of your regexp code because you have a zero-or-more repeat repeated zero-or-one times, which in the current version of python causes this error. Technically, the outer zero-or-one operator ('?') is redundant and you can eliminate it, but this IMHO should not cause the error listed below and I will look into a solution in issue 2636. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 15:31:13 2008 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Mon, 13 Oct 2008 13:31:13 +0000 Subject: [issue1708652] Exact matching Message-ID: <1223904673.94.0.159989260861.issue1708652@psf.upfronthosting.co.za> Jeffrey C. Jacobs added the comment: Binary format searches should be supported once issue 1282 is implemented, likely as part of issue 2636 Item 32. That said, I'm not clear what you mean by exact search; wouldn't you want match instead? If your main issue is you want something that automatically binds to the beginning and ending of input, then I suppose we could add an 'exact' method where 'search' searches anywhere, 'match' matches from the start of input and 'exact' matches from beginning to ending. I'd call that a separate issue, though. In other words: byte-oriented matches is covered by 1282 and adding an 'exact' method is the only new issue here. Does that sound right? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 15:57:38 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 13 Oct 2008 13:57:38 +0000 Subject: [issue4091] python dll not installed in windows system directory In-Reply-To: <1223576423.68.0.448178359444.issue4091@psf.upfronthosting.co.za> Message-ID: <1223906258.5.0.0653632306747.issue4091@psf.upfronthosting.co.za> Martin v. L?wis added the comment: r61109 became obsolete when I added support for the merge module; here is a patch that fixes this. An installer demonstrating the change is available from http://www.dcl.hpi.uni-potsdam.de/home/loewis/u/python-2.7.14165.msi ---------- keywords: +needs review, patch Added file: http://bugs.python.org/file11774/system32.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 16:13:11 2008 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Mon, 13 Oct 2008 14:13:11 +0000 Subject: [issue694374] Recursive regular expressions Message-ID: <1223907191.79.0.994592409005.issue694374@psf.upfronthosting.co.za> Jeffrey C. Jacobs added the comment: The PCRE has some interesting suggestions on how the grammar for a recursive regular expressions might work. I am concerned about the use of (?P>name) to call a regexp subexpression as an atomic subroutine. The (? P>name) format has never before been supported by Python and the (?P...) notation is exclusive to python, so it is strange the PCRE assigning us a use for (?P>name) without the Python community actually agreeing to it. Other than that, though, I think this is a possible feature we could add in issue 2636 as item 35. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 16:46:42 2008 From: report at bugs.python.org (Tom Lynn) Date: Mon, 13 Oct 2008 14:46:42 +0000 Subject: [issue1708652] Exact matching Message-ID: <1223909202.66.0.54487026508.issue1708652@psf.upfronthosting.co.za> Tom Lynn added the comment: Yes, that's right. The binary aspect of it was something of a red herring, I'm afraid, although I still think that (or parsing in general) is an important use case. The prime motivation it that it's easy to either forget the '\Z' or to use '$' instead, which both cause subtle bugs. An exact() method might help to avoid that. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 17:35:23 2008 From: report at bugs.python.org (Matthew Barnett) Date: Mon, 13 Oct 2008 15:35:23 +0000 Subject: [issue694374] Recursive regular expressions Message-ID: <1223912123.13.0.0573362259559.issue694374@psf.upfronthosting.co.za> Matthew Barnett added the comment: Perl (?number) for calling numbered groups and (?&name) for named groups (Perl also supports (?P>name)). (?R) is equivalent to (?0). It's interesting that the documentation for both Perl and PCRE say that they support (?P>name) because that's what Python uses! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 19:11:43 2008 From: report at bugs.python.org (TD22057) Date: Mon, 13 Oct 2008 17:11:43 +0000 Subject: [issue4114] struct returns incorrect 4 byte float In-Reply-To: <1223917903.14.0.727253011599.issue4114@psf.upfronthosting.co.za> Message-ID: <1223917903.14.0.727253011599.issue4114@psf.upfronthosting.co.za> New submission from TD22057 : FYI Actual version is 2.5.2 running on Linux RHE4. >>> import struct >>> fmt ='>f' >>> v=1.8183e-7 >>> v 1.8183000000000001e-07 >>> s=struct.pack(fmt,v) >>> struct.unpack(fmt,s) (1.818300034983622e-07,) Looks to me like the float->double conversion is not being zeroed out before the 4 bytes are written to it. FYI this is a fairly serious issue since it leads to incorrect results be read from files (at least for me anyway). ---------- components: Extension Modules messages: 74690 nosy: TD22057 severity: normal status: open title: struct returns incorrect 4 byte float type: behavior versions: Python 2.5.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 19:17:46 2008 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 Oct 2008 17:17:46 +0000 Subject: [issue4114] struct returns incorrect 4 byte float In-Reply-To: <1223917903.14.0.727253011599.issue4114@psf.upfronthosting.co.za> Message-ID: <1223918266.95.0.716238169855.issue4114@psf.upfronthosting.co.za> STINNER Victor added the comment: Why do you use float (32 bits) instead of double (64 bits)? Your example use: double (python) -> float (C) -> double (python) If you convert 64 bits float to 32 bits, for sure you will loose some digits. It's not a bug in Python, but a problem in your code ;-) ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 19:44:52 2008 From: report at bugs.python.org (TD22057) Date: Mon, 13 Oct 2008 17:44:52 +0000 Subject: [issue4114] struct returns incorrect 4 byte float In-Reply-To: <1223917903.14.0.727253011599.issue4114@psf.upfronthosting.co.za> Message-ID: <1223919892.92.0.608252128233.issue4114@psf.upfronthosting.co.za> TD22057 added the comment: That's not my code - it's an example ;) My code reads binary data from a hardware system that is encoding 32 bit floats. The numbers I get back from struct.decode have garbage appended on the end of the floating point numbers beyond the 32 bit range. There is no 32 bit float type in python that I can allocate. If you want a 32 bit type as an input, try this: >>> v=123456789 >>> struct.unpack(fmt,struct.pack(fmt,v)) (123456792.0,) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 21:21:12 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 13 Oct 2008 19:21:12 +0000 Subject: [issue3863] 2.6rc1: test_threading hangs on FreeBSD 6.3 i386 In-Reply-To: <1221391510.13.0.209829217282.issue3863@psf.upfronthosting.co.za> Message-ID: <1223925672.91.0.46936077105.issue3863@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Apparently this can be merged in py3k. (in http://www.python.org/dev/buildbot/trunk/x86%20FreeBSD%20trunk/builds/1589/step-test/0 : [...] test_threading [18218 refs] [18576 refs] [17539 refs] [17539 refs] [17539 refs] Skipping test_3_join_in_forked_from_thread due to known OS bugs on freebsd6 [...]) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 21:48:15 2008 From: report at bugs.python.org (=?utf-8?q?Jes=C3=BAs_Cea_Avi=C3=B3n?=) Date: Mon, 13 Oct 2008 19:48:15 +0000 Subject: [issue2898] Add memory footprint query In-Reply-To: <1211021071.55.0.0441674888284.issue2898@psf.upfronthosting.co.za> Message-ID: <1223927295.98.0.699228205995.issue2898@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 22:03:59 2008 From: report at bugs.python.org (=?utf-8?q?Jes=C3=BAs_Cea_Avi=C3=B3n?=) Date: Mon, 13 Oct 2008 20:03:59 +0000 Subject: [issue3487] sre "bytecode" verifier In-Reply-To: <1217613212.91.0.751968430358.issue3487@psf.upfronthosting.co.za> Message-ID: <1223928239.3.0.779452976021.issue3487@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 22:42:44 2008 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 Oct 2008 20:42:44 +0000 Subject: [issue4114] struct returns incorrect 4 byte float In-Reply-To: <1223917903.14.0.727253011599.issue4114@psf.upfronthosting.co.za> Message-ID: <1223930564.44.0.632473641646.issue4114@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't understand your problem/question. It's not a bug of Python, it's a problem of conversion between the types float (32 bits) and double (64 bits). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 22:58:54 2008 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 Oct 2008 20:58:54 +0000 Subject: [issue2819] Full precision summation In-Reply-To: <1210522613.21.0.870124531367.issue2819@psf.upfronthosting.co.za> Message-ID: <1223931534.9.0.00386927600119.issue2819@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 23:13:33 2008 From: report at bugs.python.org (TD22057) Date: Mon, 13 Oct 2008 21:13:33 +0000 Subject: [issue4114] struct returns incorrect 4 byte float In-Reply-To: <1223917903.14.0.727253011599.issue4114@psf.upfronthosting.co.za> Message-ID: <1223932413.67.0.988624435556.issue4114@psf.upfronthosting.co.za> TD22057 added the comment: I'm receiving a 32 bit floating point number encoded in binary format. The correct value for that number is 1.8183e-7 which can be expressed in single precision just fine. Given that the number in the binary encoding is 1.8183e-7, I expected to get that back, not 1.818300034983622e-07 (which is NOT the closest double precision number to the actual single precision number). After doing some experiments, I think the problem is a basic fact of life in C code which is that casting that single precision value to a double precision one does not specify what happens in the extra digits. So I'm getting garbage in the extra digits when the struct module C code casts the single to a double. The problem is that C doesn't assume that the non-precise digits are zero. Since this is a function of the underlying C language, I'll withdraw the bug. (Hmm - I don't seem to have permission to do that) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 23:21:02 2008 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 Oct 2008 21:21:02 +0000 Subject: [issue4114] struct returns incorrect 4 byte float In-Reply-To: <1223917903.14.0.727253011599.issue4114@psf.upfronthosting.co.za> Message-ID: <1223932862.59.0.26580854156.issue4114@psf.upfronthosting.co.za> STINNER Victor added the comment: The problem is not from Python but from your FPU during the conversion from 64 bits float to 32 float (made by struct.pack). Example in C: #include int main() { float f; double d; d = 1.8183; printf("d=%.20f\n", d); f = (float)d; d = (double)f; printf("f=%.20f\n", f); printf("d=%.20f\n", d); return 0; } Result: d=1.81830000000000002736 # ok f=1.81830000877380371094 # 64->32: loose precision d=1.81830000877380371094 # 32->64: no change ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 23:30:41 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 13 Oct 2008 21:30:41 +0000 Subject: [issue2956] 2to3 should have a way to disable some fixers In-Reply-To: <1211624926.75.0.230496362406.issue2956@psf.upfronthosting.co.za> Message-ID: <1223933441.45.0.460987519199.issue2956@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Done in r66885. ---------- nosy: +benjamin.peterson resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 23:46:00 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 13 Oct 2008 21:46:00 +0000 Subject: [issue4114] struct returns incorrect 4 byte float In-Reply-To: <1223917903.14.0.727253011599.issue4114@psf.upfronthosting.co.za> Message-ID: <1223934360.43.0.153143731297.issue4114@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I think the complaint is that presumably, when expanding the float to double in unpacking, the result is not zero-padded. I cannot reproduce the problem, though: py> hexlify(struct.pack(">d",struct.unpack(">f",struct.pack(">f",1.8183e-7))[0])) '3e8867a1a0000000' Seems to me that the zero-padding works just well. TD22057, why do you say that 1.818300034983622e-07 is not the closest number. AFAICT, this is not true: this *is* the closest number. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 23:57:45 2008 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 Oct 2008 21:57:45 +0000 Subject: [issue3727] poplib module broken by str to unicode conversion In-Reply-To: <1220018390.31.0.482710376741.issue3727@psf.upfronthosting.co.za> Message-ID: <1223935065.83.0.873566320886.issue3727@psf.upfronthosting.co.za> STINNER Victor added the comment: Here is a patch proposition: - a socket uses bytes - makefile() creates an unicode file using 'r' mode - default encoding ISO-8859-1 because I guess that most servers use this encoding, but you can change the encoding using "encoding" constructor optioan argument - read unicode and write unicode: convert convert from/to bytes at the last moment (just after/before reading/writing the socket) - cosmetic: use .startswith() instead of for example b[:2] == '..' Test updates: - replace "localhost" by HOST - write a test for a logging (user + password) Missing: no SSL unit test. I tested SSL on my personal POP3 account, but only the login. ---------- keywords: +patch nosy: +haypo Added file: http://bugs.python.org/file11775/poplib_unicode.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 23:59:23 2008 From: report at bugs.python.org (TD22057) Date: Mon, 13 Oct 2008 21:59:23 +0000 Subject: [issue4114] struct returns incorrect 4 byte float In-Reply-To: <1223917903.14.0.727253011599.issue4114@psf.upfronthosting.co.za> Message-ID: <1223935163.36.0.318944961997.issue4114@psf.upfronthosting.co.za> TD22057 added the comment: Martin is correct. I expected (naively) that struct would zero pad the digits beyond the significant digits of a float. As to whether it's exact or not, see my first message: >>> v=1.8183e-7 >>> v 1.8183000000000001e-07 Since 32 bit floats only have ~7 digits of precision, I expected to get the same thing back. Not 7 digits + garbage. Like I said, you can mark this bug as invalid since Python is just reflecting what C is doing. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 13 23:59:45 2008 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 Oct 2008 21:59:45 +0000 Subject: [issue214033] re incompatibility in sre Message-ID: <1223935185.38.0.927903735626.issue214033@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- components: +Regular Expressions -Extension Modules _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 00:01:32 2008 From: report at bugs.python.org (Terry Scott) Date: Mon, 13 Oct 2008 22:01:32 +0000 Subject: [issue4115] split() method In-Reply-To: <1223935291.9.0.99017812612.issue4115@psf.upfronthosting.co.za> Message-ID: <1223935291.9.0.99017812612.issue4115@psf.upfronthosting.co.za> New submission from Terry Scott : x = "Four score and seven" x.split() => ["Four", "score", "and", "seven"] x.split(" ") => ["Four", "score", " ", "and", "seven"] Probably not a big deal but it seems that it should be consistent. One of my students spotted it. ---------- components: Windows messages: 74701 nosy: terry.scott severity: normal status: open title: split() method type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 00:06:46 2008 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 Oct 2008 22:06:46 +0000 Subject: [issue4114] struct returns incorrect 4 byte float In-Reply-To: <1223917903.14.0.727253011599.issue4114@psf.upfronthosting.co.za> Message-ID: <1223935606.0.0.648463321048.issue4114@psf.upfronthosting.co.za> STINNER Victor added the comment: "Since 32 bit floats only have ~7 digits of precision, I expected to get the same thing back. Not 7 digits + garbage." This problem is a well known problem of conversion from base 2 (IEEE float) to base 10 (Python unicode string). Search for any programming FAQ, eg. http://www.python.org/doc/faq/general/#why-are-floating-point-calculations-so-inaccurate "Python is just reflecting what C is doing": the problem is deeper in the silicium. If you want a better precision, use an arbitrary precision float type like decimal.Decimal() or the GMP library (Python: gmpy) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 00:17:04 2008 From: report at bugs.python.org (Tim Gordon) Date: Mon, 13 Oct 2008 22:17:04 +0000 Subject: [issue4115] split() method In-Reply-To: <1223935291.9.0.99017812612.issue4115@psf.upfronthosting.co.za> Message-ID: <48F3C8D1.6060206@aleph17.co.uk> Tim Gordon added the comment: This is the intended behaviour. See http://www.python.org/doc/2.5.2/lib/string-methods.html for details. ---------- nosy: +QuantumTim _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 00:21:05 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 13 Oct 2008 22:21:05 +0000 Subject: [issue4115] split() method In-Reply-To: <1223935291.9.0.99017812612.issue4115@psf.upfronthosting.co.za> Message-ID: <1223936465.84.0.872599542645.issue4115@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 00:22:51 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 13 Oct 2008 22:22:51 +0000 Subject: [issue4114] struct returns incorrect 4 byte float In-Reply-To: <1223935606.0.0.648463321048.issue4114@psf.upfronthosting.co.za> Message-ID: <48F3CA38.9050408@v.loewis.de> Martin v. L?wis added the comment: > "Python is just reflecting what C is doing": the problem is deeper in > the silicium. If you want a better precision, use an arbitrary > precision float type like decimal.Decimal() or the GMP library > (Python: gmpy) The problem is indeed deeper, however, I doubt GMP is an answer here: we are talking about the struct module, which, *by design* gives access to 32-bit (inprecise) floating point numbers - not because people deliberately want to perform computations inaccurately, but because there is often a need to interface with this specific representation (which originally probably was created for its own reasons, such as to save space, or because some hardware didn't support double precision). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 00:27:03 2008 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 Oct 2008 22:27:03 +0000 Subject: [issue4114] struct returns incorrect 4 byte float In-Reply-To: <1223917903.14.0.727253011599.issue4114@psf.upfronthosting.co.za> Message-ID: <1223936823.38.0.583103993855.issue4114@psf.upfronthosting.co.za> STINNER Victor added the comment: @loewis: Yes, the initial problem is about unpack("f", bytes). It's not possible to exact original 32 bits float value because Python forces a conversion to 64 bits float. The behaviour should be documented. Don't hesitate to reopen the bug if you consider that something should be fixed in Python. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 00:28:56 2008 From: report at bugs.python.org (Terry Scott) Date: Mon, 13 Oct 2008 22:28:56 +0000 Subject: [issue4115] split() method In-Reply-To: <48F3C8D1.6060206@aleph17.co.uk> Message-ID: Terry Scott added the comment: Tim, Duh, thanks sorry I didn't check the documentation. Thanks. Terry On Mon, 13 Oct 2008, Tim Gordon wrote: > > Tim Gordon added the comment: > > This is the intended behaviour. See > http://www.python.org/doc/2.5.2/lib/string-methods.html for details. > > ---------- > nosy: +QuantumTim > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 00:29:29 2008 From: report at bugs.python.org (Terry Scott) Date: Mon, 13 Oct 2008 22:29:29 +0000 Subject: [issue4115] split() method In-Reply-To: <1223936465.94.0.276538617168.issue4115@psf.upfronthosting.co.za> Message-ID: Terry Scott added the comment: Benjamin, Thanks. The documentation cleared this up for me. Thanks. Terry On Mon, 13 Oct 2008, Benjamin Peterson wrote: > > Changes by Benjamin Peterson : > > > ---------- > resolution: -> invalid > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 00:36:06 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 13 Oct 2008 22:36:06 +0000 Subject: [issue4114] struct returns incorrect 4 byte float In-Reply-To: <1223936823.38.0.583103993855.issue4114@psf.upfronthosting.co.za> Message-ID: <48F3CD53.6040505@v.loewis.de> Martin v. L?wis added the comment: > Don't hesitate to reopen the bug if you consider that > something should be fixed in Python. I agree that it should be closed; people should read general CS introductory material to learn how floating point numbers work. > @loewis: Yes, the initial problem is about unpack("f", bytes). It's > not possible to exact original 32 bits float value Interestingly enough, it is possible - using the OPs approach. If you want to truncate a 64-bit floating point number to a 32-bit one, pack it as float in the struct module, then unpack it. Python will automatically pad the mantissa bytes with null bytes. > because Python > forces a conversion to 64 bits float. The behaviour should be > documented. I think it's documented somewhere that a Python float is represented with a C double. That should suffice, IMO. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 00:57:07 2008 From: report at bugs.python.org (Gregor Lingl) Date: Mon, 13 Oct 2008 22:57:07 +0000 Subject: [issue4116] name conflict in ScrolledCanvas.__init__() in Lib/turtle.py In-Reply-To: <1223938627.85.0.00676973039125.issue4116@psf.upfronthosting.co.za> Message-ID: <1223938627.85.0.00676973039125.issue4116@psf.upfronthosting.co.za> New submission from Gregor Lingl : In ScrolledCanvas.__init__() there's a name conflict with a methodname of the parentclass Frame: _root. The bugfix consists in renaming this attribute, which occurs only twice. No change in behaviour at all. Regards, Gregor ---------- components: Library (Lib) files: ScrolledCanvas.__init__.diff keywords: patch messages: 74709 nosy: gregorlingl, loewis severity: normal status: open title: name conflict in ScrolledCanvas.__init__() in Lib/turtle.py versions: Python 3.0 Added file: http://bugs.python.org/file11776/ScrolledCanvas.__init__.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 01:01:59 2008 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 Oct 2008 23:01:59 +0000 Subject: [issue3727] poplib module broken by str to unicode conversion In-Reply-To: <1220018390.31.0.482710376741.issue3727@psf.upfronthosting.co.za> Message-ID: <1223938919.84.0.466536527798.issue3727@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11775/poplib_unicode.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 01:02:44 2008 From: report at bugs.python.org (Gregor Lingl) Date: Mon, 13 Oct 2008 23:02:44 +0000 Subject: [issue4117] missing update() in _Screen.setup() of Lib/turtle.py In-Reply-To: <1223938964.4.0.025382695872.issue4117@psf.upfronthosting.co.za> Message-ID: <1223938964.4.0.025382695872.issue4117@psf.upfronthosting.co.za> New submission from Gregor Lingl : In Lib/turtle.py _Screen.setup() needs a final update() call in order to ensure, that immediately following calls of window_width() or window_height() return correct values. Consequently the setup() method call in _Screen.__init__() has to take place only after the call of TurtleScreen.__init__() ---------- components: Library (Lib) files: _Screen.setup.diff keywords: patch messages: 74710 nosy: gregorlingl, loewis severity: normal status: open title: missing update() in _Screen.setup() of Lib/turtle.py type: behavior versions: Python 3.0 Added file: http://bugs.python.org/file11777/_Screen.setup.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 01:07:29 2008 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 Oct 2008 23:07:29 +0000 Subject: [issue3727] poplib module broken by str to unicode conversion In-Reply-To: <1220018390.31.0.482710376741.issue3727@psf.upfronthosting.co.za> Message-ID: <1223939249.17.0.645632082368.issue3727@psf.upfronthosting.co.za> STINNER Victor added the comment: Ooops, my previous patch was wrong (startswith => not startswith). I tested python trunk test for poplib: with minor changes, all tests are ok except tests using SSL. I get a "select.error: (9, 'Bad file descriptor')" from asyncore. So I tried to synchronize python3 ssl with python2 trunk, but it depends on python2 trunk version of the socket module and this module is very complex and hard to port to python3. About EBADF error from select(), it may comes from missing makefile() method of the ssl socket wrapper. Added file: http://bugs.python.org/file11778/poplib_unicode-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 01:17:35 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 13 Oct 2008 23:17:35 +0000 Subject: [issue4118] Built-in compile() and ast module doc issues In-Reply-To: <1223939855.4.0.779100160496.issue4118@psf.upfronthosting.co.za> Message-ID: <1223939855.4.0.779100160496.issue4118@psf.upfronthosting.co.za> New submission from Terry J. Reedy : >From docs.python.org 2.6: Compile the source into a code or AST object. 3.0: Compile the source into a code object. Add 'or AST ' to the latter. Both: Refer to the _ast module documentation Both: for information on how to compile into and from AST objects. This sentence should at least have 'and from AST ' deleted. The information on 'from' is given in the previous sentence. Both: source can either be a string or an AST object. The ast doc adds nothing. "A modified abstract syntax tree can be compiled into a Python code object using the built-in compile() function." The remainder of the sentence could be replaced by the shorter "To compile into an AST object, import ast and pass ast.PyCF_ONLY_AST as a flag." This could be followed by "See ast module documentation for more." ---- In the ast doc, both say: "An abstract syntax tree can be generated by passing _ast.PyCF_ONLY_AST ..." That should be ast, not _ast; the existence of the shadow C version is a CPython implementation detail. In the parse() doc lines, 'PyCF_ONLY_AST' should, I think, have the 'ast' prefix as the former will not work unless one does 'from ast import PyCF_ONLY_AST' (or '... import *'). ---- Back to compile(): 2.6 (and before): When compiling a string with multi-line statements... 3.0 The first, about '\n' versus '\r\n' still applies. print (compile("def f():\r\n pass #haha",'','exec')) #fails print (compile("def f():\n pass #haha",'','exec')) # succeeds The second, at least for 2.5.2 and 3.0c1 (and I presume for 2.6), only applies, it seems, based on testing, if the last line consists only of a comment. In the second example above, putting '#haha' on a separate line fails. See: 'compile' built-in function failures when missing EOL http://bugs.python.org/issue1479099 I am not sure what to suggest, but a warning that is nearly always a false alarm confuses and lulls. ---------- assignee: georg.brandl components: Documentation messages: 74712 nosy: georg.brandl, tjreedy severity: normal status: open title: Built-in compile() and ast module doc issues versions: Python 2.6, Python 2.7, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 01:19:18 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 13 Oct 2008 23:19:18 +0000 Subject: [issue1479099] 'compile' built-in function failures when missing EOL Message-ID: <1223939958.92.0.307454133667.issue1479099@psf.upfronthosting.co.za> Terry J. Reedy added the comment: As near as I can tell, for 2.5.2 and 3.0c1, the limitation on compile only applies when the last line only contains a comment. >>> print (compile("def f():\n pass #haha",'','exec')) at 00AADAD0, file "", line 1> >>> print (compile("def f():\n pass\n#haha",'','exec')) # or >>> print (compile("def f():\n pass\n #haha",'','exec')) Traceback (most recent call last): File "", line 1, in File "", line 3 #haha I would prefer more consistent behavior. I have opened a separate doc issue that includes the documentation of this issue. http://bugs.python.org/issue4118 ---------- nosy: +tjreedy versions: +Python 2.6, Python 2.7, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 01:44:54 2008 From: report at bugs.python.org (STINNER Victor) Date: Mon, 13 Oct 2008 23:44:54 +0000 Subject: [issue4119] ssl wrapper: add makefile() method In-Reply-To: <1223941494.63.0.576303360385.issue4119@psf.upfronthosting.co.za> Message-ID: <1223941494.63.0.576303360385.issue4119@psf.upfronthosting.co.za> New submission from STINNER Victor : ssl module of Python 2.6 has a makefile() method whereas Python3 has not. Attached patch fix this issue. There a just a difference between Python2 and Python3 makefile() method: Python3 has not bufsize optional argument because SocketIO() is unbuffered. ---------- components: Library (Lib) files: ssl_makefile.py messages: 74714 nosy: haypo severity: normal status: open title: ssl wrapper: add makefile() method versions: Python 3.0 Added file: http://bugs.python.org/file11779/ssl_makefile.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 02:02:25 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 00:02:25 +0000 Subject: [issue3727] poplib module broken by str to unicode conversion In-Reply-To: <1220018390.31.0.482710376741.issue3727@psf.upfronthosting.co.za> Message-ID: <1223942545.66.0.946476414124.issue3727@psf.upfronthosting.co.za> STINNER Victor added the comment: New version: - fix SSL: self.file contains the SSL socket and not the raw socket! - upgrade test_poplib.py from Python trunk poplib should be refactored to reuse the new IO library. But I don't know how to build a TextIO wrapper for a socket. Using TextIO, it would be possible to remove newline (CR/LF) and unicode encoding/decoding code. Added file: http://bugs.python.org/file11780/poplib_unicode-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 02:17:07 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 14 Oct 2008 00:17:07 +0000 Subject: [issue4119] ssl wrapper: add makefile() method In-Reply-To: <1223941494.63.0.576303360385.issue4119@psf.upfronthosting.co.za> Message-ID: <1223943427.56.0.0669549565582.issue4119@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> janssen nosy: +janssen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 02:20:27 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 14 Oct 2008 00:20:27 +0000 Subject: [issue3727] poplib module broken by str to unicode conversion In-Reply-To: <1220018390.31.0.482710376741.issue3727@psf.upfronthosting.co.za> Message-ID: <1223943627.45.0.493598967486.issue3727@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I haven't tried the patch but I think that "encoding" should be a class attribute as it is in ftplib and similar py3k network related modules. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 02:30:00 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 00:30:00 +0000 Subject: [issue3727] poplib module broken by str to unicode conversion In-Reply-To: <1220018390.31.0.482710376741.issue3727@psf.upfronthosting.co.za> Message-ID: <1223944200.06.0.120349489362.issue3727@psf.upfronthosting.co.za> STINNER Victor added the comment: New version: - remove duplicate methods of POP3_SSL() - use makefile('r', encoding=self.encoding) to get a nice text wrapper with universal newline - remove newline conversion (done by TextIOWrapper) Finally my patch removes more code in poplib.py than it adds :-D I like such patch. Python3 new I/O library rocks! Added file: http://bugs.python.org/file11781/poplib_unicode-4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 02:30:09 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 00:30:09 +0000 Subject: [issue3727] poplib module broken by str to unicode conversion In-Reply-To: <1220018390.31.0.482710376741.issue3727@psf.upfronthosting.co.za> Message-ID: <1223944209.89.0.407170102484.issue3727@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11778/poplib_unicode-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 02:30:12 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 00:30:12 +0000 Subject: [issue3727] poplib module broken by str to unicode conversion In-Reply-To: <1220018390.31.0.482710376741.issue3727@psf.upfronthosting.co.za> Message-ID: <1223944212.99.0.430558607868.issue3727@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11780/poplib_unicode-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 02:54:19 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 00:54:19 +0000 Subject: [issue3727] poplib module broken by str to unicode conversion In-Reply-To: <1220018390.31.0.482710376741.issue3727@psf.upfronthosting.co.za> Message-ID: <1223945659.84.0.353180875848.issue3727@psf.upfronthosting.co.za> STINNER Victor added the comment: @giampaolo.rodola: Right, I also prefer encoding as a class attribute. So I wrote a new patch: - encoding is now a class attribute - continue SSL code factorization: SSL code is now around 10 lines instead of 70 lines! Added file: http://bugs.python.org/file11782/poplib_unicode-5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 02:54:24 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 00:54:24 +0000 Subject: [issue3727] poplib module broken by str to unicode conversion In-Reply-To: <1220018390.31.0.482710376741.issue3727@psf.upfronthosting.co.za> Message-ID: <1223945664.31.0.5047433028.issue3727@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11781/poplib_unicode-4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 02:55:31 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 00:55:31 +0000 Subject: [issue4119] ssl wrapper: add makefile() method In-Reply-To: <1223941494.63.0.576303360385.issue4119@psf.upfronthosting.co.za> Message-ID: <1223945731.36.0.445882001169.issue4119@psf.upfronthosting.co.za> STINNER Victor added the comment: Ooops, ssl already has a makefile() method from socket object! I was confused because of the Python 2.6 version of socket module... ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 06:52:08 2008 From: report at bugs.python.org (Gregor Lingl) Date: Tue, 14 Oct 2008 04:52:08 +0000 Subject: [issue4116] name conflict in ScrolledCanvas.__init__() in Lib/turtle.py In-Reply-To: <1223938627.85.0.00676973039125.issue4116@psf.upfronthosting.co.za> Message-ID: <1223959928.12.0.392287907406.issue4116@psf.upfronthosting.co.za> Gregor Lingl added the comment: This patch applies to Python 2.6 as well Gregor ---------- versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 06:52:45 2008 From: report at bugs.python.org (Gregor Lingl) Date: Tue, 14 Oct 2008 04:52:45 +0000 Subject: [issue4117] missing update() in _Screen.setup() of Lib/turtle.py In-Reply-To: <1223938964.4.0.025382695872.issue4117@psf.upfronthosting.co.za> Message-ID: <1223959965.46.0.0945350004956.issue4117@psf.upfronthosting.co.za> Gregor Lingl added the comment: This patch applies to Python 2.6 as well Gregor ---------- versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 09:09:30 2008 From: report at bugs.python.org (Joachim Strombergson) Date: Tue, 14 Oct 2008 07:09:30 +0000 Subject: [issue4017] IDLE 2.6 broken on OSX (Leopard) In-Reply-To: <1222960590.08.0.635891151551.issue4017@psf.upfronthosting.co.za> Message-ID: <1223968170.41.0.807786210702.issue4017@psf.upfronthosting.co.za> Joachim Strombergson added the comment: Aloha! I followed the suggestions in msg74544 by Leo M and can confirm that IDLE starts as OK. *BUT* when I try to import Tkinter I get: >>> import Tkinter Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk/Tkinter.py", line 39, in import _tkinter # If this fails your Python may not be configured for Tk ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_tkinter.so, 2): Library not loaded: /Library/Frameworks/Tcl.framework/Versions/8.5/Tcl Referenced from: /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_tkinter.so It seems the fix is not 100% ---------- nosy: +Watchman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 10:01:52 2008 From: report at bugs.python.org (Andre Heider) Date: Tue, 14 Oct 2008 08:01:52 +0000 Subject: [issue4120] Do not embed manifest files in *.pyd when compiling with MSVC In-Reply-To: <1223971312.31.0.131537865896.issue4120@psf.upfronthosting.co.za> Message-ID: <1223971312.31.0.131537865896.issue4120@psf.upfronthosting.co.za> New submission from Andre Heider : The MSVC build process currently embeds the .manifest file, which is generated by the MS linker, in the following files: - python.exe - pythonXY.dll - *.pyd The latter is problematic on machines without the MS CRT redistributable installed (No CRT files in %WINDIR%\WinSxS). While this error won't occur when the python package is installed, it will in other cases like in ours: We use the python interpreter within our application and do ship python25.dll. We also ship the MS CRT files and place them next to the main application (MS calls this "private assemblies" and "xcopy deployment). We do not install the redistributable, because it needs admin rights. If a user tries to "import socket" on this setup it will fail, because the Side by Side / Fusion loader expects the CRT next to the calling Binary (%PYTHONHOME%\DLLs\_socket.pyd) because of the manifest. The solution is to not embed the manifest in the *.pyd Modules. This way the modules just link against msvc*.dll. This works because the windows loader has already mapped the CRT into memory for the process (either through python.exe or pythonXY.dll). This is also the only reliable way i could find to fix the import on machines without redist. Attached you'll find a patch for the MSVC90 build, apply with -p5. It will only patch the release file, PCbuild8/pyd_d.vsprops requires the same fix. Trolltech also uses this approach for its plugins: https://trolltech.com/developer/faqs/faq.2007-10-19.6185511205 ---------- components: Build files: Python-2.5.2-no.manifest.in.pyd.diff keywords: patch messages: 74723 nosy: aheider severity: normal status: open title: Do not embed manifest files in *.pyd when compiling with MSVC versions: Python 2.5 Added file: http://bugs.python.org/file11783/Python-2.5.2-no.manifest.in.pyd.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 10:14:53 2008 From: report at bugs.python.org (Andre Heider) Date: Tue, 14 Oct 2008 08:14:53 +0000 Subject: [issue2563] embed manifest in windows extensions In-Reply-To: <1207489949.8.0.458848189984.issue2563@psf.upfronthosting.co.za> Message-ID: <1223972093.24.0.897999107948.issue2563@psf.upfronthosting.co.za> Andre Heider added the comment: Note that this patch will break the loading of compiled modules on machines without the MS CRT redistributable installed. See Issue 4120 ---------- nosy: +aheider _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 12:38:46 2008 From: report at bugs.python.org (Fredrik Johansson) Date: Tue, 14 Oct 2008 10:38:46 +0000 Subject: [issue3439] math.frexp and obtaining the bit size of a large integer In-Reply-To: <1216920044.56.0.218954878238.issue3439@psf.upfronthosting.co.za> Message-ID: <1223980726.37.0.561874485137.issue3439@psf.upfronthosting.co.za> Fredrik Johansson added the comment: Some elaboration (that perhaps could be adapted into the documentation or at least source comments). There are two primary uses for numbits, both of which justify (0).numbits() == 0. The first is that for positive k, n = k.numbits() gives the minimum width of a register that can hold k, where a register can hold the 2**n integers 0, 1, ..., 2**n-1 (inclusive). This definition continues to make sense for k = 0, n = 0 (the empty register holds the 2**0 = 1 values 0). In Python terms, one could say that self.numbits() "returns the smallest n such that abs(self) is in range(2**n)". Perhaps this would make a clearer docstring? Second, k.numbits() (plus/minus 1, or perhaps multiplied by a constant factor) measures the number of steps required to solve a problem of size k using various divide-and-conquer algorithms. The problem of size k = 0 is trivial and therefore requires (0).numbits() == 0 steps. In particular, if L is a sorted list, then len(L).numbits() exactly gives the maximum number of comparisons required to find an insertion point in L using binary search. Finally, the convention (-k).numbits() == k.numbits() is useful in contexts where the number k itself is the input to a mathematical function. For example, in a function for multiplying two integers, one might want to choose a different algorithm depending on the sizes of the inputs, and this choice is likely to be independent of signs (if not, one probably needs to check signs anyway.) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 12:42:00 2008 From: report at bugs.python.org (Ulrich Eckhardt) Date: Tue, 14 Oct 2008 10:42:00 +0000 Subject: [issue4075] Use WCHAR variant of OutputDebugString In-Reply-To: <1223471607.48.0.166278298943.issue4075@psf.upfronthosting.co.za> Message-ID: <1223980920.43.0.142460541163.issue4075@psf.upfronthosting.co.za> Ulrich Eckhardt added the comment: "If this patch required for CE 5.0?" The patch I created is required for all CEs that I know of. I have personally worked with 4.20, 5 and now 6, and had some exchange with others who worked on 3.x variants to get STLport (C++ stdlibrary implementation) to run. AFAIK, none of them support the *A functions, so this patch or something similar is required for every CE flavor out there. Roumen, you mentioned the way that the PythonCE project did it, which also works, but I'd say that that code is obsolete, because the emulated functions actually create a win9x-like environment, while Python has officially dropped support for that. The problem is that the *W functions are badly supported on win9x while the *A functions are unsupported on CE. The NT variants (NT, win2000..) support both APIs, but the *A functions are wrappers around the *W functions and don't provide the whole functionality that the OS actually supports. So, what this path does is to help phase out the *A functions, gaining more thorough Unicode support while at the same time easing porting to CE. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 13:02:02 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 11:02:02 +0000 Subject: [issue4121] open(): use keyword only for arguments other than file and mode In-Reply-To: <1223982122.27.0.317312591734.issue4121@psf.upfronthosting.co.za> Message-ID: <1223982122.27.0.317312591734.issue4121@psf.upfronthosting.co.za> New submission from STINNER Victor : In the C library, fopen() have two arguments: filename and the mode, and open() has three arguments: filename, mode and flags. In Python, open() has 7 arguments: - file - mode - buffering - encoding - errors - newline - closefd Most programs only use the two first arguments, but buffering is sometimes set. Eg. open(filename, "r") or open(filename, "wb", 0). I think that only the file and mode arguments are easy to understand, the others have to be specified using their name. Eg. open(filename, "wb", buffering=0) or open(filename, "r", encoding="GBK"). I wrote a patch to use keyword only arguments, and another to fix some libraries and the unit tests. explicit_open.patch needs review. I don't know the best way to create a dictionary. Py_BuildValue() may be used to write a smaller patch. -- open(file, mode, *, buffering, ...) may be replaced by open(file, mode, buffering, *, ...) to keep compatibility with Python2, but I read somewhere that Python3 breaks the compatibility and a 2to3 fixer can be used to fix open(). ---------- components: Library (Lib) files: explicit_open.patch keywords: needs review, patch, patch messages: 74727 nosy: haypo severity: normal status: open title: open(): use keyword only for arguments other than file and mode versions: Python 3.0 Added file: http://bugs.python.org/file11784/explicit_open.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 13:02:27 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 11:02:27 +0000 Subject: [issue4121] open(): use keyword only for arguments other than file and mode In-Reply-To: <1223982122.27.0.317312591734.issue4121@psf.upfronthosting.co.za> Message-ID: <1223982147.55.0.999294114011.issue4121@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file11785/explicit_open-fixtests.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 13:04:02 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 11:04:02 +0000 Subject: [issue3439] math.frexp and obtaining the bit size of a large integer In-Reply-To: <1216920044.56.0.218954878238.issue3439@psf.upfronthosting.co.za> Message-ID: <1223982242.98.0.550204625972.issue3439@psf.upfronthosting.co.za> STINNER Victor added the comment: See also issue #3724 which proposes to support long integers for math.log2(). ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 13:07:52 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 11:07:52 +0000 Subject: [issue3439] create a numbits() method for int and long types In-Reply-To: <1216920044.56.0.218954878238.issue3439@psf.upfronthosting.co.za> Message-ID: <1223982472.89.0.383335370822.issue3439@psf.upfronthosting.co.za> STINNER Victor added the comment: I changed the title since I agree that numbits() with long integer is not related to floats. ---------- title: math.frexp and obtaining the bit size of a large integer -> create a numbits() method for int and long types _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 13:18:46 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 14 Oct 2008 11:18:46 +0000 Subject: [issue4120] Do not embed manifest files in *.pyd when compiling with MSVC In-Reply-To: <1223971312.31.0.131537865896.issue4120@psf.upfronthosting.co.za> Message-ID: <1223983126.42.0.402068714494.issue4120@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I'm skeptical about this patch. It seems like it could produce an incompatibility with existing installations or deployment procedures. In any case, the VS 2008 project files are not officially supported. If VS 2005 is any similar with VS 2008 wrt. to manifests, I think you can solve your problem by providing a CRT manifest in the directory that has _socket.pyd. I'd be rather interested in seeing the consequences of this approach for Python 2.6. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 13:27:47 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 11:27:47 +0000 Subject: [issue1210] imaplib does not run under Python 3 In-Reply-To: <1190872174.76.0.553436258502.issue1210@psf.upfronthosting.co.za> Message-ID: <1223983667.47.0.195770788025.issue1210@psf.upfronthosting.co.za> STINNER Victor added the comment: Here is a patch for imaplib: - add encoding attribute to IMAP4 class (as ftplib and see also issue 3727 for my poplib patch) - use makefile('r', encoding=self.encoding) instead of a binary file (mode='rb') - remove duplicate code in IMAP4_SSL I choosed ISO-8859-1 as the default charset. I tested the library on my local IMAP4 server using IMAP4 and IMAP4_SSL classes. But the library needs more unit tests as done for poplib. ---------- keywords: +patch nosy: +haypo Added file: http://bugs.python.org/file11786/imaplib_unicode.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 13:45:20 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 14 Oct 2008 11:45:20 +0000 Subject: [issue4121] open(): use keyword only for arguments other than file and mode In-Reply-To: <1223982122.27.0.317312591734.issue4121@psf.upfronthosting.co.za> Message-ID: <1223984720.45.0.932630021557.issue4121@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: It's true that the order of arguments is difficult to remember correctly. However I think this deserves Guido's approval. About the implementation: To build the kw dict, did you consider using Py_BuildValue? Something like: kw = Py_BuildValue("{si ss ss}", "buffering", buffering, "encoding", encoding, "errors", errors, ...); is simpler to write, if you consider error handling. ---------- nosy: +amaury.forgeotdarc, gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 13:50:14 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 11:50:14 +0000 Subject: [issue3714] nntplib module broken by str to unicode conversion In-Reply-To: <1219932621.55.0.439111476187.issue3714@psf.upfronthosting.co.za> Message-ID: <1223985014.94.0.381034758401.issue3714@psf.upfronthosting.co.za> STINNER Victor added the comment: Instead of ASCII, I think that it would be better to use ISO-8859-1 since it's the most common charset. New patch: - use ISO-8859-1 as the default charset - remove set_encoding() method: was it really needed - use makefile('r', encoding=self.encoding') to get a new TextIOWrapper with universal newline and automatic unicode decode => getline() is simplified and I removed CRLF ---------- nosy: +haypo Added file: http://bugs.python.org/file11787/nntplib_unicode.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 13:59:06 2008 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 14 Oct 2008 11:59:06 +0000 Subject: [issue3724] math.log(x, 10) gives different result than math.log10(x) In-Reply-To: <1220013140.94.0.0541204512227.issue3724@psf.upfronthosting.co.za> Message-ID: <1223985546.73.0.28363116671.issue3724@psf.upfronthosting.co.za> Mark Dickinson added the comment: Note that log2(int) -> float wouldn't entirely replace numbits, due to loss of precision in the result. e.g. log2(2**100), log2(2**100+1) and log2(2**100-1) would likely all return exactly the same result (100.0), where numbits wants results of 101, 101 and 100 respectively. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 14:08:36 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 12:08:36 +0000 Subject: [issue3725] telnetlib module broken by str to unicode conversion In-Reply-To: <1220013826.6.0.647840298479.issue3725@psf.upfronthosting.co.za> Message-ID: <1223986116.59.0.567151355655.issue3725@psf.upfronthosting.co.za> STINNER Victor added the comment: I think that telnet should only use bytes (and not characters). For an HTTP connection, the charset is only known after parsing the HTTP headers. So telnet should use bytes, and your HTTP browser will convert bytes to characters using the charset from the HTTP headers. My patch only uses bytes for internal buffering and special codes (IAC, DONT, ENCRYPT, etc.). Example to test the library (Starwars, telnet, ISO-8859-1): from telnetlib import Telnet from sys import stdout ipv4 = "towel.blinkenlights.nl" ipv6 = "2001:980:ffe:1::42" t = Telnet(ipv6, 23) while True: command = t.read_some() command = str(command, "ISO-8859-1") stdout.write(command) Example to test the library (Google, HTTP, ASCII): from telnetlib import Telnet t = Telnet("www.google.com", 80) t.write(b'GET / HTTP/1.0\r\n\r\n') answer = t.read_all() answer = str(answer, "ASCII") print(answer) ---------- keywords: +patch nosy: +haypo Added file: http://bugs.python.org/file11788/telnet_bytes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 14:11:23 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 12:11:23 +0000 Subject: [issue4121] open(): use keyword only for arguments other than file and mode In-Reply-To: <1223982122.27.0.317312591734.issue4121@psf.upfronthosting.co.za> Message-ID: <1223986283.03.0.52244501431.issue4121@psf.upfronthosting.co.za> STINNER Victor added the comment: socket.makefile() already uses keyword only argument, but buffering is not a keyword only argument: def makefile(self, mode="r", buffering=None, *, encoding=None, newline=None): _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 14:11:59 2008 From: report at bugs.python.org (Dmitry Vasiliev) Date: Tue, 14 Oct 2008 12:11:59 +0000 Subject: [issue3714] nntplib module broken by str to unicode conversion In-Reply-To: <1219932621.55.0.439111476187.issue3714@psf.upfronthosting.co.za> Message-ID: <1223986319.37.0.847429358656.issue3714@psf.upfronthosting.co.za> Dmitry Vasiliev added the comment: Oh, you need to read the comments first: - Use of ISO-8859-1 it's a bad idea here. See msg72776 for details. Moreover RFC-3977 explicitly say about UTF-8, so I think we need to use UTF-8. - Maybe set_encoding() isn't needed but you need to have a possibility to change encoding after object creation. Because different groups can use different encodings. But with makefile() addition you just remove this possibility. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 14:12:43 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 12:12:43 +0000 Subject: [issue3724] math.log(x, 10) gives different result than math.log10(x) In-Reply-To: <1220013140.94.0.0541204512227.issue3724@psf.upfronthosting.co.za> Message-ID: <1223986363.23.0.716626934057.issue3724@psf.upfronthosting.co.za> STINNER Victor added the comment: About the number of bits: I prefer an the implementation in int/long types proposed in issue #3439. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 14:20:42 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 12:20:42 +0000 Subject: [issue3714] nntplib module broken by str to unicode conversion In-Reply-To: <1219932621.55.0.439111476187.issue3714@psf.upfronthosting.co.za> Message-ID: <1223986842.26.0.408266732111.issue3714@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok for UTF-8 which is a superset of ASCII and raise an error when trying to decode Latin1 or KOI-8. > You need to have a possibility to change encoding after object creation If you share a connection for the different groups, you will have to take care of the side effets of set_encoding(). But if you consider that set_encoding() is a must-have, ok, forget my patch (because using makefile(), it's not possible to change the charset) ;-) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 14:27:12 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 14 Oct 2008 12:27:12 +0000 Subject: [issue4121] open(): use keyword only for arguments other than file and mode In-Reply-To: <1223982122.27.0.317312591734.issue4121@psf.upfronthosting.co.za> Message-ID: <1223987232.58.0.187399851795.issue4121@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Do you suggest that 'buffering' should be allowed as positional argument? This would help with migration from 2.x, where open() accepts 3 positional arguments: open(...) open(name[, mode[, buffering]]) -> file object And no need to 'fix' the tests. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 14:41:43 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 12:41:43 +0000 Subject: [issue4121] open(): use keyword only for arguments other than file and mode In-Reply-To: <1223982122.27.0.317312591734.issue4121@psf.upfronthosting.co.za> Message-ID: <1223988103.64.0.367507004845.issue4121@psf.upfronthosting.co.za> STINNER Victor added the comment: > Do you suggest that 'buffering' should be allowed > as positional argument? No, I would prefer to keep also two positional arguments: file and mode. I hate open(filename, 'r', s): I don't know what is s, the buffering or the encoding? And I think that beginner would also be distribed by this third argument. Sometimes, it's easy to understand the 3 arguments of a function, like re.match("[a-z]", t, re.IGNORECASE). But for open(), I would prefer explicit arguments. And so socket.makefile() should also be "fixed" to keep only 2 positional arguments. It's my opinion and if you really want to keep compatibility with Python2, keep the 3 positional arguments. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 15:35:43 2008 From: report at bugs.python.org (Andre Heider) Date: Tue, 14 Oct 2008 13:35:43 +0000 Subject: [issue4120] Do not embed manifest files in *.pyd when compiling with MSVC In-Reply-To: <1223971312.31.0.131537865896.issue4120@psf.upfronthosting.co.za> Message-ID: <1223991343.31.0.436739633335.issue4120@psf.upfronthosting.co.za> Andre Heider added the comment: Yes, i know that v2.5 doesn't officially support MSVC9. But the same problem applies to MSVC8 and its CRT. But in contrast to MSVC9, the CRT8 redist is installed on almost every machine, because alot of software installs it. But thats basically just luck ;) Placing just a .manifest next to *.pyd won't work either. If you're going this route, you have to put the 3 CRT DLLs there too (and thats actually the approach mentioned here: http://msdn.microsoft.com/en-us/library/ms235291.aspx) Then you've got 2 cases: 1) The user does have the redist installed or 2) He does not for 1) The WinSXS installation has a higher priority and the local files are ignored for 2) The files next to the binaries are used (eg c:\python and c:\python\DLLs) Sounds fine, but the latter raises another issue: Now you have 2 copies of the DLLs. Based on these 2 unique file names, windows decides to load 2 copies into memory, one for python.exe|dll and one for *.pyd. As you might see, this gets very nasty because you have 2 different heaps now. Allocating memory from the one instance and freeing it in the other makes the whole process crash. This issue doesn't stop here, here's another situation: Python is compiled with MSVC9. A user has it and MSVC9 SP1 installed, which has a newer CRT version. If he builds site-packages, these files have an embedded manifest with another CRT version than the python interpreter itself. Importing these packages loads a second copy of a CRT into the processes memory, just like described above. I don't know if or for what version this should be addressed for python. I'm just saying that this was a huge issue the last days at the company i work for. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 15:39:08 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Tue, 14 Oct 2008 13:39:08 +0000 Subject: [issue4122] undefined reference to _Py_ascii_whitespace In-Reply-To: <1223991548.86.0.809237615427.issue4122@psf.upfronthosting.co.za> Message-ID: <1223991548.86.0.809237615427.issue4122@psf.upfronthosting.co.za> New submission from Ralf Schmitt : unicodeobject.h contains the following code: extern const unsigned char _Py_ascii_whitespace[]; #define Py_UNICODE_ISSPACE(ch) \ ((ch) < 128U ? _Py_ascii_whitespace[(ch)] : _PyUnicode_IsWhitespace(ch)) When linking a module which uses the Py_UNICODE_ISSPACE macro, I get an error "undefined reference to _Py_ascii_whitespace" (on windows using the mingw compiler, linux works without problems). The symbol should most probably be exported with the PyAPI_DATA macro... This happens with python 2.6. ---------- components: Windows messages: 74743 nosy: schmir severity: normal status: open title: undefined reference to _Py_ascii_whitespace type: compile error versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 16:26:15 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 14:26:15 +0000 Subject: [issue4122] undefined reference to _Py_ascii_whitespace In-Reply-To: <1223991548.86.0.809237615427.issue4122@psf.upfronthosting.co.za> Message-ID: <1223994375.94.0.684138904766.issue4122@psf.upfronthosting.co.za> STINNER Victor added the comment: You can try this patch for Python. ---------- keywords: +patch nosy: +haypo Added file: http://bugs.python.org/file11789/export_Py_ascii_whitespace.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 16:49:07 2008 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 14 Oct 2008 14:49:07 +0000 Subject: [issue3863] 2.6rc1: test_threading hangs on FreeBSD 6.3 i386 In-Reply-To: <1221391510.13.0.209829217282.issue3863@psf.upfronthosting.co.za> Message-ID: <1223995747.11.0.837639395695.issue3863@psf.upfronthosting.co.za> Gregory P. Smith added the comment: looks like it already has been merged in py3k. ---------- versions: +Python 2.5.3 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 16:49:24 2008 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 14 Oct 2008 14:49:24 +0000 Subject: [issue4121] open(): use keyword only for arguments other than file and mode In-Reply-To: <1223982122.27.0.317312591734.issue4121@psf.upfronthosting.co.za> Message-ID: <1223995764.44.0.687439620664.issue4121@psf.upfronthosting.co.za> Guido van Rossum added the comment: This is certainly out of scope for 3.0. Remember, for 3.0 we're trying to get a release out of the door, not cram in new features, no matter how small. Beyond 3.0, I'm still rather reluctant -- I expect most users will be wise and use keyword args anyway; I'm not sure what we buy by forcing this. I'd be okay with documenting the recommendation to always use keyword args for any argument added in 3.0 or later (which would leave buffering a positional argument -- I don't even know its name since it has been a positional argument since the 1.0 days). ---------- priority: -> low versions: +Python 3.1 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 16:50:25 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 14 Oct 2008 14:50:25 +0000 Subject: [issue4120] Do not embed manifest files in *.pyd when compiling with MSVC In-Reply-To: <1223971312.31.0.131537865896.issue4120@psf.upfronthosting.co.za> Message-ID: <1223995825.38.0.731049339222.issue4120@psf.upfronthosting.co.za> Martin v. L?wis added the comment: > Yes, i know that v2.5 doesn't officially support MSVC9. But the same > problem applies to MSVC8 and its CRT. The point is that even the MSVC8 project files are not supported. They have been included, but they are not actually used for anything. > Yes, i know that v2.5 doesn't officially support MSVC9. But the same > problem applies to MSVC8 and its CRT. Not necessarily. Take a look at how I deploy Python 2.6. I use a single copy of the DLL, but two copies of the manifest (both referring to the same DLL image). AFAICT, this works fine on XP (but fails on Vista SP1, which complains that the manifest is ill-formed). I'm closing this for 2.5 as rejected; it might cause more problems than it solves, and 2.5.3 will be the last release (i.e. with no release to fix it if it breaks something badly). If you can come up with a working patch for 2.6: that would be more interesting. Would the many manifest files that get generated need to be shipped as well? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 16:50:37 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 14 Oct 2008 14:50:37 +0000 Subject: [issue4120] Do not embed manifest files in *.pyd when compiling with MSVC In-Reply-To: <1223971312.31.0.131537865896.issue4120@psf.upfronthosting.co.za> Message-ID: <1223995837.97.0.171903391998.issue4120@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 17:00:02 2008 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 14 Oct 2008 15:00:02 +0000 Subject: [issue3439] create a numbits() method for int and long types In-Reply-To: <1216920044.56.0.218954878238.issue3439@psf.upfronthosting.co.za> Message-ID: <1223996402.22.0.301292062912.issue3439@psf.upfronthosting.co.za> Changes by Mark Dickinson : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 17:04:12 2008 From: report at bugs.python.org (Ralf Schmitt) Date: Tue, 14 Oct 2008 15:04:12 +0000 Subject: [issue4122] undefined reference to _Py_ascii_whitespace In-Reply-To: <1223991548.86.0.809237615427.issue4122@psf.upfronthosting.co.za> Message-ID: <1223996652.19.0.474409116839.issue4122@psf.upfronthosting.co.za> Ralf Schmitt added the comment: I hope someone else can test this, as I don't feel like setting up a windows build environment... _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 17:07:23 2008 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 14 Oct 2008 15:07:23 +0000 Subject: [issue3439] create a numbits() method for int and long types In-Reply-To: <1216920044.56.0.218954878238.issue3439@psf.upfronthosting.co.za> Message-ID: <1223996843.21.0.206863276162.issue3439@psf.upfronthosting.co.za> Mark Dickinson added the comment: Accidentally removed the following message from Victor Stinner; apologies. (Time to turn off tap-to-click on my trackpad, methinks.) > See also issue #3724 which proposes to support long integers for > math.log2(). One other note: in Fredrik's patch there's commented out code for a numbits *property* (rather than a method). Is there any good reason to make this a property? I don't have a good feeling for when something should be a method and when it should be a property, but in this case I'd be inclined to leave numbits as a method. Are there general guidelines for making things properties? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 17:13:41 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 15:13:41 +0000 Subject: [issue3439] create a numbits() method for int and long types In-Reply-To: <1216920044.56.0.218954878238.issue3439@psf.upfronthosting.co.za> Message-ID: <1223997221.34.0.0501711511738.issue3439@psf.upfronthosting.co.za> STINNER Victor added the comment: > Accidentally removed the following message from Victor Stinner No problem. > Is there any good reason to make this a property? Since numbits() cost is O(n) with n: number of digits. I prefer a method than a property because, IMHO, reading a property should be O(1) (*read* an attribute is different than *compute* a value). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 17:38:21 2008 From: report at bugs.python.org (Fredrik Johansson) Date: Tue, 14 Oct 2008 15:38:21 +0000 Subject: [issue3439] create a numbits() method for int and long types In-Reply-To: <1216920044.56.0.218954878238.issue3439@psf.upfronthosting.co.za> Message-ID: <1223998701.12.0.758807199355.issue3439@psf.upfronthosting.co.za> Fredrik Johansson added the comment: > One other note: in Fredrik's patch there's commented out code for a > numbits *property* (rather than a method). Is there any good reason to > make this a property? Aesthetically, I think numbits as a function would make more sense. (Maybe if the hypothetical imath module comes along...) > Since numbits() cost is O(n) with n: number of digits. I prefer a > method than a property because, IMHO, reading a property should be > O(1) (*read* an attribute is different than *compute* a value). Unless I missed something, numbits() is O(1). Only the topmost word in a number needs to be examined. > reading a property should be O(1) (*read* an attribute is different > than *compute* a value). O(1) is necessary but not sufficient. My sense is that an attribute should access an existing "part" of an object while an operation that involves creating a "new" object should be a method. Compare complex.real/.imag and complex.conjugate(). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 17:57:12 2008 From: report at bugs.python.org (Bill Janssen) Date: Tue, 14 Oct 2008 15:57:12 +0000 Subject: [issue1210] imaplib does not run under Python 3 In-Reply-To: <1223983667.47.0.195770788025.issue1210@psf.upfronthosting.co.za> Message-ID: <4b3e516a0810140857l740fa794m7277424cd05f7b3a@mail.gmail.com> Bill Janssen added the comment: Victor, what kind of content have you tried this with? For instance, have you passed unencoded (Content-Transfer-Encoding: binary) binary data through it, by mailing a JPEG, for instance? These things are strings really only at the application level; the data is still bytes. In addition, the use of Latin-1 goes against the explicit directives of the IMAP group, doesn't it? They're pushing UTF-8. Bill On Tue, Oct 14, 2008 at 4:27 AM, STINNER Victor wrote: > > STINNER Victor added the comment: > > Here is a patch for imaplib: > - add encoding attribute to IMAP4 class (as ftplib and see also issue > 3727 for my poplib patch) > - use makefile('r', encoding=self.encoding) instead of a binary file > (mode='rb') > - remove duplicate code in IMAP4_SSL > > I choosed ISO-8859-1 as the default charset. I tested the library on > my local IMAP4 server using IMAP4 and IMAP4_SSL classes. But the > library needs more unit tests as done for poplib. > > ---------- > keywords: +patch > nosy: +haypo > Added file: http://bugs.python.org/file11786/imaplib_unicode.patch > > _______________________________________ > Python tracker > > _______________________________________ > Added file: http://bugs.python.org/file11790/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: unnamed URL: From report at bugs.python.org Tue Oct 14 18:13:36 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 14 Oct 2008 16:13:36 +0000 Subject: [issue3863] 2.6rc1: test_threading hangs on FreeBSD 6.3 i386 In-Reply-To: <1221391510.13.0.209829217282.issue3863@psf.upfronthosting.co.za> Message-ID: <1224000816.83.0.0435878470614.issue3863@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, so it's not a release blocker anymore :) ---------- priority: release blocker -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 18:20:36 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 16:20:36 +0000 Subject: [issue3439] create a numbits() method for int and long types In-Reply-To: <1216920044.56.0.218954878238.issue3439@psf.upfronthosting.co.za> Message-ID: <1224001236.11.0.69387501598.issue3439@psf.upfronthosting.co.za> STINNER Victor added the comment: > Unless I missed something, numbits() is O(1). Ooops, you're right. I looked quickly at the patch and I read "while(n)" but n is a digit, not the number of digits! So it's very quick to compute number of bits. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 19:09:33 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 14 Oct 2008 17:09:33 +0000 Subject: [issue3439] create a numbits() method for int and long types In-Reply-To: <1216920044.56.0.218954878238.issue3439@psf.upfronthosting.co.za> Message-ID: <1224004173.85.0.627505499161.issue3439@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I consider .numbits to be an internal property of ints and would prefer it accessed that way. To me, this sort of thing is what property() is for. Guido has said that the nuisance of tacking on otherwise unnecessary empty parens is a warning to the user that getting the answer might take a long time. Another tack is to notice that numbits is the length of the bit sequence representation of an int (excepting 0) and give ints a .__len__ method ;-). I would not expect that suggestion to fly very far, though. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 19:19:18 2008 From: report at bugs.python.org (Fredrik Johansson) Date: Tue, 14 Oct 2008 17:19:18 +0000 Subject: [issue3439] create a numbits() method for int and long types In-Reply-To: <1216920044.56.0.218954878238.issue3439@psf.upfronthosting.co.za> Message-ID: <1224004758.76.0.0886691401923.issue3439@psf.upfronthosting.co.za> Fredrik Johansson added the comment: > Another tack is to notice that numbits is the length of the bit sequence > representation of an int (excepting 0) and give ints a .__len__ method > ;-). I would not expect that suggestion to fly very far, though. FWIW, I'm one of the people who'd additionally find indexing and slicing of the bits of integers very useful. It's not going to happen, though! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 19:31:28 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 17:31:28 +0000 Subject: [issue3439] create a numbits() method for int and long types In-Reply-To: <1216920044.56.0.218954878238.issue3439@psf.upfronthosting.co.za> Message-ID: <1224005488.93.0.658876509362.issue3439@psf.upfronthosting.co.za> STINNER Victor added the comment: A property /looks/ like an attribute and an user might try to change its value: "x=1; x.numbits = 2" (gives 3 or 4 ? :-)) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 19:36:08 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 17:36:08 +0000 Subject: [issue1210] imaplib does not run under Python 3 In-Reply-To: <1190872174.76.0.553436258502.issue1210@psf.upfronthosting.co.za> Message-ID: <1224005768.77.0.672620953633.issue1210@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11790/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 19:57:21 2008 From: report at bugs.python.org (Andre Heider) Date: Tue, 14 Oct 2008 17:57:21 +0000 Subject: [issue4120] Do not embed manifest files in *.pyd when compiling with MSVC In-Reply-To: <1223971312.31.0.131537865896.issue4120@psf.upfronthosting.co.za> Message-ID: <1224007041.21.0.0167658397735.issue4120@psf.upfronthosting.co.za> Andre Heider added the comment: Ok, point taken, so lets aim at v2.6. Should i open a new issue then? Attached you'll find a new diff against v2.6. This time pyd_d.vsprops gets patched too and the linker doesn't even generate a .manifest file. So no, the *.pyd files do not get any manifest info, neither a loose *.pyd.manifest nor an embedded one. I checked a per-user v2.6 install with the CRT manifest pointing at "..". I also tried this approach for our software, but i couldn't get it working on w2k3. The solution i am proposing doesn't need a CRT manifest file in "./DLLs". This approach works on w2k3, but i can not test this on vista SP1. Added file: http://bugs.python.org/file11791/Python-2.6-no.manifest.in.pyd.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 20:03:24 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 14 Oct 2008 18:03:24 +0000 Subject: [issue3439] create a numbits() method for int and long types In-Reply-To: <1216920044.56.0.218954878238.issue3439@psf.upfronthosting.co.za> Message-ID: <1224007404.6.0.808047621361.issue3439@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Properties can be made read-only. Also, there is a good precedent: c=4+5j; print c.real _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 20:14:21 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 18:14:21 +0000 Subject: [issue1210] imaplib does not run under Python 3 In-Reply-To: <1190872174.76.0.553436258502.issue1210@psf.upfronthosting.co.za> Message-ID: <1224008061.69.0.581437081517.issue1210@psf.upfronthosting.co.za> STINNER Victor added the comment: IMAP_stream() is also broken because it uses os.popen2() which has been deprecated since long time and now replaced by subprocess. Here is a patch replacing os.popen2() by subprocess, but also using transparent conversion from/to unicode using io.TextIOWrapper(). Added file: http://bugs.python.org/file11792/imaplib_stream.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 20:21:14 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 18:21:14 +0000 Subject: [issue1210] imaplib does not run under Python 3 In-Reply-To: <1190872174.76.0.553436258502.issue1210@psf.upfronthosting.co.za> Message-ID: <1224008474.33.0.296566120776.issue1210@psf.upfronthosting.co.za> STINNER Victor added the comment: > what kind of content have you tried this with? I only tried the most basic commands like capability(). I retried with search() and... hey, search() has a charset argument!? It should reuse self.encoding. Same for sort(). Then I tried to get the content of an email but fetch(num, '(RFC822)') fails with "imaplib.abort: command: FETCH => unexpected response: 'Return-Path: _______________________________________ From report at bugs.python.org Tue Oct 14 20:26:36 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 14 Oct 2008 18:26:36 +0000 Subject: [issue4120] Do not embed manifest files in *.pyd when compiling with MSVC In-Reply-To: <1223971312.31.0.131537865896.issue4120@psf.upfronthosting.co.za> Message-ID: <1224008796.87.0.404945532032.issue4120@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I'm just repurposing the issue (despite what I usually claim as a policy) ---------- resolution: rejected -> status: closed -> open versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 20:26:44 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 14 Oct 2008 18:26:44 +0000 Subject: [issue4120] Do not embed manifest files in *.pyd when compiling with MSVC In-Reply-To: <1223971312.31.0.131537865896.issue4120@psf.upfronthosting.co.za> Message-ID: <1224008804.23.0.710644496095.issue4120@psf.upfronthosting.co.za> Changes by Martin v. L?wis : Removed file: http://bugs.python.org/file11783/Python-2.5.2-no.manifest.in.pyd.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 20:47:06 2008 From: report at bugs.python.org (Don Braffitt) Date: Tue, 14 Oct 2008 18:47:06 +0000 Subject: [issue4017] IDLE 2.6 broken on OSX (Leopard) In-Reply-To: <1222960590.08.0.635891151551.issue4017@psf.upfronthosting.co.za> Message-ID: <1224010026.29.0.397710738035.issue4017@psf.upfronthosting.co.za> Don Braffitt added the comment: >I've just installed Python 2.6 on Mac OS X 10.5.5 and IDLE won't start. I have the same problem with Python 2.6 IDLE on Mac OS X 10.4.11. ---------- nosy: +donbraffitt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 20:55:10 2008 From: report at bugs.python.org (Nat) Date: Tue, 14 Oct 2008 18:55:10 +0000 Subject: [issue4017] IDLE 2.6 broken on OSX (Leopard) In-Reply-To: <1222960590.08.0.635891151551.issue4017@psf.upfronthosting.co.za> Message-ID: <1224010510.82.0.666736394633.issue4017@psf.upfronthosting.co.za> Nat added the comment: If you look in /Library/Frameworks/Tcl.framework/Versions/, what's there? How about in /Library/Frameworks/Tcl.framework/Versions/8.5/? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 21:29:04 2008 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 14 Oct 2008 19:29:04 +0000 Subject: [issue3439] create a numbits() method for int and long types In-Reply-To: <1216920044.56.0.218954878238.issue3439@psf.upfronthosting.co.za> Message-ID: <1224012544.13.0.0870547921852.issue3439@psf.upfronthosting.co.za> Mark Dickinson added the comment: One more minor deficiency in the patch: it gives incorrect results for very large integers. For example, on a 32-bit build of the trunk: >>> x = 1 << 2**31-1 >>> x <<= 2**31-1 >>> x.numbits() # expect 4294967295 4294967295L >>> x <<= 2 >>> x.numbits() # expect 4294967297 4294967295L It would be nicer if the OverflowError from _PyLong_NumBits were propagated, so that the second case raises OverflowError instead of giving an incorrect result. Alternatively, in case of OverflowError one could recompute numbits correctly, without overflow, by using Python longs instead of a C size_t; but this would mean adding little-used, and probably little-tested, extra code for what must be a very rare special case. Probably not worth it. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 21:31:12 2008 From: report at bugs.python.org (Bill Janssen) Date: Tue, 14 Oct 2008 19:31:12 +0000 Subject: [issue1210] imaplib does not run under Python 3 In-Reply-To: <1190872174.76.0.553436258502.issue1210@psf.upfronthosting.co.za> Message-ID: <1224012672.05.0.712297702474.issue1210@psf.upfronthosting.co.za> Bill Janssen added the comment: Maybe the first thing to do is to expand the Lib/test/test_imaplib.py file, which right now is pretty darn minimal. We really need an IMAP server somewhere to test against, with a standard library of varied messages. Perhaps Python.org is running an IMAP server? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 22:02:10 2008 From: report at bugs.python.org (Roumen Petrov) Date: Tue, 14 Oct 2008 20:02:10 +0000 Subject: [issue4075] Use WCHAR variant of OutputDebugString In-Reply-To: <1223471607.48.0.166278298943.issue4075@psf.upfronthosting.co.za> Message-ID: <1224014530.45.0.000830749105081.issue4075@psf.upfronthosting.co.za> Roumen Petrov added the comment: May be OutputDebugStringA has to be part of "wince-port" library but if is fine all win platforms to call *W what about patch to use function MultiByteToWideChar() ? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 22:47:52 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 14 Oct 2008 20:47:52 +0000 Subject: [issue4075] Use WCHAR variant of OutputDebugString In-Reply-To: <1224014530.45.0.000830749105081.issue4075@psf.upfronthosting.co.za> Message-ID: <48F50575.4040303@v.loewis.de> Martin v. L?wis added the comment: > May be OutputDebugStringA has to be part of "wince-port" library but if > is fine all win platforms to call *W what about patch to use function > MultiByteToWideChar() ? Is there a problem with the proposed patch? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 23:12:58 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 14 Oct 2008 21:12:58 +0000 Subject: [issue3725] telnetlib module broken by str to unicode conversion In-Reply-To: <1220013826.6.0.647840298479.issue3725@psf.upfronthosting.co.za> Message-ID: <1224018778.14.0.999484652015.issue3725@psf.upfronthosting.co.za> Benjamin Peterson added the comment: The patch looks pretty straightforward to me. If somebody else gives their nod, I'll apply it. ---------- assignee: -> benjamin.peterson nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 23:39:36 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 14 Oct 2008 21:39:36 +0000 Subject: [issue4122] undefined reference to _Py_ascii_whitespace In-Reply-To: <1223991548.86.0.809237615427.issue4122@psf.upfronthosting.co.za> Message-ID: <1224020376.67.0.251194132859.issue4122@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This also happens with VS2008. ---------- assignee: -> amaury.forgeotdarc nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 14 23:55:01 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 21:55:01 +0000 Subject: [issue1210] imaplib does not run under Python 3 In-Reply-To: <1190872174.76.0.553436258502.issue1210@psf.upfronthosting.co.za> Message-ID: <1224021301.43.0.633363143688.issue1210@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11786/imaplib_unicode.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 00:01:02 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 14 Oct 2008 22:01:02 +0000 Subject: [issue4122] undefined reference to _Py_ascii_whitespace In-Reply-To: <1223991548.86.0.809237615427.issue4122@psf.upfronthosting.co.za> Message-ID: <1224021662.69.0.0766645529173.issue4122@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Committed r66891 (trunk) and r66892 (release26-maint). Thanks for the report and the patch! In the meantime, you may use _PyUnicode_IsWhitespace(ch), like the 2.5 version did. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 00:03:01 2008 From: report at bugs.python.org (paul rubin) Date: Tue, 14 Oct 2008 22:03:01 +0000 Subject: [issue4123] random.shuffle slow on deque In-Reply-To: <1224021781.11.0.882167475115.issue4123@psf.upfronthosting.co.za> Message-ID: <1224021781.11.0.882167475115.issue4123@psf.upfronthosting.co.za> New submission from paul rubin : This is observed in Python 2.5.1, I haven't tried any later versions. d = collections.deque(xrange(100000)) random.shuffle(d) is quite slow. Increasing the size to 200k, 300k, etc. shows that the runtime increases quadratically or worse. It's much faster to convert the deque to a list, shuffle the list, and make a new deque from the shuffled list. ---------- components: Library (Lib) messages: 74773 nosy: phr severity: normal status: open title: random.shuffle slow on deque versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 00:07:33 2008 From: report at bugs.python.org (Miki Tebeka) Date: Tue, 14 Oct 2008 22:07:33 +0000 Subject: [issue4124] Patch for adding "default" to itemgetter and attrgetter In-Reply-To: <1224022053.76.0.0750871741065.issue4124@psf.upfronthosting.co.za> Message-ID: <1224022053.76.0.0750871741065.issue4124@psf.upfronthosting.co.za> New submission from Miki Tebeka : This is a patch for adding "default" keyword to itemgetter and attrgetter. This way you can do: >>> f = itemgetter(0, default=1) >>> f([]) 1 >>> f= attrgetter("a", default="b") >>> f(object()) 'b' >>> I'm not sure about all the Py_INCREF I've placed there, someone with more knowledge than me should review the code. ---------- components: Library (Lib) files: getter.patch keywords: patch messages: 74774 nosy: tebeka severity: normal status: open title: Patch for adding "default" to itemgetter and attrgetter versions: Python 2.7 Added file: http://bugs.python.org/file11793/getter.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 00:14:05 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 22:14:05 +0000 Subject: [issue1210] imaplib does not run under Python 3 In-Reply-To: <1190872174.76.0.553436258502.issue1210@psf.upfronthosting.co.za> Message-ID: <1224022445.55.0.222886605619.issue1210@psf.upfronthosting.co.za> STINNER Victor added the comment: The server can send raw 8 bits email in any charset (charset is specified in the email headers). That's why I think that it's better to keep bytes instead of the unicode conversion using a fixed charset. Each email can use a different charset. Types used in my new patch: - unicode: * IMAP commands (charset=ASCII) * untagged_responses keys (charset=ASCII) - bytes: * answer * regex * tagre attribute * untagged_responses values I chooosed to keep unicode for some variables to minimize the changes in imaplib library and to keep readable code. Patch TODO: - Remove the assert (added for quicker debugging) - Test more functions - Restore _checkquote() in _command() method or use _quote()/_checkquote() in method which need it. login() already quote the password (but why not the login?) I also wrote a patch for a "pure bytes string" version, but the patch is complex, long and the resulting module source code is hard to read. Added file: http://bugs.python.org/file11794/imaplib_bytes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 00:19:22 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 14 Oct 2008 22:19:22 +0000 Subject: [issue4123] random.shuffle slow on deque In-Reply-To: <1224021781.11.0.882167475115.issue4123@psf.upfronthosting.co.za> Message-ID: <1224022762.89.0.00656578840519.issue4123@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Why do you think this is a bug? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 00:20:33 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 22:20:33 +0000 Subject: [issue1210] imaplib does not run under Python 3 In-Reply-To: <1190872174.76.0.553436258502.issue1210@psf.upfronthosting.co.za> Message-ID: <1224022833.05.0.561616748457.issue1210@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11792/imaplib_stream.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 00:32:47 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 14 Oct 2008 22:32:47 +0000 Subject: [issue2046] patch to fix_import: UserDict -> collections In-Reply-To: <1202427848.74.0.973500196502.issue2046@psf.upfronthosting.co.za> Message-ID: <1224023567.26.0.943628507287.issue2046@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Closing in favor of #2876. ---------- nosy: +benjamin.peterson resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 00:34:52 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 22:34:52 +0000 Subject: [issue1210] imaplib does not run under Python 3 In-Reply-To: <1190872174.76.0.553436258502.issue1210@psf.upfronthosting.co.za> Message-ID: <1224023691.97.0.247014605297.issue1210@psf.upfronthosting.co.za> STINNER Victor added the comment: New version of my bytes patch: - fix IMAP4_stream: use subprocess.Popen() as my previous imap_stream.patch but use bytes instead of characters - fix IMAP4_SSL: sslobj wasn't set in IMAP4_SSL.open() but used, for example, in read() method; remove duplicate method (simplify the code) - IMAP4.read(): call file.read() multiple times if the result is smaller than size (needed especially for the SSL version); FIXME: does this function raise an error of EOF or just loop forever? should we stop the loop if data is b''? Added file: http://bugs.python.org/file11795/imaplib_bytes-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 00:34:57 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 22:34:57 +0000 Subject: [issue1210] imaplib does not run under Python 3 In-Reply-To: <1190872174.76.0.553436258502.issue1210@psf.upfronthosting.co.za> Message-ID: <1224023697.75.0.9433763706.issue1210@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11794/imaplib_bytes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 00:41:32 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 22:41:32 +0000 Subject: [issue1210] imaplib does not run under Python 3 In-Reply-To: <1190872174.76.0.553436258502.issue1210@psf.upfronthosting.co.za> Message-ID: <1224024092.23.0.0294186780033.issue1210@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11795/imaplib_bytes-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 00:43:32 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 22:43:32 +0000 Subject: [issue1210] imaplib does not run under Python 3 In-Reply-To: <1190872174.76.0.553436258502.issue1210@psf.upfronthosting.co.za> Message-ID: <1224024212.03.0.394247240129.issue1210@psf.upfronthosting.co.za> STINNER Victor added the comment: Oops, my previous patch didn't include changes to the documentation. New patch changes: - fix the documentation: os.popen2() => subprocess.Popen(); no more ssl() method: use socket() - use a buffer of 4096 bytes in read() method (as suggested in socket documentation) - break read() loop if read() returns an empty bytes string Added file: http://bugs.python.org/file11796/imaplib_bytes-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 00:50:51 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 14 Oct 2008 22:50:51 +0000 Subject: [issue3725] telnetlib module broken by str to unicode conversion In-Reply-To: <1220013826.6.0.647840298479.issue3725@psf.upfronthosting.co.za> Message-ID: <1224024651.51.0.664099305.issue3725@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Yes, the patch is good. I think that documentation (both Doc\library\telnetlib.rst and the docstrings in telnetlib.py) should reflect the change, at least the code samples. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 01:06:40 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 23:06:40 +0000 Subject: [issue4125] runtests.sh: use -bb flag of Python In-Reply-To: <1224025600.55.0.798566736158.issue4125@psf.upfronthosting.co.za> Message-ID: <1224025600.55.0.798566736158.issue4125@psf.upfronthosting.co.za> New submission from STINNER Victor : The -bb (raise ByteWarning error) is useful for debugging and needed to improve bytes/unicode distinction in Python3. Here is a small patch to always run Python with -bb option. The patch helps issue3988 test. ---------- files: runtests.patch keywords: patch messages: 74781 nosy: haypo severity: normal status: open title: runtests.sh: use -bb flag of Python versions: Python 3.0 Added file: http://bugs.python.org/file11797/runtests.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 01:16:17 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 23:16:17 +0000 Subject: [issue3988] Byte warning mode and b'' != '' In-Reply-To: <1222601577.06.0.270135591037.issue3988@psf.upfronthosting.co.za> Message-ID: <1224026177.65.0.0582767464949.issue3988@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11647/bytes_ne_warning-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 01:16:21 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 23:16:21 +0000 Subject: [issue3988] Byte warning mode and b'' != '' In-Reply-To: <1222601577.06.0.270135591037.issue3988@psf.upfronthosting.co.za> Message-ID: <1224026181.27.0.744324848943.issue3988@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11648/test_bytes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 01:17:34 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 23:17:34 +0000 Subject: [issue3988] Byte warning mode and b'' != '' In-Reply-To: <1222601577.06.0.270135591037.issue3988@psf.upfronthosting.co.za> Message-ID: <1224026254.7.0.15816847945.issue3988@psf.upfronthosting.co.za> STINNER Victor added the comment: New patch including the test. The test doesn't fail anymore if -bb is not set (test is just ignored). See also issue #4125 (force -bb option for runtests.sh). Added file: http://bugs.python.org/file11798/bytes_ne_warning-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 01:33:42 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 23:33:42 +0000 Subject: [issue4034] traceback attribute error In-Reply-To: <1223076719.45.0.395696576555.issue4034@psf.upfronthosting.co.za> Message-ID: <1224027222.49.0.0937037889175.issue4034@psf.upfronthosting.co.za> STINNER Victor added the comment: My patch causes a crash with: import sys try: raise Exception("hm!") except: t, v, tb = sys.exc_info() tb.tb_frame = {} raise t, v, tb Change tb.tb_frame value is not a good idea. It's better to clear locals/globals: see msg74329. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 01:33:49 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Oct 2008 23:33:49 +0000 Subject: [issue4034] traceback attribute error In-Reply-To: <1223076719.45.0.395696576555.issue4034@psf.upfronthosting.co.za> Message-ID: <1224027229.08.0.57911187271.issue4034@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11719/traceback_tb_frame_setter.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 02:45:25 2008 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 Oct 2008 00:45:25 +0000 Subject: [issue4126] remove not decodable environment variables In-Reply-To: <1224031525.89.0.11832939128.issue4126@psf.upfronthosting.co.za> Message-ID: <1224031525.89.0.11832939128.issue4126@psf.upfronthosting.co.za> New submission from STINNER Victor : Python3 skips environment variables which can not be parsed and decoded as unicode strings. But exec*() functions keep the original environment and so the child process environment is different than the Python environement (than os.environ). I propose to remove these variables to avoid strange behaviours, but also to avoid possible security issues. The attached patch is an implementation of this idea using a custom implementation of unsetenv(): _Py_unsetenv() argument is not the name of the variable but the raw variable including the value (eg. "a=b"). So it's also possible to drop truncated variables like "a" (no value nor "=" character). This issue also affects Python2 since Python2 does also skip variable with no value but the variables still exist in memory (and so child process get them). ---------- components: Interpreter Core files: unsetenv.patch keywords: patch messages: 74784 nosy: haypo severity: normal status: open title: remove not decodable environment variables type: security versions: Python 3.0 Added file: http://bugs.python.org/file11799/unsetenv.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 02:48:43 2008 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 Oct 2008 00:48:43 +0000 Subject: [issue4126] remove not decodable environment variables In-Reply-To: <1224031525.89.0.11832939128.issue4126@psf.upfronthosting.co.za> Message-ID: <1224031723.55.0.81896983701.issue4126@psf.upfronthosting.co.za> STINNER Victor added the comment: Note: I don't have Windows at home to test my patch on Windows. At least, the patch works correctly on Ubuntu Gutsy/i386. Example to demonstrate the issue: $ env -i a=a b=$(echo -e '--\xff--') c=c ./python -c "import os; os.execvp('/usr/bin/env', ['/usr/bin/env'])" a=a b=--?-- c=c Patched Python: $ env -i a=a b=$(echo -e '--\xff--') c=c ./python -c "import os; os.execvp('/usr/bin/env', ['/usr/bin/env'])" a=a c=c I tested Python 2.5: b is also removed, but Python 2.6 keeps the variable b. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 03:01:58 2008 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 Oct 2008 01:01:58 +0000 Subject: [issue4126] remove not decodable environment variables In-Reply-To: <1224031525.89.0.11832939128.issue4126@psf.upfronthosting.co.za> Message-ID: <1224032518.97.0.896050941251.issue4126@psf.upfronthosting.co.za> STINNER Victor added the comment: while+strcmp() in _Py_unsetenv() is useless since we already get the pointer to the evil variable. The new patch is shorter. Added file: http://bugs.python.org/file11800/unsetenv-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 03:02:03 2008 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 Oct 2008 01:02:03 +0000 Subject: [issue4126] remove not decodable environment variables In-Reply-To: <1224031525.89.0.11832939128.issue4126@psf.upfronthosting.co.za> Message-ID: <1224032523.09.0.264451602177.issue4126@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11799/unsetenv.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 03:04:41 2008 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 Oct 2008 01:04:41 +0000 Subject: [issue4006] os.getenv silently discards env variables with non-UTF-8 values In-Reply-To: <1222845441.08.0.104904424427.issue4006@psf.upfronthosting.co.za> Message-ID: <1224032681.23.0.278989362821.issue4006@psf.upfronthosting.co.za> STINNER Victor added the comment: See also issue #4126 which is the opposite :-) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 03:05:31 2008 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 Oct 2008 01:05:31 +0000 Subject: [issue4126] remove not decodable environment variables In-Reply-To: <1224031525.89.0.11832939128.issue4126@psf.upfronthosting.co.za> Message-ID: <1224032731.21.0.932796879805.issue4126@psf.upfronthosting.co.za> STINNER Victor added the comment: See also issue #4006 which asks the opposite (keep invalid variables, even in os.environ(b)) :-) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 04:00:25 2008 From: report at bugs.python.org (Toshio Kuratomi) Date: Wed, 15 Oct 2008 02:00:25 +0000 Subject: [issue4126] remove not decodable environment variables In-Reply-To: <1224031525.89.0.11832939128.issue4126@psf.upfronthosting.co.za> Message-ID: <1224036025.1.0.407986827426.issue4126@psf.upfronthosting.co.za> Toshio Kuratomi added the comment: Yep :-) I am against throwing away valid data just because we can't interpret it automatically. Environment variables in Unix hold bytes. Those bytes are usually ASCii characters, however, they do not have to be. This is a case of being on the border between python and the outside world so we need to be able to pass in bytes if the user requests it. Let's say that you have a local directory of: /home/\xff/username/bin in your PATH environment variable and a command named my_app.sh in there. At the shell you can happily run myapp.sh and it will do it's thing. Now you open your python shell and do: subprocess.call(['myapp.sh']) and it doesn't work. This is non-intuitive behaviour for people who are used to how the shell works. All this patch will do is take away the work around of subprocess.call(['bash', 'myapp.sh']) """ I tested Python 2.5: b is also removed, but Python 2.6 keeps the variable b. """ I just tested python-2.5.1 and b is kept, not removed. ---------- nosy: +a.badger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 04:22:12 2008 From: report at bugs.python.org (David W. Lambert) Date: Wed, 15 Oct 2008 02:22:12 +0000 Subject: [issue4127] repr or reprlib? In-Reply-To: <1224037332.88.0.79090862313.issue4127@psf.upfronthosting.co.za> Message-ID: <1224037332.88.0.79090862313.issue4127@psf.upfronthosting.co.za> New submission from David W. Lambert : http://docs.python.org/dev/3.0/library/reprlib.html#module-reprlib names the module reprlib. However, the example at bottom of page uses: http://docs.python.org/dev/3.0/library/reprlib.html#subclassing-repr- objects import repr ---------- assignee: georg.brandl components: Documentation messages: 74790 nosy: LambertDW, georg.brandl severity: normal status: open title: repr or reprlib? versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 05:10:01 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 15 Oct 2008 03:10:01 +0000 Subject: [issue4127] repr or reprlib? In-Reply-To: <1224037332.88.0.79090862313.issue4127@psf.upfronthosting.co.za> Message-ID: <1224040201.28.0.793286484249.issue4127@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks for the report! Fixed in r66897. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 07:58:41 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 15 Oct 2008 05:58:41 +0000 Subject: [issue4072] build_py support for lib2to3 is stale In-Reply-To: <1223426997.83.0.795530448507.issue4072@psf.upfronthosting.co.za> Message-ID: <1224050321.75.0.442767508125.issue4072@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Committed as r66901 ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 08:05:30 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 15 Oct 2008 06:05:30 +0000 Subject: [issue3574] compile() cannot decode Latin-1 source encodings In-Reply-To: <1218933580.53.0.0614369271998.issue3574@psf.upfronthosting.co.za> Message-ID: <1224050730.31.0.0947376602682.issue3574@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The patch looks fine to me, please apply. I notice that the diff file reports changes to test_pep3120.py. No such changes should be necessary, so please exclude them from committing. ---------- assignee: loewis -> brett.cannon keywords: -needs review resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 08:15:08 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 15 Oct 2008 06:15:08 +0000 Subject: [issue957650] Fix for bugs relating to ntpath.expanduser() Message-ID: <1224051308.27.0.0757213360459.issue957650@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- assignee: loewis -> priority: high -> normal resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 08:40:14 2008 From: report at bugs.python.org (Dmitry Vasiliev) Date: Wed, 15 Oct 2008 06:40:14 +0000 Subject: [issue3725] telnetlib module broken by str to unicode conversion In-Reply-To: <1220013826.6.0.647840298479.issue3725@psf.upfronthosting.co.za> Message-ID: <1224052814.53.0.502796784686.issue3725@psf.upfronthosting.co.za> Dmitry Vasiliev added the comment: The patch is good. It's exactly what I told about in msg72132. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 09:12:30 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 15 Oct 2008 07:12:30 +0000 Subject: [issue4073] distutils build_scripts and install_data commands need 2to3 support In-Reply-To: <1223427347.42.0.185462217727.issue4073@psf.upfronthosting.co.za> Message-ID: <1224054750.66.0.497112023038.issue4073@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Here is a patch. It refactors the 2to3 support into a function in util, and adds build_scripts support. For build_scripts, the approach is slightly different from the one proposed by Mark: I modify copy_scripts to collect the modified files, and return them along with outfiles. Modifying copy_file is insufficient, as it doesn't support the case of adjust. I'm skeptical about adding build_data support, as it's not obvious what files would need conversion. Users should adjust their build_data commands to invoke distutils.util.run_2to3. I would appreciate a confirmation that this function has a useful API. In this version, I don't pass any options to the RefactoringTool anymore, and I arrange to delete the backup files. ---------- keywords: +needs review, patch Added file: http://bugs.python.org/file11801/build_scripts.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 09:12:59 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 15 Oct 2008 07:12:59 +0000 Subject: [issue4073] distutils build_scripts and install_data commands need 2to3 support In-Reply-To: <1223427347.42.0.185462217727.issue4073@psf.upfronthosting.co.za> Message-ID: <1224054779.66.0.511803379282.issue4073@psf.upfronthosting.co.za> Changes by Martin v. L?wis : Removed file: http://bugs.python.org/file11801/build_scripts.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 09:13:25 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 15 Oct 2008 07:13:25 +0000 Subject: [issue4073] distutils build_scripts and install_data commands need 2to3 support In-Reply-To: <1223427347.42.0.185462217727.issue4073@psf.upfronthosting.co.za> Message-ID: <1224054805.1.0.284774231764.issue4073@psf.upfronthosting.co.za> Changes by Martin v. L?wis : Added file: http://bugs.python.org/file11802/build_scripts.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 09:14:02 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 15 Oct 2008 07:14:02 +0000 Subject: [issue4073] distutils build_scripts and install_data commands need 2to3 support In-Reply-To: <1223427347.42.0.185462217727.issue4073@psf.upfronthosting.co.za> Message-ID: <1224054842.42.0.979489644761.issue4073@psf.upfronthosting.co.za> Changes by Martin v. L?wis : Removed file: http://bugs.python.org/file11802/build_scripts.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 09:14:16 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 15 Oct 2008 07:14:16 +0000 Subject: [issue4073] distutils build_scripts and install_data commands need 2to3 support In-Reply-To: <1223427347.42.0.185462217727.issue4073@psf.upfronthosting.co.za> Message-ID: <1224054856.18.0.643710015757.issue4073@psf.upfronthosting.co.za> Changes by Martin v. L?wis : Added file: http://bugs.python.org/file11803/build_scripts.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 10:24:58 2008 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 Oct 2008 08:24:58 +0000 Subject: [issue4126] remove not decodable environment variables In-Reply-To: <1224031525.89.0.11832939128.issue4126@psf.upfronthosting.co.za> Message-ID: <1224059098.87.0.400171846969.issue4126@psf.upfronthosting.co.za> STINNER Victor added the comment: About your subprocess example: we choose to refuse it because we don't mix bytes (your non decodable PATH) and unicode ('myapp.sh'). Using my patch in issue #4036 you will be able to run program with bytes arguments (including the program name), but there is no way (yet?) in Python3 to read the raw (bytes) environment variable PATH. About Python2, I retested and all versions (2.5.2 and trunk (2.7a0)) keep the variables. But Python2 doesn't convert value to unicode and so it's not right example. Python2 skips variable with no "=" character, but I don't know how to reproduce this example (maybe using a C program using execve). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 11:07:05 2008 From: report at bugs.python.org (Ray Wang) Date: Wed, 15 Oct 2008 09:07:05 +0000 Subject: [issue4027] wrong page index number in reference book of python documentation In-Reply-To: <1223026876.14.0.133212410345.issue4027@psf.upfronthosting.co.za> Message-ID: <1224061625.93.0.702805792652.issue4027@psf.upfronthosting.co.za> Ray Wang added the comment: any feedback here? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 12:03:17 2008 From: report at bugs.python.org (Fredrik Johansson) Date: Wed, 15 Oct 2008 10:03:17 +0000 Subject: [issue4128] Performance regression in long division in 2.6 In-Reply-To: <1224064997.42.0.94461510007.issue4128@psf.upfronthosting.co.za> Message-ID: <1224064997.42.0.94461510007.issue4128@psf.upfronthosting.co.za> New submission from Fredrik Johansson : On my laptop (Windows XP, 32-bit), long division is about 15% slower in 2.6 compared to 2.5. See the attached .txt for timings. I noticed this when comparing the unit tests for mpmath (http://code.google.com/p/mpmath/) under 2.5 and 2.6. It appears that most tests run 10-20% faster under 2.6 (good work all Python developers!), but the tests performing very high precision arithmetic run noticeably slower. >From some quick benchmarking, addition and multiplication are not the culprits (they both actually seem to be quite a bit faster in 2.6). There could be other factors involved, but from what I've found out so far, it is only division that has become slower in 2.6. Division in Python 2.4 is also the same speed as 2.5. ---------- components: Interpreter Core files: division_speed.txt messages: 74798 nosy: fredrikj severity: normal status: open title: Performance regression in long division in 2.6 versions: Python 2.6 Added file: http://bugs.python.org/file11804/division_speed.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 12:44:09 2008 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 Oct 2008 10:44:09 +0000 Subject: [issue4128] Performance regression in long division in 2.6 In-Reply-To: <1224064997.42.0.94461510007.issue4128@psf.upfronthosting.co.za> Message-ID: <1224067449.78.0.565770941014.issue4128@psf.upfronthosting.co.za> STINNER Victor added the comment: The source code is unchanged except the format functions (binary and octal bases with the new prefixes: 0b, 0o). The speed difference comes from different compiler options. - (Ubuntu Gutsy) python2.5: 1010 ms - python trunk: 1010 ms - python trunk with -O0: 1800 ms I'm using -O0 to help gdb debug, but the default gcc optimization level for Python is -03. Did you recompiled your own Python or did you use the binary at python.org? Look at the compilater option for python 2.5 and python 2.6. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 12:51:22 2008 From: report at bugs.python.org (Fredrik Johansson) Date: Wed, 15 Oct 2008 10:51:22 +0000 Subject: [issue4128] Performance regression in long division in 2.6 In-Reply-To: <1224064997.42.0.94461510007.issue4128@psf.upfronthosting.co.za> Message-ID: <1224067882.83.0.41432831694.issue4128@psf.upfronthosting.co.za> Fredrik Johansson added the comment: > The speed difference comes from different compiler options. I figured as much. I'm using the binaries from python.org (see the .txt file; it includes version headers). The question is why the compilation changes for 2.6 slowed down division but not e.g. multiplication, and if there is a workaround. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 13:16:16 2008 From: report at bugs.python.org (=?utf-8?q?Jakob_Schi=C3=B8tz?=) Date: Wed, 15 Oct 2008 11:16:16 +0000 Subject: [issue4129] C/API documentation: request for documentation of change to Py_ssize_t* arguments. In-Reply-To: <1224069376.75.0.412282464499.issue4129@psf.upfronthosting.co.za> Message-ID: <1224069376.75.0.412282464499.issue4129@psf.upfronthosting.co.za> New submission from Jakob Schi?tz : In general, the Python C/API manual is very careful to document when changes have occurred in the API, this is really useful information when writing portable extension modules to be used with different Python versions. However, there is a group of changes that are not documented. In Python 2.5 the Py_ssize_t type was introduced, and a number of functions had arguments changed from int to Py_ssize_t (a trivial change) or from int* to Py_ssize_t*. The latter is an incompatible change on 64-bit platforms, as int and Py_ssize_t have different size, and this DOES break extension modules on 64-bit platforms. For example, the change in int PySlice_GetIndices breaks the Scientific Python NetCDF module badly. I suggest that a note is added to the documentation of all functions taking a Py_ssize_t* argument stating that the type of the argument was changed in Python 2.5. Best regards Jakob ---------- assignee: georg.brandl components: Documentation messages: 74801 nosy: georg.brandl, schiotz severity: normal status: open title: C/API documentation: request for documentation of change to Py_ssize_t* arguments. type: feature request versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 13:44:13 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 15 Oct 2008 11:44:13 +0000 Subject: [issue4129] C/API documentation: request for documentation of change to Py_ssize_t* arguments. In-Reply-To: <1224069376.75.0.412282464499.issue4129@psf.upfronthosting.co.za> Message-ID: <1224071053.64.0.0402246876242.issue4129@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I think the Py_ssize_t change is clearly documented in the "What's new" document: http://docs.python.org/whatsnew/2.5.html#pep-353-using-ssize-t-as-the-index-type This paragraph also links to: http://www.python.org/dev/peps/pep-0353/#doesn-t-this-break-much-code which happens to mention the incompatibility in the slice API. Didn't you get any compilation warning? I suggest to use a newer version of Scientific Python: 2.7 at least uses Py_ssize_t throughout its code. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 14:43:33 2008 From: report at bugs.python.org (=?utf-8?q?Jakob_Schi=C3=B8tz?=) Date: Wed, 15 Oct 2008 12:43:33 +0000 Subject: [issue4129] C/API documentation: request for documentation of change to Py_ssize_t* arguments. In-Reply-To: <1224069376.75.0.412282464499.issue4129@psf.upfronthosting.co.za> Message-ID: <1224074613.45.0.237822458103.issue4129@psf.upfronthosting.co.za> Jakob Schi?tz added the comment: Don't get me wrong: I am not complaining about the code breakage, it is unavoidable as long as Python is a developing language. As you say I can use newer versions of at least some of the modules. I just think it would be nice for developers that occasionally write python modules to have the information at hand in the C/API manual, since that is where they will be looking when writing the module. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 16:40:57 2008 From: report at bugs.python.org (Weird) Date: Wed, 15 Oct 2008 14:40:57 +0000 Subject: [issue3905] subprocess failing in GUI applications on Windows In-Reply-To: <1221779222.6.0.581055626962.issue3905@psf.upfronthosting.co.za> Message-ID: <1224081657.87.0.659906701365.issue3905@psf.upfronthosting.co.za> Weird added the comment: Georg Brandl thank you, i was having the same problem, but now is fixed ---------- nosy: +Weird _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 17:22:15 2008 From: report at bugs.python.org (Toshio Kuratomi) Date: Wed, 15 Oct 2008 15:22:15 +0000 Subject: [issue4036] Support bytes for subprocess.Popen() In-Reply-To: <1223077515.41.0.60688229915.issue4036@psf.upfronthosting.co.za> Message-ID: <1224084135.12.0.867163470027.issue4036@psf.upfronthosting.co.za> Changes by Toshio Kuratomi : ---------- nosy: +a.badger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 17:25:29 2008 From: report at bugs.python.org (Toshio Kuratomi) Date: Wed, 15 Oct 2008 15:25:29 +0000 Subject: [issue4126] remove not decodable environment variables In-Reply-To: <1224031525.89.0.11832939128.issue4126@psf.upfronthosting.co.za> Message-ID: <1224084329.54.0.675512253263.issue4126@psf.upfronthosting.co.za> Toshio Kuratomi added the comment: """ About your subprocess example: we choose to refuse it because we don't mix bytes (your non decodable PATH) and unicode ('myapp.sh') """ If python3 is doing things right we shouldn't be mixing bytes and unicode here: 1) the programmer is only sending unicode to subprocess, not a mixture of bytes and unicode. 2) Python should be converting the arguments to subprocess.call() into bytes before combining it with PATH, at least on Unix. The conversion to bytes is something Python has to do at some point before looking on the filesystem for the command as filenames are a sequence of bytes in Unix. Note: your patch for #4036 looks like the right thing to do for the args argument but as you point out, that doesn't have bearing on the environment. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 18:54:23 2008 From: report at bugs.python.org (Russell Blau) Date: Wed, 15 Oct 2008 16:54:23 +0000 Subject: [issue4043] Warnings in IDLE raise TypeError (such as attempting to import deprecated modules) In-Reply-To: <1223159409.57.0.545310219567.issue4043@psf.upfronthosting.co.za> Message-ID: <1224089663.45.0.461707750961.issue4043@psf.upfronthosting.co.za> Russell Blau added the comment: This error is caused by line 27 in run.py: def idle_formatwarning_subproc(message, category, filename, lineno): needs to be changed to -- def idle_formatwarning_subproc(message, category, filename, lineno, line=None): so that the function signature matches that of warnings.formatwarning ---------- nosy: +russblau _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 19:15:35 2008 From: report at bugs.python.org (Brett Cannon) Date: Wed, 15 Oct 2008 17:15:35 +0000 Subject: [issue3574] compile() cannot decode Latin-1 source encodings In-Reply-To: <1224050730.31.0.0947376602682.issue3574@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Tue, Oct 14, 2008 at 11:05 PM, Martin v. L?wis wrote: > > Martin v. L?wis added the comment: > > The patch looks fine to me, please apply. > Great! > I notice that the diff file reports changes to test_pep3120.py. No such > changes should be necessary, so please exclude them from committing. > I added a test for compile() in there, which is why the patch is claiming that. There is an uploaded version of test_pep3120.py on the issue. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 19:37:59 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 15 Oct 2008 17:37:59 +0000 Subject: [issue4027] wrong page index number in reference book of python documentation In-Reply-To: <1223026876.14.0.133212410345.issue4027@psf.upfronthosting.co.za> Message-ID: <1224092279.77.0.56770685287.issue4027@psf.upfronthosting.co.za> Terry J. Reedy added the comment: We are all volunteers here, and I see three replies. This may or may not be trivial to fix, and may take some time. Python docs are written in rst format and translated by Sphinx to various formats. The main translation is to html, as viewed on the site. Translation to .pdf is indirect via translation to latex and then from latex to .pdf. Since the .html index appears flawless, and since a different .pdf has problems, I suspect that the .pdf index problem is in one of the two translation steps. Hence the change of component. In the meanwhile, either ignore the index or use the html version. ---------- components: +Documentation tools (Sphinx) -Documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 19:41:33 2008 From: report at bugs.python.org (Sergey Lipnevich) Date: Wed, 15 Oct 2008 17:41:33 +0000 Subject: [issue3909] Building PDF documentation from tex files In-Reply-To: <1221842807.23.0.726390591277.issue3909@psf.upfronthosting.co.za> Message-ID: <1224092493.82.0.826547309197.issue3909@psf.upfronthosting.co.za> Sergey Lipnevich added the comment: I don't know what the proper procedure is (reopening or filing a new ticket), but I see this problem with Sphinx 0.5dev-20081015 and Python 2.6 on Windows XP. The change recommended by Winfried in msg73874 seems to fix it (patch attached). The version of MiKTeX: MiKTeX-pdfTeX 2.7.3147 (1.40.9) (MiKTeX 2.7) Copyright (C) 1982 D. E. Knuth, (C) 1996-2006 Han The Thanh TeX is a trademark of the American Mathematical Society. ---------- keywords: +patch nosy: +sergey Added file: http://bugs.python.org/file11805/sphinx.sty-issue3909.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 21:28:12 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 15 Oct 2008 19:28:12 +0000 Subject: [issue4129] C/API documentation: request for documentation of change to Py_ssize_t* arguments. In-Reply-To: <1224069376.75.0.412282464499.issue4129@psf.upfronthosting.co.za> Message-ID: <1224098892.82.0.534933278725.issue4129@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I don't think that we will change the 2.5 manuals anymore; Python 2.5 is about to see its last bug-fix release. For 2.6, I suppose contributions would be welcome. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 21:33:18 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 15 Oct 2008 19:33:18 +0000 Subject: [issue3574] compile() cannot decode Latin-1 source encodings In-Reply-To: Message-ID: <48F64570.5040602@v.loewis.de> Martin v. L?wis added the comment: > I added a test for compile() in there, which is why the patch is > claiming that. There is an uploaded version of test_pep3120.py on the > issue. Ah, ok. I missed that - that change is also fine. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 22:12:53 2008 From: report at bugs.python.org (John J Lee) Date: Wed, 15 Oct 2008 20:12:53 +0000 Subject: [issue2007] cookielib lacks FileCookieJar class for Internet Explorer In-Reply-To: <1202153753.42.0.88577975251.issue2007@psf.upfronthosting.co.za> Message-ID: <1224101573.41.0.476938288477.issue2007@psf.upfronthosting.co.za> John J Lee added the comment: Note that the code on wwwsearch.sf.net only reads cookies, and does not write them. Also, the approach used is fragile to changes to MS's "index.dat" database, which was the reason why that code was not included when cookielib was added. As far as I know, the index.dat format is not specified and is subject to change or removal by MS. It's possible that that MSIE cookiejar is already broken on Windows Vista, for example, since I have never tested it on that platform. An alternative approach that should allow writing cookies would be to use InternetGetCookie / InternetSetCookie API: http://msdn.microsoft.com/en-us/library/aa384710(VS.85).aspx A *sketch* of that approach (which I'm not going to implement properly) is here: http://codespeak.net/svn/wwwsearch/mechanize/trunk/attic/MSIEDBCookieJar.py The other, fragile (but working, at least on some MS OSes) approach: http://codespeak.net/svn/wwwsearch/mechanize/trunk/mechanize/_msiecookiejar.py ---------- nosy: +jjlee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 22:42:16 2008 From: report at bugs.python.org (jared jennings) Date: Wed, 15 Oct 2008 20:42:16 +0000 Subject: [issue4130] Intel icc 9.1 does not support __int128_t used by ctypes In-Reply-To: <1224103336.6.0.753228794094.issue4130@psf.upfronthosting.co.za> Message-ID: <1224103336.6.0.753228794094.issue4130@psf.upfronthosting.co.za> New submission from jared jennings : If the Intel 9.1 compilers are used to compile Python 2.6, the following compiler error results: /mnt/gpfs/usrpeople/jenninjl/Python-2.6-intel/Modules/_ctypes/libffi/src/x86/ffi64.c(43): error: identifier "__int128_t" is undefined __int128_t sse[MAX_SSE_REGS]; ^ Forum thread regarding lack of support for __int128_t in icc: http://software.intel.com/en-us/forums/intel-c-compiler/topic/56652/ Intel C++ Compiler 10.1 for Linux, Intrinsic Reference: http://softwarecommunity.intel.com/isn/downloads/softwareproducts/pdfs/347603.pdf The Intrinsic Reference details (pp. 2-4) the __m128 type supported by the Intel compiler, and restrictions on its use. (Note that the compiler used was 9.1 but the documentation is from 10.1.) ---------- assignee: theller components: ctypes messages: 74813 nosy: jared.jennings, theller severity: normal status: open title: Intel icc 9.1 does not support __int128_t used by ctypes type: compile error versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 22:51:29 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 15 Oct 2008 20:51:29 +0000 Subject: [issue4130] Intel icc 9.1 does not support __int128_t used by ctypes In-Reply-To: <1224103336.6.0.753228794094.issue4130@psf.upfronthosting.co.za> Message-ID: <1224103889.23.0.367947820434.issue4130@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Why are you reporting this as a bug in Python? Isn't it rather a bug in icc? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 22:54:40 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 15 Oct 2008 20:54:40 +0000 Subject: [issue3725] telnetlib module broken by str to unicode conversion In-Reply-To: <1220013826.6.0.647840298479.issue3725@psf.upfronthosting.co.za> Message-ID: <1224104080.82.0.223851268627.issue3725@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r66904. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 23:03:15 2008 From: report at bugs.python.org (John J Lee) Date: Wed, 15 Oct 2008 21:03:15 +0000 Subject: [issue1570255] redirected cookies Message-ID: <1224104595.89.0.339571365161.issue1570255@psf.upfronthosting.co.za> John J Lee added the comment: Sorry I turned up rather late here (is there a way to subscribe to changes to all bugs whose comments or title contain a given string?) If it works with Firefox and not with cookielib it's almost certainly a bug. However, it's not clear to me from the report what the real bug might be, because cookies aren't really redirected -- they're just added to the new request following the usual rules for adding Cookie: headers to requests. That's why the redirect handler deliberately doesn't add the unredirected headers -- the Cookie header gets added later on, by HTTPCookieProcessor. So, a diagnosis of the problem would involve finding out why cookielib thinks that your cookie should not be returned to the server in the request in question (which just happens to be a redirected request). Running your script with cookielib's logging enabled (see the documentation) will probably be all that's required to find that out; if you can still reproduce this, please post the log here (sanitized to remove usernames, passwords, etc.). If not, a test case, or failing that a sanitized dump of the HTTP traffic, would be very useful. ---------- nosy: +jjlee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 23:05:33 2008 From: report at bugs.python.org (Chris Ozeroff) Date: Wed, 15 Oct 2008 21:05:33 +0000 Subject: [issue4049] IDLE does not open at all In-Reply-To: <1223253081.14.0.0863464602504.issue4049@psf.upfronthosting.co.za> Message-ID: <1224104733.28.0.092330739144.issue4049@psf.upfronthosting.co.za> Chris Ozeroff added the comment: This bug does not just affect Vista. I am running Windows XP Professional x64 and encountered the same problem. Everything appeared to go fine on the installation, but then IDLE just refuses to run, nothing appears in the task manager, no errors, nothing. Command line still works. When I read Raj's coment, I realized that I had only installed it for me, not for all users. Installing it the other way worked. This seems like a pretty serious bug, because users (like me) are probably going to be totally baffled as to the cause, since there is no feedback. Thanks for the workaround! ---------- nosy: +scionkiller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 23:06:12 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 15 Oct 2008 21:06:12 +0000 Subject: [issue4043] Warnings in IDLE raise TypeError (such as attempting to import deprecated modules) In-Reply-To: <1223159409.57.0.545310219567.issue4043@psf.upfronthosting.co.za> Message-ID: <1224104772.04.0.265479112557.issue4043@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r66905. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 23:16:03 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 15 Oct 2008 21:16:03 +0000 Subject: [issue4049] IDLE does not open at all In-Reply-To: <1224104733.28.0.092330739144.issue4049@psf.upfronthosting.co.za> Message-ID: <48F65D90.5030802@v.loewis.de> Martin v. L?wis added the comment: > I am running Windows XP Professional x64 and encountered the same > problem. Everything appeared to go fine on the installation, but then > IDLE just refuses to run, nothing appears in the task manager, no > errors, nothing. Command line still works. It's normal that there are no errors. They get to stderr, and there is no stderr in a GUI application. Can you please try these steps, and report results? 1. open cmd.exe 2. cd \python26 3. python.exe Lib\idlelib\idle.py Report any output that this produces. > This seems like a pretty serious bug I don't think it's pretty serious. It has a workaround; a "pretty serious" bug doesn't have one. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 23:33:22 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 15 Oct 2008 21:33:22 +0000 Subject: [issue4073] distutils build_scripts and install_data commands need 2to3 support In-Reply-To: <1223427347.42.0.185462217727.issue4073@psf.upfronthosting.co.za> Message-ID: <1224106402.41.0.285585118952.issue4073@psf.upfronthosting.co.za> Benjamin Peterson added the comment: If you'd like, I can add support for skipping backup files to 2to3. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 23:34:09 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 15 Oct 2008 21:34:09 +0000 Subject: [issue4073] distutils build_scripts and install_data commands need 2to3 support In-Reply-To: <1224106402.41.0.285585118952.issue4073@psf.upfronthosting.co.za> Message-ID: <48F661CF.6060500@v.loewis.de> Martin v. L?wis added the comment: > If you'd like, I can add support for skipping backup files to 2to3. That would be useful, I think. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 15 23:42:36 2008 From: report at bugs.python.org (John J Lee) Date: Wed, 15 Oct 2008 21:42:36 +0000 Subject: [issue2190] MozillaCookieJar ignore HttpOnly cookies In-Reply-To: <1203957546.34.0.123660895963.issue2190@psf.upfronthosting.co.za> Message-ID: <1224106956.06.0.78428494267.issue2190@psf.upfronthosting.co.za> John J Lee added the comment: I think firefox 3 no longer writes cookies.txt (it writes cookies.sqlite instead). Can anybody point out a version of firefox that wrote this HttpOnly information to cookies.txt, so the patch can be tested? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 00:09:18 2008 From: report at bugs.python.org (John J Lee) Date: Wed, 15 Oct 2008 22:09:18 +0000 Subject: [issue4131] Note that Firefox 3 does not write cookies.txt In-Reply-To: <1224108558.64.0.703968829281.issue4131@psf.upfronthosting.co.za> Message-ID: <1224108558.64.0.703968829281.issue4131@psf.upfronthosting.co.za> New submission from John J Lee : Just adds a note to the cookielib documentation to point out that Firefox 3 no longer writes cookies.txt, the file format understood by cookielib.MozillaCookieJar (firefox now maintains persistent cookie state in an sqlite database). ---------- assignee: georg.brandl components: Documentation files: firefox3_cookies_txt.patch keywords: patch messages: 74823 nosy: georg.brandl, jjlee severity: normal status: open title: Note that Firefox 3 does not write cookies.txt Added file: http://bugs.python.org/file11806/firefox3_cookies_txt.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 00:48:10 2008 From: report at bugs.python.org (John J Lee) Date: Wed, 15 Oct 2008 22:48:10 +0000 Subject: [issue3704] cookielib doesn't handle URLs with / in parameters In-Reply-To: <1219856501.23.0.0473308500082.issue3704@psf.upfronthosting.co.za> Message-ID: <1224110890.94.0.228446295803.issue3704@psf.upfronthosting.co.za> John J Lee added the comment: Do we have an RFC 3986 URI parser in the stdlib now? It would be better to use that if so, but I don't see one. Failing that, an implementation of the relevant part of that RFC is only about four lines of code, so that would be better than naively looking for "?" (request_path should probably be changed at the same time). I'll try and add a patch that does that and check what Firefox does to see if I agree it's a bug. ---------- nosy: +jjlee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 01:10:12 2008 From: report at bugs.python.org (John J Lee) Date: Wed, 15 Oct 2008 23:10:12 +0000 Subject: [issue3924] cookielib chokes on non-integer cookie version, should ignore it instead In-Reply-To: <1222021824.75.0.209543556591.issue3924@psf.upfronthosting.co.za> Message-ID: <1224112212.47.0.750198273276.issue3924@psf.upfronthosting.co.za> John J Lee added the comment: The sensible fix for this is to strip the quotes off, defaulting to version 0 on failure to parse the version cookie-attribute. It's not necessary to retain the original version string. By the way, what you posted warning rather than a strictly unhandled exception or "crash" -- it's a bug, but won't cause the program to stop. And by "none of the cookies work after that", you mean that no cookies in headers containing the quoted version cookie-attribute are accepted by the cookiejar. FWIW, this bug only affects RFC 2109 cookies, not RFC 2965 cookies. ---------- nosy: +jjlee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 04:54:56 2008 From: report at bugs.python.org (Ray Wang) Date: Thu, 16 Oct 2008 02:54:56 +0000 Subject: [issue4027] wrong page index number in reference book of python documentation In-Reply-To: <1223026876.14.0.133212410345.issue4027@psf.upfronthosting.co.za> Message-ID: <1224125696.91.0.653488964794.issue4027@psf.upfronthosting.co.za> Ray Wang added the comment: > We are all volunteers here, and I see three replies. > This may or may not be trivial to fix, and may take some time. > Python docs are written in rst format and translated by Sphinx to > various formats. The main translation is to html, as viewed on the > site. Translation to .pdf is indirect via translation to latex and then > from latex to .pdf. Since the .html index appears flawless, and since a > different .pdf has problems, I suspect that the .pdf index problem is in > one of the two translation steps. Hence the change of component. > In the meanwhile, either ignore the index or use the html version. Thanks a lot for you reply. I just intend to raise somebody's attention to this problem in order to improve reader's experience. It might or might not be a trivial to fix though. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 05:20:15 2008 From: report at bugs.python.org (Senthil) Date: Thu, 16 Oct 2008 03:20:15 +0000 Subject: [issue3704] cookielib doesn't handle URLs with / in parameters In-Reply-To: <1219856501.23.0.0473308500082.issue3704@psf.upfronthosting.co.za> Message-ID: <1224127215.04.0.280490758657.issue3704@psf.upfronthosting.co.za> Senthil added the comment: John, issue3647 tries relative url parsing and joins to be RFC3986 compliance. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 08:43:32 2008 From: report at bugs.python.org (Winfried Plappert) Date: Thu, 16 Oct 2008 06:43:32 +0000 Subject: [issue4027] wrong page index number in reference book of python documentation In-Reply-To: <1223026876.14.0.133212410345.issue4027@psf.upfronthosting.co.za> Message-ID: <1224139412.82.0.964269980418.issue4027@psf.upfronthosting.co.za> Winfried Plappert added the comment: This problem also applies to Python 3.0rc1. Georg, could you please comment on ray's and tjreedy's question. Thanks ---------- versions: +Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 09:20:29 2008 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 16 Oct 2008 07:20:29 +0000 Subject: [issue1717] Get rid of more refercenes to __cmp__ In-Reply-To: <1199205565.64.0.0495465164968.issue1717@psf.upfronthosting.co.za> Message-ID: <1224141629.47.0.0492798707237.issue1717@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Guido's patch breaks these tests: > > test_descr test_hash test_long test_richcmp test_set It looks like all these are easily fixed: all these tests were making outdated assumptions and needed updating. Here's a patch that fixes these tests. One other detail: In test_descr.py, there are tests for 'overridden behavior for static classes' and 'overridden behavior for dynamic classes', using test classes 'Proxy' and 'DProxy'; apart from the name change, the 'dynamic' code is identical to the 'static' code, so I removed it. I guess this had to do with the __dynamic__ class attribute, which is ancient history, no? ---------- nosy: +marketdickinson Added file: http://bugs.python.org/file11807/nocmp_tests.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 09:47:55 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 16 Oct 2008 07:47:55 +0000 Subject: [issue4027] wrong page index number in reference book of python documentation In-Reply-To: <1223026876.14.0.133212410345.issue4027@psf.upfronthosting.co.za> Message-ID: <1224143275.3.0.277501300633.issue4027@psf.upfronthosting.co.za> Georg Brandl added the comment: I'm not ignoring this issue; I think it's a trivial fix once I find out where :) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 12:55:45 2008 From: report at bugs.python.org (Ray Wang) Date: Thu, 16 Oct 2008 10:55:45 +0000 Subject: [issue4027] wrong page index number in reference book of python documentation In-Reply-To: <1223026876.14.0.133212410345.issue4027@psf.upfronthosting.co.za> Message-ID: <1224154545.34.0.81442898196.issue4027@psf.upfronthosting.co.za> Ray Wang added the comment: ah, thanks goodness, what a fortune that you are not ignoring this problem. I expect the fix could be happen in the near future. :) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 13:03:52 2008 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 16 Oct 2008 11:03:52 +0000 Subject: [issue4015] [patch] make installed scripts executable on windows In-Reply-To: <1222949528.24.0.767744507339.issue4015@psf.upfronthosting.co.za> Message-ID: <1224155032.08.0.232190723701.issue4015@psf.upfronthosting.co.za> anatoly techtonik added the comment: The same issue in "Roundup Tracker" bugtracker http://sourceforge.net/tracker2/index.php?func=detail&aid=1163804&group_id=31577&atid=402788 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 13:19:58 2008 From: report at bugs.python.org (paul rubin) Date: Thu, 16 Oct 2008 11:19:58 +0000 Subject: [issue4123] random.shuffle slow on deque In-Reply-To: <1224021781.11.0.882167475115.issue4123@psf.upfronthosting.co.za> Message-ID: <1224155998.41.0.834529396884.issue4123@psf.upfronthosting.co.za> paul rubin added the comment: If it's not a bug, it is at least a surprising gotcha that should be documented in the manual. The collections module is described in the library docs as "high performance container datatypes" but I could not possibly consider the observed behavior to be high performance. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 14:43:17 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 16 Oct 2008 12:43:17 +0000 Subject: [issue4123] random.shuffle slow on deque In-Reply-To: <1224021781.11.0.882167475115.issue4123@psf.upfronthosting.co.za> Message-ID: <1224160997.13.0.00641954678318.issue4123@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, perhaps the deque documentation should make it clear that random access is O(n), rather than O(1) for a list. With this information it is easy to infer that operations such as shuffle() can be much slower on a deque. ---------- assignee: -> georg.brandl components: +Documentation -Library (Lib) nosy: +georg.brandl, pitrou priority: -> normal type: -> feature request versions: +Python 2.6, Python 3.0 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 15:36:42 2008 From: report at bugs.python.org (Andre Heider) Date: Thu, 16 Oct 2008 13:36:42 +0000 Subject: [issue4120] Do not embed manifest files in *.pyd when compiling with MSVC In-Reply-To: <1223971312.31.0.131537865896.issue4120@psf.upfronthosting.co.za> Message-ID: <1224164202.85.0.656375813231.issue4120@psf.upfronthosting.co.za> Andre Heider added the comment: To my surprise there indeed is a vista SP1 box in our test farm. We tested my patch on the following windows machines (each without an installed CRT redist): - xp SP2 and SP3 - xp64 SP2 - server 2003 R2 SP1 - vista with and without SP1 - windows server 2008 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 15:38:38 2008 From: report at bugs.python.org (Winfried Plappert) Date: Thu, 16 Oct 2008 13:38:38 +0000 Subject: [issue4132] LaTeX Error: Environment cmemberdescni undefined. In-Reply-To: <1224164318.48.0.349785856959.issue4132@psf.upfronthosting.co.za> Message-ID: <1224164318.48.0.349785856959.issue4132@psf.upfronthosting.co.za> New submission from Winfried Plappert : When building latex documentation for the first time round, the make of c-api fails with "! LaTeX Error: Environment cmemberdescni undefined.". A second make builds c-api and all other documents successfully. However, The pdf document c-api.pdf is lacking the TOC and the Index. All other PDFs have a TOC and an Index. I will include the a copy of the make output (typescript.org) - first call to make. ---------- assignee: georg.brandl components: Documentation files: typescript.org messages: 74836 nosy: georg.brandl, wplappert severity: normal status: open title: LaTeX Error: Environment cmemberdescni undefined. versions: Python 3.0 Added file: http://bugs.python.org/file11808/typescript.org _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 15:41:06 2008 From: report at bugs.python.org (Winfried Plappert) Date: Thu, 16 Oct 2008 13:41:06 +0000 Subject: [issue4132] LaTeX Error: Environment cmemberdescni undefined. In-Reply-To: <1224164318.48.0.349785856959.issue4132@psf.upfronthosting.co.za> Message-ID: <1224164466.45.0.385237988265.issue4132@psf.upfronthosting.co.za> Winfried Plappert added the comment: PS.: The original error occurs in line 164 of the attached output file. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 18:17:05 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 16 Oct 2008 16:17:05 +0000 Subject: [issue3391] Idle uses old showwarning signature In-Reply-To: <1216288315.21.0.418563087868.issue3391@psf.upfronthosting.co.za> Message-ID: <1224173825.13.0.453586957436.issue3391@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> benjamin.peterson nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 18:59:44 2008 From: report at bugs.python.org (Don Braffitt) Date: Thu, 16 Oct 2008 16:59:44 +0000 Subject: [issue4017] IDLE 2.6 broken on OSX (Leopard) In-Reply-To: <1222960590.08.0.635891151551.issue4017@psf.upfronthosting.co.za> Message-ID: <1224176384.49.0.665960800375.issue4017@psf.upfronthosting.co.za> Don Braffitt added the comment: ITEC-MBP-15087:~ dbraffitt$ cd /Library/Frameworks/Tcl.framework/ -bash: cd: /Library/Frameworks/Tcl.framework/: No such file or directory - Don _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 19:04:09 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 16 Oct 2008 17:04:09 +0000 Subject: [issue4123] random.shuffle slow on deque In-Reply-To: <1224021781.11.0.882167475115.issue4123@psf.upfronthosting.co.za> Message-ID: <1224176649.99.0.487514014153.issue4123@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: georg.brandl -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 19:13:03 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 16 Oct 2008 17:13:03 +0000 Subject: [issue4123] random.shuffle slow on deque In-Reply-To: <1224021781.11.0.882167475115.issue4123@psf.upfronthosting.co.za> Message-ID: <1224177183.99.0.791418100049.issue4123@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Will add a note to the deque docs that random access is O(n). ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 19:23:57 2008 From: report at bugs.python.org (Nat) Date: Thu, 16 Oct 2008 17:23:57 +0000 Subject: [issue4017] IDLE 2.6 broken on OSX (Leopard) In-Reply-To: <1222960590.08.0.635891151551.issue4017@psf.upfronthosting.co.za> Message-ID: <1224177837.37.0.402366656947.issue4017@psf.upfronthosting.co.za> Nat added the comment: Do you know if you have tcl/tk somewhere else? Otherwise, I think you need to install it. You can get the source from Sourceforge, or I think you can get it from Activestate. http://tcl.sourceforge.net/ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 19:52:33 2008 From: report at bugs.python.org (Skip Montanaro) Date: Thu, 16 Oct 2008 17:52:33 +0000 Subject: [issue4133] -R fix for setup.py In-Reply-To: <1224179553.69.0.502715553095.issue4133@psf.upfronthosting.co.za> Message-ID: <1224179553.69.0.502715553095.issue4133@psf.upfronthosting.co.za> New submission from Skip Montanaro : Please apply the attached one-line patch to setup.py. This is a backport from trunk/2.6. I would check it in myself but I don't have access to a read/write checkout at the moment. Thanks, Skip ---------- files: setup.py.diff keywords: patch messages: 74841 nosy: skip.montanaro priority: normal severity: normal status: open title: -R fix for setup.py versions: Python 2.5.3 Added file: http://bugs.python.org/file11809/setup.py.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 20:29:45 2008 From: report at bugs.python.org (jared jennings) Date: Thu, 16 Oct 2008 18:29:45 +0000 Subject: [issue4130] Intel icc 9.1 does not support __int128_t used by ctypes In-Reply-To: <1224103336.6.0.753228794094.issue4130@psf.upfronthosting.co.za> Message-ID: <1224181785.66.0.165472132553.issue4130@psf.upfronthosting.co.za> jared jennings added the comment: According to ?7.1.3 of the C99 standard, the name __int128_t is reserved for implementation-specific use because it starts with an underscore. So if gcc defines this type and icc does not, that is not a bug in icc; and if Python uses this type, it will only certainly build using gcc. I doubt such a dependency was intended, because it is not documented, and no error was thrown when the autoconf script detected that a compiler other than GCC was being used. C99 standard: http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1124.pdf Exact-width integer types (e.g. int64_t) are documented in ?7.18.1.1 of the above. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 20:34:12 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 16 Oct 2008 18:34:12 +0000 Subject: [issue4123] random.shuffle slow on deque In-Reply-To: <1224021781.11.0.882167475115.issue4123@psf.upfronthosting.co.za> Message-ID: <1224182052.74.0.620852201661.issue4123@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Patch attached. ---------- assignee: rhettinger -> georg.brandl keywords: +patch Added file: http://bugs.python.org/file11810/dequedoc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 20:53:40 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 16 Oct 2008 18:53:40 +0000 Subject: [issue4123] random.shuffle slow on deque In-Reply-To: <1224021781.11.0.882167475115.issue4123@psf.upfronthosting.co.za> Message-ID: <1224183220.97.0.683770712796.issue4123@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Done in r66913. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 21:01:00 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 16 Oct 2008 19:01:00 +0000 Subject: [issue4133] -R fix for setup.py In-Reply-To: <1224179553.69.0.502715553095.issue4133@psf.upfronthosting.co.za> Message-ID: <1224183660.71.0.881880539243.issue4133@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Done in r66914. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 21:06:00 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 16 Oct 2008 19:06:00 +0000 Subject: [issue3909] Building PDF documentation from tex files In-Reply-To: <1221842807.23.0.726390591277.issue3909@psf.upfronthosting.co.za> Message-ID: <1224183960.42.0.783198755132.issue3909@psf.upfronthosting.co.za> Georg Brandl added the comment: OK, I've committed a fix that I hope will work for all situations in r66916. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 21:32:11 2008 From: report at bugs.python.org (John J Lee) Date: Thu, 16 Oct 2008 19:32:11 +0000 Subject: [issue2007] cookielib lacks FileCookieJar class for Internet Explorer In-Reply-To: <1202153753.42.0.88577975251.issue2007@psf.upfronthosting.co.za> Message-ID: <1224185531.18.0.069745764567.issue2007@psf.upfronthosting.co.za> John J Lee added the comment: Forgot to add: if somebody else does the work, I'm happy to agree to the code being used in Python stdlib. Perhaps it would be necessary to get the author of the original Perl code from which this MSIE class is derived to sign a contributor agreement, though (even though he already agreed to a BSD-ish license). FWIW, there's also a Firefox 3 cookies.sqlite cookiejar in the same package (though not yet used in anger by me, and wanting more tests, so marked experimental). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 21:35:17 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 16 Oct 2008 19:35:17 +0000 Subject: [issue1717] Get rid of more refercenes to __cmp__ In-Reply-To: <1199205565.64.0.0495465164968.issue1717@psf.upfronthosting.co.za> Message-ID: <1224185717.24.0.250930804037.issue1717@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks, Mark! Applied in r66920. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 21:37:07 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 16 Oct 2008 19:37:07 +0000 Subject: [issue1717] Get rid of more refercenes to __cmp__ In-Reply-To: <1199205565.64.0.0495465164968.issue1717@psf.upfronthosting.co.za> Message-ID: <1224185827.73.0.809394970877.issue1717@psf.upfronthosting.co.za> Georg Brandl added the comment: The library still has __cmp__ functions defined here and there, e.g. in xmlrpc/client.py. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 21:40:29 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 16 Oct 2008 19:40:29 +0000 Subject: [issue3391] Idle uses old showwarning signature In-Reply-To: <1216288315.21.0.418563087868.issue3391@psf.upfronthosting.co.za> Message-ID: <1224186029.42.0.240372996908.issue3391@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks! Applied in r66922. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 21:41:56 2008 From: report at bugs.python.org (John J Lee) Date: Thu, 16 Oct 2008 19:41:56 +0000 Subject: [issue3647] urlparse - relative url parsing and joins to be RFC3986 compliance In-Reply-To: <1219409676.71.0.379802173537.issue3647@psf.upfronthosting.co.za> Message-ID: <1224186116.1.0.0149523700549.issue3647@psf.upfronthosting.co.za> John J Lee added the comment: There are a bunch of other candidate implementations of this RFC kicking around, I think. Also, I believe there was agreement on python-dev that a new module should be added rather than changing the behaviour of module urlparse. ---------- nosy: +jjlee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 21:44:47 2008 From: report at bugs.python.org (John J Lee) Date: Thu, 16 Oct 2008 19:44:47 +0000 Subject: [issue3647] urlparse - relative url parsing and joins to be RFC3986 compliance In-Reply-To: <1219409676.71.0.379802173537.issue3647@psf.upfronthosting.co.za> Message-ID: <1224186287.12.0.530954782732.issue3647@psf.upfronthosting.co.za> John J Lee added the comment: Here they are: http://bugs.python.org/issue1500504 http://bugs.python.org/issue1462525 http://bugs.python.org/issue1591035 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 21:54:10 2008 From: report at bugs.python.org (David Turner) Date: Thu, 16 Oct 2008 19:54:10 +0000 Subject: [issue4134] Peephole optimization: returning a temp In-Reply-To: <1224186850.06.0.464686732743.issue4134@psf.upfronthosting.co.za> Message-ID: <1224186850.06.0.464686732743.issue4134@psf.upfronthosting.co.za> New submission from David Turner : This patch adds an optimization to the peephole optimizer for the common case of: def func(...): ... retval = ... return retval Before the patch, the compiler would generate STORE_FAST 3 LOAD_FAST 3 RETURN_VALUE The store and load are pointless, as the local 3 (or whatever) is never used again. This patch makes the peephole optimizer optimize them out. ---------- components: None files: peephole-return-temp.diff keywords: patch messages: 74853 nosy: novalis_dt severity: normal status: open title: Peephole optimization: returning a temp versions: Python 2.7 Added file: http://bugs.python.org/file11811/peephole-return-temp.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 22:33:08 2008 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 16 Oct 2008 20:33:08 +0000 Subject: [issue1717] Get rid of more refercenes to __cmp__ In-Reply-To: <1199205565.64.0.0495465164968.issue1717@psf.upfronthosting.co.za> Message-ID: <1224189188.31.0.316221628907.issue1717@psf.upfronthosting.co.za> Mark Dickinson added the comment: Presumably any nonzero entries for tp_compare in type initializers should be looked at closely, as well? I see nonzero tp_compare entries in: Modules/_tkinter.c Modules/parsermodule.c Objects/cellobject.c Objects/descrobject.c PC/winreg.c Objects/setobject.c (but that last one just raises an error pointing out that cmp can't be used to compare sets, so maybe that's okay). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 22:34:27 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 16 Oct 2008 20:34:27 +0000 Subject: [issue4132] LaTeX Error: Environment cmemberdescni undefined. In-Reply-To: <1224164318.48.0.349785856959.issue4132@psf.upfronthosting.co.za> Message-ID: <1224189267.92.0.388719020854.issue4132@psf.upfronthosting.co.za> Georg Brandl added the comment: Should be fixed in r66930. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 22:38:25 2008 From: report at bugs.python.org (John J Lee) Date: Thu, 16 Oct 2008 20:38:25 +0000 Subject: [issue3647] urlparse - relative url parsing and joins to be RFC3986 compliance In-Reply-To: <1219409676.71.0.379802173537.issue3647@psf.upfronthosting.co.za> Message-ID: <1224189505.84.0.836115183025.issue3647@psf.upfronthosting.co.za> John J Lee added the comment: Hmm, I see you've already commented on some of those, Senthil. Perhaps you could add a comment to this bug explaining how your patch relates to the others. Should it replace them? (why?) Should one of those patches be applied also? Also, my comment about there being agreement on python-dev is probably a misrepresentation. This is what I remembered, I think: http://article.gmane.org/gmane.comp.python.devel/73314/ which seems to say that a new API should be added, but not that urlparse shouldn't be changed to be more compliant with RFC 3986. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 22:55:50 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 16 Oct 2008 20:55:50 +0000 Subject: [issue1717] Get rid of more refercenes to __cmp__ In-Reply-To: <1199205565.64.0.0495465164968.issue1717@psf.upfronthosting.co.za> Message-ID: <1224190550.25.0.737759893141.issue1717@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Let's lower the priority on this. ---------- priority: release blocker -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 23:04:02 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 16 Oct 2008 21:04:02 +0000 Subject: [issue4027] wrong page index number in reference book of python documentation In-Reply-To: <1223026876.14.0.133212410345.issue4027@psf.upfronthosting.co.za> Message-ID: <1224191042.64.0.717227219754.issue4027@psf.upfronthosting.co.za> Georg Brandl added the comment: OK, I have the problem. The hyperref package must not be included before fncychap, in fact, it should be included last. I'll fix this as soon as I've found the most adaptable way to do it. :) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 23:04:37 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 16 Oct 2008 21:04:37 +0000 Subject: [issue4103] sphinx: latexwriter uses undefined 'excdescni' environment In-Reply-To: <1223674377.15.0.736293209348.issue4103@psf.upfronthosting.co.za> Message-ID: <1224191077.99.0.888970480724.issue4103@psf.upfronthosting.co.za> Georg Brandl added the comment: Should be fixed in 0.5 trunk (since r66930). ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 23:16:38 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 16 Oct 2008 21:16:38 +0000 Subject: [issue4102] sphinx: ansi color even on dumb terminal In-Reply-To: <1223673661.93.0.815684986423.issue4102@psf.upfronthosting.co.za> Message-ID: <1224191798.59.0.548606707721.issue4102@psf.upfronthosting.co.za> Georg Brandl added the comment: Should be fixed in r66933. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 23:18:03 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 16 Oct 2008 21:18:03 +0000 Subject: [issue3623] _json: fix raise_errmsg(), py_encode_basestring_ascii() and linecol() In-Reply-To: <1219273124.72.0.104841129313.issue3623@psf.upfronthosting.co.za> Message-ID: <1224191883.53.0.4295733681.issue3623@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r66932 and r66934. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 23:20:28 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 16 Oct 2008 21:20:28 +0000 Subject: [issue4131] Note that Firefox 3 does not write cookies.txt In-Reply-To: <1224108558.64.0.703968829281.issue4131@psf.upfronthosting.co.za> Message-ID: <1224192028.19.0.309458897014.issue4131@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed in r66936. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 23:20:55 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 16 Oct 2008 21:20:55 +0000 Subject: [issue4129] C/API documentation: request for documentation of change to Py_ssize_t* arguments. In-Reply-To: <1224069376.75.0.412282464499.issue4129@psf.upfronthosting.co.za> Message-ID: <1224192055.77.0.813984747137.issue4129@psf.upfronthosting.co.za> Georg Brandl added the comment: I agree with Martin. Patches are welcome. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 23:28:12 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 16 Oct 2008 21:28:12 +0000 Subject: [issue3623] _json: fix raise_errmsg(), py_encode_basestring_ascii() and linecol() In-Reply-To: <1219273124.72.0.104841129313.issue3623@psf.upfronthosting.co.za> Message-ID: <1224192492.11.0.632542345604.issue3623@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Refleak was fixed in r66934. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 23:28:27 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 16 Oct 2008 21:28:27 +0000 Subject: [issue3623] _json: fix raise_errmsg(), py_encode_basestring_ascii() and linecol() In-Reply-To: <1219273124.72.0.104841129313.issue3623@psf.upfronthosting.co.za> Message-ID: <1224192507.86.0.484631039548.issue3623@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I mean r66938. Sorry! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 23:32:46 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 16 Oct 2008 21:32:46 +0000 Subject: [issue4134] Peephole optimization: returning a temp In-Reply-To: <1224186850.06.0.464686732743.issue4134@psf.upfronthosting.co.za> Message-ID: <1224192766.4.0.807284761744.issue4134@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Sorry, am not excited by this one. It is not a common idiom in most code that I've ever seen and it never occurs in an inner-loop. Besides the load_fast/store_fast combination are so *very* fast that any real code would not see a worthwhile speedup. When the AST optimizer gets built-out, I expect that we'll get many of these sort of optimizations for free. In the meantime, this one just isn't worth adding complexity to the peepholer. ---------- assignee: -> rhettinger nosy: +rhettinger priority: -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 23:35:00 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 16 Oct 2008 21:35:00 +0000 Subject: [issue4134] Peephole optimization: returning a temp In-Reply-To: <1224186850.06.0.464686732743.issue4134@psf.upfronthosting.co.za> Message-ID: <1224192900.09.0.526880364463.issue4134@psf.upfronthosting.co.za> Georg Brandl added the comment: I wonder why people don't just write "return ..." in the first place... ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 23:36:51 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 16 Oct 2008 21:36:51 +0000 Subject: [issue4012] Minor errors in multiprocessing docs In-Reply-To: <1222910620.56.0.617350560863.issue4012@psf.upfronthosting.co.za> Message-ID: <1224193011.66.0.287379643375.issue4012@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed the "processing" name in r66939. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 23:39:00 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 16 Oct 2008 21:39:00 +0000 Subject: [issue4083] try statement in language reference not updated for v2.6 In-Reply-To: <1223538033.46.0.0709872608111.issue4083@psf.upfronthosting.co.za> Message-ID: <1224193140.68.0.771141453684.issue4083@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r66940. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 16 23:59:21 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 16 Oct 2008 21:59:21 +0000 Subject: [issue3727] poplib module broken by str to unicode conversion In-Reply-To: <1220018390.31.0.482710376741.issue3727@psf.upfronthosting.co.za> Message-ID: <1224194361.72.0.431074543789.issue3727@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I like this patch. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 00:05:36 2008 From: report at bugs.python.org (Alex Coventry) Date: Thu, 16 Oct 2008 22:05:36 +0000 Subject: [issue4135] help("modules ftp") fails due to test modules In-Reply-To: <1224194736.44.0.337868576776.issue4135@psf.upfronthosting.co.za> Message-ID: <1224194736.44.0.337868576776.issue4135@psf.upfronthosting.co.za> New submission from Alex Coventry : The modules test.bad_coding and test.badsyntax_pep3120.py cause the command "help('modules ftp')" to fail with the errors LookupError: unknown encoding: uft-8 and SyntaxError: Non-UTF-8 code starting with '\xf6' in file (null) on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details respectively. Removing these modules causes the help command to run without error. Not that that's a solution, just evidence for their involvement in the problem. ---------- messages: 74871 nosy: throwaway severity: normal status: open title: help("modules ftp") fails due to test modules _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 00:08:49 2008 From: report at bugs.python.org (Bob Ippolito) Date: Thu, 16 Oct 2008 22:08:49 +0000 Subject: [issue4136] merge json library with simplejson 2.0.3 In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> New submission from Bob Ippolito : simplejson 2.0.3 includes major performance enhancements (both in Python and C) and removes usage of the private sre functionality. I will need some help with 3.0 since I am not well versed in the changes to the C API or Python code for that, but merging for 2.6.1 should be no big deal. How should I go about this? ---------- assignee: bob.ippolito components: Library (Lib) messages: 74872 nosy: bob.ippolito severity: normal status: open title: merge json library with simplejson 2.0.3 versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 00:16:43 2008 From: report at bugs.python.org (Alex Coventry) Date: Thu, 16 Oct 2008 22:16:43 +0000 Subject: [issue4135] help("modules ftp") fails due to test modules In-Reply-To: <1224194736.44.0.337868576776.issue4135@psf.upfronthosting.co.za> Message-ID: <1224195403.97.0.867400587382.issue4135@psf.upfronthosting.co.za> Changes by Alex Coventry : ---------- versions: +Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 00:18:15 2008 From: report at bugs.python.org (STINNER Victor) Date: Thu, 16 Oct 2008 22:18:15 +0000 Subject: [issue3727] poplib module broken by str to unicode conversion In-Reply-To: <1220018390.31.0.482710376741.issue3727@psf.upfronthosting.co.za> Message-ID: <1224195495.05.0.840354240687.issue3727@psf.upfronthosting.co.za> Changes by STINNER Victor : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 00:19:50 2008 From: report at bugs.python.org (STINNER Victor) Date: Thu, 16 Oct 2008 22:19:50 +0000 Subject: [issue3727] poplib module broken by str to unicode conversion In-Reply-To: <1220018390.31.0.482710376741.issue3727@psf.upfronthosting.co.za> Message-ID: <1224195590.34.0.758936565174.issue3727@psf.upfronthosting.co.za> STINNER Victor added the comment: Oooops, I removed the message74562 from giampaolo.rodola, sorry: "As for issue #3911 this is another module for which an actual test suite would be very necessary." _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 00:25:49 2008 From: report at bugs.python.org (STINNER Victor) Date: Thu, 16 Oct 2008 22:25:49 +0000 Subject: [issue4136] merge json library with simplejson 2.0.3 In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1224195949.71.0.55063334447.issue4136@psf.upfronthosting.co.za> STINNER Victor added the comment: Can you write a patch against python trunk ? :-) ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 00:39:06 2008 From: report at bugs.python.org (Bob Ippolito) Date: Thu, 16 Oct 2008 22:39:06 +0000 Subject: [issue4136] merge json library with simplejson 2.0.3 In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1224196746.04.0.57239833767.issue4136@psf.upfronthosting.co.za> Bob Ippolito added the comment: Sure, but that doesn't port it to Python 3.0 :) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 00:48:21 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 16 Oct 2008 22:48:21 +0000 Subject: [issue4134] Peephole optimization: returning a temp In-Reply-To: <1224186850.06.0.464686732743.issue4134@psf.upfronthosting.co.za> Message-ID: <1224197301.92.0.452866211944.issue4134@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Agreed. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 00:48:39 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 16 Oct 2008 22:48:39 +0000 Subject: [issue4136] merge json library with simplejson 2.0.3 In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1224197319.74.0.150539004189.issue4136@psf.upfronthosting.co.za> Martin v. L?wis added the comment: > Sure, but that doesn't port it to Python 3.0 :) Still, as Victor suggests, the first step for porting it to 3.0 definitely is to produce a patch for the trunk. What the next steps will be can be discussed when this step has been completed. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 00:57:29 2008 From: report at bugs.python.org (STINNER Victor) Date: Thu, 16 Oct 2008 22:57:29 +0000 Subject: [issue3727] poplib module broken by str to unicode conversion In-Reply-To: <1220018390.31.0.482710376741.issue3727@psf.upfronthosting.co.za> Message-ID: <1224197849.82.0.6257657172.issue3727@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11782/poplib_unicode-5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 00:58:44 2008 From: report at bugs.python.org (STINNER Victor) Date: Thu, 16 Oct 2008 22:58:44 +0000 Subject: [issue3727] poplib module broken by str to unicode conversion In-Reply-To: <1220018390.31.0.482710376741.issue3727@psf.upfronthosting.co.za> Message-ID: <1224197924.32.0.152583711183.issue3727@psf.upfronthosting.co.za> STINNER Victor added the comment: After testing real world message, my patch using pure unicode doesn't work. The problem comes with message encoding with "8-bit" encoding. If the email charset is different than POP3.encoding, the message in not decoded correctly. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 00:59:20 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 16 Oct 2008 22:59:20 +0000 Subject: [issue3787] Make PyInstanceMethod_Type available or remove it In-Reply-To: <1220640720.16.0.546689222531.issue3787@psf.upfronthosting.co.za> Message-ID: <1224197960.6.0.0327125889809.issue3787@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Let's commit the capi patch but not expose instancemethod. Make it so. ---------- resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 01:24:59 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 16 Oct 2008 23:24:59 +0000 Subject: [issue3781] warnings.catch_warnings fails gracelessly when recording warnings but no warnings are emitted In-Reply-To: <1220566209.35.0.614126643007.issue3781@psf.upfronthosting.co.za> Message-ID: <1224199499.41.0.952934445553.issue3781@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Applied in r66945. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 01:33:30 2008 From: report at bugs.python.org (David Turner) Date: Thu, 16 Oct 2008 23:33:30 +0000 Subject: [issue4134] Peephole optimization: returning a temp In-Reply-To: <1224186850.06.0.464686732743.issue4134@psf.upfronthosting.co.za> Message-ID: <1224200010.94.0.974729757579.issue4134@psf.upfronthosting.co.za> David Turner added the comment: The idiom appears at least 370 times in the standard library. And, while on its own it can't appear in a loop, a function that uses it might get called in a loop. You mention some sort of AST optimizer. I haven't really followed Python development enough to know anything about this. Is it worth bothering to do other work on the peepholer which might handle some more common cases? If not, is there a branch or something where I can look at the AST optimizer? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 01:56:44 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 16 Oct 2008 23:56:44 +0000 Subject: [issue3787] Make PyInstanceMethod_Type available or remove it In-Reply-To: <1220640720.16.0.546689222531.issue3787@psf.upfronthosting.co.za> Message-ID: <1224201404.65.0.93597771456.issue3787@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Applied in r66947. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 02:05:35 2008 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 Oct 2008 00:05:35 +0000 Subject: [issue3727] poplib module broken by str to unicode conversion In-Reply-To: <1220018390.31.0.482710376741.issue3727@psf.upfronthosting.co.za> Message-ID: <1224201935.31.0.960997400279.issue3727@psf.upfronthosting.co.za> STINNER Victor added the comment: New patch: resp() returns bytes - self.file is now a binary file - encode commands using POP3.encoding charset, default is UTF-8 - use md5.hexdigest() - factorize POP3_SSL code: code specific for SSL is just the creation of the socket The default charset is UTF-8, but most servers only accept pure ASCII login/password (eg. gmail.com) or a smaller subset of ASCII (eg. only A-Z, a-z, 0-9 and some ponctuation signs :-/). If you user non-ASCII login/password and your server doesn't use UTF-8, change POP3.encoding or .encoding (encoding is not used in the constructor). welcome attribute (and getwelcome() results) is a bytes string. You have to parse the message headers to get the right charset to decode bytes to unicode characters. A multipart message may contains two or more charsets and different encoding. But poplib is not responsible to decode messages, just to download a message as bytes. Arguments (username (login), password, a message identifier) are unicode strings. For a message identifier, you can also use an integer (nothing new, it was already possible). I hope that apop() works. No Python error is raised but no server does support his authentication method. I tested 3 servers (pop3.haypocalc.com, pop.laposte.net and pop.gmail.com) and none supports APOP. I tested POP3 and POP3_SSL (gmail requires SSL). Added file: http://bugs.python.org/file11812/poplib-bytes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 02:07:27 2008 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 Oct 2008 00:07:27 +0000 Subject: [issue3727] poplib module broken by str to unicode conversion In-Reply-To: <1220018390.31.0.482710376741.issue3727@psf.upfronthosting.co.za> Message-ID: <1224202047.73.0.291352423468.issue3727@psf.upfronthosting.co.za> STINNER Victor added the comment: About apop(): the second argument is the user password, not a "shared password" which is the local variable "timestamp" read from welcome attribute. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 02:20:42 2008 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 Oct 2008 00:20:42 +0000 Subject: [issue3727] poplib module broken by str to unicode conversion In-Reply-To: <1220018390.31.0.482710376741.issue3727@psf.upfronthosting.co.za> Message-ID: <1224202842.78.0.320932881233.issue3727@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11812/poplib-bytes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 02:21:31 2008 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 Oct 2008 00:21:31 +0000 Subject: [issue3727] poplib module broken by str to unicode conversion In-Reply-To: <1220018390.31.0.482710376741.issue3727@psf.upfronthosting.co.za> Message-ID: <1224202891.19.0.0842764968752.issue3727@psf.upfronthosting.co.za> STINNER Victor added the comment: I forgot the new unit tests. New patch: - port python trunk unit tests Added file: http://bugs.python.org/file11813/poplib-bytes-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 03:15:54 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 17 Oct 2008 01:15:54 +0000 Subject: [issue3685] Crash while compiling Python 3000 in OpenBSD 4.4 In-Reply-To: <1219733554.71.0.0422559715732.issue3685@psf.upfronthosting.co.za> Message-ID: <1224206154.43.0.92409068121.issue3685@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: r66948 ---------- nosy: +barry resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 03:30:09 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 17 Oct 2008 01:30:09 +0000 Subject: [issue3661] sys.call_tracing segfaults In-Reply-To: <1219606145.44.0.504923400807.issue3661@psf.upfronthosting.co.za> Message-ID: <1224207009.12.0.682293947192.issue3661@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: r66949 ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 03:34:46 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 17 Oct 2008 01:34:46 +0000 Subject: [issue3664] Pickler.dump from a badly initialized Pickler segfaults In-Reply-To: <1219609595.23.0.140986466622.issue3664@psf.upfronthosting.co.za> Message-ID: <1224207286.26.0.791494098713.issue3664@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Rather than attach a full _pickle.c file, please generate a unified diff with just your changes. The patch should include a test for the crashing condition. If you can upload that I'll try to accept it for rc3. Deferring for now. ---------- nosy: +barry priority: release blocker -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 03:39:29 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 17 Oct 2008 01:39:29 +0000 Subject: [issue3714] nntplib module broken by str to unicode conversion In-Reply-To: <1219932621.55.0.439111476187.issue3714@psf.upfronthosting.co.za> Message-ID: <1224207569.39.0.928400541507.issue3714@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: This issue does not seem close to resolution and the nntplib is not critical enough to block the release, so I'm deferring this to rc3. ---------- nosy: +barry priority: release blocker -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 03:50:58 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 17 Oct 2008 01:50:58 +0000 Subject: [issue4125] runtests.sh: use -bb flag of Python In-Reply-To: <1224025600.55.0.798566736158.issue4125@psf.upfronthosting.co.za> Message-ID: <1224208258.29.0.44446974343.issue4125@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: r66950 ---------- nosy: +barry status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 03:51:13 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 17 Oct 2008 01:51:13 +0000 Subject: [issue3988] Byte warning mode and b'' != '' In-Reply-To: <1222601577.06.0.270135591037.issue3988@psf.upfronthosting.co.za> Message-ID: <1224208273.35.0.280558332431.issue3988@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: r66950 ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 03:55:12 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 17 Oct 2008 01:55:12 +0000 Subject: [issue3574] compile() cannot decode Latin-1 source encodings In-Reply-To: <1218933580.53.0.0614369271998.issue3574@psf.upfronthosting.co.za> Message-ID: <1224208512.15.0.110263859365.issue3574@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Brett, please apply and close the issue. ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 05:30:14 2008 From: report at bugs.python.org (Mark Tsuchida) Date: Fri, 17 Oct 2008 03:30:14 +0000 Subject: [issue4017] Tkinter cannot find Tcl/Tk on Mac OS X In-Reply-To: <1222960590.08.0.635891151551.issue4017@psf.upfronthosting.co.za> Message-ID: <1224214214.95.0.0536080380417.issue4017@psf.upfronthosting.co.za> Mark Tsuchida added the comment: There are two symptoms here, each caused by a different bug. Neither is specific to IDLE; they have to do with Tkinter recognizing the correct Tcl/Tk installation at build time and run time. Bug 1: The Python 2.6 binary installer appears (judging from the error message) to have been built against a Tcl installation in /Library/Frameworks/Tcl.framework. Mac OS X (10.4.11 and I assume Leopard as well) comes with Tcl/Tk, installed in /System/Library/Frameworks, but there will be no /Library/Frameworks/Tcl.framework unless you install Tcl/Tk on your own (but read on before doing so). Symptom 1: Hence, the error about not being able to find /Library/Frameworks/Tcl.framework/Versions/8.5/Tcl. This symptom should not manifest if either a) you install Tcl/Tk 8.5 on your own, or b) you build Python from the source (so that it finds the pre-installed Tcl in /System/Library). Bug 2: The Python source distribution (both 2.5.2 and 2.6; I have not checked earlier versions) searches for Tcl and Tk in the wrong order, as pointed out in the comp.lang.python post referenced in msg74440 and msg74544. In Mac OS X's standard search order for frameworks, /Library/Frameworks comes before /System/Library/Frameworks (see the ld and dyld man pages: http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/ ld.1.html and http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/ dyld.1.html), whereas the setup.py script in the Python source distribution tries /System/Library/Frameworks/Tcl.framework before /Library/Frameworks/Tcl.framework (and same for Tk.framework). Symptom 2: This causes a problem _only_ when you have a separately installed version of Tcl (e.g. 8.5). Python's setup.py script finds the Tk installation in /System/Library/Frameworks/Tk.framework (version 8.4) and uses its headers, whereas the linker (being part of Mac OS X) chooses the Tk dynamic library in /Library/Frameworks/Tk.framework (version 8.5 if that's what you installed). (I suspect the linker records the Tcl and Tk installations (or versions) found at build time.) Hence the error message about Tk version mismatch. If you are affected by both of these bugs, Tkinter will not work whether or not you install Tcl 8.5 in /Library/Frameworks. I believe the setup.py script ought to be corrected (as per the post cited in msg74544). I do not know of an easy fix for existing Python installations that are affected by this, other than rebuilding Python. ---------- components: +Build, Installation, Macintosh, Tkinter -IDLE nosy: +mtsch title: IDLE 2.6 broken on OSX (Leopard) -> Tkinter cannot find Tcl/Tk on Mac OS X versions: +Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 05:34:08 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 17 Oct 2008 03:34:08 +0000 Subject: [issue3574] compile() cannot decode Latin-1 source encodings In-Reply-To: <1218933580.53.0.0614369271998.issue3574@psf.upfronthosting.co.za> Message-ID: <1224214448.28.0.171563031653.issue3574@psf.upfronthosting.co.za> Brett Cannon added the comment: Sorry about that; been one of those days. Doing a svn up and making sure it still compiles fine. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 05:39:12 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 17 Oct 2008 03:39:12 +0000 Subject: [issue3574] compile() cannot decode Latin-1 source encodings In-Reply-To: <1218933580.53.0.0614369271998.issue3574@psf.upfronthosting.co.za> Message-ID: <1224214752.79.0.671249030502.issue3574@psf.upfronthosting.co.za> Brett Cannon added the comment: Applied in r66951. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 07:10:12 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 17 Oct 2008 05:10:12 +0000 Subject: [issue3664] Pickler.dump from a badly initialized Pickler segfaults In-Reply-To: <1219609595.23.0.140986466622.issue3664@psf.upfronthosting.co.za> Message-ID: <1224220212.07.0.0827140470905.issue3664@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Oops. I must have been quite tired when I submitted that. Here's the patch for the fix and the test case. ---------- keywords: +patch Added file: http://bugs.python.org/file11814/issue3664_fix.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 07:50:26 2008 From: report at bugs.python.org (Ray Wang) Date: Fri, 17 Oct 2008 05:50:26 +0000 Subject: [issue4027] wrong page index number in reference book of python documentation In-Reply-To: <1223026876.14.0.133212410345.issue4027@psf.upfronthosting.co.za> Message-ID: <1224222626.59.0.210039521458.issue4027@psf.upfronthosting.co.za> Ray Wang added the comment: Woohoo, you are awesome, thanks a lot! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 09:49:01 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 17 Oct 2008 07:49:01 +0000 Subject: [issue3664] Pickler.dump from a badly initialized Pickler segfaults In-Reply-To: <1219609595.23.0.140986466622.issue3664@psf.upfronthosting.co.za> Message-ID: <1224229741.59.0.781760215413.issue3664@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The patch is fine. ---------- nosy: +amaury.forgeotdarc resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 10:09:24 2008 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 17 Oct 2008 08:09:24 +0000 Subject: [issue4137] update SIG web pages In-Reply-To: <1224230964.55.0.983457546691.issue4137@psf.upfronthosting.co.za> Message-ID: <1224230964.55.0.983457546691.issue4137@psf.upfronthosting.co.za> New submission from anatoly techtonik : Distutils SIG pages contain largely outdated information. http://www.python.org/community/sigs/current/distutils-sig/ It would be good to replace CVS instructions with SVN, add wiki link, mark download page as "archived version" and add notice how newer distutils are packaged into Python distribution. In general this content seems a little bit stale and if it could be revised to a more up-to-date status - that will surely increase the willingness to collaborate. ---------- components: Distutils messages: 74899 nosy: techtonik severity: normal status: open title: update SIG web pages type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 10:12:46 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 17 Oct 2008 08:12:46 +0000 Subject: [issue4125] runtests.sh: use -bb flag of Python In-Reply-To: <1224025600.55.0.798566736158.issue4125@psf.upfronthosting.co.za> Message-ID: <1224231166.99.0.528109383981.issue4125@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Barry, did you *really* apply this change? I can't find it anywhere. r66950 does not contains runtests.sh: http://mail.python.org/pipermail/python-3000-checkins/2008-October/004752.html ---------- nosy: +amaury.forgeotdarc status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 13:25:24 2008 From: report at bugs.python.org (Georg Brandl) Date: Fri, 17 Oct 2008 11:25:24 +0000 Subject: [issue4027] wrong page index number in reference book of python documentation In-Reply-To: <1223026876.14.0.133212410345.issue4027@psf.upfronthosting.co.za> Message-ID: <1224242724.81.0.164646791362.issue4027@psf.upfronthosting.co.za> Georg Brandl added the comment: Should be fixed now in r66955. Thanks for your patience! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 13:52:43 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 17 Oct 2008 11:52:43 +0000 Subject: [issue3664] Pickler.dump from a badly initialized Pickler segfaults In-Reply-To: <1219609595.23.0.140986466622.issue3664@psf.upfronthosting.co.za> Message-ID: <1224244363.6.0.802813748913.issue3664@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Amaury, please apply the patch and close the issue. Thanks! ---------- priority: deferred blocker -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 14:06:04 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 17 Oct 2008 12:06:04 +0000 Subject: [issue4125] runtests.sh: use -bb flag of Python In-Reply-To: <1224025600.55.0.798566736158.issue4125@psf.upfronthosting.co.za> Message-ID: <1224245164.54.0.568820487147.issue4125@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: r66957. really. fer sher. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 14:28:07 2008 From: report at bugs.python.org (Matthew Barnett) Date: Fri, 17 Oct 2008 12:28:07 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1224246487.72.0.809524526752.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: Further to msg74203, I can see no reason why we can't allow duplicate capture group names if the groups are on different branches are are thus mutually exclusive. For example: (?Pa)|(?Pb) Apart from this I think that duplicate names should continue to raise an exception. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 14:48:22 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 17 Oct 2008 12:48:22 +0000 Subject: [issue3626] python3.0 interpreter on Cygwin ignores all arguments In-Reply-To: <1219293362.56.0.98048679745.issue3626@psf.upfronthosting.co.za> Message-ID: <1224247702.51.0.239439494888.issue3626@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I think cygwin_badprintf.patch needs to consider the case r==PATH_MAX; this happens when the conversion would need more than PATH_MAX bytes for the target buffer. In that case, I think it would be good enough to write "" into cfilename (using cfilename as is will crash because it's not null-terminated; forcefully null-terminating it might break the shift state) ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 15:14:49 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 17 Oct 2008 13:14:49 +0000 Subject: [issue4128] Performance regression in long division in 2.6 In-Reply-To: <1224064997.42.0.94461510007.issue4128@psf.upfronthosting.co.za> Message-ID: <1224249289.01.0.0699099432103.issue4128@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It may be that one of the builds was done with profile-guided optimization and the other was not. If you are interested in long division performance, you may also take a look at #3451. ---------- nosy: +loewis, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 15:49:15 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 17 Oct 2008 13:49:15 +0000 Subject: [issue4091] python dll not installed in windows system directory In-Reply-To: <1223576423.68.0.448178359444.issue4091@psf.upfronthosting.co.za> Message-ID: <1224251355.29.0.00652195538548.issue4091@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Committed as r66958, r66959, and r66960. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 15:52:39 2008 From: report at bugs.python.org (Winfried Plappert) Date: Fri, 17 Oct 2008 13:52:39 +0000 Subject: [issue4027] wrong page index number in reference book of python documentation In-Reply-To: <1223026876.14.0.133212410345.issue4027@psf.upfronthosting.co.za> Message-ID: <1224251559.79.0.727441232735.issue4027@psf.upfronthosting.co.za> Winfried Plappert added the comment: Hi Georg, I tried to rebuilt the documentation from scratch (2.6 as well as 3.0rc1) and make fails with the command " \tableofcontents", which is part of the generated *.tex file. I will include the typescript output of the make command. The error message in 'typescript' is line 77. The checked ot revision of sphinx is: 'Checked out revision 66957.' Added file: http://bugs.python.org/file11815/typescript _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 16:09:07 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 17 Oct 2008 14:09:07 +0000 Subject: [issue4128] Performance regression in long division in 2.6 In-Reply-To: <1224064997.42.0.94461510007.issue4128@psf.upfronthosting.co.za> Message-ID: <1224252547.55.0.681307086425.issue4128@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The 2.5 build was done by VS 2003, with no PGO, and the 2.6 build was done with VS 2008, and it used profile-guided optimization. To understand why it behaves the way it behaves, you probably need to look at the respective machine code. I propose to close this as "won't fix"; I'm not interested in 150ms speed differences when dividing 100000 digit numbers. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 16:14:53 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 17 Oct 2008 14:14:53 +0000 Subject: [issue2642] MSVCRT packing in Windows Installer (3.0a4) In-Reply-To: <1208307954.26.0.976441320091.issue2642@psf.upfronthosting.co.za> Message-ID: <1224252893.62.0.0904669554477.issue2642@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I'm closing this issue as out-of-date. Static linking is out of the question, as that will duplicate CRT global various in confusing and risky ways. Installing the CRTs into the Python directory is what Python 2.6 does, and it does not work on Vista. ---------- nosy: +loewis resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 16:19:03 2008 From: report at bugs.python.org (Winfried Plappert) Date: Fri, 17 Oct 2008 14:19:03 +0000 Subject: [issue4027] wrong page index number in reference book of python documentation In-Reply-To: <1223026876.14.0.133212410345.issue4027@psf.upfronthosting.co.za> Message-ID: <1224253143.95.0.775041066716.issue4027@psf.upfronthosting.co.za> Winfried Plappert added the comment: Interesting: I reran the build of PDFs under Windows (XP) and it works like a charm! Everything is there, the TOC, the Index and the Contents. I have no idea why Ubuntus pdflatex decided to go on strike. Thanks a lot for all your work! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 16:37:07 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 17 Oct 2008 14:37:07 +0000 Subject: [issue3717] Py_InitModule* is still referenced in docs In-Reply-To: <1219956531.21.0.0850096773002.issue3717@psf.upfronthosting.co.za> Message-ID: <1224254227.31.0.244714312487.issue3717@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Here is a patch that makes Demo/embed compile and run successfully. ---------- keywords: +needs review, patch nosy: +loewis Added file: http://bugs.python.org/file11816/embed.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 16:41:15 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 17 Oct 2008 14:41:15 +0000 Subject: [issue3717] Py_InitModule* is still referenced in docs In-Reply-To: <1219956531.21.0.0850096773002.issue3717@psf.upfronthosting.co.za> Message-ID: <1224254475.79.0.24016256308.issue3717@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Looks good to me. ---------- keywords: -needs review nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 16:44:17 2008 From: report at bugs.python.org (Jianmin Xue) Date: Fri, 17 Oct 2008 14:44:17 +0000 Subject: [issue4138] IDLE crashes in my Windows Vista In-Reply-To: <1224254656.95.0.739612699268.issue4138@psf.upfronthosting.co.za> Message-ID: <1224254656.95.0.739612699268.issue4138@psf.upfronthosting.co.za> New submission from Jianmin Xue : I just downloaded Python 3.0 RC1 today from python.org and installed in my Windows Vista. However when I tried to run IDLE, it crashed with error message popping up. Screen-shot is attached. Please let me know if any other information is needed. ---------- components: IDLE files: py3_idle_crash_20081017.JPG messages: 74914 nosy: xuejm1225 severity: normal status: open title: IDLE crashes in my Windows Vista type: crash versions: Python 3.0 Added file: http://bugs.python.org/file11817/py3_idle_crash_20081017.JPG _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 16:49:45 2008 From: report at bugs.python.org (STINNER Victor) Date: Fri, 17 Oct 2008 14:49:45 +0000 Subject: [issue4128] Performance regression in long division in 2.6 In-Reply-To: <1224064997.42.0.94461510007.issue4128@psf.upfronthosting.co.za> Message-ID: <1224254985.03.0.690910928721.issue4128@psf.upfronthosting.co.za> STINNER Victor added the comment: > I propose to close this as "won't fix" I agree. > I'm not interested in 150ms speed differences when dividing 100000 digit numbers. I'm ok to close the ticket, but I'm also interrested to optimize Python. But the compiler option is not the best choice to optimize a program. I prefer changes like using a O(n) algorithm instead of O(n^2) algorithm. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 16:52:58 2008 From: report at bugs.python.org (Matteo Bertini) Date: Fri, 17 Oct 2008 14:52:58 +0000 Subject: [issue1068268] subprocess is not EINTR-safe Message-ID: <1224255178.71.0.422789425961.issue1068268@psf.upfronthosting.co.za> Matteo Bertini added the comment: Factorized try-except code, merged r65475 from 25-maint. Protetect std[in|out|err] read and write too. Added file: http://bugs.python.org/file11818/subprocess-retry-on-EINTR-std-in-out-err.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 17:16:05 2008 From: report at bugs.python.org (thor222) Date: Fri, 17 Oct 2008 15:16:05 +0000 Subject: [issue4139] Major error in cmath routines In-Reply-To: <1224256565.24.0.380974841882.issue4139@psf.upfronthosting.co.za> Message-ID: <1224256565.24.0.380974841882.issue4139@psf.upfronthosting.co.za> New submission from thor222 : There's an error in the way cmath computes the inverse sine, cosine and tangent functions. Example: In 2.6: cmath.asin(2) returns 1.5707963267948966+1.3169578969248166j However, the answer should be 1.5707963267948966-1.3169578969248166j cmath.asin(2) returns the correct answer in 2.5.2. Same problem exists in cmath.acos: In 2.6: cmath.acos(2) = -1.3169578969248164j, but should be 1.3169578969248164j (once again, 2.5.2 returns the correct answer). However, in 2.5.2 and 2.6, cmath.asin(1j) = 0.88137358701954283j, which is correct. ---------- components: Library (Lib) messages: 74917 nosy: thor222 severity: normal status: open title: Major error in cmath routines versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 17:16:23 2008 From: report at bugs.python.org (thor222) Date: Fri, 17 Oct 2008 15:16:23 +0000 Subject: [issue4139] Major error in cmath routines In-Reply-To: <1224256565.24.0.380974841882.issue4139@psf.upfronthosting.co.za> Message-ID: <1224256583.81.0.294745601439.issue4139@psf.upfronthosting.co.za> Changes by thor222 : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 17:17:58 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 17 Oct 2008 15:17:58 +0000 Subject: [issue4139] Major error in cmath routines In-Reply-To: <1224256565.24.0.380974841882.issue4139@psf.upfronthosting.co.za> Message-ID: <1224256678.67.0.0254121053914.issue4139@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- nosy: +christian.heimes, marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 17:44:07 2008 From: report at bugs.python.org (Christian Heimes) Date: Fri, 17 Oct 2008 15:44:07 +0000 Subject: [issue4139] Major error in cmath routines In-Reply-To: <1224256565.24.0.380974841882.issue4139@psf.upfronthosting.co.za> Message-ID: <1224258247.21.0.952503613943.issue4139@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- assignee: -> marketdickinson components: +Extension Modules -Library (Lib) priority: -> critical versions: +Python 2.7, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 17:45:33 2008 From: report at bugs.python.org (Jan-Klaas Kollhof) Date: Fri, 17 Oct 2008 15:45:33 +0000 Subject: [issue4140] urllib2: request with digest auth through proxy fail In-Reply-To: <1224258333.01.0.331002758914.issue4140@psf.upfronthosting.co.za> Message-ID: <1224258333.01.0.331002758914.issue4140@psf.upfronthosting.co.za> New submission from Jan-Klaas Kollhof : When using a proxy to request URLs that require Digest Auth, a header similar to the following is sent to the server: Authorization: Digest ... uri="http://example.org/foobar/spam" ... The server then responded with: HTTP/1.1 400 Bad Request Server: Microsoft-IIS/6.0 When not using a proxy, the header sent will look like: Authorization: Digest ... uri="/foobar/spam" ... and the server responded as expected with a 200 OK. I don't know what is at fault here, urllib2 or IIS, but patching the urllib2 to not use the full URL, when creating the Digest Auth. header, works. When a proxy is being used by urllib2, the Request's get_selector() will always return the full URL instead of just the selector. The code that creates the Digest auth. header also uses the get_selector() to set the "uri="-part in the auth header. Making sure that the "uri="-part is not a full URL all seems to work. See the patched urllib2.py attached. I have only tested the fix against the server I had problems with, and it seems to be working. ---------- components: Library (Lib) files: urllib2.py messages: 74918 nosy: jan.kollhof severity: normal status: open title: urllib2: request with digest auth through proxy fail type: behavior versions: Python 2.5 Added file: http://bugs.python.org/file11819/urllib2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 17:47:29 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 17 Oct 2008 15:47:29 +0000 Subject: [issue3723] Py_NewInterpreter does not work In-Reply-To: <1220011870.63.0.171875917127.issue3723@psf.upfronthosting.co.za> Message-ID: <1224258449.53.4.38721844216e-05.issue3723@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Here is a patch that fixed importexc.c. It consists of the following parts: - set m_size of the builtins module and the sys module to -1, indicating that these modules don't support repeated initialization. This should be reviewed; perhaps it's better (and necessary) to record the init function not only for dynamically-loaded modules in m_init, but also for statically linked ones, so that the reinit code can call them again (whether or not it is safe to call them again for sys and builtins should then be studied). - add a field to the interpreter state indicating that the codecs are not ready. when trying to use the file system encoding in this state, use ASCII instead. - Fix importexc to use the types module. Added file: http://bugs.python.org/file11820/importexc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 17:53:20 2008 From: report at bugs.python.org (Christian Heimes) Date: Fri, 17 Oct 2008 15:53:20 +0000 Subject: [issue4139] Major error in cmath routines In-Reply-To: <1224256565.24.0.380974841882.issue4139@psf.upfronthosting.co.za> Message-ID: <1224258800.71.0.799817894182.issue4139@psf.upfronthosting.co.za> Christian Heimes added the comment: I'm pretty sure that Python 2.6 is correct and Python 2.5 is wrong. Python 2.6: >>> cmath.asin(2.0) (1.5707963267948966+1.3169578969248166j) >>> cmath.asin(2.0+(+1E-300j)) (1.5707963267948966+1.3169578969248166j) >>> cmath.asin(2.0+(-1E-300j)) (1.5707963267948966-1.3169578969248166j) Python 2.5: >>> cmath.asin(2.0) (1.5707963267948966-1.3169578969248166j) >>> cmath.asin(2.0+(+1E-300j)) (1.5707963267948966+1.3169578969248164j) >>> cmath.asin(2.0+(-1E-300j)) (1.5707963267948966-1.3169578969248166j) I used -1E-300j to get value that is almost a negative complex zero. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 17:55:16 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 17 Oct 2008 15:55:16 +0000 Subject: [issue3717] Py_InitModule* is still referenced in docs In-Reply-To: <1219956531.21.0.0850096773002.issue3717@psf.upfronthosting.co.za> Message-ID: <1224258916.0.0.550465873954.issue3717@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Committed as r66961. ---------- keywords: +needs review resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 18:01:34 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 17 Oct 2008 16:01:34 +0000 Subject: [issue4138] IDLE crashes in my Windows Vista In-Reply-To: <1224254656.95.0.739612699268.issue4138@psf.upfronthosting.co.za> Message-ID: <1224259294.21.0.840699842093.issue4138@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Did you disable your personal firewall as instructed? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 18:10:39 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 17 Oct 2008 16:10:39 +0000 Subject: [issue4130] Intel icc 9.1 does not support __int128_t used by ctypes In-Reply-To: <1224103336.6.0.753228794094.issue4130@psf.upfronthosting.co.za> Message-ID: <1224259839.27.0.470758817101.issue4130@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Hmm. Perhaps icc shouldn't define __x86_64__ either, then? Can you propose a patch to fix that problem? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 18:30:23 2008 From: report at bugs.python.org (Matteo Bertini) Date: Fri, 17 Oct 2008 16:30:23 +0000 Subject: [issue1068268] subprocess is not EINTR-safe Message-ID: <1224261023.68.0.59836772257.issue1068268@psf.upfronthosting.co.za> Matteo Bertini added the comment: Ups, forgot a _no_intr around select.select Index: subprocess.py =================================================================== --- subprocess.py (revisione 19645) +++ subprocess.py (copia locale) @@ -1178,7 +1178,7 @@ input_offset = 0 while read_set or write_set: - rlist, wlist, xlist = select.select(read_set, write_set, []) + rlist, wlist, xlist = _no_intr(select.select)(read_set, write_set, []) if self.stdin in wlist: # When select has indicated that the file is writable, _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 19:00:21 2008 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 17 Oct 2008 17:00:21 +0000 Subject: [issue4139] Major error in cmath routines In-Reply-To: <1224256565.24.0.380974841882.issue4139@psf.upfronthosting.co.za> Message-ID: <1224262821.14.0.991623366565.issue4139@psf.upfronthosting.co.za> Mark Dickinson added the comment: This is not a bug, at least in the sense that the behaviour of Python 2.6 is intentional: asin has branch cuts from 1 to infinity and -1 to - infinity along the real axis. As explained by the note at the top of the cmath documentation, on platforms with signed zeros (which is pretty much all platforms these days), the sign of the imaginary part of the argument is used to determine which side of the branch cut to use. So: >>> import cmath >>> cmath.asin(complex(2.0, 0.0)) (1.5707963267948966+1.3169578969248166j) >>> cmath.asin(complex(2.0, -0.0)) (1.5707963267948966-1.3169578969248166j) This is fairly standard practice, and usually the right thing in applications; see the Kahan paper referred to at the bottom of the cmath docs. It also follows the suggestions outlined in Annex G of the C99 standard. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 19:51:15 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 17 Oct 2008 17:51:15 +0000 Subject: [issue4120] Do not embed manifest files in *.pyd when compiling with MSVC In-Reply-To: <1223971312.31.0.131537865896.issue4120@psf.upfronthosting.co.za> Message-ID: <1224265875.98.0.888065189041.issue4120@psf.upfronthosting.co.za> Martin v. L?wis added the comment: For some reason, the linker *does* generate manifest files for all the .pyds when I try it out. Should that worry me? When I delete them, it still can import them just fine. FWIW, with the patch alone, the manifest in .DLLs will still be needed, to be able to load tcl85.dll. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 19:55:18 2008 From: report at bugs.python.org (Fredrik Johansson) Date: Fri, 17 Oct 2008 17:55:18 +0000 Subject: [issue4128] Performance regression in long division in 2.6 In-Reply-To: <1224064997.42.0.94461510007.issue4128@psf.upfronthosting.co.za> Message-ID: <1224266118.25.0.346687224307.issue4128@psf.upfronthosting.co.za> Fredrik Johansson added the comment: > I propose to close this as "won't fix"; I'm not interested in 150ms > speed differences when dividing 100000 digit numbers. Sure. (I care about differences like this, because they have a tendency to add up. But it's a minor issue, and a faster algorithm in Python 2.7 will indeed solve the problem.) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 20:00:48 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 17 Oct 2008 18:00:48 +0000 Subject: [issue4128] Performance regression in long division in 2.6 In-Reply-To: <1224064997.42.0.94461510007.issue4128@psf.upfronthosting.co.za> Message-ID: <1224266448.64.0.616193381188.issue4128@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 20:27:58 2008 From: report at bugs.python.org (David Turner) Date: Fri, 17 Oct 2008 18:27:58 +0000 Subject: [issue4141] Dis docs on CALL_FUNCTION a bit unclear In-Reply-To: <1224268078.7.0.393708918822.issue4141@psf.upfronthosting.co.za> Message-ID: <1224268078.7.0.393708918822.issue4141@psf.upfronthosting.co.za> New submission from David Turner : This patch improves them. ---------- files: dis-doc-patch.diff keywords: patch messages: 74928 nosy: novalis_dt severity: normal status: open title: Dis docs on CALL_FUNCTION a bit unclear Added file: http://bugs.python.org/file11821/dis-doc-patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 20:28:06 2008 From: report at bugs.python.org (David Turner) Date: Fri, 17 Oct 2008 18:28:06 +0000 Subject: [issue4141] Dis docs on CALL_FUNCTION a bit unclear In-Reply-To: <1224268078.7.0.393708918822.issue4141@psf.upfronthosting.co.za> Message-ID: <1224268086.14.0.681123524878.issue4141@psf.upfronthosting.co.za> Changes by David Turner : ---------- assignee: -> georg.brandl components: +Documentation nosy: +georg.brandl versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 20:45:27 2008 From: report at bugs.python.org (Bob Ippolito) Date: Fri, 17 Oct 2008 18:45:27 +0000 Subject: [issue4136] merge json library with simplejson 2.0.3 In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1224269127.03.0.587935765557.issue4136@psf.upfronthosting.co.za> Bob Ippolito added the comment: patch to r66961 of trunk is attached. ---------- keywords: +26backport, patch versions: +Python 2.7, Python 3.1 Added file: http://bugs.python.org/file11822/json_issue4136_r66961.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 21:06:00 2008 From: report at bugs.python.org (Koen van de Sande) Date: Fri, 17 Oct 2008 19:06:00 +0000 Subject: [issue4120] Do not embed manifest files in *.pyd when compiling with MSVC In-Reply-To: <1223971312.31.0.131537865896.issue4120@psf.upfronthosting.co.za> Message-ID: <1224270360.72.0.0106417553546.issue4120@psf.upfronthosting.co.za> Koen van de Sande added the comment: In response to 74742: > This issue doesn't stop here, here's another situation: Python is compiled with MSVC9. A user has it and MSVC9 SP1 installed, which has a newer CRT version. If he builds site-packages, these files have an embedded manifest with another CRT version than the python interpreter itself. Importing these packages loads a second copy of a CRT into the processes memory, just like described above. This is not true. For MSVC9SP (VS2008) Microsoft decided that by default, it will still compile against the original CRT. Only by explicitly adding a compiler flag can you use the updated SP1 CRT (they did this because the 2005SP1 caused so much grief, which did automatically upgrade the CRT, and subsequently companies did not roll out SP1 to prevent the mixing of CRTs). So you can safely compile using SP1 installed, and you will at least still use the same CRT version. ---------- nosy: +koen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 21:30:55 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 17 Oct 2008 19:30:55 +0000 Subject: [issue4136] merge json library with simplejson 2.0.3 In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1224271855.3.0.775242229868.issue4136@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: About the patch: are those lines really needed? + PyScannerType.tp_getattro = PyObject_GenericGetAttr; + PyScannerType.tp_setattro = PyObject_GenericSetAttr; + PyScannerType.tp_alloc = PyType_GenericAlloc; + PyScannerType.tp_new = PyType_GenericNew; + PyScannerType.tp_free = _PyObject_Del; I've never used them. What happens if the slots are left empty, and let PyType_Ready() do the rest? ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 21:35:41 2008 From: report at bugs.python.org (Bob Ippolito) Date: Fri, 17 Oct 2008 19:35:41 +0000 Subject: [issue4136] merge json library with simplejson 2.0.3 In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1224272141.83.0.984912574945.issue4136@psf.upfronthosting.co.za> Bob Ippolito added the comment: You're probably right, I don't remember what code I was using as a template for that. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 21:39:48 2008 From: report at bugs.python.org (Bob Ippolito) Date: Fri, 17 Oct 2008 19:39:48 +0000 Subject: [issue4136] merge json library with simplejson 2.0.3 In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1224272388.34.0.439322279623.issue4136@psf.upfronthosting.co.za> Bob Ippolito added the comment: Actually, if I remove those lines from the equivalent module in simplejson it no longer works properly with Python 2.5.2. File "/Users/bob/src/simplejson/simplejson/decoder.py", line 307, in __init__ self.scan_once = make_scanner(self) TypeError: cannot create 'make_scanner' instances _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 22:02:09 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 17 Oct 2008 20:02:09 +0000 Subject: [issue4141] Dis docs on CALL_FUNCTION a bit unclear In-Reply-To: <1224268078.7.0.393708918822.issue4141@psf.upfronthosting.co.za> Message-ID: <1224273729.89.0.42185693908.issue4141@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks for the patch. Applied in r66962. ---------- nosy: +benjamin.peterson resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 22:02:42 2008 From: report at bugs.python.org (Don Dwiggins) Date: Fri, 17 Oct 2008 20:02:42 +0000 Subject: [issue4142] smtplib doesn't clear helo/ehlo flags on quit In-Reply-To: <1224273762.79.0.0391835714009.issue4142@psf.upfronthosting.co.za> Message-ID: <1224273762.79.0.0391835714009.issue4142@psf.upfronthosting.co.za> New submission from Don Dwiggins : Found on Windows, running Python 2.4.3. SMTP.login() and SMTP.sendmail set one of the attributes ehlo_resp or helo_resp to whatever the server responded (only if they're not already set). SMTP.quit() doesn't clear these attributes, so on the next connection, the HELO/EHLO commands won't be sent; this will cause problems with some servers (MDaemon in my case). The fix is obvious, and a workaround would be to clear the attributes in the instance before calling login (or sendmail where authentication isn't needed). ---------- components: Library (Lib) messages: 74935 nosy: dwig severity: normal status: open title: smtplib doesn't clear helo/ehlo flags on quit type: behavior versions: Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 22:16:14 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 17 Oct 2008 20:16:14 +0000 Subject: [issue3664] Pickler.dump from a badly initialized Pickler segfaults In-Reply-To: <1219609595.23.0.140986466622.issue3664@psf.upfronthosting.co.za> Message-ID: <1224274574.96.0.742113304403.issue3664@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Committed r66963. ---------- resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 22:28:13 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 17 Oct 2008 20:28:13 +0000 Subject: [issue3626] python3.0 interpreter on Cygwin ignores all arguments In-Reply-To: <1219293362.56.0.98048679745.issue3626@psf.upfronthosting.co.za> Message-ID: <1224275293.58.0.684749380843.issue3626@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Updated patch, which checks the return value of wcstombs. Added file: http://bugs.python.org/file11823/cygwin_badprintf-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 23:24:43 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 17 Oct 2008 21:24:43 +0000 Subject: [issue3723] Py_NewInterpreter does not work In-Reply-To: <1220011870.63.0.171875917127.issue3723@psf.upfronthosting.co.za> Message-ID: <1224278683.18.0.6376414255.issue3723@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I think the patch goes in the right direction. But in addition, Py_NewInterpreter() has to call initstdio() between initmain() and initsite() (the same sequence as in Py_InitializeEx) Found by using the following command string in importexc.c: "import types; print(types.XXX)" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 23:27:43 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 17 Oct 2008 21:27:43 +0000 Subject: [issue3723] Py_NewInterpreter does not work In-Reply-To: <1220011870.63.0.171875917127.issue3723@psf.upfronthosting.co.za> Message-ID: <1224278863.34.0.0174106402831.issue3723@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Wouldn't it make more sense to move interpreter initialization things to Py_NewInterpreter and call it from Py_InitializeEx? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 23:29:16 2008 From: report at bugs.python.org (Christian Heimes) Date: Fri, 17 Oct 2008 21:29:16 +0000 Subject: [issue3723] Py_NewInterpreter does not work In-Reply-To: <1220011870.63.0.171875917127.issue3723@psf.upfronthosting.co.za> Message-ID: <1224278956.69.0.695336806886.issue3723@psf.upfronthosting.co.za> Christian Heimes added the comment: Sounds like a good plan, Benjamin ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 17 23:36:01 2008 From: report at bugs.python.org (Jerry Seutter) Date: Fri, 17 Oct 2008 21:36:01 +0000 Subject: [issue3435] trace.py tries to get coverage data from non Python files In-Reply-To: <1216895941.29.0.346900095215.issue3435@psf.upfronthosting.co.za> Message-ID: <1224279361.16.0.75579114992.issue3435@psf.upfronthosting.co.za> Changes by Jerry Seutter : ---------- nosy: +jseutter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 18 00:27:38 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 17 Oct 2008 22:27:38 +0000 Subject: [issue4136] merge json library with simplejson 2.0.3 In-Reply-To: <1224272388.34.0.439322279623.issue4136@psf.upfronthosting.co.za> Message-ID: <48F91154.5010900@v.loewis.de> Martin v. L?wis added the comment: > Actually, if I remove those lines from the equivalent module in simplejson > it no longer works properly with Python 2.5.2. Why aren't the functions pointers in the structs itself? As a procedural note, it seems like this patch is a complete rewrite of the module. Do you anticipate further complete rewrites within the next year? If yes, we should close the issue, and wait for the module to evolve. If no, I'll try to find some time to review the entire module - can you then please post the code to Rietveld? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 18 00:31:57 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 17 Oct 2008 22:31:57 +0000 Subject: [issue3626] python3.0 interpreter on Cygwin ignores all arguments In-Reply-To: <1219293362.56.0.98048679745.issue3626@psf.upfronthosting.co.za> Message-ID: <1224282717.65.0.954079403282.issue3626@psf.upfronthosting.co.za> Martin v. L?wis added the comment: IIUC, another error return value (besides -1) is PATH_MAX, meaning that the buffer would overrun; correct me if I'm wrong. If I'm not, I propose that they get handles similarly. In addition, it might be safer to compare to (size_t)-1 (I keep forgetting whether this is the default when comparing signed and unsigned - some compilers warn about comparisong with mixed signs). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 18 00:34:13 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 17 Oct 2008 22:34:13 +0000 Subject: [issue3723] Py_NewInterpreter does not work In-Reply-To: <1224278863.34.0.0174106402831.issue3723@psf.upfronthosting.co.za> Message-ID: <48F912E2.4020105@v.loewis.de> Martin v. L?wis added the comment: > Wouldn't it make more sense to move interpreter initialization things to > Py_NewInterpreter and call it from Py_InitializeEx? Can you propose a specific patch? I'm worried that doing so blindly introduces other bugs. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 18 00:38:20 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 17 Oct 2008 22:38:20 +0000 Subject: [issue4104] Namespace inconsistency In-Reply-To: <1223674536.22.0.160836227089.issue4104@psf.upfronthosting.co.za> Message-ID: <1224283100.04.0.578714016066.issue4104@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I consider the request invalid. Continue the example with B=A.B B The repr of an object cannot now and should not depend on the access path. =or= class C: pass class D: pass D C.D = D C.D Same comment. ---------- nosy: +tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 18 00:45:00 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 17 Oct 2008 22:45:00 +0000 Subject: [issue4113] functools.partial(), no __name__; wrong __doc__ In-Reply-To: <1223898315.71.0.950281538816.issue4113@psf.upfronthosting.co.za> Message-ID: <1224283500.26.0.0243302333679.issue4113@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- components: +Library (Lib) -Extension Modules versions: +Python 2.7, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 18 00:45:24 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 17 Oct 2008 22:45:24 +0000 Subject: [issue4113] functools.partial(), no __name__; wrong __doc__ In-Reply-To: <1223898315.71.0.950281538816.issue4113@psf.upfronthosting.co.za> Message-ID: <1224283524.38.0.957427467431.issue4113@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Same in 3.0 ---------- nosy: +tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 18 01:34:17 2008 From: report at bugs.python.org (Bob Ippolito) Date: Fri, 17 Oct 2008 23:34:17 +0000 Subject: [issue4136] merge json library with simplejson 2.0.3 In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1224286457.89.0.335879098111.issue4136@psf.upfronthosting.co.za> Bob Ippolito added the comment: I don't recall exactly why they aren't in the struct itself, it may not have worked with some compiler on some platform. It's not really a complete rewrite, the encoding path is largely the same and the tests haven't changed. Anyway, there is no further work planned for simplejson. It's done except for the potential for bug fixes. The only enhancements were performance related and this is about as fast as it's going to get. The majority of this work was ready before Python 2.6 was released but it was frozen so I couldn't get this in. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 18 01:38:40 2008 From: report at bugs.python.org (Kevin Walzer) Date: Fri, 17 Oct 2008 23:38:40 +0000 Subject: [issue4017] Tkinter cannot find Tcl/Tk on Mac OS X In-Reply-To: <1222960590.08.0.635891151551.issue4017@psf.upfronthosting.co.za> Message-ID: <1224286720.96.0.134784282733.issue4017@psf.upfronthosting.co.za> Changes by Kevin Walzer : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 18 01:38:54 2008 From: report at bugs.python.org (Kevin Walzer) Date: Fri, 17 Oct 2008 23:38:54 +0000 Subject: [issue4017] Tkinter cannot find Tcl/Tk on Mac OS X In-Reply-To: <1222960590.08.0.635891151551.issue4017@psf.upfronthosting.co.za> Message-ID: <1224286734.05.0.254486197591.issue4017@psf.upfronthosting.co.za> Changes by Kevin Walzer : ---------- nosy: +wordtech _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 18 01:39:42 2008 From: report at bugs.python.org (Nat) Date: Fri, 17 Oct 2008 23:39:42 +0000 Subject: [issue4017] Tkinter cannot find Tcl/Tk on Mac OS X In-Reply-To: <1222960590.08.0.635891151551.issue4017@psf.upfronthosting.co.za> Message-ID: <1224286782.38.0.575093767589.issue4017@psf.upfronthosting.co.za> Changes by Nat : ---------- nosy: -njw23 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 18 01:39:46 2008 From: report at bugs.python.org (Bob Ippolito) Date: Fri, 17 Oct 2008 23:39:46 +0000 Subject: [issue4136] merge json library with simplejson 2.0.3 In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1224286786.76.0.52166768634.issue4136@psf.upfronthosting.co.za> Bob Ippolito added the comment: http://codereview.appspot.com/7311 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 18 02:08:59 2008 From: report at bugs.python.org (Kevin Watters) Date: Sat, 18 Oct 2008 00:08:59 +0000 Subject: [issue4143] ast.Node objects do not have column number information In-Reply-To: <1224288539.13.0.569366728466.issue4143@psf.upfronthosting.co.za> Message-ID: <1224288539.13.0.569366728466.issue4143@psf.upfronthosting.co.za> New submission from Kevin Watters : I see column number information in ast.c, but it's not accessible via the information by the Node objects returned by compiler.parse. ---------- components: Library (Lib) messages: 74948 nosy: kevinwatters severity: normal status: open title: ast.Node objects do not have column number information type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 18 02:26:16 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 18 Oct 2008 00:26:16 +0000 Subject: [issue4143] ast.Node objects do not have column number information In-Reply-To: <1224288539.13.0.569366728466.issue4143@psf.upfronthosting.co.za> Message-ID: <1224289576.2.0.986042474833.issue4143@psf.upfronthosting.co.za> Benjamin Peterson added the comment: The compiler package is related to ast.c. You can access that through the ast (or _ast) module. ---------- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 18 06:35:31 2008 From: report at bugs.python.org (Ray Wang) Date: Sat, 18 Oct 2008 04:35:31 +0000 Subject: [issue4027] wrong page index number in reference book of python documentation In-Reply-To: <1223026876.14.0.133212410345.issue4027@psf.upfronthosting.co.za> Message-ID: <1224304531.71.0.921358105316.issue4027@psf.upfronthosting.co.za> Ray Wang added the comment: Thanks for your big efforts! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 18 16:04:19 2008 From: report at bugs.python.org (Waldecir) Date: Sat, 18 Oct 2008 14:04:19 +0000 Subject: [issue4018] "for me" installer problem on x64 Vista In-Reply-To: <1222963572.56.0.515590438992.issue4018@psf.upfronthosting.co.za> Message-ID: <1224338659.3.0.515882938233.issue4018@psf.upfronthosting.co.za> Waldecir added the comment: existis a 2.6 fix or a build with fix? ---------- nosy: +psycoman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 18 16:26:30 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 18 Oct 2008 14:26:30 +0000 Subject: [issue4018] "for me" installer problem on x64 Vista In-Reply-To: <1224338659.3.0.515882938233.issue4018@psf.upfronthosting.co.za> Message-ID: <48F9F1B9.1080209@v.loewis.de> Martin v. L?wis added the comment: > existis a 2.6 fix or a build with fix? No, this will be fixed in 2.6.1. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 18 17:50:31 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 18 Oct 2008 15:50:31 +0000 Subject: [issue4049] IDLE does not open at all In-Reply-To: <1223253081.14.0.0863464602504.issue4049@psf.upfronthosting.co.za> Message-ID: <1224345031.52.0.342843366137.issue4049@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: > It's normal that there are no errors. They get to stderr, and there is > no stderr in a GUI application. Maybe it would make sense putting the main() function into a try/except statement and pop-up a message box to display the error. A patch is in attachment. ---------- keywords: +patch nosy: +giampaolo.rodola Added file: http://bugs.python.org/file11824/idle.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 18 20:08:49 2008 From: report at bugs.python.org (Georg Brandl) Date: Sat, 18 Oct 2008 18:08:49 +0000 Subject: [issue4027] wrong page index number in reference book of python documentation In-Reply-To: <1223026876.14.0.133212410345.issue4027@psf.upfronthosting.co.za> Message-ID: <1224353329.96.0.601095468501.issue4027@psf.upfronthosting.co.za> Georg Brandl added the comment: Winfried, can you try again with the newest trunk? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 18 20:15:20 2008 From: report at bugs.python.org (Georg Brandl) Date: Sat, 18 Oct 2008 18:15:20 +0000 Subject: [issue4081] Error copying directory to _static in Sphinx In-Reply-To: <1223504918.57.0.382949560871.issue4081@psf.upfronthosting.co.za> Message-ID: <1224353720.68.0.867974615652.issue4081@psf.upfronthosting.co.za> Georg Brandl added the comment: But there is a "path.exists()" condition around the rmtree, isn't there? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 18 21:56:45 2008 From: report at bugs.python.org (Tim Delaney) Date: Sat, 18 Oct 2008 19:56:45 +0000 Subject: [issue4081] Error copying directory to _static in Sphinx In-Reply-To: <1223504918.57.0.382949560871.issue4081@psf.upfronthosting.co.za> Message-ID: <1224359805.78.0.531679473568.issue4081@psf.upfronthosting.co.za> Tim Delaney added the comment: Confirmed fixed in 0.43 - this issue can be closed. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 18 21:58:10 2008 From: report at bugs.python.org (Malte Helmert) Date: Sat, 18 Oct 2008 19:58:10 +0000 Subject: [issue1040026] os.times() is bogus Message-ID: <1224359890.71.0.219734677267.issue1040026@psf.upfronthosting.co.za> Changes by Malte Helmert : Removed file: http://bugs.python.org/file9540/os_times4.PATCH _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 18 22:35:34 2008 From: report at bugs.python.org (David W. Lambert) Date: Sat, 18 Oct 2008 20:35:34 +0000 Subject: [issue4144] 3 tutorial documentation errors In-Reply-To: <1224362134.12.0.593423230728.issue4144@psf.upfronthosting.co.za> Message-ID: <1224362134.12.0.593423230728.issue4144@psf.upfronthosting.co.za> New submission from David W. Lambert : I ran doctests on the interactive session scripts from the tutorial. Aside from finding a doctest enhancement---but there are already so many doctest issues tracked---I found these discrepancies using online tutorial and Python 3.0rc1 (r30rc1:66499, Oct 17 2008, 13:11:34) -1--1--1--1--1--1--1--1--1--1--1--1--1--1--1--1--1--1--1--1--1-- "doesn't" --> "does not" Trite documentation error http://docs.python.org/dev/3.0/tutorial/introduction.html Time to fix the doctest EXCEPTION_DETAIL TypeError: 'str' object doesn't support ... (multiple occurrences) "doesn't" became "does not" in release 2.4. -2--2--2--2--2--2--2--2--2--2--2--2--2--2--2--2--2--2--2--2--2-- "coercing to Unicode" or "convert to str"? $ p3 Python 3.0rc1 (r30rc1:66499, Oct 17 2008, 13:11:34) [GCC 3.4.6 20060404 (Red Hat 3.4.6-3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> '2'+3 Traceback (most recent call last): File "", line 1, in TypeError: Can't convert 'int' object to str implicitly http://docs.python.org/dev/3.0/tutorial/errors.html >>> '2' + 2 Traceback (most recent call last): File "", line 1, in ? TypeError: coercing to Unicode: need string or buffer, int found -3--3--3--3--3--3--3--3--3--3--3--3--3--3--3--3--3--3--3--3--3-- Integer division yields float http://docs.python.org/dev/3.0/tutorial/errors.html >>> divide(2, 1) # 2.0 is correct result is 2 -doctest---doctest---doctest---doctest---doctest---doctest-- doctest improvement possible # execute this as sh code to exhibit problem cat<p.py ''' example from http://docs.python.org/dev/3.0/tutorial/introduction.html >>> 'doesn\'t' "doesn't" ''' import doctest doctest.testmod() EOF python p.py # "\"Yes,\" he said." # likewise breaks doctest # end of sh scripting I suppose these issues are known. Here's another that fails in doctest: http://docs.python.org/dev/3.0/tutorial/stdlib.html >>> re.findall(r'\bf[a-z]*', 'which foot or hand fell fastest') ['foot', 'fell', 'fastest'] ---------- messages: 74958 nosy: LambertDW severity: normal status: open title: 3 tutorial documentation errors versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 18 22:55:42 2008 From: report at bugs.python.org (Georg Brandl) Date: Sat, 18 Oct 2008 20:55:42 +0000 Subject: [issue4081] Error copying directory to _static in Sphinx In-Reply-To: <1223504918.57.0.382949560871.issue4081@psf.upfronthosting.co.za> Message-ID: <1224363342.34.0.314534744459.issue4081@psf.upfronthosting.co.za> Georg Brandl added the comment: Great! Thanks for the patience. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 18 23:03:53 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 18 Oct 2008 21:03:53 +0000 Subject: [issue3626] python3.0 interpreter on Cygwin ignores all arguments In-Reply-To: <1224275293.58.0.684749380843.issue3626@psf.upfronthosting.co.za> Message-ID: <1224363802.9064.4.camel@localhost> Antoine Pitrou added the comment: The patch looks sound to me. Someone should probably test it under Cygwin. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 19 00:37:50 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 18 Oct 2008 22:37:50 +0000 Subject: [issue1040026] os.times() is bogus Message-ID: <1224369470.14.0.184660940304.issue1040026@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Malte proposed this patch for inclusion into Python 2.5. In its current form, I'm skeptical about doing so, as it has the potential for breakage. IIUC, the patch requires that HZ is defined if HAVE_TIMES is defined and HAVE_SYSCONF is not; plus it requires _SC_CLK_TCK to be defined if HAVE_SYSCONF is defined. For 2.5, such additional constraints are not acceptable. Instead, the patch should guarantee compilation of posixmodule if 2.5.2 allowed compilation, no matter how confused the system is. If some of the prerequisites are not met, it is OK if either os.times is absent, or produces bogus results. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 19 00:54:49 2008 From: report at bugs.python.org (Alex Willmer) Date: Sat, 18 Oct 2008 22:54:49 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1224370489.61.0.192835039848.issue2636@psf.upfronthosting.co.za> Changes by Alex Willmer : ---------- nosy: +moreati _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 19 01:32:04 2008 From: report at bugs.python.org (Malte Helmert) Date: Sat, 18 Oct 2008 23:32:04 +0000 Subject: [issue1040026] os.times() is bogus Message-ID: <1224372724.9.0.65364236813.issue1040026@psf.upfronthosting.co.za> Malte Helmert added the comment: Martin, compilation indeed breaks if sysconf is available but _SC_CLK_TCK is not. My Unix-foo is not sufficient to confidently say that this is impossible, so my suggestion is to add defined(_SC_CLK_TCK) to the condition of this #ifdef branch. For what it's worth, this also appears to be the way Perl does it (perl.c, lines 384-385): #if defined(HAS_SYSCONF) && defined(_SC_CLK_TCK) && !defined(__BEOS__) PL_clocktick = sysconf(_SC_CLK_TCK); In the other case you mention, where neither sysconf nor HZ are available, the old default of 60 could be used instead. A noisy error appears safer to me to avoid future similar bugs, but I see that this is a bad idea for Python 2.5.x. I'll prepare a modified patch. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 19 02:13:15 2008 From: report at bugs.python.org (Malte Helmert) Date: Sun, 19 Oct 2008 00:13:15 +0000 Subject: [issue1040026] os.times() is bogus Message-ID: <1224375195.89.0.943895050816.issue1040026@psf.upfronthosting.co.za> Malte Helmert added the comment: OK, modified and simplified patch attached (os_times5.PATCH). The patch and unit test (in test_posix5.PATCH) apply cleanly against the trunk. "make test" passes on two machines I tried, including a 64-bit Linux machine where the new unit test fails without the patch. The caveat is that with the machines I have, I can't exercise all #ifdef paths. However, the logic looks simple enough now. Added file: http://bugs.python.org/file11826/os_times5.PATCH _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 19 06:33:47 2008 From: report at bugs.python.org (Dan Rippon) Date: Sun, 19 Oct 2008 04:33:47 +0000 Subject: [issue4138] IDLE crashes in my Windows Vista In-Reply-To: <1224254656.95.0.739612699268.issue4138@psf.upfronthosting.co.za> Message-ID: <1224390827.46.0.114796973577.issue4138@psf.upfronthosting.co.za> Dan Rippon added the comment: It's been fixed. http://svn.python.org/view?rev=66518&view=rev ---------- nosy: +rippond _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 19 09:12:34 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 19 Oct 2008 07:12:34 +0000 Subject: [issue1040026] os.times() is bogus In-Reply-To: <1224372724.9.0.65364236813.issue1040026@psf.upfronthosting.co.za> Message-ID: <48FADDCC.3070107@v.loewis.de> Martin v. L?wis added the comment: > compilation indeed breaks if sysconf is available but _SC_CLK_TCK is > not. My Unix-foo is not sufficient to confidently say that this is > impossible To make such a statement, one would need knowledge of all operating system releases that have ever been made, including releases that didn't make it to the public. It might be that POSIX mandates _SC_CLK_TCK, but that would be irrelevant, as systems might chose not to comply with POSIX in this aspect. > In the other case you mention, where neither sysconf nor HZ are > available, the old default of 60 could be used instead. That would probably be safest, although I could also accept that os.times becomes unavailable on such a system. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 19 09:16:48 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 19 Oct 2008 07:16:48 +0000 Subject: [issue1040026] os.times() is bogus Message-ID: <1224400608.01.0.395331414061.issue1040026@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- versions: +Python 2.5.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 19 09:20:23 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 19 Oct 2008 07:20:23 +0000 Subject: [issue4138] IDLE crashes in my Windows Vista In-Reply-To: <1224254656.95.0.739612699268.issue4138@psf.upfronthosting.co.za> Message-ID: <1224400823.13.0.79680147351.issue4138@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Dan, you are right. Closing as fixed. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 19 10:20:12 2008 From: report at bugs.python.org (Winfried Plappert) Date: Sun, 19 Oct 2008 08:20:12 +0000 Subject: [issue4027] wrong page index number in reference book of python documentation In-Reply-To: <1223026876.14.0.133212410345.issue4027@psf.upfronthosting.co.za> Message-ID: <1224404412.12.0.257242285851.issue4027@psf.upfronthosting.co.za> Winfried Plappert added the comment: Georg, sphinx r66972 works perfectly. Thanks again! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 19 10:30:40 2008 From: report at bugs.python.org (Armin Ronacher) Date: Sun, 19 Oct 2008 08:30:40 +0000 Subject: [issue4067] ast.fix_missing_locations() breaks if node doesn't have "_attributes" variable In-Reply-To: <1223390276.15.0.153059354273.issue4067@psf.upfronthosting.co.za> Message-ID: <1224405040.83.0.138116436877.issue4067@psf.upfronthosting.co.za> Armin Ronacher added the comment: Fixed in changeset 66973 for trunk. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 19 10:31:09 2008 From: report at bugs.python.org (Armin Ronacher) Date: Sun, 19 Oct 2008 08:31:09 +0000 Subject: [issue4067] ast.fix_missing_locations() breaks if node doesn't have "_attributes" variable In-Reply-To: <1223390276.15.0.153059354273.issue4067@psf.upfronthosting.co.za> Message-ID: <1224405069.56.0.000491232466347.issue4067@psf.upfronthosting.co.za> Changes by Armin Ronacher : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 19 10:46:59 2008 From: report at bugs.python.org (Winfried Plappert) Date: Sun, 19 Oct 2008 08:46:59 +0000 Subject: [issue4145] tabulary entries in PDF documentation In-Reply-To: <1224406019.73.0.627994354189.issue4145@psf.upfronthosting.co.za> Message-ID: <1224406019.73.0.627994354189.issue4145@psf.upfronthosting.co.za> New submission from Winfried Plappert : I wonder if the readabiliy of tables in PDFs can be improved. I take the example of ABCs. The online documentation can be found at http://docs.python.org/library/collections.html, the rst source is at /Doc/library/collections.rst. I'll enclose two png files, which show the table in HTML format and in PDF format. My PDF reader is Adobe Acrobat Reader 8.1.2 (Ubuntu), but I also tried xpdf and "Evince Document Viewer 2.22.2". The result is the same that the coulumn width is somehow not calculated correctly. Any ideas? PS.: Since I can only upload one file at a time, there will be another entry soon. ---------- assignee: georg.brandl components: Documentation files: Screenshot-collections ? High-performance container datatypes ? Python v2.6 documentation - Mozilla Firefox.png messages: 74969 nosy: georg.brandl, wplappert severity: normal status: open title: tabulary entries in PDF documentation type: behavior versions: Python 2.6, Python 3.0 Added file: http://bugs.python.org/file11827/Screenshot-collections ? High-performance container datatypes ? Python v2.6 documentation - Mozilla Firefox.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 19 10:48:25 2008 From: report at bugs.python.org (Winfried Plappert) Date: Sun, 19 Oct 2008 08:48:25 +0000 Subject: [issue4145] tabulary entries in PDF documentation In-Reply-To: <1224406019.73.0.627994354189.issue4145@psf.upfronthosting.co.za> Message-ID: <1224406105.03.0.0590220771752.issue4145@psf.upfronthosting.co.za> Winfried Plappert added the comment: An the PDF view of the same table Added file: http://bugs.python.org/file11828/Screenshot-library.pdf - Adobe Reader.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 19 11:11:26 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 19 Oct 2008 09:11:26 +0000 Subject: [issue4145] tabulary entries in PDF documentation In-Reply-To: <1224406019.73.0.627994354189.issue4145@psf.upfronthosting.co.za> Message-ID: <1224407486.08.0.871352787998.issue4145@psf.upfronthosting.co.za> Georg Brandl added the comment: The only way to get this right for arbitrary tables is to hand-select the column widths with a "tabularcolumns" directive. I'll keep this issue open and optimize these columns step by step. ---------- priority: -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 19 12:59:12 2008 From: report at bugs.python.org (Winfried Plappert) Date: Sun, 19 Oct 2008 10:59:12 +0000 Subject: [issue4145] tabulary entries in PDF documentation In-Reply-To: <1224406019.73.0.627994354189.issue4145@psf.upfronthosting.co.za> Message-ID: <1224413952.49.0.981153225508.issue4145@psf.upfronthosting.co.za> Winfried Plappert added the comment: Oh, what a pain, if you have to do it by hand! Is there no other way of doing it by counting record lengths (in a column) - see below? Just for the grins of it, I modified collections.html a bit to show more on the first page. Then I printed a PDF copy of the online web pages. I include that print as reference. When looking at the HTML source, I find the following lines at the beginning of the relevant table: And the the first table line follows: So somebody is calculating the column width :) And this somebody - I guess - is Sphinx? Is is possible to do the same for latex? Hmmm. Added file: http://bugs.python.org/file11829/collections_pdf.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 19 14:11:32 2008 From: report at bugs.python.org (Damien Miller) Date: Sun, 19 Oct 2008 12:11:32 +0000 Subject: [issue4146] compilation of Modules/python.c fails on OpenBSD In-Reply-To: <1224418292.85.0.510600214379.issue4146@psf.upfronthosting.co.za> Message-ID: <1224418292.85.0.510600214379.issue4146@psf.upfronthosting.co.za> New submission from Damien Miller : Compilation of 3.0rc1 Modules/python.c fails on OpenBSD with the following error. The attached patch fixes things by explicitly casting PyMem_Malloc's return value c++ -pthread -c -fno-strict-aliasing -DNDEBUG -O2 -pipe -DTHREAD_STACK_SIZE=0x20000 -fPIC -I. -IInclude -I./Include -DPy_BUILD_CORE -o Modules/python.o ./Modules/python.c Modules/python.c: In function `int main(int, char**)': Modules/python.c:20: error: invalid conversion from `void*' to `wchar_t**' Modules/python.c:22: error: invalid conversion from `void*' to `wchar_t**' Modules/python.c:57: error: invalid conversion from `void*' to `wchar_t*' ---------- components: Interpreter Core files: patch-Modules_python_c messages: 74973 nosy: djmdjm severity: normal status: open title: compilation of Modules/python.c fails on OpenBSD type: compile error versions: Python 3.0 Added file: http://bugs.python.org/file11830/patch-Modules_python_c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 19 14:19:36 2008 From: report at bugs.python.org (Christian Heimes) Date: Sun, 19 Oct 2008 12:19:36 +0000 Subject: [issue4146] compilation of Modules/python.c fails on OpenBSD In-Reply-To: <1224418292.85.0.510600214379.issue4146@psf.upfronthosting.co.za> Message-ID: <1224418776.86.0.696805900756.issue4146@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks! The patch looks good. Next time please use either the .diff or .patch extension. It makes it easier to review the patch. ---------- assignee: -> barry keywords: +needs review, patch nosy: +barry, christian.heimes priority: -> release blocker resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 19 16:16:50 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 19 Oct 2008 14:16:50 +0000 Subject: [issue4146] compilation of Modules/python.c fails on OpenBSD In-Reply-To: <1224418292.85.0.510600214379.issue4146@psf.upfronthosting.co.za> Message-ID: <1224425810.63.0.0195653830421.issue4146@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r66976. ---------- nosy: +benjamin.peterson resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 19 16:32:03 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 19 Oct 2008 14:32:03 +0000 Subject: [issue4073] distutils build_scripts and install_data commands need 2to3 support In-Reply-To: <1223427347.42.0.185462217727.issue4073@psf.upfronthosting.co.za> Message-ID: <1224426723.71.0.851441934112.issue4073@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Ok. I've refactored RefactoringTool so that the write_file method doesn't make a backup file by default. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 19 16:59:34 2008 From: report at bugs.python.org (Thomas Lee) Date: Sun, 19 Oct 2008 14:59:34 +0000 Subject: [issue4113] functools.partial(), no __name__; wrong __doc__ In-Reply-To: <1223898315.71.0.950281538816.issue4113@psf.upfronthosting.co.za> Message-ID: <1224428374.87.0.750892049152.issue4113@psf.upfronthosting.co.za> Thomas Lee added the comment: Here's a patch against the 2.x trunk. Basically just dispatches reads of a partial's __name__ and __doc__ attributes to the underlying function object. ---------- keywords: +patch nosy: +thomas.lee Added file: http://bugs.python.org/file11831/issue4113-01.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 19 17:33:24 2008 From: report at bugs.python.org (Thomas Lee) Date: Sun, 19 Oct 2008 15:33:24 +0000 Subject: [issue4147] xml.dom.minidom toprettyxml: omit whitespace for text-only elements In-Reply-To: <1224430404.43.0.0672391440841.issue4147@psf.upfronthosting.co.za> Message-ID: <1224430404.43.0.0672391440841.issue4147@psf.upfronthosting.co.za> New submission from Thomas Lee : For XML elements containing only text data, it would be nice if toprettyxml could omit the whitespace it normally injects before & after the text, e.g. Bob Becomes: Bob >From what I understand the handling of whitespace within XML elements is application-defined, so I'm classifying this as a nice-to-have feature. However it should be noted that in our particular case, the existing behaviour caused a few problems with a third-party system which treated whitespace as being significant. ---------- components: Library (Lib), XML files: minidom-toprettyxml-01.patch keywords: patch messages: 74978 nosy: thomas.lee severity: normal status: open title: xml.dom.minidom toprettyxml: omit whitespace for text-only elements type: feature request versions: Python 2.7 Added file: http://bugs.python.org/file11832/minidom-toprettyxml-01.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 19 18:07:31 2008 From: report at bugs.python.org (Winfried Plappert) Date: Sun, 19 Oct 2008 16:07:31 +0000 Subject: [issue4145] tabulary entries in PDF documentation In-Reply-To: <1224406019.73.0.627994354189.issue4145@psf.upfronthosting.co.za> Message-ID: <1224432451.69.0.382822963438.issue4145@psf.upfronthosting.co.za> Winfried Plappert added the comment: I probed a bit more into HTML output and the column width of tabulary entries is always present in the HTML output. I don't yet know where these relative widths are calculated, but I do roughly know how they are calculated: from the width of table definition in the *.rst files. This information should be sufficient to define a (relative) width instead of the generic latex command "\begin{tabulary}{\textwidth}{|L|L|L|L|}". _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 19 18:28:50 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 19 Oct 2008 16:28:50 +0000 Subject: [issue4145] tabulary entries in PDF documentation In-Reply-To: <1224406019.73.0.627994354189.issue4145@psf.upfronthosting.co.za> Message-ID: <1224433730.64.0.82102098837.issue4145@psf.upfronthosting.co.za> Georg Brandl added the comment: The advantage of HTML here is that the browser dynamically adjusts the column widths to prevent things like in your screenshot from happening. LaTeX does no such thing. If you tell it that the column width 20%, the column will not be enlarged to fit if the contained text is longer. Standard LaTeX tables don't even bother with relative widths: if you don't explicitly set a width for a column, the column will be stretched so that all text fits in one line, no matter how wide the table gets. The L tabulary entry is the best compromise I could find for automatic handling: it calculates widths based on cell contents. But as said above, no handling of overlapping text is done, and I couldn't find a package that helps with that problem. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 19 20:26:55 2008 From: report at bugs.python.org (Andre Berg) Date: Sun, 19 Oct 2008 18:26:55 +0000 Subject: [issue4017] Tkinter cannot find Tcl/Tk on Mac OS X In-Reply-To: <1222960590.08.0.635891151551.issue4017@psf.upfronthosting.co.za> Message-ID: <1224440815.91.0.475653443878.issue4017@psf.upfronthosting.co.za> Andre Berg added the comment: Per instructions in the helpful post outlining the Library search order, I downloaded and installed AquaTk 8.5.4, then I downloaded Python-2.6.tar.gz source, ran ./configure --enable-framework, sudo make build, sudo make install. IDLE appears to be working well so far. Also the Python interactive interpreter appears to be working. Except that whenever I do an import I get a Bus Error and the Python interpreter crashes. This appears randomly, but no less than the second import statement I type one after the other. It is interesting to note that the interactive prompt in the IDLE does not have this problem. Only the command line (e.g. Terminal) interactive interpreter does, as well as IPython. Following is the crash report shown by the Apple Crash Reporter. Hopefully someone can make sense of it, as I can't (I am not a hardcore programmer, unfortunately.) -------------------------- CRASH REPORT ---------------------------- Parent Process: bash [766] Date/Time: 2008-10-19 20:11:18.643 +0200 OS Version: Mac OS X 10.5.5 (9F33) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000 Crashed Thread: 0 Thread 0 Crashed: 0 readline.so 0x000bba3c call_readline + 732 1 org.python.python 0x001d43ae PyOS_Readline + 254 2 org.python.python 0x001d5ba0 tok_nextc + 64 3 org.python.python 0x001d6425 PyTokenizer_Get + 101 4 org.python.python 0x001d0da0 parsetok + 256 5 org.python.python 0x002b0942 PyRun_InteractiveOneFlags + 306 6 org.python.python 0x002b0c83 PyRun_InteractiveLoopFlags + 99 7 org.python.python 0x002b1549 PyRun_AnyFileExFlags + 185 8 org.python.python 0x002c2506 Py_Main + 3046 9 org.python.python.app 0x00001f7b 0x1000 + 3963 10 org.python.python.app 0x00001ea9 0x1000 + 3753 Thread 0 crashed with X86 Thread State (32-bit): eax: 0x00000000 ebx: 0x000bb76b ecx: 0xbfffeff8 edx: 0x00417ea0 edi: 0x004291d0 esi: 0x004256d0 ebp: 0xbffff108 esp: 0xbffff020 ss: 0x0000001f efl: 0x00010246 eip: 0x000bba3c cs: 0x00000017 ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037 cr2: 0x00000000 Binary Images: 0x1000 - 0x1ff5 +org.python.python.app 2.6 (2.6) /Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python 0x48000 - 0x48ffc +_functools.so ??? (???) <29c6937481e9eeb3b02765cca7ccf287> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_functools.so 0xba000 - 0xbbff1 +readline.so ??? (???) <0a2a766193b43567110e66bf2231dafa> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/readline.so 0xc1000 - 0xd7fea libedit.2.dylib ??? (???) /usr/lib/libedit.2.dylib 0xe2000 - 0xe5ff3 +_collections.so ??? (???) /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_collections.so 0xeb000 - 0xeefff +operator.so ??? (???) /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/operator.so 0xf5000 - 0xf6fff +time.so ??? (???) /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/time.so 0x1cf000 - 0x2f5fe3 +org.python.python 2.6.0, (c) 2004-2008 Python Software Foundation. (2.6.0) <44f73bce7c729a42509bd1761feecc32> /Library/Frameworks/Python.framework/Versions/2.6/Python 0x8fe00000 - 0x8fe2da53 dyld 96.2 (???) <7af47d3b00b2268947563c7fa8c59a07> /usr/lib/dyld 0x92778000 - 0x9277ffe9 libgcc_s.1.dylib ??? (???) /usr/lib/libgcc_s.1.dylib 0x94583000 - 0x94587fff libmathCommon.A.dylib ??? (???) /usr/lib/system/libmathCommon.A.dylib 0x94a36000 - 0x94b96ff3 libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib 0x95526000 - 0x95555ff7 libncurses.5.4.dylib ??? (???) <3b2ac2ca8190942b6b81d2a7012ea859> /usr/lib/libncurses.5.4.dylib 0xffff0000 - 0xffff1780 libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib ------------------------------------------------------------------- I have MacPorts installed and also an old Fink installation. Could this be causing it? I also looked through the README troubleshooting section, and I did not change the default installation location for the framework as suggested in the README. If someone could help I'd be most grateful. Andr? ---------- nosy: +andreb versions: -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 19 22:38:26 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 19 Oct 2008 20:38:26 +0000 Subject: [issue4113] functools.partial(), no __name__; wrong __doc__ In-Reply-To: <1223898315.71.0.950281538816.issue4113@psf.upfronthosting.co.za> Message-ID: <1224448706.3.0.370049713213.issue4113@psf.upfronthosting.co.za> Georg Brandl added the comment: I do not think the partial object should have the original function's __name__ or __doc__. It is after all not that function, but a callable that calls it. (This is different from e.g. a decorated function -- the decorator is taken as "modifying the function", even if it returns a wholly different one. This is why functools.wraps() exists.) In any case, this is not a bug but a feature request. ---------- nosy: +georg.brandl priority: -> low type: behavior -> feature request versions: +Python 3.1 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 19 22:43:06 2008 From: report at bugs.python.org (Winfried Plappert) Date: Sun, 19 Oct 2008 20:43:06 +0000 Subject: [issue4145] tabulary entries in PDF documentation In-Reply-To: <1224406019.73.0.627994354189.issue4145@psf.upfronthosting.co.za> Message-ID: <1224448986.36.0.0755047958274.issue4145@psf.upfronthosting.co.za> Winfried Plappert added the comment: Hi Georg, the only thing I could find on the net is a reference to: "\begin{tabular}{p{1in}p{2in}}" at http://www.cs.cornell.edu/Info/Misc/LaTeX-Tutorial/Tables.html. Assuming that one knows the effective width of the whole table, one then should be able to calculate the width of a column based on previous information in the *.rst files. Since I really don't know anything about LaTeX - and you certainly do, I should better shut up and don't say anything more. But indeed, this table business in LaTeX seems to be a bit messy. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 00:43:39 2008 From: report at bugs.python.org (Winfried Plappert) Date: Sun, 19 Oct 2008 22:43:39 +0000 Subject: [issue4145] tabulary entries in PDF documentation In-Reply-To: <1224406019.73.0.627994354189.issue4145@psf.upfronthosting.co.za> Message-ID: <1224456219.89.0.132799495655.issue4145@psf.upfronthosting.co.za> Winfried Plappert added the comment: Hi Georg, I tried to find a few bones and came up with the following little demo. I pinched the first few lines from http://www.latex-community.org/viewtopic.php?f=5&t=910 and set up a table with defined column widths - see attached file. Added file: http://bugs.python.org/file11833/test_latex-2.tex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 00:48:58 2008 From: report at bugs.python.org (Winfried Plappert) Date: Sun, 19 Oct 2008 22:48:58 +0000 Subject: [issue4145] tabulary entries in PDF documentation In-Reply-To: <1224406019.73.0.627994354189.issue4145@psf.upfronthosting.co.za> Message-ID: <1224456538.71.0.576311615882.issue4145@psf.upfronthosting.co.za> Changes by Winfried Plappert : Removed file: http://bugs.python.org/file11833/test_latex-2.tex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 00:49:33 2008 From: report at bugs.python.org (Winfried Plappert) Date: Sun, 19 Oct 2008 22:49:33 +0000 Subject: [issue4145] tabulary entries in PDF documentation In-Reply-To: <1224406019.73.0.627994354189.issue4145@psf.upfronthosting.co.za> Message-ID: <1224456573.62.0.201509284581.issue4145@psf.upfronthosting.co.za> Changes by Winfried Plappert : Added file: http://bugs.python.org/file11834/test_latex-2.tex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 01:31:04 2008 From: report at bugs.python.org (Winfried Plappert) Date: Sun, 19 Oct 2008 23:31:04 +0000 Subject: [issue4145] tabulary entries in PDF documentation In-Reply-To: <1224406019.73.0.627994354189.issue4145@psf.upfronthosting.co.za> Message-ID: <1224459064.38.0.0020222777188.issue4145@psf.upfronthosting.co.za> Winfried Plappert added the comment: I used the following values, based on 14cm total width (of the paper) [it could be a bit more for A4]: \begin{tabular}{|p{2.94cm}|p{2.52cm}|p{2.52cm}|p{6.02cm}|} - for the ABC table and reran library.tex completely. The table came out beautifully. The percent values I took from the equivalent HTML output, based on collections.rst. So I think it is possible to calculate column width automatically. Since it is late, I will not show the PDF output now. Perhaps tomorrow. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 04:23:30 2008 From: report at bugs.python.org (Thomas Lee) Date: Mon, 20 Oct 2008 02:23:30 +0000 Subject: [issue4113] functools.partial(), no __name__; wrong __doc__ In-Reply-To: <1223898315.71.0.950281538816.issue4113@psf.upfronthosting.co.za> Message-ID: <1224469410.41.0.696104520618.issue4113@psf.upfronthosting.co.za> Thomas Lee added the comment: I actually agree with the sentiment Georg. Would it instead be useful to maybe provide a __repr__ implementation that describes the state of the partially applied function? I guess this is an entirely different issue, maybe one for python-ideas. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 06:27:58 2008 From: report at bugs.python.org (mshee) Date: Mon, 20 Oct 2008 04:27:58 +0000 Subject: [issue4148] Using blender In-Reply-To: <1224476876.93.0.671447627318.issue4148@psf.upfronthosting.co.za> Message-ID: <1224476876.93.0.671447627318.issue4148@psf.upfronthosting.co.za> New submission from mshee : When I start blender this shows in the cmd box. Why? Compiled with python version 2.5.2 'import site' failed; use -v for traceback checking for installed python... No installed python found. only built-in modules are available. some scripts may not run. continuing happily. ---------- messages: 74987 nosy: mshee severity: normal status: open title: Using blender type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 06:35:45 2008 From: report at bugs.python.org (mshee) Date: Mon, 20 Oct 2008 04:35:45 +0000 Subject: [issue4148] Using blender In-Reply-To: <1224476876.93.0.671447627318.issue4148@psf.upfronthosting.co.za> Message-ID: <1224477345.15.0.660487146295.issue4148@psf.upfronthosting.co.za> mshee added the comment: I'm using vista also I downloaded the 2.6 but the error window shows 2.5? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 07:33:30 2008 From: report at bugs.python.org (Kandalintsev Alexandre) Date: Mon, 20 Oct 2008 05:33:30 +0000 Subject: [issue4149] Py_BuildValue and "y" format unit In-Reply-To: <1224480810.72.0.431948511218.issue4149@psf.upfronthosting.co.za> Message-ID: <1224480810.72.0.431948511218.issue4149@psf.upfronthosting.co.za> New submission from Kandalintsev Alexandre : Hello! 'y' format unit in Py_BuildValue undocumented. However it's described in PyArg_ParseTuple. ---------- assignee: georg.brandl components: Documentation messages: 74989 nosy: exe, georg.brandl severity: normal status: open title: Py_BuildValue and "y" format unit versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 08:14:18 2008 From: report at bugs.python.org (Winfried Plappert) Date: Mon, 20 Oct 2008 06:14:18 +0000 Subject: [issue4145] tabulary entries in PDF documentation In-Reply-To: <1224406019.73.0.627994354189.issue4145@psf.upfronthosting.co.za> Message-ID: <1224483258.41.0.408600125459.issue4145@psf.upfronthosting.co.za> Winfried Plappert added the comment: Here is the screenshot: ABCs-2.png Added file: http://bugs.python.org/file11835/ABCs-2.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 09:40:11 2008 From: report at bugs.python.org (Winfried Plappert) Date: Mon, 20 Oct 2008 07:40:11 +0000 Subject: [issue4145] tabulary entries in PDF documentation In-Reply-To: <1224406019.73.0.627994354189.issue4145@psf.upfronthosting.co.za> Message-ID: <1224488411.62.0.488816975073.issue4145@psf.upfronthosting.co.za> Winfried Plappert added the comment: There are some 200 tables in the 2.6 documentation, 150 alone in library.tex - and a few less in the 3.0rc1 documentation. So may suggest a course of action: since most of these tables produces reasonable results by using your automatic layout, there are only a few to tackle "manually". You could invent a new keyword e.g. relativecolumnwidth, which then renders the table in the above style, based on effective paper width and based on column widths in the *.rst files. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 11:17:20 2008 From: report at bugs.python.org (Andre Heider) Date: Mon, 20 Oct 2008 09:17:20 +0000 Subject: [issue4120] Do not embed manifest files in *.pyd when compiling with MSVC In-Reply-To: <1223971312.31.0.131537865896.issue4120@psf.upfronthosting.co.za> Message-ID: <1224494240.12.0.952159745834.issue4120@psf.upfronthosting.co.za> Andre Heider added the comment: > For some reason, the linker *does* generate manifest files for all the .pyds when I try it out. Should that worry me? When I delete them, it still can import them just fine. Hm, works for me. I am using MS SDK v6.1 and PCbuild/build.bat. > This is not true. For MSVC9SP (VS2008) Microsoft decided that by default, it will still compile against the original CRT You're right, there are defines for that: http://msdn.microsoft.com/en-us/library/cc664727.aspx While that won't load a 2nd copy of the CRT into memory, the embedded manifests of site-packages still have the same problem as the .pyd files now. So if this gets accepted, reverting the patch of Issue 2563 should be considered. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 12:18:56 2008 From: report at bugs.python.org (Yaakov (Cygwin Ports)) Date: Mon, 20 Oct 2008 10:18:56 +0000 Subject: [issue3626] python3.0 interpreter on Cygwin ignores all arguments In-Reply-To: <1219293362.56.0.98048679745.issue3626@psf.upfronthosting.co.za> Message-ID: <1224497936.47.0.615162714423.issue3626@psf.upfronthosting.co.za> Yaakov (Cygwin Ports) added the comment: 3.0rc1 builds and installs fine with the latest patch. Thanks! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 13:47:20 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 20 Oct 2008 11:47:20 +0000 Subject: [issue4148] Using blender In-Reply-To: <1224476876.93.0.671447627318.issue4148@psf.upfronthosting.co.za> Message-ID: <1224503240.88.0.0603492649182.issue4148@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This is a Blender problem, no a Python bug. Please consult blender's help resources. ---------- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 16:21:10 2008 From: report at bugs.python.org (Armin Rigo) Date: Mon, 20 Oct 2008 14:21:10 +0000 Subject: [issue4150] pdb "up" command fails in generator frames In-Reply-To: <1224512469.54.0.977568708745.issue4150@psf.upfronthosting.co.za> Message-ID: <1224512469.54.0.977568708745.issue4150@psf.upfronthosting.co.za> New submission from Armin Rigo : pdb in post-mortem mode is not able to walk the stack through frames that belong to generators. The "up" command fails with the message "Oldest frame", making it impossible to inspect the caller (or even know what the caller was). The attached patch fixes this. ---------- components: Library (Lib) files: pdb-gen-frames.diff keywords: patch, patch messages: 74995 nosy: arigo severity: normal status: open title: pdb "up" command fails in generator frames type: behavior 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 2.6, Python 2.7 Added file: http://bugs.python.org/file11836/pdb-gen-frames.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 17:13:31 2008 From: report at bugs.python.org (jan matejek) Date: Mon, 20 Oct 2008 15:13:31 +0000 Subject: [issue3620] test_smtplib is flaky In-Reply-To: <1219244969.03.0.636728598981.issue3620@psf.upfronthosting.co.za> Message-ID: <1224515611.95.0.0223192500147.issue3620@psf.upfronthosting.co.za> Changes by jan matejek : ---------- nosy: +matejcik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 19:04:16 2008 From: report at bugs.python.org (Neil Schemenauer) Date: Mon, 20 Oct 2008 17:04:16 +0000 Subject: [issue4151] Separate build dir broken In-Reply-To: <1224522256.17.0.820973690454.issue4151@psf.upfronthosting.co.za> Message-ID: <1224522256.17.0.820973690454.issue4151@psf.upfronthosting.co.za> New submission from Neil Schemenauer : Building in a separate directory got broken at some point. The code is hairy but it looks like the source of the problem was a lame sysconfig.get_python_inc() function. The attached patches fix things and hopefully do not introduce any new bugs. ---------- components: Build files: get_python_inc.patch keywords: patch messages: 74996 nosy: nas severity: normal status: open title: Separate build dir broken type: compile error Added file: http://bugs.python.org/file11837/get_python_inc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 19:06:28 2008 From: report at bugs.python.org (Neil Schemenauer) Date: Mon, 20 Oct 2008 17:06:28 +0000 Subject: [issue4151] Separate build dir broken In-Reply-To: <1224522256.17.0.820973690454.issue4151@psf.upfronthosting.co.za> Message-ID: <1224522388.49.0.936663873056.issue4151@psf.upfronthosting.co.za> Changes by Neil Schemenauer : Added file: http://bugs.python.org/file11838/get_python_inc2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 19:06:33 2008 From: report at bugs.python.org (Neil Schemenauer) Date: Mon, 20 Oct 2008 17:06:33 +0000 Subject: [issue4151] Separate build dir broken In-Reply-To: <1224522256.17.0.820973690454.issue4151@psf.upfronthosting.co.za> Message-ID: <1224522393.83.0.0166696097492.issue4151@psf.upfronthosting.co.za> Changes by Neil Schemenauer : Removed file: http://bugs.python.org/file11837/get_python_inc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 19:06:53 2008 From: report at bugs.python.org (Neil Schemenauer) Date: Mon, 20 Oct 2008 17:06:53 +0000 Subject: [issue4151] Separate build dir broken In-Reply-To: <1224522256.17.0.820973690454.issue4151@psf.upfronthosting.co.za> Message-ID: <1224522413.78.0.592337913227.issue4151@psf.upfronthosting.co.za> Changes by Neil Schemenauer : Added file: http://bugs.python.org/file11839/get_python_inc2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 19:17:46 2008 From: report at bugs.python.org (Koen van de Sande) Date: Mon, 20 Oct 2008 17:17:46 +0000 Subject: [issue4120] Do not embed manifest files in *.pyd when compiling with MSVC In-Reply-To: <1223971312.31.0.131537865896.issue4120@psf.upfronthosting.co.za> Message-ID: <1224523066.48.0.709923360994.issue4120@psf.upfronthosting.co.za> Koen van de Sande added the comment: The TCL85.dll introduces a subtlety (actually it is TK85.dll). The MSVCRT90 is not the only dependency that can be in the manifest. The Windows.CommonControls.6.0 is used by TK85.dll. So, also for all Python extensions which have additional dependencies beside MSVCRT90, the manifest should still be included. Situation: - .pyd only depends on MSVCRT90: no manifest needed (will fallback to Python 2.6's own manifest and to WinSXS or the installation in the main Python folder) - .pyd has more dependencies: manifest is needed. But, a wild idea, perhaps we could strip MSVCRT90 from the manifest? This is speculation, but perhaps the fallback to the manifest of Python26.exe will still work this way, and the runtimes will only need to be in a single place. Anyone know of an easy-to-build example of a Python extension with extra dependencies? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 19:36:42 2008 From: report at bugs.python.org (Neil Schemenauer) Date: Mon, 20 Oct 2008 17:36:42 +0000 Subject: [issue4152] ihooks module cannot handle absolute imports In-Reply-To: <1224524202.33.0.257355673326.issue4152@psf.upfronthosting.co.za> Message-ID: <1224524202.33.0.257355673326.issue4152@psf.upfronthosting.co.za> New submission from Neil Schemenauer : The ihooks module was updated when the absolute imports feature was implemented. At a minimum, I guess the import_module() methods in that module would need to have "level=-1" keyword arguments added. The only library in the core that uses an absolute import is encodings/__init__.py. ---------- messages: 74998 nosy: nas severity: normal status: open title: ihooks module cannot handle absolute imports type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 20:04:00 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 20 Oct 2008 18:04:00 +0000 Subject: [issue4153] Unicode HOWTO up to date? In-Reply-To: <1224525840.81.0.649106205615.issue4153@psf.upfronthosting.co.za> Message-ID: <1224525840.81.0.649106205615.issue4153@psf.upfronthosting.co.za> New submission from Terry J. Reedy : The Unicode HOWTO begins with "Warning This HOWTO has not yet been updated for Python 3000?s string object changes." Without reading in detail, it appears it has been updated, at least somewhat, and certainly more than I feared from the warning. "The String Type Since Python 3.0, the language features a str type that contain Unicode characters" and then a section "Converting to Bytes" and a later reference to bytearrays. So perhaps the warning is obsolete and should be removed. Also, the revision history should have at least one more entry for the 3.0 updates, which certainly were entered since 2005 ---------- assignee: georg.brandl components: Documentation messages: 74999 nosy: georg.brandl, tjreedy severity: normal status: open title: Unicode HOWTO up to date? versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 20:45:10 2008 From: report at bugs.python.org (Anthony Tuininga) Date: Mon, 20 Oct 2008 18:45:10 +0000 Subject: [issue1102] Add support for _msi.Record.GetString() and _msi.Record.GetInteger() In-Reply-To: <1188940010.27.0.383470464739.issue1102@psf.upfronthosting.co.za> Message-ID: <1224528310.7.0.233426770135.issue1102@psf.upfronthosting.co.za> Changes by Anthony Tuininga : Removed file: http://bugs.python.org/file8385/_msi.patch.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 20:47:47 2008 From: report at bugs.python.org (Anthony Tuininga) Date: Mon, 20 Oct 2008 18:47:47 +0000 Subject: [issue1102] Add support for _msi.Record.GetString() and _msi.Record.GetInteger() In-Reply-To: <1188940010.27.0.383470464739.issue1102@psf.upfronthosting.co.za> Message-ID: <1224528467.19.0.0955406281718.issue1102@psf.upfronthosting.co.za> Anthony Tuininga added the comment: With apologies for the delay, I have modified the patch to remove the stuff that has been added already. Some of the other changes are to make use of new C API functionality but they can be ignored, if desired. The changes that are relevant are in the view_fetch() routine. Again, if you have questions, let me know. ---------- versions: +Python 2.6 -Python 2.5 Added file: http://bugs.python.org/file11840/_msi.patch.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 21:07:13 2008 From: report at bugs.python.org (David W. Lambert) Date: Mon, 20 Oct 2008 19:07:13 +0000 Subject: [issue4154] More doc trivia In-Reply-To: <1224529633.22.0.844259184987.issue4154@psf.upfronthosting.co.za> Message-ID: <1224529633.22.0.844259184987.issue4154@psf.upfronthosting.co.za> New submission from David W. Lambert : http://docs.python.org/dev/3.0/extending/extending.html Given that the following paragraph tells us that there should be just one non-static item in the module file, struct PyModuleDef spammodule = should be static struct PyModuleDef spammodule = Possibly this persists into the Demos, that's not available to me right now. Thanks! (perusal---might wish to write static void no_bug static void bug ) ---------- assignee: georg.brandl components: Documentation messages: 75001 nosy: LambertDW, georg.brandl severity: normal status: open title: More doc trivia versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 21:17:55 2008 From: report at bugs.python.org (Russell Owen) Date: Mon, 20 Oct 2008 19:17:55 +0000 Subject: [issue4017] Tkinter cannot find Tcl/Tk on Mac OS X In-Reply-To: <1222960590.08.0.635891151551.issue4017@psf.upfronthosting.co.za> Message-ID: <1224530275.24.0.465146880292.issue4017@psf.upfronthosting.co.za> Changes by Russell Owen : ---------- nosy: +reowen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 22:08:02 2008 From: report at bugs.python.org (Petr) Date: Mon, 20 Oct 2008 20:08:02 +0000 Subject: [issue4155] Wrong math calculation In-Reply-To: <1224533281.89.0.753070831539.issue4155@psf.upfronthosting.co.za> Message-ID: <1224533281.89.0.753070831539.issue4155@psf.upfronthosting.co.za> New submission from Petr : Hi, I've just tried some math functions in python3.0, but there's an wrong calculation (see the example). sin(pi/4) should be same as (2^.5)/2, but the result is different in last two digits. I don't know if it's an expected behaviour and this is my first posted issue. Python 3.0rc1 (r30rc1:66507, Sep 18 2008, 14:47:08) [MSC v.1500 32 bit (Intel)] >>> from math import * >>> sin(pi/4)==(2**0.5)/2 False sin(pi/4)==0.70710678118654746 (2**0.5)/2==0.70710678118654757 bubersson ---------- messages: 75002 nosy: bubersson severity: normal status: open title: Wrong math calculation type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 22:33:50 2008 From: report at bugs.python.org (vali) Date: Mon, 20 Oct 2008 20:33:50 +0000 Subject: [issue3997] zipfile and winzip In-Reply-To: <1222701058.88.0.102455918408.issue3997@psf.upfronthosting.co.za> Message-ID: <1224534830.06.0.0793362181615.issue3997@psf.upfronthosting.co.za> vali added the comment: The version I used should not have this limitation as archives created with other languages as Java or C# opens fine in WinZip 11.2 evaluation version. Also the same issue can be observed in Windows compress utility. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 22:35:33 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 20 Oct 2008 20:35:33 +0000 Subject: [issue4155] Wrong math calculation In-Reply-To: <1224533281.89.0.753070831539.issue4155@psf.upfronthosting.co.za> Message-ID: <1224534933.58.0.671052241373.issue4155@psf.upfronthosting.co.za> Raymond Hettinger added the comment: None of these calculations are going to work out exactly. Look-up "what every computer scientist needs to know about floating point" and see the floating-point appendix in the Python tutorial. In this case, the difference is only one bit in the last place: >>> 0.70710678118654746.hex() '0x1.6a09e667f3bccp-1' >>> 0.70710678118654757.hex() '0x1.6a09e667f3bcdp-1' ---------- nosy: +rhettinger resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 23:04:58 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 20 Oct 2008 21:04:58 +0000 Subject: [issue4154] More doc trivia In-Reply-To: <1224529633.22.0.844259184987.issue4154@psf.upfronthosting.co.za> Message-ID: <1224536698.41.0.497609253929.issue4154@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks. Fixed in r66983. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 23:15:09 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 20 Oct 2008 21:15:09 +0000 Subject: [issue2619] Document PEP 3118 In-Reply-To: <1207946818.06.0.901333881861.issue2619@psf.upfronthosting.co.za> Message-ID: <1224537309.09.0.568928243847.issue2619@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I'm just going to close this. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 23:17:07 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 20 Oct 2008 21:17:07 +0000 Subject: [issue1248] ftplib needs a rewrite to use bytes/buffers In-Reply-To: <1191874324.3.0.017965594704.issue1248@psf.upfronthosting.co.za> Message-ID: <1224537427.6.0.923804020412.issue1248@psf.upfronthosting.co.za> Benjamin Peterson added the comment: So can we close this? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 23:17:31 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 20 Oct 2008 21:17:31 +0000 Subject: [issue3931] codecs.charmap_build is untested and undocumented In-Reply-To: <1222085190.52.0.690275455212.issue3931@psf.upfronthosting.co.za> Message-ID: <1224537451.96.0.579330857449.issue3931@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 23:21:53 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 20 Oct 2008 21:21:53 +0000 Subject: [issue4062] Reference to non-existent __version__ in ast module In-Reply-To: <1223335681.88.0.292034788645.issue4062@psf.upfronthosting.co.za> Message-ID: <1224537713.18.0.195020335524.issue4062@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: georg.brandl -> aronacher nosy: +aronacher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 23:25:01 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 20 Oct 2008 21:25:01 +0000 Subject: [issue2231] Memory leak in itertools.chain() In-Reply-To: <1204636244.39.0.268718353736.issue2231@psf.upfronthosting.co.za> Message-ID: <1224537901.07.0.919084098232.issue2231@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Backport candidate ---------- nosy: +loewis versions: +Python 2.5.3 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 23:27:46 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 20 Oct 2008 21:27:46 +0000 Subject: [issue2231] Memory leak in itertools.chain() In-Reply-To: <1204636244.39.0.268718353736.issue2231@psf.upfronthosting.co.za> Message-ID: <1224538066.99.0.998793355263.issue2231@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 23:28:15 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 20 Oct 2008 21:28:15 +0000 Subject: [issue2246] itertools.groupby() leaks memory with circular reference In-Reply-To: <1204832369.47.0.680636098879.issue2246@psf.upfronthosting.co.za> Message-ID: <1224538095.3.0.859832289605.issue2246@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Backport candidate ---------- nosy: +loewis versions: +Python 2.5.3 -Python 2.4, Python 2.5, Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 23:28:28 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 20 Oct 2008 21:28:28 +0000 Subject: [issue2246] itertools.groupby() leaks memory with circular reference In-Reply-To: <1204832369.47.0.680636098879.issue2246@psf.upfronthosting.co.za> Message-ID: <1224538108.55.0.446999475747.issue2246@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 23:29:24 2008 From: report at bugs.python.org (Armin Ronacher) Date: Mon, 20 Oct 2008 21:29:24 +0000 Subject: [issue4062] Reference to non-existent __version__ in ast module In-Reply-To: <1223335681.88.0.292034788645.issue4062@psf.upfronthosting.co.za> Message-ID: <1224538164.27.0.794891974453.issue4062@psf.upfronthosting.co.za> Armin Ronacher added the comment: Fixed in changeset 66984. ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 23:33:21 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 20 Oct 2008 21:33:21 +0000 Subject: [issue1102] Add support for _msi.Record.GetString() and _msi.Record.GetInteger() In-Reply-To: <1188940010.27.0.383470464739.issue1102@psf.upfronthosting.co.za> Message-ID: <1224538401.28.0.324606760608.issue1102@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 23:33:42 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 20 Oct 2008 21:33:42 +0000 Subject: [issue4120] Do not embed manifest files in *.pyd when compiling with MSVC In-Reply-To: <1223971312.31.0.131537865896.issue4120@psf.upfronthosting.co.za> Message-ID: <1224538422.63.0.424230483712.issue4120@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- assignee: -> loewis priority: -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 20 23:43:09 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Mon, 20 Oct 2008 21:43:09 +0000 Subject: [issue2246] itertools.groupby() leaks memory with circular reference In-Reply-To: <1204832369.47.0.680636098879.issue2246@psf.upfronthosting.co.za> Message-ID: <1224538989.86.0.382700616594.issue2246@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Already backported in r61287. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 00:05:40 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 20 Oct 2008 22:05:40 +0000 Subject: [issue3931] codecs.charmap_build is untested and undocumented In-Reply-To: <1222085190.52.0.690275455212.issue3931@psf.upfronthosting.co.za> Message-ID: <1224540340.07.0.865637743018.issue3931@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: AFAIR, this code was added by Martin as optimization. The function is a direct interface to PyUnicode_BuildEncodingMap() which builds either a dictionary or EncodingMap object for use by the charmap codec. It is primarily used by the gencodec.py script. ---------- assignee: -> georg.brandl components: +Documentation nosy: +georg.brandl, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 00:21:45 2008 From: report at bugs.python.org (Roumen Petrov) Date: Mon, 20 Oct 2008 22:21:45 +0000 Subject: [issue4151] Separate build dir broken In-Reply-To: <1224522256.17.0.820973690454.issue4151@psf.upfronthosting.co.za> Message-ID: <1224541305.18.0.66917860351.issue4151@psf.upfronthosting.co.za> Roumen Petrov added the comment: get_python_inc() and test case is addressed in issue4070 as well. ---------- nosy: +rpetrov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 00:23:52 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 20 Oct 2008 22:23:52 +0000 Subject: [issue3997] zipfile and winzip In-Reply-To: <1222701058.88.0.102455918408.issue3997@psf.upfronthosting.co.za> Message-ID: <1224541432.5.0.148312683782.issue3997@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Right, this is a bug in zipfile.py. The official PKZIP specifications says: http://www.pkware.com/documents/casestudies/APPNOTE.TXT total number of entries in the central dir: (2 bytes) The total number of files in the .ZIP file. If an archive is in ZIP64 format and the value in this field is 0xFFFF, the size will be in the corresponding 8 byte zip64 end of central directory field. Patch is attached. With it I can open the file with WinZip. ---------- keywords: +needs review, patch nosy: +loewis Added file: http://bugs.python.org/file11841/zip-64k.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 00:51:27 2008 From: report at bugs.python.org (Neil Schemenauer) Date: Mon, 20 Oct 2008 22:51:27 +0000 Subject: [issue4070] python tests failure if builddir <> sourcedir In-Reply-To: <1223418786.48.0.948441318912.issue4070@psf.upfronthosting.co.za> Message-ID: <1224543087.94.0.0364032349242.issue4070@psf.upfronthosting.co.za> Neil Schemenauer added the comment: Issue 4151 contains a similar patch but it cleans up more code, IMHO. ---------- nosy: +nas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 01:39:32 2008 From: report at bugs.python.org (kai zhu) Date: Mon, 20 Oct 2008 23:39:32 +0000 Subject: [issue3238] backport python 3.0 language functionality to python 2.6 by adding 7 opcodes to ceval.c In-Reply-To: <1214770027.24.0.542856927114.issue3238@psf.upfronthosting.co.za> Message-ID: <1224545972.64.0.648780688676.issue3238@psf.upfronthosting.co.za> kai zhu added the comment: ported to python-2.6 & is a bit more stable (written a few py3k programs w/ it). the patches have been simplified & consolidated to a single file: ceval.c u can also test out scripts generated by 2to3 by adding to them the magic line: "from __future__ import py3k_syntax" an example "python-2.6" script using "python-3.0" language syntax (& numpy if its installed) is provided @: http://www-rcf.usc.edu/~kaizhu/work/py3to2/current/example_py3k.py new features added by patch to python-2.6 (under py3k_syntax mode): pep3102 Keyword-Only Arguments pep3104 Access to Names in Outer Scopes pep3107 Function Annotations pep3111 Simple input built-in in Python 3000 pep3113 Removal of Tuple Parameter Unpacking pep3114 Renaming iterator.next() to iterator.__next__() pep3115 Metaclasses in Python 3000 pep3127 Integer Literal Support and Syntax - oct() functions differently in py3k_syntax mode pep3129 Class Decorators pep3132 Extended Iterable Unpacking pep3135 New Super misc exec becomes a function sans unicode & py3k's builtins module, the above (plus __future__) implements pretty much all of py3k's language syntax py3k_syntax mode: a special bitflag is embedded in codeobj->co_argcount, which triggers PyEval_EvalFrameEx to enable the backported opcodes (which r disabled by default) & use an alternate py3k __builtin__. codeobj->co_argcount now limited to range 0-0xffff with upper bits reserved for py3k flags codeobj->co_kwonlyargcount (limited to range 0-0xff) is embedded in upper bits of codeobj->co_argcount most of the trouble have been gettin kwonlyarg, annotations, & classes to work. there is one unrelated opcode (LOAD_ATTR_py3k) added to ceval.c for my personal use (curries attributes as a universal function), but can b safely disabled by commenting its case out of PyEvalFrameEx in ceval.c & deleting it from dict opnew_py2x in py3to2.py ---------- components: +Extension Modules, Library (Lib) -None Added file: http://bugs.python.org/file11842/README.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 03:57:47 2008 From: report at bugs.python.org (kai zhu) Date: Tue, 21 Oct 2008 01:57:47 +0000 Subject: [issue3238] backport python 3.0 language functionality to python 2.6 by adding 7 opcodes to ceval.c In-Reply-To: <1214770027.24.0.542856927114.issue3238@psf.upfronthosting.co.za> Message-ID: <1224554267.13.0.742872919554.issue3238@psf.upfronthosting.co.za> Changes by kai zhu : ---------- keywords: +patch Added file: http://bugs.python.org/file11843/ceval.20081020.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 04:25:48 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 21 Oct 2008 02:25:48 +0000 Subject: [issue2446] 2to3 translates "import foobar" to "import .foobar" rather than "from . import foobar" In-Reply-To: <1206122382.01.0.177794619684.issue2446@psf.upfronthosting.co.za> Message-ID: <1224555948.28.0.604985614934.issue2446@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I fixed this is r66707. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 04:42:16 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 21 Oct 2008 02:42:16 +0000 Subject: [issue4062] Reference to non-existent __version__ in ast module In-Reply-To: <1223335681.88.0.292034788645.issue4062@psf.upfronthosting.co.za> Message-ID: <1224556936.79.0.493263685902.issue4062@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 07:03:58 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 21 Oct 2008 05:03:58 +0000 Subject: [issue3238] backport python 3.0 language functionality to python 2.6 by adding 7 opcodes to ceval.c In-Reply-To: <1214770027.24.0.542856927114.issue3238@psf.upfronthosting.co.za> Message-ID: <1224565438.59.0.712216181284.issue3238@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Recommend rejecting this. I believe that it wasn't backported for a reason. Guido, care to pronounce? ---------- assignee: -> gvanrossum nosy: +gvanrossum, rhettinger priority: -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 08:30:22 2008 From: report at bugs.python.org (kai zhu) Date: Tue, 21 Oct 2008 06:30:22 +0000 Subject: [issue3238] backport python 3.0 language functionality to python 2.6 by adding 7 opcodes to ceval.c In-Reply-To: <1214770027.24.0.542856927114.issue3238@psf.upfronthosting.co.za> Message-ID: <1224570622.54.0.709576950336.issue3238@psf.upfronthosting.co.za> Changes by kai zhu : Added file: http://bugs.python.org/file11844/py3to2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 08:42:18 2008 From: report at bugs.python.org (Dmitry Dvoinikov) Date: Tue, 21 Oct 2008 06:42:18 +0000 Subject: [issue3890] ssl.SSLSocket.recv() implementation may not work with non-blocking sockets In-Reply-To: <1221683752.69.0.81133093826.issue3890@psf.upfronthosting.co.za> Message-ID: <1224571338.94.0.0939709314407.issue3890@psf.upfronthosting.co.za> Changes by Dmitry Dvoinikov : ---------- nosy: +ddvoinikov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 08:45:24 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 21 Oct 2008 06:45:24 +0000 Subject: [issue2231] Memory leak in itertools.chain() In-Reply-To: <1204636244.39.0.268718353736.issue2231@psf.upfronthosting.co.za> Message-ID: <1224571524.87.0.992181566487.issue2231@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The affected code did not exist in Py2.5. The patch made it to both Py2.6 and Py3.0. Closing. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 08:56:20 2008 From: report at bugs.python.org (kai zhu) Date: Tue, 21 Oct 2008 06:56:20 +0000 Subject: [issue3238] backport python 3.0 language functionality to python 2.6 by adding 7 opcodes to ceval.c In-Reply-To: <1214770027.24.0.542856927114.issue3238@psf.upfronthosting.co.za> Message-ID: <1224572180.92.0.322664872779.issue3238@psf.upfronthosting.co.za> kai zhu added the comment: hi, i'm happy i got a response on this :) anyway, can u elaborate on the "reason" y something like this was never done? yes, i kno the patch is rough right now (& will never get accepted in its current state), but its now proven to work, & gives migrating developers *something* to test their py3k_syntax code while *still* maintaining compatibility w/ python2.x extension modules. isn't that the spirit of python 2.7? in the meantime, i'm in no hurry to have anything committed. Added file: http://bugs.python.org/file11845/example_py3k.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 11:22:24 2008 From: report at bugs.python.org (Dan Dibagh) Date: Tue, 21 Oct 2008 09:22:24 +0000 Subject: [issue2980] Pickle stream for unicode object may contain non-ASCII characters. In-Reply-To: <1211902695.6.0.958731947697.issue2980@psf.upfronthosting.co.za> Message-ID: <1224580944.13.0.420901995574.issue2980@psf.upfronthosting.co.za> Dan Dibagh added the comment: Your reasoning shows a lack of understanding how Python is actually used from a programmers point of view. Why do you think that "noticing" a problem is the same thing as entering as a python bug report? In practice there are several steps between noticing a problem in a python program and entering it as a bug report in the python development system. It is very difficult so see why any of these steps would happen automatically. Believe me, people have had real problems due to this bug. They have just selected other solutions than reporting it. You are yourself reluctant so seek out the roots of this problem and fix it. Why should other people behave differently and report it? A not so uncommon "fix" to pickle problems out there is to not using pickle at all. There are Python programmers who gives the advice to avoid pickle since "it's too shaky". It is a solution, but is it the solution you desire? The capability to serialize stuff into ASCII strings isn't just an implementation detail that happens to be nice for human readability. It is a feature people need for technical reasons. If the data is ASCII, it can be dealt with in any ASCII-compatible context which might be network protocols, file formats and database interfaces. There is the real use. Programs depend on it to work properly. The solution the change the documentation is in practice breaking compatibility (which programming language designers normally tries to avoid or do in a very controlled manner). How is a documentation fix going to help all the code out there written with the assumption that pickle protocol 0 is always ASCII? Is there a better solution around than changing pickle to meet actual expectations? Well, nobody has reported it as a bug in 8 years. How long do you think that code will stay around based on the ASCII assumption? 8 years? 16 years? 24 years? Maybe all the time in the world for this to become an issue again and again and again? It is difficult to grasp why there is "no way to fix it now". From a programmers point of view an obvious "fix" is to ditch pickle and use something that delivers a consistent result rather than debugging hours. When I try to see it from the Python library developers point of view I see code implemented in C which produces a result with reasonable performance. It is perfectly possible to write the code which implements the expected result within reasonable performance. What is the problem? Perhaps it is the raw-unicode-escape encoding that should be fixed? I failed to find exact information about what raw-unicode-escape means. In particular, where is the information which states that raw-unicode-escape is always an 8-bit format? The closest I've come is PEP 100 and PEP 263 (which I notice is written by you guys), which describes how to decode raw unicode escape strings from Python source and how to define encoding formats for python source code. The sole original purpose of both unicode-escape and raw-unicode-escape appears to be representing unicode strings in Python source code as u' and ur' strings respectively. It is clear that the decoding of a raw unicode escaped or unicode escaped string depends on the actual encoding of the python source, but how goes the logic that when something is _encoded_ into a raw unicode string then the target source must be of some 8-bit encoding. Especially considering that the default python source encoding is ASCII. For unicode-escape this makes sense: >>> f = file("test.py", "wb") >>> f.write('s = u"%s"\n' % u"\u0080".encode("unicode-escape")) >>> f.close() >>> ^Z python test.py (executes silently without errors) But for raw-unicode-escape the outcome is a different thing: >>> f = file("test.py", "wb") >>> f.write('s = ur"%s"\n' % u"\u0080".encode("raw-unicode-escape")) >>> f.close() >>> ^Z python test.py File "test.py", line 1 SyntaxError: Non-ASCII character '\x80' in file test.py on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details Huh? For someone who trusts the Standard Encodings section Python Library reference this isn't what one would expect. If the documentation states "Produce a string that is suitable as raw Unicode literal in Python source code" then why isn't it suitable? ---------- nosy: +dddibagh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 11:46:38 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 21 Oct 2008 09:46:38 +0000 Subject: [issue2980] Pickle stream for unicode object may contain non-ASCII characters. In-Reply-To: <1224580944.13.0.420901995574.issue2980@psf.upfronthosting.co.za> Message-ID: <48FDA4F7.7080307@egenix.com> Marc-Andre Lemburg added the comment: On 2008-10-21 11:22, Dan Dibagh wrote: > Your reasoning shows a lack of understanding how Python is actually used > from a programmers point of view. Hmm, I've been using Python for almost 15 years now and do believe that I have an idea of how Python is being used. Note that we cannot change the pickle format in retrospective, since this would break pickle data exchange between different Python versions relying on the same format (but using different pickle implementations). What we could do is add a new pickle format which then escapes all non-ASCII data. However, people have been more keen on getting compact and fast loading pickles than pickles in ASCII which is why all new versions of the pickle format are binary formats, so I don't think it's worth the effort. Note that the common way of dealing with binary data in ASCII streams is using a base64 encoding and possibly also apply compression. The pickle 0 format is really only useful for debugging purposes. > Perhaps it is the raw-unicode-escape encoding that should be fixed? I > failed to find exact information about what raw-unicode-escape means. In > particular, where is the information which states that > raw-unicode-escape is always an 8-bit format? The closest I've come is > PEP 100 and PEP 263 (which I notice is written by you guys), which > describes how to decode raw unicode escape strings from Python source > and how to define encoding formats for python source code. The sole > original purpose of both unicode-escape and raw-unicode-escape appears > to be representing unicode strings in Python source code as u' and ur' > strings respectively. Right. > It is clear that the decoding of a raw unicode > escaped or unicode escaped string depends on the actual encoding of the > python source, but how goes the logic that when something is _encoded_ > into a raw unicode string then the target source must be of some 8-bit > encoding. Especially considering that the default python source encoding > is ASCII. For unicode-escape this makes sense: > >>>> f = file("test.py", "wb") >>>> f.write('s = u"%s"\n' % u"\u0080".encode("unicode-escape")) >>>> f.close() >>>> ^Z > > python test.py (executes silently without errors) > > But for raw-unicode-escape the outcome is a different thing: > >>>> f = file("test.py", "wb") >>>> f.write('s = ur"%s"\n' % u"\u0080".encode("raw-unicode-escape")) >>>> f.close() >>>> ^Z > > python test.py > > File "test.py", line 1 > SyntaxError: Non-ASCII character '\x80' in file test.py on line 1, but > no encoding declared; see http://www.python.org/peps/pep-0263.html for > details > > Huh? For someone who trusts the Standard Encodings section Python > Library reference this isn't what one would expect. If the documentation > states "Produce a string that is suitable as raw Unicode literal in > Python source code" then why isn't it suitable? Because the raw-unicode-escape codec won't escape the \x80 character, hence the name. As a result, the generated source code is not ASCII, which is why you see the exception. But this is off-topic w/r to the issue in question. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 13:09:30 2008 From: report at bugs.python.org (Kent Johnson) Date: Tue, 21 Oct 2008 11:09:30 +0000 Subject: [issue4156] Docs for BaseHandler.protocol_xxx methods are unclear In-Reply-To: <1224587370.27.0.33419504535.issue4156@psf.upfronthosting.co.za> Message-ID: <1224587370.27.0.33419504535.issue4156@psf.upfronthosting.co.za> New submission from Kent Johnson : In the docs for urllib2.BaseHandler previous to Python 2.6, the names of the protocol_xxx() methods were spelled with 'protocol' in italics to indicate that it is a placeholder; the actual method name is e.g. http_opener(). http://www.python.org/doc/2.5.2/lib/base-handler-objects.html In the Python 2.6 docs this typographic distinction has been lost http://docs.python.org/library/urllib2.html#basehandler-objects so it is not so clear that e.g. protocol_open() is not an actual method. I suggest either restoring the italics or using a spelling such as _open() for the method names. If this is difficult then the body of the descriptions should be rewritten to make it clear that the 'given protocol' is indicated by the name of the method. ---------- assignee: georg.brandl components: Documentation messages: 75023 nosy: georg.brandl, kjohnson severity: normal status: open title: Docs for BaseHandler.protocol_xxx methods are unclear versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 15:37:41 2008 From: report at bugs.python.org (Feite Jaarsma) Date: Tue, 21 Oct 2008 13:37:41 +0000 Subject: [issue4157] Tuple not callable in platform.py In-Reply-To: <1224596260.97.0.062858509503.issue4157@psf.upfronthosting.co.za> Message-ID: <1224596260.97.0.062858509503.issue4157@psf.upfronthosting.co.za> New submission from Feite Jaarsma : The function 'def _test_parse_release_file()' has a for statement with a tuple as iter in it (examples of release file contents). This tuple is not a tuple. There is a ',' missing on every line (marked by '*'): for input, output in ( # Examples of release file contents: ('SuSE Linux 9.3 (x86-64)', ('SuSE Linux ', '9.3', 'x86-64'))* ('SUSE LINUX 10.1 (X86-64)', ('SUSE LINUX ', '10.1', 'X86-64'))* ('SUSE LINUX 10.1 (i586)', ('SUSE LINUX ', '10.1', 'i586'))* ('Fedora Core release 5 (Bordeaux)', ('Fedora Core', '5', 'Bordeaux'))* ('Red Hat Linux release 8.0 (Psyche)', ('Red Hat Linux', '8.0', 'Psyche'))* ('Red Hat Linux release 9 (Shrike)', ('Red Hat Linux', '9', 'Shrike'))* ('Red Hat Enterprise Linux release 4 (Nahant)', ('Red Hat Enterprise Linux', '4', 'Nahant'))* ('CentOS release 4', ('CentOS', '4', None))* ('Rocks release 4.2.1 (Cydonia)', ('Rocks', '4.2.1', 'Cydonia')) ): ---------- components: Library (Lib) messages: 75024 nosy: Feite severity: normal status: open title: Tuple not callable in platform.py type: compile error versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 16:23:42 2008 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 21 Oct 2008 14:23:42 +0000 Subject: [issue3238] backport python 3.0 language functionality to python 2.6 by adding 7 opcodes to ceval.c In-Reply-To: <1214770027.24.0.542856927114.issue3238@psf.upfronthosting.co.za> Message-ID: <1224599022.13.0.734538395273.issue3238@psf.upfronthosting.co.za> Guido van Rossum added the comment: This doesn't sound like it will ever be reliable. Kai Zhu, a better strategy would be for you to maintain your own experimental port of Python 2.6+3.0 based upon these patches. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 16:34:36 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 21 Oct 2008 14:34:36 +0000 Subject: [issue4157] Tuple not callable in platform.py In-Reply-To: <1224596260.97.0.062858509503.issue4157@psf.upfronthosting.co.za> Message-ID: <1224599676.67.0.42355714195.issue4157@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Correct. Fortunately this is an internal function that is not used by any other code. It should be corrected and moved to the test suite. ---------- assignee: -> amaury.forgeotdarc nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 16:36:27 2008 From: report at bugs.python.org (Jacques Lemire) Date: Tue, 21 Oct 2008 14:36:27 +0000 Subject: [issue4158] import of sqlite3 fails In-Reply-To: <1224599787.4.0.032538793853.issue4158@psf.upfronthosting.co.za> Message-ID: <1224599787.4.0.032538793853.issue4158@psf.upfronthosting.co.za> New submission from Jacques Lemire : This is a dump of the error: Python 3.0rc1 (r30rc1:66499, Oct 6 2008, 12:44:02) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sqlite3 Traceback (most recent call last): File "", line 1, in File "/home/devp/altBIN/Python3r/lib/python3.0/sqlite3/__init__.py", line 24, in from sqlite3.dbapi2 import * File "/home/devp/altBIN/Python3r/lib/python3.0/sqlite3/dbapi2.py", line 27, in from _sqlite3 import * ImportError: No module named _sqlite3 ---------- components: Library (Lib) messages: 75027 nosy: jlp severity: normal status: open title: import of sqlite3 fails type: crash versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 16:48:05 2008 From: report at bugs.python.org (Winfried Plappert) Date: Tue, 21 Oct 2008 14:48:05 +0000 Subject: [issue4159] Table about Standard Encodings is cut off at the bottom - 35 entries missing In-Reply-To: <1224600485.7.0.778638686943.issue4159@psf.upfronthosting.co.za> Message-ID: <1224600485.7.0.778638686943.issue4159@psf.upfronthosting.co.za> New submission from Winfried Plappert : library.pdf - Chapter 8.8.3 deals with Standard Encodings. There is a long table which is massively overshooting the bottom of the page (page 110) in the PDF-A4 version. About 35 rows in the table get completely lost - compared to the HTML version at http://docs.python.org/library/codecs.html. ---------- assignee: georg.brandl components: Documentation messages: 75028 nosy: georg.brandl, wplappert severity: normal status: open title: Table about Standard Encodings is cut off at the bottom - 35 entries missing type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 17:06:34 2008 From: report at bugs.python.org (Winfried Plappert) Date: Tue, 21 Oct 2008 15:06:34 +0000 Subject: [issue4160] library.pdf - Section 12.13.2 Connection Objects - example cut off at the right hand side In-Reply-To: <1224601594.18.0.145893129918.issue4160@psf.upfronthosting.co.za> Message-ID: <1224601594.18.0.145893129918.issue4160@psf.upfronthosting.co.za> New submission from Winfried Plappert : in the Python 2.6 PDF-documentation, the example followong the "text_factory is incomplete, because it is cut off at the right hand side of the text. HTML-version: http://docs.python.org/library/sqlite3.html I include the relevant line from the HTML-version: cur.execute("select ?", ("this is latin1 and would normally create errors" + u"\xe4\xf6\xfc".encode("latin1"),)) . This line should probably be split, so the text cannot run off at the right edge. ---------- assignee: georg.brandl components: Documentation messages: 75029 nosy: georg.brandl, wplappert severity: normal status: open title: library.pdf - Section 12.13.2 Connection Objects - example cut off at the right hand side versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 17:18:22 2008 From: report at bugs.python.org (Winfried Plappert) Date: Tue, 21 Oct 2008 15:18:22 +0000 Subject: [issue4159] Table about Standard Encodings is cut off at the bottom - 35 entries missing In-Reply-To: <1224600485.7.0.778638686943.issue4159@psf.upfronthosting.co.za> Message-ID: <1224602302.23.0.507006696325.issue4159@psf.upfronthosting.co.za> Winfried Plappert added the comment: Can also be seen on 3.0rc1 if the PDF documents are built 'by hand'. ---------- versions: +Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 17:19:19 2008 From: report at bugs.python.org (Zsolt Cserna) Date: Tue, 21 Oct 2008 15:19:19 +0000 Subject: [issue4161] test_urllib fails with ValueError In-Reply-To: <1224602359.77.0.0539565176483.issue4161@psf.upfronthosting.co.za> Message-ID: <1224602359.77.0.0539565176483.issue4161@psf.upfronthosting.co.za> New submission from Zsolt Cserna : test_urllib regression test fails with ValueError on linux (kernel 2.4, glibc 2.3): test_urllib test test_urllib failed -- Traceback (most recent call last): File "/tmp/x/Lib/test/test_urllib.py", line 112, in tearDown for k, v in self._saved_environ: ValueError: too many values to unpack I think the fix is trivial, but I've attached the patch. If this bug has been already fixed, sorry for reporting it. ---------- files: test_urllib.patch keywords: patch messages: 75031 nosy: csernazs severity: normal status: open title: test_urllib fails with ValueError type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file11846/test_urllib.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 17:26:43 2008 From: report at bugs.python.org (Winfried Plappert) Date: Tue, 21 Oct 2008 15:26:43 +0000 Subject: [issue4159] Table about Standard Encodings is cut off at the bottom - 35 entries missing In-Reply-To: <1224600485.7.0.778638686943.issue4159@psf.upfronthosting.co.za> Message-ID: <1224602803.53.0.465466932852.issue4159@psf.upfronthosting.co.za> Winfried Plappert added the comment: Another example is chapter 16.8.3 GENERIC OPERATING SYSTEM SERVICES::curses ? Terminal handling for character-cell displays::Constants. The table on page 442 again misses about 35 entries completely. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 17:47:01 2008 From: report at bugs.python.org (Winfried Plappert) Date: Tue, 21 Oct 2008 15:47:01 +0000 Subject: [issue4162] library.pdf - Section 17.6.4 Examples - Multiprocessing - Formatting got lost In-Reply-To: <1224604021.37.0.924796663652.issue4162@psf.upfronthosting.co.za> Message-ID: <1224604021.37.0.924796663652.issue4162@psf.upfronthosting.co.za> New submission from Winfried Plappert : There is a very long (last) example following the paragraph which starts with the words: "An example/demo of how to use the managers.SyncManager, Process and others ...". The formatting that this an example somehow got lost and the PDF text becomes very sparse. I will attach a png file later. The HTML documentation recognizes it as an example and formats it correctly. ---------- assignee: georg.brandl components: Documentation messages: 75033 nosy: georg.brandl, wplappert severity: normal status: open title: library.pdf - Section 17.6.4 Examples - Multiprocessing - Formatting got lost type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 17:49:31 2008 From: report at bugs.python.org (Winfried Plappert) Date: Tue, 21 Oct 2008 15:49:31 +0000 Subject: [issue4160] library.pdf - Section 12.13.2 Connection Objects - example cut off at the right hand side In-Reply-To: <1224601594.18.0.145893129918.issue4160@psf.upfronthosting.co.za> Message-ID: <1224604171.85.0.876048502895.issue4160@psf.upfronthosting.co.za> Changes by Winfried Plappert : ---------- components: +Documentation tools (Sphinx) -Documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 17:49:55 2008 From: report at bugs.python.org (Winfried Plappert) Date: Tue, 21 Oct 2008 15:49:55 +0000 Subject: [issue4159] Table about Standard Encodings is cut off at the bottom - 35 entries missing In-Reply-To: <1224600485.7.0.778638686943.issue4159@psf.upfronthosting.co.za> Message-ID: <1224604195.16.0.193440037107.issue4159@psf.upfronthosting.co.za> Changes by Winfried Plappert : ---------- components: +Documentation tools (Sphinx) -Documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 17:50:10 2008 From: report at bugs.python.org (Winfried Plappert) Date: Tue, 21 Oct 2008 15:50:10 +0000 Subject: [issue4162] library.pdf - Section 17.6.4 Examples - Multiprocessing - Formatting got lost In-Reply-To: <1224604021.37.0.924796663652.issue4162@psf.upfronthosting.co.za> Message-ID: <1224604210.81.0.918254401325.issue4162@psf.upfronthosting.co.za> Changes by Winfried Plappert : ---------- components: +Documentation tools (Sphinx) -Documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 17:50:28 2008 From: report at bugs.python.org (Winfried Plappert) Date: Tue, 21 Oct 2008 15:50:28 +0000 Subject: [issue4145] tabulary entries in PDF documentation In-Reply-To: <1224406019.73.0.627994354189.issue4145@psf.upfronthosting.co.za> Message-ID: <1224604228.27.0.461568386746.issue4145@psf.upfronthosting.co.za> Changes by Winfried Plappert : ---------- components: +Documentation tools (Sphinx) -Documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 19:18:57 2008 From: report at bugs.python.org (Brett Cannon) Date: Tue, 21 Oct 2008 17:18:57 +0000 Subject: [issue4158] compilation of sqlite3 fails In-Reply-To: <1224599787.4.0.032538793853.issue4158@psf.upfronthosting.co.za> Message-ID: <1224609537.36.0.512303015173.issue4158@psf.upfronthosting.co.za> Brett Cannon added the comment: Looks like sqlite3 was not compiled for you. To verify, run ``make`` again and note what modules it lists at the very end as not built. I bet it lists sqlite3 there. ---------- nosy: +brett.cannon title: import of sqlite3 fails -> compilation of sqlite3 fails type: crash -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 19:57:04 2008 From: report at bugs.python.org (Koen van de Sande) Date: Tue, 21 Oct 2008 17:57:04 +0000 Subject: [issue4120] Do not embed manifest files in *.pyd when compiling with MSVC In-Reply-To: <1223971312.31.0.131537865896.issue4120@psf.upfronthosting.co.za> Message-ID: <1224611824.62.0.511485818909.issue4120@psf.upfronthosting.co.za> Koen van de Sande added the comment: Instead of reverting the patch for Issue 2563, I propose to strip the VC90 runtimes from the manifest (this will preserve other dependencies needed). I checked this by editing tk85.dll and replacing the dependency there with white-space - the Windows Common Controls dependency still worked properly after this. I've attached a patch to strip the runtime from the manifest when building Python extensions (through search/replace). I think somehow the manifests of the .pyd's in DLLs should also be edited, because leaving them out will cause problems if this is done when building tk85.dll. Or perhaps only special care is needed if there ever is a .pyd with additional dependencies? All files with the .pyd extension do not rely on anything else. I don't know enough about the build process to suggest a change for this, except that the build config for the .dll files inside DLLs might also need to be changed. Added file: http://bugs.python.org/file11847/msvc9compiler_stripruntimes.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 21:25:00 2008 From: report at bugs.python.org (vali) Date: Tue, 21 Oct 2008 19:25:00 +0000 Subject: [issue3997] zipfile and winzip In-Reply-To: <1222701058.88.0.102455918408.issue3997@psf.upfronthosting.co.za> Message-ID: <1224617100.96.0.703315650121.issue3997@psf.upfronthosting.co.za> vali added the comment: Thank you for the quick fix. I could verify that the issue is fixed in python 2.6 when I use WinZip to open an archive with more than 2^16 files created with attached script (bug.py). However the windows native compress utility does not seem to be able to recognize the files that have more than 2^16 files (the error says that the archive is not valid). However, if I try to create an archive using WinZip or 7zip with exactly the same files, windows compress utility is able to open the archive. The same thing would apply if I create the archive using zlib C# library. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 22:05:23 2008 From: report at bugs.python.org (Sebastian Kirsche) Date: Tue, 21 Oct 2008 20:05:23 +0000 Subject: [issue4163] textwrap wordsep_re Unicode In-Reply-To: <1224619523.16.0.79700210606.issue4163@psf.upfronthosting.co.za> Message-ID: <1224619523.16.0.79700210606.issue4163@psf.upfronthosting.co.za> New submission from Sebastian Kirsche : The attached patch makes textwrap work with strings containing dashes and Unicode alphabetic characters. In addition, it fixes the test case for issue 1149508, which no longer failed after temporarily undoing the corresponding change. Example 1: print textwrap.fill(u'Die Empf?nger-Auswahl', 13) Output without patch: Die Empf ?nger-Auswahl With patch: Die Empf?nger- Auswahl Example 2: print textwrap.fill(u'aa ??-??', 7) Output without patch: aa ??-?? With patch: aa ??- ?? ---------- components: Library (Lib) files: textwrap-umlauts.patch keywords: patch messages: 75037 nosy: skirsche severity: normal status: open title: textwrap wordsep_re Unicode type: behavior versions: Python 2.5, Python 2.5.3, Python 2.6, Python 2.7 Added file: http://bugs.python.org/file11848/textwrap-umlauts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 22:10:25 2008 From: report at bugs.python.org (Felipe) Date: Tue, 21 Oct 2008 20:10:25 +0000 Subject: [issue4164] String double quoted fatal problem In-Reply-To: <1224619825.55.0.957590005213.issue4164@psf.upfronthosting.co.za> Message-ID: <1224619825.55.0.957590005213.issue4164@psf.upfronthosting.co.za> New submission from Felipe : Hi I have a problem with python 2.6, when i try to process strings with triple-quoted string literal i get an error: a='a''a' #1 double quoted Ok a='a''''a' # 2 Ok a= 'a''''''a' # 3 doble quoted -- SyntaxError: EOF while scanning triple-quoted string literal a= 'a''''''''a' # 4 ok a='a''''''''''a' # 5 same error impair doble quoted a='a''''''''''''a' # 6 Ok............... a... #7 error.................. ---------- components: Library (Lib) messages: 75038 nosy: cliffdover88 severity: normal status: open title: String double quoted fatal problem type: compile error versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 22:31:48 2008 From: report at bugs.python.org (Anand Patil) Date: Tue, 21 Oct 2008 20:31:48 +0000 Subject: [issue4165] Failure building 64-bit Python on Leopard In-Reply-To: <1224621107.94.0.119625965208.issue4165@psf.upfronthosting.co.za> Message-ID: <1224621107.94.0.119625965208.issue4165@psf.upfronthosting.co.za> New submission from Anand Patil : Configuring with sihpc03:Python-2.6 anand$ ./configure --with-framework-name=Python64 -- with-universal-archs=all --enable-framework --enable- universalsdk=MACOSX_DEPLOYMENT_TARGET=10.5 on an Intel Mac Pro with the latest Leopard and Apple gcc 4.0, I get many errors like the following instructing me to report a bug. My config.log file is attached. checking errno.h presence... yes configure: WARNING: errno.h: present but cannot be compiled configure: WARNING: errno.h: check for missing prerequisite headers? configure: WARNING: errno.h: see the Autoconf documentation configure: WARNING: errno.h: section "Present But Cannot Be Compiled" configure: WARNING: errno.h: proceeding with the preprocessor's result configure: WARNING: errno.h: in the future, the compiler will take precedence configure: WARNING: ## --------------------------------------------- --- ## configure: WARNING: ## Report this to http://www.python.org/python- bugs ## configure: WARNING: ## --------------------------------------------- --- ## ---------- components: Macintosh files: config.log messages: 75039 nosy: anand severity: normal status: open title: Failure building 64-bit Python on Leopard type: compile error versions: Python 2.6 Added file: http://bugs.python.org/file11849/config.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 22:41:15 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 21 Oct 2008 20:41:15 +0000 Subject: [issue3997] zipfile and winzip In-Reply-To: <1222701058.88.0.102455918408.issue3997@psf.upfronthosting.co.za> Message-ID: <1224621675.41.0.938180024246.issue3997@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: OK, it seems that the "central directory size" and "central directory offset" must contain their actual value if it can fit in a 32bit int, even though the spec says "If an archive is in ZIP64 format and the value in this field is 0xFFFFFFFF, the value is in the corresponding zip64 end of central directory field." Attached a new patch. The file generated by bug.py seems very similar to one generated with WinZip, and the WindowsXP explorer can now open it. Added file: http://bugs.python.org/file11850/zip-64k-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 22:44:25 2008 From: report at bugs.python.org (Roumen Petrov) Date: Tue, 21 Oct 2008 20:44:25 +0000 Subject: [issue4070] python tests failure if builddir <> sourcedir In-Reply-To: <1223418786.48.0.948441318912.issue4070@psf.upfronthosting.co.za> Message-ID: <1224621865.31.0.25484545657.issue4070@psf.upfronthosting.co.za> Roumen Petrov added the comment: About issue4151 - clean up is in test_sysconfig.py and setup.py - it is fine with me. Modification for test_build_ext.py from above mentioned issue break non-posix builds. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 22:44:54 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 21 Oct 2008 20:44:54 +0000 Subject: [issue4165] Failure building 64-bit Python on Leopard In-Reply-To: <1224621107.94.0.119625965208.issue4165@psf.upfronthosting.co.za> Message-ID: <1224621894.09.0.791578955152.issue4165@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> ronaldoussoren nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 22:51:30 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 21 Oct 2008 20:51:30 +0000 Subject: [issue4161] test_urllib fails with ValueError In-Reply-To: <1224602359.77.0.0539565176483.issue4161@psf.upfronthosting.co.za> Message-ID: <1224622290.6.0.0414667315572.issue4161@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks for the report! Fixed in r66992. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 22:57:56 2008 From: report at bugs.python.org (Roumen Petrov) Date: Tue, 21 Oct 2008 20:57:56 +0000 Subject: [issue4165] Failure building 64-bit Python on Leopard In-Reply-To: <1224621107.94.0.119625965208.issue4165@psf.upfronthosting.co.za> Message-ID: <1224622676.87.0.900563452084.issue4165@psf.upfronthosting.co.za> Roumen Petrov added the comment: .... configure:5602: checking errno.h usability configure:5619: gcc-4.0 -c -arch i386 -arch ppc -arch ppc64 -arch x86_64 -isysroot MACOSX_DEPLOYMENT_TARGET=10.5 -g -O2 conftest.c >&5 Binary file conftest.er1 matches configure:5625: $? = 1 .... It is possible gcc to compile for multiple architectures at same time ? ---------- nosy: +rpetrov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 22:59:26 2008 From: report at bugs.python.org (kai zhu) Date: Tue, 21 Oct 2008 20:59:26 +0000 Subject: [issue3238] backport python 3.0 language functionality to python 2.6 by adding 7 opcodes to ceval.c In-Reply-To: <1214770027.24.0.542856927114.issue3238@psf.upfronthosting.co.za> Message-ID: <1224622766.51.0.743659609028.issue3238@psf.upfronthosting.co.za> kai zhu added the comment: k _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 22:59:55 2008 From: report at bugs.python.org (Winfried Plappert) Date: Tue, 21 Oct 2008 20:59:55 +0000 Subject: [issue4162] library.pdf - Section 17.6.4 Examples - Multiprocessing - Formatting got lost In-Reply-To: <1224604021.37.0.924796663652.issue4162@psf.upfronthosting.co.za> Message-ID: <1224622795.7.0.900937955937.issue4162@psf.upfronthosting.co.za> Winfried Plappert added the comment: example-17.6.4.png shows two pieces of Python code, the top being good and the bottom very sparse. Added file: http://bugs.python.org/file11851/example- 17.6.4.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 23:05:00 2008 From: report at bugs.python.org (Winfried Plappert) Date: Tue, 21 Oct 2008 21:05:00 +0000 Subject: [issue4159] Table about Standard Encodings is cut off at the bottom - 35 entries missing In-Reply-To: <1224600485.7.0.778638686943.issue4159@psf.upfronthosting.co.za> Message-ID: <1224623100.95.0.163149266263.issue4159@psf.upfronthosting.co.za> Winfried Plappert added the comment: here is the screen copy of chapter 8.8.3 Added file: http://bugs.python.org/file11852/8.8.3.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 23:05:20 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 21 Oct 2008 21:05:20 +0000 Subject: [issue4164] String double quoted fatal problem In-Reply-To: <1224619825.55.0.957590005213.issue4164@psf.upfronthosting.co.za> Message-ID: <1224623120.06.0.836045478568.issue4164@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: All your samples explain easily if you consider that two adjacent string literals are joined together. (You seem to consider that "double quote" is a way to insert a quote character. It's not; Python is not Pascal or SQL) Your first two examples become: a='a''a' two adjacent strings == 'aa' a='a''''a' three adjacent strings ('a' + '' + 'a') == 'aa' The third is an error: a='a''''''a' one string ('a') followed by the beginning of a "triple quoted string" (''') which content starts with the characters (''a') but does not have a matching (''') to finish the string, hence the Syntax error. ... and so on. Please have a look at http://docs.python.org/reference/lexical_analysis.html#string-literals ---------- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 23:09:58 2008 From: report at bugs.python.org (Winfried Plappert) Date: Tue, 21 Oct 2008 21:09:58 +0000 Subject: [issue4160] library.pdf - Section 12.13.2 Connection Objects - example cut off at the right hand side In-Reply-To: <1224601594.18.0.145893129918.issue4160@psf.upfronthosting.co.za> Message-ID: <1224623398.02.0.363737373186.issue4160@psf.upfronthosting.co.za> Winfried Plappert added the comment: The page of chapter 12.13.2 Added file: http://bugs.python.org/file11853/12.13.2.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 23:10:30 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 21 Oct 2008 21:10:30 +0000 Subject: [issue4149] Py_BuildValue and "y" format unit In-Reply-To: <1224480810.72.0.431948511218.issue4149@psf.upfronthosting.co.za> Message-ID: <1224623430.03.0.14634716901.issue4149@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Documented in r66993. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 23:13:29 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 21 Oct 2008 21:13:29 +0000 Subject: [issue4149] Py_BuildValue and "y" format unit In-Reply-To: <1224480810.72.0.431948511218.issue4149@psf.upfronthosting.co.za> Message-ID: <1224623609.71.0.326405765711.issue4149@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 23:52:11 2008 From: report at bugs.python.org (Eric Firing) Date: Tue, 21 Oct 2008 21:52:11 +0000 Subject: [issue4166] extra "\fi Message-ID: <1224625931.36.0.439342755436.issue4166@psf.upfronthosting.co.za> Changes by Eric Firing : ---------- assignee: georg.brandl components: Documentation tools (Sphinx) nosy: efiring, georg.brandl severity: normal status: open title: extra "\fi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 21 23:59:22 2008 From: report at bugs.python.org (Eric Firing) Date: Tue, 21 Oct 2008 21:59:22 +0000 Subject: [issue4166] extra "\fi" in sphinx.sty, line 62 In-Reply-To: <1224626362.8.0.706164926632.issue4166@psf.upfronthosting.co.za> Message-ID: <1224626362.8.0.706164926632.issue4166@psf.upfronthosting.co.za> New submission from Eric Firing : Building the matplotlib docs using Sphinx svn 66969 results in a Latex error ending in: ) (/usr/share/texmf-texlive/tex/latex/graphics/graphicx.sty (/usr/share/texmf-texlive/tex/latex/graphics/graphics.sty (/usr/share/texmf-texlive/tex/latex/graphics/trig.sty) (/etc/texmf/tex/latex/config/graphics.cfg))) (/usr/share/texmf-texlive/tex/plain/misc/pdfcolor.tex) ! Extra \fi. l.62 \fi\fi The line 62 turns out to be in sphinx.sty; removing one "\fi" allows the build to proceed. The svn diff is: efiring at manini:~/programs/py/sphinx_svn$ svn -x '-w' diff Index: sphinx/texinputs/sphinx.sty =================================================================== --- sphinx/texinputs/sphinx.sty (revision 66993) +++ sphinx/texinputs/sphinx.sty (working copy) @@ -59,7 +59,7 @@ \ifx\ifxetex\undefined\else\ifxetex \def\py at NormalColor{\color[rgb]{0.0,0.0,0.0}} \def\py at TitleColor{\color{TitleColor}} -\fi\fi +\fi % Increase printable page size (copied from fullpage.sty) \topmargin 0pt ---------- title: extra "\fi -> extra "\fi" in sphinx.sty, line 62 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 00:02:27 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 21 Oct 2008 22:02:27 +0000 Subject: [issue4157] Tuple not callable in platform.py In-Reply-To: <1224596260.97.0.062858509503.issue4157@psf.upfronthosting.co.za> Message-ID: <1224626547.61.0.551664833867.issue4157@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Fixed with r66994. Thanks for the report! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 00:03:32 2008 From: report at bugs.python.org (Winfried Plappert) Date: Tue, 21 Oct 2008 22:03:32 +0000 Subject: [issue4166] extra "\fi" in sphinx.sty, line 62 In-Reply-To: <1224626362.8.0.706164926632.issue4166@psf.upfronthosting.co.za> Message-ID: <1224626612.31.0.846793397449.issue4166@psf.upfronthosting.co.za> Changes by Winfried Plappert : ---------- nosy: +wplappert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 00:18:27 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 Oct 2008 22:18:27 +0000 Subject: [issue1248] ftplib needs a rewrite to use bytes/buffers In-Reply-To: <1191874324.3.0.017965594704.issue1248@psf.upfronthosting.co.za> Message-ID: <1224627507.21.0.00841795400734.issue1248@psf.upfronthosting.co.za> STINNER Victor added the comment: Function result type should be the same of the connection is in text mode or binary mode. As far as I remember, the text mode converts the newline byte sequence, not the charset. A text file could be stored as latin-1, utf-8, koi-8 or anything else. Am I wrong? ftplib should use byte strings (as I did for POP3, IMAP4 or some other libraries) because the FTP protocol doesn't send the charset. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 00:18:46 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 21 Oct 2008 22:18:46 +0000 Subject: [issue4092] inspect.getargvalues return type not ArgInfo In-Reply-To: <1223577852.4.0.573977291018.issue4092@psf.upfronthosting.co.za> Message-ID: <1224627526.45.0.116635059088.issue4092@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks for the report. Fixed in r66995. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 00:30:58 2008 From: report at bugs.python.org (Josiah Carlson) Date: Tue, 21 Oct 2008 22:30:58 +0000 Subject: [issue3890] ssl.SSLSocket.recv() implementation may not work with non-blocking sockets In-Reply-To: <1221683752.69.0.81133093826.issue3890@psf.upfronthosting.co.za> Message-ID: <1224628258.65.0.40240486015.issue3890@psf.upfronthosting.co.za> Josiah Carlson added the comment: I agree with Giampaolo. In the case of non-blocking sockets, if reading from the ssl stream fails because there is no data on the socket, then sitting in a while loop is just going to busy-wait until data is discovered. Never mind that the reference to "sendall" should be replaced by recv. Whether to 'continue' or 'raise' should be determined by whether the socket is blocking. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 00:56:15 2008 From: report at bugs.python.org (Dan Dibagh) Date: Tue, 21 Oct 2008 22:56:15 +0000 Subject: [issue2980] Pickle stream for unicode object may contain non-ASCII characters. In-Reply-To: <1211902695.6.0.958731947697.issue2980@psf.upfronthosting.co.za> Message-ID: <1224629775.93.0.909801174269.issue2980@psf.upfronthosting.co.za> Dan Dibagh added the comment: I am well aware why my example produces an error from a technical standpoint. What I'm getting at is the decision to implement PyUnicode_EncodeRawUnicodeEscape the way it is. Probably there is nothing wrong with it, but how am I supposed to know? I read the PEP, which serves as a specification of raw unicode escape (at least for the decoding bit) and the reference documentation. Then I read the source trying to map between specified behavior in the documentation and the implementation in the source code. When it comes to the part which causes the problem with non-ASCII characters, it is difficult to follow. Or in other words: what is the high level reason why the codec won't escape \x80 in my test program? To use a real-world term; an interface specification, in this case the pickle documentation, is the contract between the consumer of the library and the provider of the library. If it states "ASCII", ASCII is expected. If it doesn't state "for debugging only" it will be used for non-debugging purposes. There isn't much you can do about it without breaking the contract. What makes you think that the problem cannot be fixed without changing the existing pickle format 0? Note that base64 is "a common" way to deal with binary data in ascii streams rather than "the common". (But why should I care when my data is already ascii?) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 00:57:01 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 Oct 2008 22:57:01 +0000 Subject: [issue1248] ftplib needs a rewrite to use bytes/buffers In-Reply-To: <1191874324.3.0.017965594704.issue1248@psf.upfronthosting.co.za> Message-ID: <1224629821.35.0.93572598503.issue1248@psf.upfronthosting.co.za> STINNER Victor added the comment: - retrbinary() and storbinary() uses bytes (byte strings) - retrlines() and storlines() uses str (unicode strings) with charset=self.encoding - command is an unicode string converted to byte string with charset=self.encoding So it's already possible to receive/send raw bytes, and forget my previous message. I see a potential but minor problem: if the server is running a POSIX OS, it's not possible to open / rename / unlink a file with an invalid name. ftp might allow bytes filename, but I prefer to leave ftplib unchanged. If your FTP server is broken, fix your file system, fix your configuration or use an old FTP client to fix the problem. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 01:03:46 2008 From: report at bugs.python.org (Bill Janssen) Date: Tue, 21 Oct 2008 23:03:46 +0000 Subject: [issue3890] ssl.SSLSocket.recv() implementation may not work with non-blocking sockets In-Reply-To: <1221683752.69.0.81133093826.issue3890@psf.upfronthosting.co.za> Message-ID: <1224630226.69.0.949348423102.issue3890@psf.upfronthosting.co.za> Bill Janssen added the comment: I agree, too. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 01:34:46 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 21 Oct 2008 23:34:46 +0000 Subject: [issue2980] Pickle stream for unicode object may contain non-ASCII characters. In-Reply-To: <1224629775.93.0.909801174269.issue2980@psf.upfronthosting.co.za> Message-ID: <48FE6713.7080100@v.loewis.de> Martin v. L?wis added the comment: > I read the PEP, > which serves as a specification of raw unicode escape (at least for the > decoding bit) and the reference documentation. Which PEP specifically? PEP 263 only mentions the unicode-escape encoding in its problem statement, i.e. as a pre-existing thing. It doesn't specify it, nor does it give a rationale for why it behaves the way it does. > Then I read the source > trying to map between specified behavior in the documentation and the > implementation in the source code. When it comes to the part which > causes the problem with non-ASCII characters, it is difficult to follow. What code are you looking at, and where do you find it difficult to follow it? Maybe you get confused between the "unicode-escape" codec, and the "raw-unicode-escape" codec, also. > Or in other words: what is the high level reason why the codec won't > escape \x80 in my test program? The raw-unicode-escape codec? It was designed to support parsing of Python 2.0 source code, and of "raw" unicode strings (ur"") in particular. In Python 2.0, you only needed to escape characters above U+0100; Latin-1 characters didn't need escaping. Python, itself, only relied on the decoding directory. That the codec choses not to escape Latin-1 characters on encoding is an arbitrary choice (I guess); it's still symmetric with decoding. Even though the choice was arbitrary, you shouldn't change it now, because people may rely on how this codec works. > What makes you think that the problem cannot be fixed without changing > the existing pickle format 0? Applications might rely on what was implemented rather than what was specified. If they had implemented their own pickle readers, such readers might break if the pickle format is changed. In principle, even the old pickle readers of Python 2.0..2.6 might break if the format changes in 2.7 - we would have to go back and check that they don't break (although I do believe that they would work fine). So I personally don't see a problem with fixing this, but it appears MAL does (for whatever reasons - I can't quite buy the performance argument). OTOH, I don't feel that this issue deserves as much of my time to actually implement anythings. So contributions are welcome. If you find that the patch meets resistance, you also need to write a PEP, and ask for BDFL pronouncement. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 05:36:42 2008 From: report at bugs.python.org (Mark Hammond) Date: Wed, 22 Oct 2008 03:36:42 +0000 Subject: [issue4073] distutils build_scripts and install_data commands need 2to3 support In-Reply-To: <1223427347.42.0.185462217727.issue4073@psf.upfronthosting.co.za> Message-ID: <1224646602.86.0.703239412686.issue4073@psf.upfronthosting.co.za> Mark Hammond added the comment: > I'm skeptical about adding build_data support, as it's not > obvious what files would need conversion. All .py files should be converted. I can't think why a project would use this 2to3 capability for scripts and packages, but not .py files in data files. pywin32 uses data files to install 'demo' scripts. Would the motivation become clearer if we modified Demo/distutils/test2to3 to install a README.txt and a demo .py file (where the demo .py file should not be installed in the global 'scripts' directory, but instead in a 'demos' sub-directory of the package)? > Users should adjust their build_data commands to invoke > distutils.util.run_2to3. True - but the same justification could be used to avoid adding support to build_scripts. I guess the question is 'how common is it that .py files will be included in data_files?' My experience is that it is common enough to warrant support (but obviously others experiences may be different) > I would appreciate a confirmation that this function has a useful API. I haven't actually applied the patch and modified pywin32 to use it, but the API certainly looks useful from reading the patch. +1 Thanks. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 05:40:57 2008 From: report at bugs.python.org (Mark Hammond) Date: Wed, 22 Oct 2008 03:40:57 +0000 Subject: [issue4073] distutils build_scripts and install_data commands need 2to3 support In-Reply-To: <1223427347.42.0.185462217727.issue4073@psf.upfronthosting.co.za> Message-ID: <1224646857.28.0.752156547711.issue4073@psf.upfronthosting.co.za> Mark Hammond added the comment: Thinking more about data_files, I'd agree that blindly converting all .py files and nothing more isn't as useful for install_data as the other commands. It might make more sense to allow data_files to specify a list of patterns that will be matched to perform the conversion, with the default being all .py files. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 07:24:02 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 22 Oct 2008 05:24:02 +0000 Subject: [issue4073] distutils build_scripts and install_data commands need 2to3 support In-Reply-To: <1224646602.86.0.703239412686.issue4073@psf.upfronthosting.co.za> Message-ID: <48FEB8EA.8010805@v.loewis.de> Martin v. L?wis added the comment: > All .py files should be converted. I disagree. For example, people decided that all .py files in Tools should get converted, converting Tools/msi in the process. Now, Tools/msi is intended to be run in an *older* Python version than the one being packaged; I currently use 2.4 to do the packaging. It took me some time to undo this conversion. It's convenient if users can easily express which files they want to convert, but it must be a selective, explicit choice. > I can't think why a project would > use this 2to3 capability for scripts and packages, but not .py files in > data files. See above. > Would the motivation become clearer if we modified > Demo/distutils/test2to3 to install a README.txt and a demo .py file > (where the demo .py file should not be installed in the global 'scripts' > directory, but instead in a 'demos' sub-directory of the package)? I understand the motivation fully (I think). I just question whether it is general. Packages that have this need (to 2to3-convert data files) would have to come up with their own command subclass still, which hopefully is very easy with what we provide. IMO, this is a case where we should err on the conservative side. If we don't provide the command in 3.0, people will write their own. If your assumption is correct that this is a common need, we can still add the command into 3.1. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 08:12:26 2008 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 22 Oct 2008 06:12:26 +0000 Subject: [issue4165] Failure building 64-bit Python on Leopard In-Reply-To: <1224622676.87.0.900563452084.issue4165@psf.upfronthosting.co.za> Message-ID: <3B2A3E1F-4795-4B0A-8C7B-CD492A411E19@mac.com> Ronald Oussoren added the comment: On 21 Oct, 2008, at 22:57, Roumen Petrov wrote: > > It is possible gcc to compile for multiple architectures at same > time ? Yes. Apple's gcc driver knows how to deal with multiple -arch flags. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 08:39:15 2008 From: report at bugs.python.org (Winfried Plappert) Date: Wed, 22 Oct 2008 06:39:15 +0000 Subject: [issue4167] Inline Markup :const: shows up in Documentation In-Reply-To: <1224657555.02.0.872283376667.issue4167@psf.upfronthosting.co.za> Message-ID: <1224657555.02.0.872283376667.issue4167@psf.upfronthosting.co.za> New submission from Winfried Plappert : The Inline Markup :const: shows up in the final documentation. Example can be found on http://docs.python.org/library/select.html : kevent.fflags? Filter specific flags :const:`KQ_FILTER_READ` and :const:`KQ_FILTER_WRITE` filter flags Constant Meaning KQ_NOTE_LOWAT low water mark of a socket buffer :const:`KQ_FILTER_VNODE` filter flags It also shows up in the equivalent PDF documentation. The underlying rst file is library/select.rst, relevant part of source text follows: *:const:`KQ_FILTER_READ` and :const:`KQ_FILTER_WRITE` filter flags* +----------------------------+--------------------------------------------+ | Constant | Meaning | +============================+============================================+ | :const:`KQ_NOTE_LOWAT` | low water mark of a socket buffer | +----------------------------+--------------------------------------------+ *:const:`KQ_FILTER_VNODE` filter flags* There is one more occurrance of :const: in http://docs.python.org/library/cookielib.html: ... Cookie.is_expired([now=:const:`None`])? True if cookie ... ---------- assignee: georg.brandl components: Documentation tools (Sphinx) messages: 75063 nosy: georg.brandl, wplappert severity: normal status: open title: Inline Markup :const: shows up in Documentation type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 09:37:11 2008 From: report at bugs.python.org (David W. Lambert) Date: Wed, 22 Oct 2008 07:37:11 +0000 Subject: [issue4168] core dump exiting python In-Reply-To: <1224661030.95.0.853599838513.issue4168@psf.upfronthosting.co.za> Message-ID: <1224661030.95.0.853599838513.issue4168@psf.upfronthosting.co.za> New submission from David W. Lambert : I created in the python module gsl_fft a __del__ method to release workspace when the data size changes. It is called upon exiting python, and gave errors without traceback. So I registered it with atexit. This caused core dump. The attached tape archive has necessary modules, and file gdb.output. The latter contains, I hope, enough information to reconstruct the command line and even to find the cause. Additionally you'll need the gsl and gslcblas shared object libraries. ---------- components: Interpreter Core files: coredump.tar messages: 75064 nosy: LambertDW severity: normal status: open title: core dump exiting python type: crash versions: Python 3.0 Added file: http://bugs.python.org/file11854/coredump.tar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 10:07:47 2008 From: report at bugs.python.org (Winfried Plappert) Date: Wed, 22 Oct 2008 08:07:47 +0000 Subject: [issue4169] library/turtle.rst does not format properly in PDF mode In-Reply-To: <1224662867.9.0.0428544955295.issue4169@psf.upfronthosting.co.za> Message-ID: <1224662867.9.0.0428544955295.issue4169@psf.upfronthosting.co.za> New submission from Winfried Plappert : library.pdf, Section 25.4.3 Methods of RawTurtle/Turtle and corresponding functions does not format the :param xxx: keyword properly. The HTML version at http://docs.python.org/library/turtle.html looks like turtle.fd(distance)? Parameters: * distancea number (integer or float) The formatting in HTML version is 100% correct, since it misses a space between 'distance' and 'a', but at least is readable. The screenshot of the PDF is not really readble. There is also the space missing between the parameter and its description. ---------- assignee: georg.brandl components: Documentation tools (Sphinx) files: turtle-pdf.png messages: 75065 nosy: georg.brandl, wplappert severity: normal status: open title: library/turtle.rst does not format properly in PDF mode versions: Python 2.6 Added file: http://bugs.python.org/file11855/turtle-pdf.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 10:09:02 2008 From: report at bugs.python.org (Winfried Plappert) Date: Wed, 22 Oct 2008 08:09:02 +0000 Subject: [issue4169] library/turtle.rst does not format properly in PDF mode In-Reply-To: <1224662867.9.0.0428544955295.issue4169@psf.upfronthosting.co.za> Message-ID: <1224662942.25.0.333318764988.issue4169@psf.upfronthosting.co.za> Winfried Plappert added the comment: The formatting in HTML version is 100% correct, s/is 100% correct/is NOT 100% correct/. Sorry for the typo. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 10:10:34 2008 From: report at bugs.python.org (Winfried Plappert) Date: Wed, 22 Oct 2008 08:10:34 +0000 Subject: [issue4169] library/turtle.rst does not format properly in PDF mode In-Reply-To: <1224662867.9.0.0428544955295.issue4169@psf.upfronthosting.co.za> Message-ID: <1224663034.92.0.513903192225.issue4169@psf.upfronthosting.co.za> Winfried Plappert added the comment: Ihave seen this formatting issue also at other places. But if you cure the problem, the issue at the other places will also go away :-) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 10:11:38 2008 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 Oct 2008 08:11:38 +0000 Subject: [issue4168] core dump exiting python In-Reply-To: <1224661030.95.0.853599838513.issue4168@psf.upfronthosting.co.za> Message-ID: <1224663098.89.0.789246774449.issue4168@psf.upfronthosting.co.za> STINNER Victor added the comment: I installed gsl using "sudo apt-get install libgsl0ldbl". Then I added ".0" to the library filenames (eg. CDLL('libgsl.so.0')). $ python3.0 dumpdriver.py Exception AttributeError: "'NoneType' object has no attribute 'debug'" in > ignored Real_FFT.__del__() uses logging.debug, logging.info and logging.warn whereas logging is None when the destructor is called. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 10:18:44 2008 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 Oct 2008 08:18:44 +0000 Subject: [issue4168] core dump exiting python In-Reply-To: <1224661030.95.0.853599838513.issue4168@psf.upfronthosting.co.za> Message-ID: <1224663524.18.0.875799662385.issue4168@psf.upfronthosting.co.za> STINNER Victor added the comment: About your gdb output: - You have a 64 bits CPU (I have a 32 bits CPU) - You are using Red Hat 6.3.0.0-1.132.EL4rh (I'm using Ubuntu Hardy) - The crash occurs in PyErr_Fetch() on "*p_type = tstate->curexc_type;": I guess that p_type and/or tstate are NULL. The most probable cause is that PyThreadState_GET() returns a NULL pointer. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 10:24:50 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 22 Oct 2008 08:24:50 +0000 Subject: [issue2980] Pickle stream for unicode object may contain non-ASCII characters. In-Reply-To: <48FE6713.7080100@v.loewis.de> Message-ID: <48FEE34E.1060203@egenix.com> Marc-Andre Lemburg added the comment: On 2008-10-22 01:34, Martin v. L?wis wrote: >> What makes you think that the problem cannot be fixed without changing >> the existing pickle format 0? > > Applications might rely on what was implemented rather than what was > specified. If they had implemented their own pickle readers, such > readers might break if the pickle format is changed. In principle, even > the old pickle readers of Python 2.0..2.6 might break if the format > changes in 2.7 - we would have to go back and check that they don't > break (although I do believe that they would work fine). > > So I personally don't see a problem with fixing this, but it appears > MAL does (for whatever reasons - I can't quite buy the performance > argument). OTOH, I don't feel that this issue deserves as much of > my time to actually implement anythings. I've had a look at the implementations used in both pickle.py and cPickle.c: both apply some extra escaping to the encoded version of raw-unicode-escape in order to handle newlines correctly, so I guess adding a few more escapes won't hurt. So +0 on adding the extra escapes for range(128,256) code points. Still, IMHO, all of this is not worth the effort, since protocol versions 1 and 2 are more efficient and there are better ways to deal with the problem of sending binary data in some ASCII format, e.g. using base64. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 10:33:06 2008 From: report at bugs.python.org (Andre Heider) Date: Wed, 22 Oct 2008 08:33:06 +0000 Subject: [issue4120] Do not embed manifest files in *.pyd when compiling with MSVC In-Reply-To: <1223971312.31.0.131537865896.issue4120@psf.upfronthosting.co.za> Message-ID: <1224664386.29.0.449774478583.issue4120@psf.upfronthosting.co.za> Andre Heider added the comment: Skipping the mt.exe call seems fine to me, but there's another solution which might be better: The automatic manifest binding comes from a "#pragma comment(linker,"/manifestdependency:" directive in crtdefs.h. That can be disabled by setting _CRT_NOFORCE_MANIFEST. This way all other manifest dependencies stay in tact and it could be set for *.pyd builds (instead of my patch). TCL's manifest is a different problem. I do not use tkinter, but according to PCbuild/readme.txt it should be possible to get rid of the CRT dependency the same way: just set _CRT_NOFORCE_MANIFEST in the nmake line. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 10:34:36 2008 From: report at bugs.python.org (Andre Heider) Date: Wed, 22 Oct 2008 08:34:36 +0000 Subject: [issue4120] Do not embed manifest files in *.pyd when compiling with MSVC In-Reply-To: <1223971312.31.0.131537865896.issue4120@psf.upfronthosting.co.za> Message-ID: <1224664476.72.0.279814055803.issue4120@psf.upfronthosting.co.za> Andre Heider added the comment: .. erm, the nmake line in Tools\buildbot\external.bat and Tools/buildbot/external-amd64.bat ;) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 11:27:02 2008 From: report at bugs.python.org (Erick Tryzelaar) Date: Wed, 22 Oct 2008 09:27:02 +0000 Subject: [issue4170] segfault with defaultdict and pickle In-Reply-To: <1224667622.54.0.802753290346.issue4170@psf.upfronthosting.co.za> Message-ID: <1224667622.54.0.802753290346.issue4170@psf.upfronthosting.co.za> New submission from Erick Tryzelaar : It seems like there's a bug with defaultdict. This is segfaulting with the latest python 3.0 svn checkout: import collections, pickle d=collections.defaultdict(int) d[1] pickle.dumps(d) It errors out with: Assertion failed: (PyIter_Check(iter)), function PyIter_Next, file Objects/abstract.c, line 2751. zsh: abort /tmp/python/bin/python3.0 foo.py ---------- components: Library (Lib) messages: 75073 nosy: erickt severity: normal status: open title: segfault with defaultdict and pickle type: crash versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 11:43:30 2008 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 22 Oct 2008 09:43:30 +0000 Subject: [issue4165] Failure building 64-bit Python on Leopard In-Reply-To: <1224621107.94.0.119625965208.issue4165@psf.upfronthosting.co.za> Message-ID: <1224668610.42.0.0224060685962.issue4165@psf.upfronthosting.co.za> Mark Dickinson added the comment: > sihpc03:Python-2.6 anand$ ./configure --with-framework-name=Python64 -- > with-universal-archs=all --enable-framework --enable- > universalsdk=MACOSX_DEPLOYMENT_TARGET=10.5 I think you want --enable-universalsdk=/ MACOSX_DEPLOYMENT_TARGET=10.5 ---------- nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 12:01:14 2008 From: report at bugs.python.org (Anand Patil) Date: Wed, 22 Oct 2008 10:01:14 +0000 Subject: [issue4165] Failure building 64-bit Python on Leopard In-Reply-To: <1224621107.94.0.119625965208.issue4165@psf.upfronthosting.co.za> Message-ID: <1224669674.84.0.302444965523.issue4165@psf.upfronthosting.co.za> Anand Patil added the comment: That worked, thanks Mark. make worked fine also, but make install failed at the end with running install_egg_info Writing /Library/Frameworks/Python64.framework/Versions/2.6/lib/python2.6/lib- dynload/Python-2.6-py2.6.egg-info ln -fs "../../../Python64" "/Library/Frameworks/Python64.framework/Versions/2.6/lib/python2.6/confi g/libpython2.6.a" cd Mac && make installmacsubtree DESTDIR="" Creating directory /Library/Frameworks/Python64.framework/Versions/2.6/Mac/Tools DYLD_FRAMEWORK_PATH=/Users/anand/Downloads/Python-2.6: ../python.exe ./scripts/cachersrc.py -v /Library/Frameworks/Python64.framework/Versions/2.6/lib/python2.6/plat- mac /Library/Frameworks/Python64.framework/Versions/2.6/Mac/Tools Traceback (most recent call last): File "./scripts/cachersrc.py", line 44, in main() File "./scripts/cachersrc.py", line 41, in main os.path.walk(dir, handler, (verbose, force)) File "./Lib/posixpath.py", line 224, in walk func(arg, top, names) File "./scripts/cachersrc.py", line 23, in handler macresource.open_pathname(os.path.join(dirname, fn), verbose=verbose) File "/Users/anand/Downloads/Python-2.6/Lib/plat-mac/macresource.py", line 81, in open_pathname refno = Res.FSpOpenResFile(pathname, 1) AttributeError: 'module' object has no attribute 'FSpOpenResFile' make[1]: *** [installmacsubtree] Error 1 make: *** [frameworkinstallmaclib] Error 2 sihpc03:Python-2.6 anand$ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 13:32:06 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Wed, 22 Oct 2008 11:32:06 +0000 Subject: [issue4170] segfault with defaultdict and pickle In-Reply-To: <1224667622.54.0.802753290346.issue4170@psf.upfronthosting.co.za> Message-ID: <1224675126.16.0.270325310056.issue4170@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: On py3k, defaultdict#items() returns dict_items object not dict_itemiterator object. I hope attached patch will fix this bug. ---------- keywords: +patch nosy: +ocean-city Added file: http://bugs.python.org/file11856/fix_defaultdict_reduce.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 13:37:24 2008 From: report at bugs.python.org (Dmitry Dvoinikov) Date: Wed, 22 Oct 2008 11:37:24 +0000 Subject: [issue4171] SSL handshake fails after TCP connection in getpeername() In-Reply-To: <1224675444.68.0.815389836032.issue4171@psf.upfronthosting.co.za> Message-ID: <1224675444.68.0.815389836032.issue4171@psf.upfronthosting.co.za> New submission from Dmitry Dvoinikov : If I connect a TCP socket s using regular s.connect(), then wrap it using ssl.wrap_socket(s) and call do_handshake on the resulting SSL socket, handshake fails in ssl.py:320 with AttributeError: 'NoneType' object has no attribute 'do_handshake' The problem is that when TCP socket is being wrapped in ssl.py:116, it is not recognized as connected by a call to getpeername(), the exception thrown in ssl.py:116 and silenced is this: [Errno 10057] A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied This is awkward, because synchronous s.connect() has just returned successfully. Even more weird, if I insert s.getpeername() between TCP connect() and SSL do_handshake() the latter works fine. Here is a working sample: ------------------------------- from socket import socket, AF_INET, SOCK_STREAM from ssl import wrap_socket, PROTOCOL_TLSv1, CERT_NONE def test_handshake(address, WORKAROUND): s = socket(AF_INET, SOCK_STREAM) s.settimeout(3.0) s.connect(address) if WORKAROUND: s.getpeername() ssl = wrap_socket(s, server_side = False, ssl_version = PROTOCOL_TLSv1, cert_reqs = CERT_NONE, do_handshake_on_connect = False) ssl.do_handshake() address = ("www.amazon.com", 443) test_handshake(address, True) # with workaround print("worked so far") test_handshake(address, False) print("but not here it didn't") ------------------------------- I'm using Python 3.0rc1 under Windows. ---------- components: Library (Lib) messages: 75077 nosy: ddvoinikov severity: normal status: open title: SSL handshake fails after TCP connection in getpeername() type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 13:43:15 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 22 Oct 2008 11:43:15 +0000 Subject: [issue4168] core dump exiting python In-Reply-To: <1224661030.95.0.853599838513.issue4168@psf.upfronthosting.co.za> Message-ID: <1224675795.71.0.215143980664.issue4168@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I can reproduce the problem, and it seems that it is already corrected by r66562 (issue3666), one week after 3.0rc1. Can you try with a newer version? ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 15:17:55 2008 From: report at bugs.python.org (Zooko O'Whielacronx) Date: Wed, 22 Oct 2008 13:17:55 +0000 Subject: [issue4172] distutils too picky about cygwin ld's version number In-Reply-To: <1224681475.69.0.42802955697.issue4172@psf.upfronthosting.co.za> Message-ID: <1224681475.69.0.42802955697.issue4172@psf.upfronthosting.co.za> New submission from Zooko O'Whielacronx : When I build an extension module with cygwin g++ and "compiler=mingw32" in my distutils config file, the build fails with: File "c:\python25\lib\site-packages\setuptools-0.6c9.egg\setuptools\command\build_ext.py", line 46, in run _build_ext.run(self) File "c:\Python25\lib\distutils\command\build_ext.py", line 264, in run force=self.force) File "c:\Python25\lib\distutils\ccompiler.py", line 1175, in new_compiler return klass (None, dry_run, force) File "c:\Python25\lib\distutils\cygwinccompiler.py", line 292, in __init__ CygwinCCompiler.__init__ (self, verbose, dry_run, force) File "c:\Python25\lib\distutils\cygwinccompiler.py", line 84, in __init__ get_versions() File "c:\Python25\lib\distutils\cygwinccompiler.py", line 424, in get_versions ld_version = StrictVersion(result.group(1)) File "c:\Python25\lib\distutils\version.py", line 40, in __init__ self.parse(vstring) File "c:\Python25\lib\distutils\version.py", line 107, in parse raise ValueError, "invalid version number '%s'" % vstring ValueError: invalid version number '2.18.50.20080625' If I change "StrictVersion" to "LooseVersion" in cygwinccompiler.py, then the build succeeds: C:\playground\allmydata\tahoe\installtahoe\allmydata-tahoe-1.2.0-r3092-SUMO>diff -u C:\Python25\Lib\distutils\cygwinccompiler.py C:\Python25\Lib\distutils\cyg winccompiler.py.new --- C:\Python25\Lib\distutils\cygwinccompiler.py 2008-10-22 07:09:26.765625000 -0600 +++ C:\Python25\Lib\distutils\cygwinccompiler.py.new 2008-10-22 07:09:06.234375000 -0600 @@ -398,7 +398,7 @@ """ Try to find out the versions of gcc, ld and dllwrap. If not possible it returns None for it. """ - from distutils.version import StrictVersion + from distutils.version import LooseVersion, StrictVersion from distutils.spawn import find_executable import re @@ -421,7 +421,7 @@ out.close() result = re.search('(\d+\.\d+(\.\d+)*)',out_string) if result: - ld_version = StrictVersion(result.group(1)) + ld_version = LooseVersion(result.group(1)) else: ld_version = None else: @@ -433,7 +433,7 @@ out.close() result = re.search(' (\d+\.\d+(\.\d+)*)',out_string) if result: - dllwrap_version = StrictVersion(result.group(1)) + dllwrap_version = LooseVersion(result.group(1)) else: dllwrap_version = None ---------- components: Distutils messages: 75079 nosy: zooko severity: normal status: open title: distutils too picky about cygwin ld's version number type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 16:11:57 2008 From: report at bugs.python.org (Winfried Plappert) Date: Wed, 22 Oct 2008 14:11:57 +0000 Subject: [issue4173] PDF documentation: long verbatim lines are cut off at right hand side In-Reply-To: <1224684717.3.0.110027961744.issue4173@psf.upfronthosting.co.za> Message-ID: <1224684717.3.0.110027961744.issue4173@psf.upfronthosting.co.za> New submission from Winfried Plappert : I seen this issue at various places, but I will quote from extending.pdf: Chapter 3: 'Building C and C++ Extensions with distutils' shows two long gcc commands. gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -DMAJOR_VERSION=1 -DMINOR_VERSION=0 -I/usr/local/include -I/usr/local/include/python2.2 -c demo.c -o build/temp.linux-i686-2.2/demo.o gcc -shared build/temp.linux-i686-2.2/demo.o -L/usr/local/lib -ltcl83 -o build/lib.linux-i686-2.2/demo.so The HTML version at http://docs.python.org/extending/building.html uses a slider to be able to see all the code, but the PDF-version does not have this feature. Consequently, the text is chopped off at the right hand side after the 98th character. ---------- assignee: georg.brandl components: Documentation tools (Sphinx) messages: 75080 nosy: georg.brandl, wplappert severity: normal status: open title: PDF documentation: long verbatim lines are cut off at right hand side versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 16:17:45 2008 From: report at bugs.python.org (Koen van de Sande) Date: Wed, 22 Oct 2008 14:17:45 +0000 Subject: [issue4120] Do not embed manifest files in *.pyd when compiling with MSVC In-Reply-To: <1223971312.31.0.131537865896.issue4120@psf.upfronthosting.co.za> Message-ID: <1224685065.4.0.329641562458.issue4120@psf.upfronthosting.co.za> Koen van de Sande added the comment: _CRT_NOFORCE_MANIFEST sounds nice, but I'm having some trouble getting it to work for Python extensions. I'm still having manifests generated...? Can you show me how to use it? It is an undocumented option. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 17:18:09 2008 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Wed, 22 Oct 2008 15:18:09 +0000 Subject: [issue4174] Performance optimization for min() and max() over lists In-Reply-To: <1224688689.45.0.882872543074.issue4174@psf.upfronthosting.co.za> Message-ID: <1224688689.45.0.882872543074.issue4174@psf.upfronthosting.co.za> New submission from Kristj?n Valur J?nsson : This adds a special case for min() and max() when iterating over lists. For simple lists of floats, the improvement is some 15% on a windows machine using release build (non pgo) ---------- components: Interpreter Core files: minmax.patch keywords: needs review, patch, patch messages: 75082 nosy: krisvale severity: normal status: open title: Performance optimization for min() and max() over lists type: performance versions: Python 2.5.3 Added file: http://bugs.python.org/file11857/minmax.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 17:56:10 2008 From: report at bugs.python.org (osvenskan) Date: Wed, 22 Oct 2008 15:56:10 +0000 Subject: [issue4012] Minor errors in multiprocessing docs In-Reply-To: <1222910620.56.0.617350560863.issue4012@psf.upfronthosting.co.za> Message-ID: <1224690970.54.0.155645634639.issue4012@psf.upfronthosting.co.za> osvenskan added the comment: The Synchronization primitives section should mention that sem_timedwait() isn't supported under OS X <=10.5.5 (and possibly later versions) so as a result timeouts passed to acquire() will be ignored (or raise an error?) http://docs.python.org/dev/library/multiprocessing.html#synchronization-primitives ---------- nosy: +osvenskan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 18:02:59 2008 From: report at bugs.python.org (flomana) Date: Wed, 22 Oct 2008 16:02:59 +0000 Subject: [issue4022] 2.6 dependent on c:\python26\ on windows In-Reply-To: <1222989342.94.0.529774628368.issue4022@psf.upfronthosting.co.za> Message-ID: <1224691379.92.0.895332380094.issue4022@psf.upfronthosting.co.za> flomana added the comment: Environment: Windows XP SP2 Python 2.6 installed for all users I?ve tried to install 2.6 to my custom directory C:\Archivos de Programa\Python All Python programs return Error 6034 (Python.exe, Pythonw.exe) Step by step, with reboot, I?ve tried as follow: mvscr90.dll copied to ...\System ...\System32 ...\winsxs with manifest installing C++ Library mentioned msg74219 but error persist: runtime error R6034 - An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team for more information. Regarding my work over win32 and django I?ve returned to ver 2.5.2 Thanks in advance ---------- components: +Windows -Build nosy: +flomana _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 18:13:40 2008 From: report at bugs.python.org (Neil Schemenauer) Date: Wed, 22 Oct 2008 16:13:40 +0000 Subject: [issue4151] Separate build dir broken In-Reply-To: <1224522256.17.0.820973690454.issue4151@psf.upfronthosting.co.za> Message-ID: <1224692020.67.0.0946877780741.issue4151@psf.upfronthosting.co.za> Neil Schemenauer added the comment: [Roumen Petrov] > Modification for test_build_ext.py from above mentioned issue break > non-posix builds. Without that change the test fails on Unix platforms when the build is not done inside the source directory. I guess the problem must be the change from (essentially): def _get_source_filename(): return os.path.join(sysconfig.project_base, 'Modules', 'xxmodule.c') to def _get_source_filename(): srcdir = sysconfig.get_config_var('srcdir') return os.path.join(srcdir, 'Modules', 'xxmodule.c') On POSIX, project_base is just the directory containing the Python executable. I think the right thing to do is to fix the srcdir var on non-POSIX systems. I don't have a Windows machine to test on. Could someone test the get_python_inc2.patch with the non_posix_srcdir.patch applied on top of it? Added file: http://bugs.python.org/file11858/non_posix_srcdir.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 18:18:24 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 22 Oct 2008 16:18:24 +0000 Subject: [issue4170] segfault with defaultdict and pickle In-Reply-To: <1224667622.54.0.802753290346.issue4170@psf.upfronthosting.co.za> Message-ID: <1224692304.39.0.348777135136.issue4170@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The pickle protocol should also check that __reduce__ returns iterators (iterables are not enough). The code below crashes the interpreter (twice ;-) class C: def __reduce__(self): return C, (), None, None, [] class D: def __reduce__(self): return D, (), None, [], None import pickle pickle.dumps(C()) pickle.dumps(D()) ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 18:23:19 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 22 Oct 2008 16:23:19 +0000 Subject: [issue4170] segfault with defaultdict and pickle In-Reply-To: <1224667622.54.0.802753290346.issue4170@psf.upfronthosting.co.za> Message-ID: <1224692599.11.0.740095613715.issue4170@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: My previous example also crashes python 2.4 & 2.6 (the classes have to inherit from 'object') _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 18:40:09 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 22 Oct 2008 16:40:09 +0000 Subject: [issue4172] distutils too picky about cygwin ld's version number In-Reply-To: <1224681475.69.0.42802955697.issue4172@psf.upfronthosting.co.za> Message-ID: <1224693609.12.0.298982783255.issue4172@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This is a duplicate of issue2234, with an identical correction; it will be part of the next 2.5 release. Thanks anyway for the report. ---------- nosy: +amaury.forgeotdarc resolution: -> duplicate status: open -> closed superseder: -> cygwinccompiler.py fails for latest MinGW releases. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 18:48:28 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 22 Oct 2008 16:48:28 +0000 Subject: [issue900977] cygwinccompiler.get_versions fails on `ld -v` output Message-ID: <1224694108.14.0.447872069266.issue900977@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Fixed by #2234. ---------- nosy: +amaury.forgeotdarc resolution: -> out of date status: open -> closed superseder: -> cygwinccompiler.py fails for latest MinGW releases. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 18:52:01 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 22 Oct 2008 16:52:01 +0000 Subject: [issue4175] Should Unix-only tty be present in Windows /Lib? In-Reply-To: <1224694321.91.0.166298390618.issue4175@psf.upfronthosting.co.za> Message-ID: <1224694321.91.0.166298390618.issue4175@psf.upfronthosting.co.za> New submission from Terry J. Reedy : As long as tty is *nix only and does not have a msvcrt-based implementation (which I presume is not exactly possible), I think it should be absent, just like termios is. >>> import tty Traceback (most recent call last): File "", line 1, in import tty File "C:\Programs\Python30\lib\tty.py", line 5, in from termios import * ImportError: No module named termios Since this is expected, and not a bug, removing tty would give a slightly shorter and clearer traceback ending with "No module named tty" ---------- components: Windows messages: 75090 nosy: tjreedy severity: normal status: open title: Should Unix-only tty be present in Windows /Lib? versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 19:00:29 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 22 Oct 2008 17:00:29 +0000 Subject: [issue4175] Should Unix-only tty be present in Windows /Lib? In-Reply-To: <1224694321.91.0.166298390618.issue4175@psf.upfronthosting.co.za> Message-ID: <1224694829.97.0.89185067145.issue4175@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Hm, I don't know if it's even possible. All *.py files are always installed. termios is an extension module, and is simply not compiled on Windows. But the build process never *remove* existing files. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 19:30:08 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 22 Oct 2008 17:30:08 +0000 Subject: [issue4022] 2.6 dependent on c:\python26\ on windows In-Reply-To: <1224691379.92.0.895332380094.issue4022@psf.upfronthosting.co.za> Message-ID: <48FF631D.4060109@v.loewis.de> Martin v. L?wis added the comment: > Thanks in advance I would not normally assume that yours is the same problem as the one reported in this issue. So please report it as a separate issue if you want it considered. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 19:31:33 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 22 Oct 2008 17:31:33 +0000 Subject: [issue4175] Should Unix-only tty be present in Windows /Lib? In-Reply-To: <1224694321.91.0.166298390618.issue4175@psf.upfronthosting.co.za> Message-ID: <1224696693.77.0.560614804469.issue4175@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I fail to see the point in not packaging it. Does the error cause an actual problem that would be solved by removing tty.py from the distribution? Closing this as "won't fix". ---------- nosy: +loewis resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 20:17:38 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Wed, 22 Oct 2008 18:17:38 +0000 Subject: [issue4176] segfault with pickle if 4th or 5th item of tuple returned by __reduce__ is not an iterator In-Reply-To: <1224699458.64.0.19589652139.issue4176@psf.upfronthosting.co.za> Message-ID: <1224699458.64.0.19589652139.issue4176@psf.upfronthosting.co.za> New submission from Hirokazu Yamamoto : Following code crashes. (See issue4170) trunk/Modules/cPickle.c (save() or save_reduce()) needs more checks of returned value from __reduce__. class C(object): def __reduce__(self): return C, (), None, None, [] # 5th item is not an iterator class D(object): def __reduce__(self): return D, (), None, [], None # 4th item is not an iterator import sys if sys.version_info[0] == 3: import pickle else: import cPickle as pickle pickle.dumps(C()) # crash pickle.dumps(D()) # crash ---------- components: Extension Modules messages: 75094 nosy: ocean-city severity: normal status: open title: segfault with pickle if 4th or 5th item of tuple returned by __reduce__ is not an iterator type: crash versions: Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 20:21:18 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Wed, 22 Oct 2008 18:21:18 +0000 Subject: [issue4170] segfault with defaultdict and pickle In-Reply-To: <1224667622.54.0.802753290346.issue4170@psf.upfronthosting.co.za> Message-ID: <1224699678.54.0.694631581701.issue4170@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: >My previous example also crashes python 2.4 & 2.6 (the classes have to inherit from 'object') I created new tracker item for this. (See issue4176) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 20:25:48 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Wed, 22 Oct 2008 18:25:48 +0000 Subject: [issue4176] segfault with pickle if 4th or 5th item of tuple returned by __reduce__ is not an iterator In-Reply-To: <1224699458.64.0.19589652139.issue4176@psf.upfronthosting.co.za> Message-ID: <1224699948.55.0.561450996636.issue4176@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: save() and save_reduce() seems to check same thing. - tuple size - 2nd item is tuple or not Is this duplicated or intended? If we adds check for 4th/5th item, should them be in both functions? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 20:40:39 2008 From: report at bugs.python.org (=?utf-8?q?S=C3=A9rgio_Surkamp?=) Date: Wed, 22 Oct 2008 18:40:39 +0000 Subject: [issue4177] Crash in MIMEText on FreeBSD In-Reply-To: <1224700839.13.0.201844476382.issue4177@psf.upfronthosting.co.za> Message-ID: <1224700839.13.0.201844476382.issue4177@psf.upfronthosting.co.za> New submission from S?rgio Surkamp : If you try to create a MIMEText object from a very large string (test case include a 40Mbytes string), the program just eat all the CPU and with high memory usage or raise a MemoryError. Sometimes it just deadlocks when using _charset = "iso-8859-1". Use the submited file and the script to test the case. ** On Linux its very slow, but work's ** - the problem occour on a FreeBSD installation. ---------- components: Library (Lib), Unicode files: test_MIMEText.tar.bz2 messages: 75097 nosy: surkamp severity: normal status: open title: Crash in MIMEText on FreeBSD type: behavior versions: Python 2.5, Python 2.5.3 Added file: http://bugs.python.org/file11859/test_MIMEText.tar.bz2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 20:50:49 2008 From: report at bugs.python.org (flomana) Date: Wed, 22 Oct 2008 18:50:49 +0000 Subject: [issue4022] 2.6 dependent on c:\python26\ on windows In-Reply-To: <1222989342.94.0.529774628368.issue4022@psf.upfronthosting.co.za> Message-ID: <1224701449.79.0.483377448225.issue4022@psf.upfronthosting.co.za> flomana added the comment: Martin Apper as an extension of the previous problem. I?ve tried with the changes proposed in the messages, but without success. Also was my first message, therefore please inform me if is better to begin a new issue. Thanks Note: Install deploy: .msi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 20:53:09 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 22 Oct 2008 18:53:09 +0000 Subject: [issue4174] Performance optimization for min() and max() over lists In-Reply-To: <1224688689.45.0.882872543074.issue4174@psf.upfronthosting.co.za> Message-ID: <1224701589.0.0.10635332766.issue4174@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I haven't tried the patch as is but I can spot two problems: - you should use PyList_CheckExact instead of PyList_Check, because a list subclass could override __getitem__ - when keyfunc is not NULL, you can't assume that the list size will stay constant; indeed, calling keyfunc may mutate the list (try something like `max(l, key=l.pop)`) I've got no opinion on whether the speedup is worth the added complexity. Perhaps a way of simplifying the patch would be to enable the special path only when keyfunc==NULL. Others may comment. ---------- nosy: +pitrou, rhettinger versions: +Python 2.7, Python 3.1 -Python 2.5.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 20:58:29 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 22 Oct 2008 18:58:29 +0000 Subject: [issue4174] Performance optimization for min() and max() over lists In-Reply-To: <1224688689.45.0.882872543074.issue4174@psf.upfronthosting.co.za> Message-ID: <1224701909.77.0.373968350248.issue4174@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Not that excited about adding this much code for such a small speedup. Also, the list can change size during iteration so the for-loop needs to be changed to: for(i = 1; i low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 21:02:40 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 22 Oct 2008 19:02:40 +0000 Subject: [issue4174] Performance optimization for min() and max() over lists In-Reply-To: <1224688689.45.0.882872543074.issue4174@psf.upfronthosting.co.za> Message-ID: <1224702160.16.0.735657568938.issue4174@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Antoine, the list can mutate even when the keyfunc is NULL. The rich comparison can callback to arbitrary Python code. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 21:03:35 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 22 Oct 2008 19:03:35 +0000 Subject: [issue4174] Performance optimization for min() and max() over lists In-Reply-To: <1224702160.16.0.735657568938.issue4174@psf.upfronthosting.co.za> Message-ID: <1224702215.7216.7.camel@localhost> Antoine Pitrou added the comment: > Antoine, the list can mutate even when the keyfunc is NULL. The rich > comparison can callback to arbitrary Python code. Ouch, you are right. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 21:29:57 2008 From: report at bugs.python.org (David W. Lambert) Date: Wed, 22 Oct 2008 19:29:57 +0000 Subject: [issue4168] core dump exiting python In-Reply-To: <1224661030.95.0.853599838513.issue4168@psf.upfronthosting.co.za> Message-ID: <1224703797.78.0.630422003624.issue4168@psf.upfronthosting.co.za> David W. Lambert added the comment: I rebuilt python3k from "today's snapshot". No more core dump. Problem solved, close case. IMH'edO. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 21:51:23 2008 From: report at bugs.python.org (Michael Witten) Date: Wed, 22 Oct 2008 19:51:23 +0000 Subject: [issue4178] codecs: Documentation Inconsistency In-Reply-To: <1224705083.0.0.680712711599.issue4178@psf.upfronthosting.co.za> Message-ID: <1224705083.0.0.680712711599.issue4178@psf.upfronthosting.co.za> New submission from Michael Witten : CodecInfo objects are supposed to have 'encoder' and 'decoder' attributes as per http://www.python.org/doc/2.5.2/lib/module-codecs.html (naturally, this applies to 2.5.* as well). However, at least the CodecInfo object for 'string_escape' names these attributes 'encode' and 'decode'. >>> import codecs >>> dir(codecs.lookup('string_escape')) ['__add__', '__class__', '__contains__', '__delattr__', '__dict__', '__doc__', '__eq__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', '__getslice__', '__gt__', '__hash__', '__init__', '__iter__', '__le__', '__len__', '__lt__', '__module__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmul__', '__setattr__', '__str__', 'decode', 'encode', 'incrementaldecoder', 'incrementalencoder', 'name', 'streamreader', 'streamwriter'] ---------- components: Library (Lib) messages: 75104 nosy: mfwitten severity: normal status: open title: codecs: Documentation Inconsistency versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 21:51:47 2008 From: report at bugs.python.org (Michael Witten) Date: Wed, 22 Oct 2008 19:51:47 +0000 Subject: [issue4178] codecs: Documentation Inconsistency In-Reply-To: <1224705083.0.0.680712711599.issue4178@psf.upfronthosting.co.za> Message-ID: <1224705107.56.0.915622153391.issue4178@psf.upfronthosting.co.za> Changes by Michael Witten : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 21:54:08 2008 From: report at bugs.python.org (Michael Witten) Date: Wed, 22 Oct 2008 19:54:08 +0000 Subject: [issue4178] codecs: Documentation Inconsistency In-Reply-To: <1224705083.0.0.680712711599.issue4178@psf.upfronthosting.co.za> Message-ID: <1224705248.57.0.654118453162.issue4178@psf.upfronthosting.co.za> Michael Witten added the comment: Apparently, it might affect all CodecInfo objects: class CodecInfo(tuple): def __new__(cls, encode, decode, streamreader=None, streamwriter=None, incrementalencoder=None, incrementaldecoder=None, name=None): self = tuple.__new__(cls, (encode, decode, streamreader, streamwriter)) self.name = name self.encode = encode self.decode = decode self.incrementalencoder = incrementalencoder self.incrementaldecoder = incrementaldecoder self.streamwriter = streamwriter self.streamreader = streamreader return self ... _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 22:04:04 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 22 Oct 2008 20:04:04 +0000 Subject: [issue4178] codecs: Documentation Inconsistency In-Reply-To: <1224705083.0.0.680712711599.issue4178@psf.upfronthosting.co.za> Message-ID: <1224705844.02.0.12923688306.issue4178@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Before CodecInfo tuple subclasses were introduced, the lookup() function used to return a tuple: (encoder, decoder, stream_reader, stream_writer) See http://www.python.org/dev/peps/pep-0100/ These were normally addressed by position rather than name and still are in most cases. I'm not sure whether the choice of attribute names on CodecInfo was done on purpose or a simple oversight. Walter added them... I've added him on CC. They do match the names of the methods on codecs, so perhaps we should just change everything to read encode/decode instead of encoder/decoder ?! ---------- nosy: +doerwalter, lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 22:36:57 2008 From: report at bugs.python.org (Winfried Plappert) Date: Wed, 22 Oct 2008 20:36:57 +0000 Subject: [issue4173] PDF documentation: long verbatim lines are cut off at right hand side In-Reply-To: <1224684717.3.0.110027961744.issue4173@psf.upfronthosting.co.za> Message-ID: <1224707817.88.0.377885058546.issue4173@psf.upfronthosting.co.za> Changes by Winfried Plappert : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 22:37:19 2008 From: report at bugs.python.org (Winfried Plappert) Date: Wed, 22 Oct 2008 20:37:19 +0000 Subject: [issue4169] library/turtle.rst does not format properly in PDF mode In-Reply-To: <1224662867.9.0.0428544955295.issue4169@psf.upfronthosting.co.za> Message-ID: <1224707839.23.0.460534691279.issue4169@psf.upfronthosting.co.za> Changes by Winfried Plappert : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 22:37:52 2008 From: report at bugs.python.org (Winfried Plappert) Date: Wed, 22 Oct 2008 20:37:52 +0000 Subject: [issue4160] library.pdf - Section 12.13.2 Connection Objects - example cut off at the right hand side In-Reply-To: <1224601594.18.0.145893129918.issue4160@psf.upfronthosting.co.za> Message-ID: <1224707872.54.0.230645994407.issue4160@psf.upfronthosting.co.za> Changes by Winfried Plappert : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 22:40:30 2008 From: report at bugs.python.org (Winfried Plappert) Date: Wed, 22 Oct 2008 20:40:30 +0000 Subject: [issue3203] sphinx - table of contents doesn't render correctly (html) In-Reply-To: <1214426188.21.0.172463487619.issue3203@psf.upfronthosting.co.za> Message-ID: <1224708030.66.0.38527915863.issue3203@psf.upfronthosting.co.za> Changes by Winfried Plappert : ---------- nosy: +wplappert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 22:41:18 2008 From: report at bugs.python.org (Winfried Plappert) Date: Wed, 22 Oct 2008 20:41:18 +0000 Subject: [issue3143] development docs waste a lot of horizontal space on left nav bar In-Reply-To: <1213894130.5.0.901866798504.issue3143@psf.upfronthosting.co.za> Message-ID: <1224708078.72.0.0538903305219.issue3143@psf.upfronthosting.co.za> Changes by Winfried Plappert : ---------- nosy: +wplapper _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 22:54:09 2008 From: report at bugs.python.org (Winfried Plappert) Date: Wed, 22 Oct 2008 20:54:09 +0000 Subject: [issue4159] Table about Standard Encodings is cut off at the bottom - 35 entries missing In-Reply-To: <1224600485.7.0.778638686943.issue4159@psf.upfronthosting.co.za> Message-ID: <1224708849.28.0.347361446974.issue4159@psf.upfronthosting.co.za> Winfried Plappert added the comment: There are some interesting remarks about long tables at http://www.tex.ac.uk/cgi-bin/texfaq2html?label=longtab. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 23:01:27 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 22 Oct 2008 21:01:27 +0000 Subject: [issue4168] core dump exiting python In-Reply-To: <1224661030.95.0.853599838513.issue4168@psf.upfronthosting.co.za> Message-ID: <1224709287.21.0.0569303162407.issue4168@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 23:02:02 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 22 Oct 2008 21:02:02 +0000 Subject: [issue4176] segfault with pickle if 4th or 5th item of tuple returned by __reduce__ is not an iterator In-Reply-To: <1224699458.64.0.19589652139.issue4176@psf.upfronthosting.co.za> Message-ID: <1224709322.75.0.579234689035.issue4176@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> alexandre.vassalotti nosy: +alexandre.vassalotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 23:07:34 2008 From: report at bugs.python.org (Daniel Clemente Laboreo) Date: Wed, 22 Oct 2008 21:07:34 +0000 Subject: [issue4179] pdb: Allow the "list" command to return to the currently debugged line In-Reply-To: <1224709654.06.0.420157536807.issue4179@psf.upfronthosting.co.za> Message-ID: <1224709654.06.0.420157536807.issue4179@psf.upfronthosting.co.za> New submission from Daniel Clemente Laboreo : The attached patch against today's trunk adds a new option to the "list" ("l") command of the debugger (pdb): "l ." "l" starts showing the portion of code which contains the current line. Further calls to "l" show the code below that. I found that I needed a way to see the original line again. Manually I'd do "w" to see the current line number and then "l 123" or so. The new command "l ." brings you again to the code portion that was shown first time, so this is automatic and faster. I have absolutely no preference for the syntax "."; please change it if something else would be more mnemonic or consistent. Since this is my first patch; please complain if I do something wrong. ---------- components: Library (Lib) files: pdb_list_refocus.patch keywords: patch messages: 75108 nosy: dclemente severity: normal status: open title: pdb: Allow the "list" command to return to the currently debugged line type: feature request Added file: http://bugs.python.org/file11860/pdb_list_refocus.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 23:08:44 2008 From: report at bugs.python.org (Jesse Noller) Date: Wed, 22 Oct 2008 21:08:44 +0000 Subject: [issue4012] Minor errors in multiprocessing docs In-Reply-To: <1222910620.56.0.617350560863.issue4012@psf.upfronthosting.co.za> Message-ID: <1224709724.86.0.728463032009.issue4012@psf.upfronthosting.co.za> Jesse Noller added the comment: fix_up_logger doesn't exist in the port, but is used in the mp_distributing.py example _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 23:11:11 2008 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 22 Oct 2008 21:11:11 +0000 Subject: [issue4163] textwrap wordsep_re Unicode In-Reply-To: <1224619523.16.0.79700210606.issue4163@psf.upfronthosting.co.za> Message-ID: <1224709871.43.0.152671450584.issue4163@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think it is an useful change indeed. Since it changes behaviour, I'm not sure it's ok for 2.6.1 or 2.5.3 though. ---------- nosy: +pitrou versions: +Python 3.1 -Python 2.5, Python 2.5.3, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 23:16:50 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 22 Oct 2008 21:16:50 +0000 Subject: [issue4150] pdb "up" command fails in generator frames In-Reply-To: <1224512469.54.0.977568708745.issue4150@psf.upfronthosting.co.za> Message-ID: <1224710210.46.0.246639371282.issue4150@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks for the patch. Fixed in r67000. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 23:46:15 2008 From: report at bugs.python.org (Roumen Petrov) Date: Wed, 22 Oct 2008 21:46:15 +0000 Subject: [issue4177] Crash in MIMEText on FreeBSD In-Reply-To: <1224700839.13.0.201844476382.issue4177@psf.upfronthosting.co.za> Message-ID: <1224711975.35.0.05891736645.issue4177@psf.upfronthosting.co.za> Roumen Petrov added the comment: I don't think that test work on linux without MemoryError. What about if you set user limits on linux ? If you enable core file on linux did the test really crash and dump core or just raise exception and exit without coredump ? ---------- nosy: +rpetrov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 23:49:32 2008 From: report at bugs.python.org (Jean-Paul Calderone) Date: Wed, 22 Oct 2008 21:49:32 +0000 Subject: [issue4180] warnings.simplefilter("always") does not make warnings always show up In-Reply-To: <1224712172.47.0.998538899646.issue4180@psf.upfronthosting.co.za> Message-ID: <1224712172.47.0.998538899646.issue4180@psf.upfronthosting.co.za> New submission from Jean-Paul Calderone : If a warning is emitted then a filter with the "always" rule is added then the is emitted again, it will not be shown the second time: exarkun at charm:~$ python Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import warnings >>> def f(): ... warnings.warn("foo") ... >>> f() /home/exarkun/.pythonstartup.py:2: UserWarning: foo >>> warnings.simplefilter("always") >>> f() >>> The "always" filter is documented as "always print matching warnings" which is contrary to this behavior. Also, the string "always" strongly implies that it will be shown the second time. ---------- messages: 75113 nosy: exarkun severity: normal status: open title: warnings.simplefilter("always") does not make warnings always show up versions: Python 2.4, Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 23:52:18 2008 From: report at bugs.python.org (Pasha) Date: Wed, 22 Oct 2008 21:52:18 +0000 Subject: [issue4181] Invalid Behavior When a Default Argument is a Dictionary. In-Reply-To: <1224712338.02.0.509740184342.issue4181@psf.upfronthosting.co.za> Message-ID: <1224712338.02.0.509740184342.issue4181@psf.upfronthosting.co.za> New submission from Pasha : Whenever the default argument to a function is a dictionary, and the function is called twice, then the function "remembers" the changes to the dictionary. This means that any time that a default argument is set to a dictionary, a list or any other built in data structure, it cannot be relied upon to correctly do the right thing. I assume this is actually two issues: 1) The default arguments are not being garbage collected after the function is done. You can check that by using a __del__ tracker 2) the argument is at the same memory location at all times. I have seen this on Python 2.5.2, however its highly possible other parts are affected as well. ---------- components: Interpreter Core files: default_argument_dictionary_bug.py messages: 75114 nosy: Pasha2009 severity: normal status: open title: Invalid Behavior When a Default Argument is a Dictionary. type: behavior versions: Python 2.5 Added file: http://bugs.python.org/file11861/default_argument_dictionary_bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 23:54:43 2008 From: report at bugs.python.org (Christian Heimes) Date: Wed, 22 Oct 2008 21:54:43 +0000 Subject: [issue4181] Invalid Behavior When a Default Argument is a Dictionary. In-Reply-To: <1224712338.02.0.509740184342.issue4181@psf.upfronthosting.co.za> Message-ID: <1224712483.85.0.276838164127.issue4181@psf.upfronthosting.co.za> Christian Heimes added the comment: The behavior is correct, expected and well documented. http://effbot.org/pyfaq/why-are-default-values-shared-between-objects.htm ---------- nosy: +christian.heimes resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 22 23:55:26 2008 From: report at bugs.python.org (Jean-Paul Calderone) Date: Wed, 22 Oct 2008 21:55:26 +0000 Subject: [issue4182] warnings.warn shows the wrong filename and line number for stacklevel of 0 In-Reply-To: <1224712526.35.0.138565894307.issue4182@psf.upfronthosting.co.za> Message-ID: <1224712526.35.0.138565894307.issue4182@psf.upfronthosting.co.za> New submission from Jean-Paul Calderone : In Python 2.5 and earlier, passing stacklevel=0 to warnings.warn resulted in a warning shown which pointed to warnings.py. In Python 2.6, passing a stacklevel of 0 results in the warning shown pointing to the file containing the call to warnings.warn. To illustrate: exarkun at charm:~$ python Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import warnings >>> def f(): ... warnings.warn("foo", stacklevel=0) ... >>> f() /usr/lib/python2.5/warnings.py:41: UserWarning: foo lineno = caller.f_lineno >>> as compared to exarkun at charm:~$ ~/Projects/python/branches/release26-maint/python Python 2.6+ (trunk:66997, Oct 22 2008, 14:43:32) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import warnings >>> def f(): ... warnings.warn("foo", stacklevel=0) ... >>> f() __main__:2: UserWarning: foo >>> This breaks code which assumes that stacklevel=0 will result in a different file than stacklevel=1. ---------- messages: 75116 nosy: exarkun severity: normal status: open title: warnings.warn shows the wrong filename and line number for stacklevel of 0 versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 00:19:04 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 22 Oct 2008 22:19:04 +0000 Subject: [issue4180] warnings.simplefilter("always") does not make warnings always show up In-Reply-To: <1224712172.47.0.998538899646.issue4180@psf.upfronthosting.co.za> Message-ID: <1224713944.24.0.958949000156.issue4180@psf.upfronthosting.co.za> Benjamin Peterson added the comment: If you didn't raise the warning before using the simple filter, this would have worked. The undesired behavior is because of __warningsregistry__. It is set the first time the warning is emitted. When the second warning comes through, the filter isn't even looked at. I think the best way to fix this is to invalidate __warningsregistry__ when a filter is used. It would probably be best to store warnings data in a global then instead of on the module, so it is easy to invalidate. ---------- nosy: +benjamin.peterson, brett.cannon priority: -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 00:34:06 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 22 Oct 2008 22:34:06 +0000 Subject: [issue4176] segfault with pickle if 4th or 5th item of tuple returned by __reduce__ is not an iterator In-Reply-To: <1224699458.64.0.19589652139.issue4176@psf.upfronthosting.co.za> Message-ID: <1224714846.7.0.16204320353.issue4176@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The attached patch adds a test and corrects the crash. ---------- keywords: +needs review, patch nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file11862/save_reduce.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 00:34:37 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 22 Oct 2008 22:34:37 +0000 Subject: [issue4182] warnings.warn shows the wrong filename and line number for stacklevel of 0 In-Reply-To: <1224712526.35.0.138565894307.issue4182@psf.upfronthosting.co.za> Message-ID: <1224714877.74.0.0447631808536.issue4182@psf.upfronthosting.co.za> Benjamin Peterson added the comment: The reason for this is that the C implementation of warnings doesn't show up on the frame stack. (The pure Python implementation of warnings in 2.6 works like in 2.5.) The only solution for this one might be using the Python implementation. (I'd also be interested to know why a stacklevel of 0 is being used.) ---------- nosy: +benjamin.peterson, brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 00:36:51 2008 From: report at bugs.python.org (Brett Cannon) Date: Wed, 22 Oct 2008 22:36:51 +0000 Subject: [issue4180] warnings.simplefilter("always") does not make warnings always show up In-Reply-To: <1224712172.47.0.998538899646.issue4180@psf.upfronthosting.co.za> Message-ID: <1224715011.07.0.0698069492565.issue4180@psf.upfronthosting.co.za> Brett Cannon added the comment: Obviously the big problem with that change, Benjamin, is you will be changing the semantics. And that is a tough thing to change when it involves the warning machinery itself so emitting a warning about a warning might get messy. ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 00:39:08 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 22 Oct 2008 22:39:08 +0000 Subject: [issue4180] warnings.simplefilter("always") does not make warnings always show up In-Reply-To: <1224712172.47.0.998538899646.issue4180@psf.upfronthosting.co.za> Message-ID: <1224715148.08.0.571756692826.issue4180@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Oh, do we not consider __warningsregistry__ an implementation detail? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 00:52:15 2008 From: report at bugs.python.org (Brett Cannon) Date: Wed, 22 Oct 2008 22:52:15 +0000 Subject: [issue4180] warnings.simplefilter("always") does not make warnings always show up In-Reply-To: <1224715148.08.0.571756692826.issue4180@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Wed, Oct 22, 2008 at 3:39 PM, Benjamin Peterson wrote: > > Benjamin Peterson added the comment: > > Oh, do we not consider __warningsregistry__ an implementation detail? > I guess you could view it that way. I just know I find it extremely annoying for testing for the exact reasons JP mentions; it's unexpected if you don't know about it. If we made __warningsregistry__ about just recording what warnings have been raised and not include filter information (which I what I think you are suggesting) then it would still server its purpose, albeit for probably a small performance penalty. Probably whomever came up with it over-optimized and just didn't realize that it might play havoc with testing. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 01:11:48 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 22 Oct 2008 23:11:48 +0000 Subject: [issue4180] warnings.simplefilter("always") does not make warnings always show up In-Reply-To: <1224712172.47.0.998538899646.issue4180@psf.upfronthosting.co.za> Message-ID: <1224717108.88.0.241924311597.issue4180@psf.upfronthosting.co.za> Benjamin Peterson added the comment: A simple solution would be to allow warn_explicit to be overridden. Then a custom warn_explicit function could simply ignore the registry argument. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 01:16:24 2008 From: report at bugs.python.org (Brett Cannon) Date: Wed, 22 Oct 2008 23:16:24 +0000 Subject: [issue4180] warnings.simplefilter("always") does not make warnings always show up In-Reply-To: <1224717108.88.0.241924311597.issue4180@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Wed, Oct 22, 2008 at 4:11 PM, Benjamin Peterson wrote: > > Benjamin Peterson added the comment: > > A simple solution would be to allow warn_explicit to be overridden. Then > a custom warn_explicit function could simply ignore the registry argument. You say "simple" from a comprehension standpoint, I say "pain" in terms of implementing it in C (although most of the hard stuff I already have worked out for showwarning). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 02:11:34 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Thu, 23 Oct 2008 00:11:34 +0000 Subject: [issue4183] test with pickle.HIGHEST_PROTOCOL missing In-Reply-To: <1224720694.29.0.00411175636093.issue4183@psf.upfronthosting.co.za> Message-ID: <1224720694.29.0.00411175636093.issue4183@psf.upfronthosting.co.za> New submission from Hirokazu Yamamoto : some tests use "for proto in range(pickle.HIGHEST_PROTOCOL)", but this statement won't invoke proto == pickle.HIGHEST_PROTOCOL. Is this intended? If not, I hope attached patch will fix this issue. ---------- components: Tests files: test_with_HIGHEST_PROTOCOL_on_trunk.patch keywords: patch messages: 75125 nosy: ocean-city severity: normal status: open title: test with pickle.HIGHEST_PROTOCOL missing versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file11863/test_with_HIGHEST_PROTOCOL_on_trunk.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 02:13:47 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Thu, 23 Oct 2008 00:13:47 +0000 Subject: [issue4170] segfault with defaultdict and pickle In-Reply-To: <1224667622.54.0.802753290346.issue4170@psf.upfronthosting.co.za> Message-ID: <1224720827.53.0.123133970289.issue4170@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I created test case referring to test_bytes, but I noticed range(pickle.HIGHETST_PROTOCOL) doesn't test HIGHEST_PROTOCOL itself. So patch revised. I created another tracker item for other tests using range(pickle.HIGHETST_PROTOCOL). See issue4183. Added file: http://bugs.python.org/file11864/fix_defaultdict_reduce_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 02:19:04 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Thu, 23 Oct 2008 00:19:04 +0000 Subject: [issue4183] test with pickle.HIGHEST_PROTOCOL missing In-Reply-To: <1224720694.29.0.00411175636093.issue4183@psf.upfronthosting.co.za> Message-ID: <1224721144.36.0.842172336653.issue4183@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : ---------- keywords: +easy Added file: http://bugs.python.org/file11865/test_with_HIGHEST_PROTOCOL_on_py3k.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 02:27:39 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 23 Oct 2008 00:27:39 +0000 Subject: [issue4183] test with pickle.HIGHEST_PROTOCOL missing In-Reply-To: <1224720694.29.0.00411175636093.issue4183@psf.upfronthosting.co.za> Message-ID: <1224721659.24.0.197789930223.issue4183@psf.upfronthosting.co.za> Benjamin Peterson added the comment: That lots reasonable to me. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 02:27:56 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 23 Oct 2008 00:27:56 +0000 Subject: [issue4183] test with pickle.HIGHEST_PROTOCOL missing In-Reply-To: <1224720694.29.0.00411175636093.issue4183@psf.upfronthosting.co.za> Message-ID: <1224721676.62.0.0307156282045.issue4183@psf.upfronthosting.co.za> Benjamin Peterson added the comment: s/lots/looks/ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 02:31:56 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Thu, 23 Oct 2008 00:31:56 +0000 Subject: [issue4176] segfault with pickle if 4th or 5th item of tuple returned by __reduce__ is not an iterator In-Reply-To: <1224699458.64.0.19589652139.issue4176@psf.upfronthosting.co.za> Message-ID: <1224721916.27.0.609668735601.issue4176@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I think the patch is fine. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 02:39:19 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Thu, 23 Oct 2008 00:39:19 +0000 Subject: [issue4183] test with pickle.HIGHEST_PROTOCOL missing In-Reply-To: <1224720694.29.0.00411175636093.issue4183@psf.upfronthosting.co.za> Message-ID: <1224722359.87.0.863722024152.issue4183@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Thanks, I committed in r67002(trunk) and r67003(py3k). ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 02:49:46 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 23 Oct 2008 00:49:46 +0000 Subject: [issue4180] warnings.simplefilter("always") does not make warnings always show up In-Reply-To: <1224712172.47.0.998538899646.issue4180@psf.upfronthosting.co.za> Message-ID: <1224722986.95.0.0154083573551.issue4180@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Don't worry, Brett; you made it really easy. :) Here's a patch. ---------- keywords: +patch Added file: http://bugs.python.org/file11866/warn_explicit_replace.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 03:17:14 2008 From: report at bugs.python.org (Richard Jones) Date: Thu, 23 Oct 2008 01:17:14 +0000 Subject: [issue4184] Remove use of private attributes in smtpd In-Reply-To: <1224724634.09.0.0444621109477.issue4184@psf.upfronthosting.co.za> Message-ID: <1224724634.09.0.0444621109477.issue4184@psf.upfronthosting.co.za> New submission from Richard Jones : Executive summary of the patch: The attached patch removes the use of __private attributes in the smtpd module allowing it to be extensible without needing to use the "___" hack. Summary of the patch's changes: 1. removes the unused __conn and __addr attributes 2. renames __server to smtp_server 3. renames __lines to received_lines 4. renames __state to smtp_state 5. renames __greeting to seen_greeting, and alters the default to empty string to match the anticipated data 6. renames __mailfrom to mailfrom 7. renames __date to received_data 8. renames __fqdn to fqdn 9. removes __peer and uses base class' addr attribute The existing unit tests contained within test_smtplib pass. Additional tests could be written if it's deemed necessary. There is a chance this patch will break backward compatibility with programs that use the private-variable-access hack. A more complex patch could be written providing greater compatibility if it's deemed necessary. ---------- components: Library (Lib) files: smtpd.py-patch messages: 75132 nosy: richard severity: normal status: open title: Remove use of private attributes in smtpd versions: Python 2.6 Added file: http://bugs.python.org/file11867/smtpd.py-patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 05:55:29 2008 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 23 Oct 2008 03:55:29 +0000 Subject: [issue4185] re module treats raw strings as normal strings In-Reply-To: <1224734129.35.0.170011642262.issue4185@psf.upfronthosting.co.za> Message-ID: <1224734129.35.0.170011642262.issue4185@psf.upfronthosting.co.za> New submission from Ezio Melotti : The re module seems to treat the raw strings as normal strings: >>> 'a1a1a'.replace('1', r'\n') == re.sub('1', r'\n', 'a1a1a') False >>> 'a1a1a'.replace('1', '\n') == re.sub('1', r'\n', 'a1a1a') True In the first line str.replace and re.sub should perform exactly the same operation and return the same result but re.sub replaces the 1s with newlines, instead of a literal '\' and 'n'. The second line should evaluate to False but re.sub replaces again the 1s with newlines so the result is equal to the LHS. >>> re.search(r'\n', 'a\na') <_sre.SRE_Match object at 0x00A81BF0> >>> r'\n' in 'a\na' False Searching a r'\n' in a string that contains a newline also return a result even if r'\n' is not in 'a\na'. Tested with Py2.5 on Linux and Py2.4/2.6 on win. The problem could be related to http://bugs.python.org/msg71861 Attached there is a txt file with more examples. ---------- components: Library (Lib), Regular Expressions files: raw-strings-with-re.txt messages: 75133 nosy: ezio.melotti severity: normal status: open title: re module treats raw strings as normal strings type: behavior versions: Python 2.4, Python 2.5, Python 2.5.3, Python 2.6 Added file: http://bugs.python.org/file11868/raw-strings-with-re.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 06:02:19 2008 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 23 Oct 2008 04:02:19 +0000 Subject: [issue4185] re module treats raw strings as normal strings In-Reply-To: <1224734129.35.0.170011642262.issue4185@psf.upfronthosting.co.za> Message-ID: <1224734539.24.0.343051309866.issue4185@psf.upfronthosting.co.za> Guido van Rossum added the comment: No, re.sub()'s documentation (http://docs.python.org/library/re.html#re.sub) makes it clear that \ followed by n in the replacement string is interpreted. To insert \ followed by n you have to double the \ inside the raw string like this: >>> re.sub('a', r'\\n', 'abba') '\\nbb\\n' >>> ---------- nosy: +gvanrossum resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 06:30:59 2008 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 23 Oct 2008 04:30:59 +0000 Subject: [issue4185] re module treats raw strings as normal strings In-Reply-To: <1224734129.35.0.170011642262.issue4185@psf.upfronthosting.co.za> Message-ID: <1224736259.43.0.369626656453.issue4185@psf.upfronthosting.co.za> Ezio Melotti added the comment: My bad, I only checked with help(re.sub). In the examples with re.search I was indeed wrong because I forgot to escape the \ and for the regex engine \n is the same of n (whereas \\n is a literal \ followed by n), but I expected 'a1a1a'.replace('1', r'\n') to return the same of re.sub('1', r'\n', 'a1a1a') because the r'\n' is not a regex but a simple replacement string. Also, the doc says "repl can be a string or a function; if it is a string, any backslash escapes in it are processed. That is, \n is converted to a single newline character, \r is converted to a linefeed, and so forth.", this is the standard behavior of normal string, it should be mentioned that the backslashes are processed even if with raw strings and they need to be escaped with two \. I think that changing the behavior of what is supposed to be a "normal string" (the repl string) is not really a good idea (even if it's useful when you have things like '\1\n' and assuming that this is why it has different behavior), I'd rather prefer to use $1 instead of \1. Unlike '\1', (as far as I know) $1 has no special meaning in Python so there won't be any problem with raw strings. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 11:13:31 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 23 Oct 2008 09:13:31 +0000 Subject: [issue4186] type() doesn't accept bases and dict keyword arguments In-Reply-To: <1224753211.57.0.0760272194538.issue4186@psf.upfronthosting.co.za> Message-ID: <1224753211.57.0.0760272194538.issue4186@psf.upfronthosting.co.za> New submission from Barry A. Warsaw : According to bug 1683368, Python 3.0's object.__init__() no longer accepts arbitrary keyword arguments. What's new in Python 2.6 says the same thing has been implemented in 2.6. However, type() no longer accepts /any/ keyword arguments, including the documented 'bases' and 'dict' keyword arguments. This seems to be a bug. It's not clear to me we no longer want to support type()'s documented keyword arguments, but even if we do, we should deprecate them in 2.6 and remove them in 2.7. The work around is fairly easy (pass positional args), but this will still break existing code. ---------- components: Interpreter Core messages: 75136 nosy: barry priority: critical severity: normal status: open title: type() doesn't accept bases and dict keyword arguments versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 11:22:51 2008 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Thu, 23 Oct 2008 09:22:51 +0000 Subject: [issue4178] codecs: Documentation Inconsistency In-Reply-To: <1224705083.0.0.680712711599.issue4178@psf.upfronthosting.co.za> Message-ID: <1224753771.51.0.643997835113.issue4178@psf.upfronthosting.co.za> Walter D?rwald added the comment: I agree that the documentation should be fixed to read "encode/decode" instead of "encoder/decoder". _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 12:51:17 2008 From: report at bugs.python.org (nut) Date: Thu, 23 Oct 2008 10:51:17 +0000 Subject: [issue4049] IDLE does not open too In-Reply-To: <1223253081.14.0.0863464602504.issue4049@psf.upfronthosting.co.za> Message-ID: <1224759077.92.0.0344090294309.issue4049@psf.upfronthosting.co.za> nut added the comment: would you help me to open IDLE it can't open in 2.6 version but can use python in terminal my OS is MacOSX. I'm the new one in python so, i need you help very much. ---------- components: +IDLE nosy: +zeromtmu -Chris_L, Raj, giampaolo.rodola, loewis, scionkiller title: IDLE does not open at all -> IDLE does not open too _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 13:12:26 2008 From: report at bugs.python.org (=?utf-8?q?Hrvoje_Nik=C5=A1i=C4=87?=) Date: Thu, 23 Oct 2008 11:12:26 +0000 Subject: [issue4174] Performance optimization for min() and max() over lists In-Reply-To: <1224688689.45.0.882872543074.issue4174@psf.upfronthosting.co.za> Message-ID: <1224760346.02.0.410474908988.issue4174@psf.upfronthosting.co.za> Hrvoje Nik?i? added the comment: Note that the item retrieved by PyList_GET_ITEM must be increffed before being passed to the function. Otherwise mutating the list can remove the item from the list and destroy the underlying object, in which case the current maxitem can refer to a freed object. This pitfall is described in http://docs.python.org/extending/extending.html#thin-ice in some detail. ---------- nosy: +hniksic _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 13:17:30 2008 From: report at bugs.python.org (=?utf-8?q?Mart_S=C3=B5mermaa?=) Date: Thu, 23 Oct 2008 11:17:30 +0000 Subject: [issue3518] multiprocessing: BaseManager.from_address documented but doesn't exist In-Reply-To: <1218131168.54.0.934616092257.issue3518@psf.upfronthosting.co.za> Message-ID: <1224760650.39.0.0071160783856.issue3518@psf.upfronthosting.co.za> Mart S?mermaa added the comment: The documentation should be amended as follows: Running the following commands creates a server for a single shared queue which remote clients can access: >>> from multiprocessing.managers import BaseManager >>> import Queue >>> queue = Queue.Queue() >>> class QueueManager(BaseManager): pass ... >>> QueueManager.register('getQueue', callable=lambda:queue) >>> m = QueueManager(address=('', 50000), authkey='abracadabra') >>> s = m.get_server() >>> s.serve_forever() One client can access the server as follows: >>> from multiprocessing.managers import BaseManager >>> class QueueManager(BaseManager): pass ... >>> QueueManager.register('getQueue') >>> m = QueueManager(address=('localhost', 50000), authkey='abracadabra') >>> m.connect() >>> q = m.getQueue() >>> q.put('hello') Another client can also use it: >>> from multiprocessing.managers import BaseManager >>> class QueueManager(BaseManager): pass ... >>> QueueManager.register('getQueue') >>> m = QueueManager(address=('localhost', 50000), authkey='abracadabra') >>> m.connect() >>> q = m.getQueue() >>> q.get() ---------- nosy: +mrts _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 13:55:13 2008 From: report at bugs.python.org (=?utf-8?q?Mart_S=C3=B5mermaa?=) Date: Thu, 23 Oct 2008 11:55:13 +0000 Subject: [issue3518] multiprocessing: BaseManager.from_address documented but doesn't exist In-Reply-To: <1218131168.54.0.934616092257.issue3518@psf.upfronthosting.co.za> Message-ID: <1224762913.73.0.811700847071.issue3518@psf.upfronthosting.co.za> Mart S?mermaa added the comment: Also, it would be helpful to elaborate a bit more on: major: * how to implement a queue that is shared both locally and remotely (i.e. n local processes access the queue as well as m remote processes) minor: * blocking (assumption: q.get() blocks on socket.recv()) * timeout (assumption: the socket does not time out, e.g. q.get() blocks endlessly on socket.recv()) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 14:45:06 2008 From: report at bugs.python.org (=?utf-8?q?S=C3=A9rgio_Surkamp?=) Date: Thu, 23 Oct 2008 12:45:06 +0000 Subject: [issue4177] Crash in MIMEText on FreeBSD In-Reply-To: <1224700839.13.0.201844476382.issue4177@psf.upfronthosting.co.za> Message-ID: <1224765906.76.0.0705560658696.issue4177@psf.upfronthosting.co.za> S?rgio Surkamp added the comment: Testing on Linux: $ ulimit -m 128000 $ ulimit -v 196000 $ python test_MIMEText.py [...] Traceback (most recent call last): File "test_MIMEText.py", line 23, in txt = MIMEText(buffer, _subtype="plain", _charset="iso-8859-1") File "/usr/lib/python2.5/email/mime/text.py", line 30, in __init__ self.set_payload(_text, _charset) File "/usr/lib/python2.5/email/message.py", line 220, in set_payload self.set_charset(charset) File "/usr/lib/python2.5/email/message.py", line 262, in set_charset self._payload = charset.body_encode(self._payload) File "/usr/lib/python2.5/email/charset.py", line 386, in body_encode return email.quoprimime.body_encode(s) File "/usr/lib/python2.5/email/quoprimime.py", line 198, in encode body = fix_eols(body) File "/usr/lib/python2.5/email/utils.py", line 77, in fix_eols s = re.sub(r'(? _______________________________________ From report at bugs.python.org Thu Oct 23 15:22:53 2008 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Thu, 23 Oct 2008 13:22:53 +0000 Subject: [issue4178] codecs: Documentation Inconsistency In-Reply-To: <1224705083.0.0.680712711599.issue4178@psf.upfronthosting.co.za> Message-ID: <1224768173.2.0.496196060571.issue4178@psf.upfronthosting.co.za> Walter D?rwald added the comment: Fixed in r67005 (trunk) and r67006 (pk3k). ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 15:49:59 2008 From: report at bugs.python.org (ldehkire) Date: Thu, 23 Oct 2008 13:49:59 +0000 Subject: [issue4187] IDLE will not start. In-Reply-To: <1224769799.89.0.110576090297.issue4187@psf.upfronthosting.co.za> Message-ID: <1224769799.89.0.110576090297.issue4187@psf.upfronthosting.co.za> New submission from ldehkire : IDLE will not start. I have installed python via the python-2.6-macosx.dmg image found on http://www.python.org/download/. I didn't find any resolutions in bugs.python.org, but did note that you are having some trouble with tk (as discussed in other bugs). I haven't tried much to troubleshoot the issue yet other than note that the 2.5 version of IDLE does start. Below is some info on the problem: I see the following in my logs every time I try and start IDLE: Oct 23 07:15:03 kaos [0x0-0x30030].org.python.IDLE[333]: Traceback (most recent call last): Oct 23 07:15:03 kaos [0x0-0x30030].org.python.IDLE[333]: File "/Applications/Python 2.6/IDLE.app/Contents/Resources/idlemain.py", line 6, in Oct 23 07:15:03 kaos [0x0-0x30030].org.python.IDLE[333]: from idlelib.PyShell import main Oct 23 07:15:03 kaos [0x0-0x30030].org.python.IDLE[333]: File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/idlelib/PyShell.py", line 14, in Oct 23 07:15:03 kaos [0x0-0x30030].org.python.IDLE[333]: import macosxSupport Oct 23 07:15:03 kaos [0x0-0x30030].org.python.IDLE[333]: File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/idlelib/macosxSupport.py", line 6, in Oct 23 07:15:03 kaos [0x0-0x30030].org.python.IDLE[333]: import Tkinter Oct 23 07:15:03 kaos [0x0-0x30030].org.python.IDLE[333]: File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk/Tkinter.py", line 39, in Oct 23 07:15:03 kaos [0x0-0x30030].org.python.IDLE[333]: import _tkinter # If this fails your Python may not be configured for Tk Oct 23 07:15:03 kaos [0x0-0x30030].org.python.IDLE[333]: ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_tkinter.so, 2): Library not loaded: /Library/Frameworks/Tcl.framework/Versions/8.5/Tcl Oct 23 07:15:03 kaos [0x0-0x30030].org.python.IDLE[333]: Referenced from: /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_tkinter.so Oct 23 07:15:03 kaos [0x0-0x30030].org.python.IDLE[333]: Reason: image not found Oct 23 07:15:03 kaos com.apple.launchd[87] ([0x0-0x30030].org.python.IDLE[333]): Exited with exit code: 1 I looked, and found the following in the referenced directory: -rwxrwxr-x 1 root admin 225936 Oct 1 17:49 _tkinter.so System info: MacBook Pro, Intel Core 2 Duo, 2 GB RAM, Mac OS X 10.5.5 ---------- components: IDLE messages: 75144 nosy: ldehkire severity: normal status: open title: IDLE will not start. type: crash versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 18:23:12 2008 From: report at bugs.python.org (vali) Date: Thu, 23 Oct 2008 16:23:12 +0000 Subject: [issue3997] zipfile and winzip In-Reply-To: <1222701058.88.0.102455918408.issue3997@psf.upfronthosting.co.za> Message-ID: <1224778992.77.0.161741904681.issue3997@psf.upfronthosting.co.za> vali added the comment: I could verify that the patch works with both the Windows Compress utility, WinZip and 7zip. Thank you! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 20:25:52 2008 From: report at bugs.python.org (nut) Date: Thu, 23 Oct 2008 18:25:52 +0000 Subject: [issue4187] IDLE will not start. In-Reply-To: <1224769799.89.0.110576090297.issue4187@psf.upfronthosting.co.za> Message-ID: <1224786352.05.0.618844413268.issue4187@psf.upfronthosting.co.za> nut added the comment: it same as me. If you can open that please help me. ---------- nosy: +zeromtmu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 20:34:51 2008 From: report at bugs.python.org (Guilherme Polo) Date: Thu, 23 Oct 2008 18:34:51 +0000 Subject: [issue4187] IDLE will not start. In-Reply-To: <1224769799.89.0.110576090297.issue4187@psf.upfronthosting.co.za> Message-ID: <1224786891.09.0.517451104863.issue4187@psf.upfronthosting.co.za> Guilherme Polo added the comment: Closing this in favor of issue4017. Check if anything there works for you, or add something new. ---------- nosy: +gpolo resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 21:30:28 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 23 Oct 2008 19:30:28 +0000 Subject: [issue4184] Remove use of private attributes in smtpd In-Reply-To: <1224724634.09.0.0444621109477.issue4184@psf.upfronthosting.co.za> Message-ID: <1224790228.97.0.745553208925.issue4184@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 21:31:32 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 23 Oct 2008 19:31:32 +0000 Subject: [issue4171] SSL handshake fails after TCP connection in getpeername() In-Reply-To: <1224675444.68.0.815389836032.issue4171@psf.upfronthosting.co.za> Message-ID: <1224790292.67.0.303102808795.issue4171@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola, janssen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 22:24:47 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 23 Oct 2008 20:24:47 +0000 Subject: [issue4017] Tkinter cannot find Tcl/Tk on Mac OS X In-Reply-To: <1222960590.08.0.635891151551.issue4017@psf.upfronthosting.co.za> Message-ID: <1224793487.7.0.87619918794.issue4017@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Assigning to Ronald. I all that needs to be done, it have the installers built correctly. ---------- assignee: -> ronaldoussoren nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 22:28:23 2008 From: report at bugs.python.org (Guilherme Polo) Date: Thu, 23 Oct 2008 20:28:23 +0000 Subject: [issue4188] Lib/threading.py causes infinite recursion when running as verbose In-Reply-To: <1224793703.28.0.169476277835.issue4188@psf.upfronthosting.co.za> Message-ID: <1224793703.28.0.169476277835.issue4188@psf.upfronthosting.co.za> New submission from Guilherme Polo : Lib/threading.py gets into infinite recursion while testing (or using) it with verbose set. This didn't happen before because Thread.__started didn't use to be an Event, but now it is. Typical situation: _DummyThread calls _Thread__started.set, which calls __started.__cond.notify_all(), which calls __cond.notify(). If there are no waiters, it calls _Verbose._note, which calls currentThread, but if there is no current thread _DummyThread is called, which calls _Thread__started.set ... ---------- components: Library (Lib) files: move_Thread__started.diff keywords: patch messages: 75149 nosy: gpolo severity: normal status: open title: Lib/threading.py causes infinite recursion when running as verbose versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file11869/move_Thread__started.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 23 23:07:13 2008 From: report at bugs.python.org (Jeffrey Harris) Date: Thu, 23 Oct 2008 21:07:13 +0000 Subject: [issue4189] Tilde compression isn't applied in TOC In-Reply-To: <1224796033.71.0.204844693671.issue4189@psf.upfronthosting.co.za> Message-ID: <1224796033.71.0.204844693671.issue4189@psf.upfronthosting.co.za> New submission from Jeffrey Harris : When Sphinx builds TOC nodes, it isn't applying the tilde rule (use only the last dotted name). For example compare the heading for: http://people.osafoundation.org/~jeffrey/rearch_documentation/Chandler-Platform/Core.html#the-dashboardentry-class to the table of contents at the top of the page, or to the node's link on: http://people.osafoundation.org/~jeffrey/rearch_documentation/Chandler-Platform/README.html ---------- assignee: georg.brandl components: Documentation tools (Sphinx) messages: 75150 nosy: georg.brandl, jeffreyharris severity: normal status: open title: Tilde compression isn't applied in TOC type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 01:23:35 2008 From: report at bugs.python.org (Andrew Shaw) Date: Thu, 23 Oct 2008 23:23:35 +0000 Subject: [issue4190] IDLE (2.6) doesn't stay open In-Reply-To: <1224804214.95.0.696961059399.issue4190@psf.upfronthosting.co.za> Message-ID: <1224804214.95.0.696961059399.issue4190@psf.upfronthosting.co.za> New submission from Andrew Shaw : Downloaded Python 2.6 for Mac OS X. When launching IDLE.app, it puts the icon on the dock for a second, then disappears. Nothing else ever happens. X11 does not open either. ---------- components: IDLE messages: 75151 nosy: andrew.t.shaw7 severity: normal status: open title: IDLE (2.6) doesn't stay open type: crash versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 01:24:46 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 23 Oct 2008 23:24:46 +0000 Subject: [issue4190] IDLE (2.6) doesn't stay open In-Reply-To: <1224804214.95.0.696961059399.issue4190@psf.upfronthosting.co.za> Message-ID: <1224804286.89.0.0308509905194.issue4190@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Duplicate of #4017. ---------- nosy: +benjamin.peterson resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 01:28:36 2008 From: report at bugs.python.org (Mark Hammond) Date: Thu, 23 Oct 2008 23:28:36 +0000 Subject: [issue4120] Do not embed manifest files in *.pyd when compiling with MSVC In-Reply-To: <1223971312.31.0.131537865896.issue4120@psf.upfronthosting.co.za> Message-ID: <1224804516.19.0.584829283395.issue4120@psf.upfronthosting.co.za> Mark Hammond added the comment: I don't see a problem with this and can see how it would help with private assemblies. ---------- nosy: +mhammond _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 09:50:33 2008 From: report at bugs.python.org (monk.e.boy) Date: Fri, 24 Oct 2008 07:50:33 +0000 Subject: [issue4191] urlparse normalize URL path In-Reply-To: <1224834633.73.0.450098014303.issue4191@psf.upfronthosting.co.za> Message-ID: <1224834633.73.0.450098014303.issue4191@psf.upfronthosting.co.za> New submission from monk.e.boy : Hi, The way urljoin works is a bit funky, equivalent paths do not get cleaned in a consistent way: import urlparse import posixpath print urlparse.urljoin('http://www.example.com', '///') print urlparse.urljoin('http://www.example.com/', '///') print urlparse.urljoin('http://www.example.com///', '///') print urlparse.urljoin('http://www.example.com///', '//') print urlparse.urljoin('http://www.example.com///', '/') print urlparse.urljoin('http://www.example.com///', '') print # the above should reduce down to: print posixpath.normpath('///') print print urlparse.urljoin('http://www.example.com///', '.') print urlparse.urljoin('http://www.example.com///', '/.') print urlparse.urljoin('http://www.example.com///', './') print urlparse.urljoin('http://www.example.com///', '/.') print print posixpath.normpath('/.') print print urlparse.urljoin('http://www.example.com///', '..') print urlparse.urljoin('http://www.example.com', '/a/../a/') print urlparse.urljoin('http://www.example.com', '../') print urlparse.urljoin('http://www.example.com', 'a/../a/') print urlparse.urljoin('http://www.example.com', 'a/../a/./') print urlparse.urljoin('http://www.example.com/a/../a/', '../a/./../a/') print urlparse.urljoin('http://www.example.com/a/../a/', '/../a/./../a/') The results of the above code are: http://www.example.com/ http://www.example.com/ http://www.example.com/ http://www.example.com/// http://www.example.com/ http://www.example.com/// / http://www.example.com/// http://www.example.com/. http://www.example.com/// http://www.example.com/. / http://www.example.com http://www.example.com/. http://www.example.com http://www.example.com/. http://www.example.com// http://www.example.com/a/../a/ http://www.example.com/../ http://www.example.com/a/ http://www.example.com/a/ http://www.example.com/a/ http://www.example.com/../a/./../a/ Sometimes the path is cleaned, sometimes it is not. When it is cleaned, the cleaning process is not perfect. The bit of code that is causing problems is commented: # XXX The stuff below is bogus in various ways... If I may be so bold, I would like to see this URL cleaning code stripped from urljoin. A new method/function could be added that cleans a URL. It could have a 'mimic browser' option, because a browser *will* follow URLs like: http://example.com/../../../ (see this non-bug http://bugs.python.org/issue2583 ) The URL cleaner could use some of the code from "posixpath". Shorter URLs would be preferred over longer (e.g: http://example.com preferred to http://example.com/ ) Thanks, monk.e.boy ---------- messages: 75154 nosy: monk.e.boy severity: normal status: open title: urlparse normalize URL path versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 11:29:00 2008 From: report at bugs.python.org (Andre Heider) Date: Fri, 24 Oct 2008 09:29:00 +0000 Subject: [issue4120] Do not embed manifest files in *.pyd when compiling with MSVC In-Reply-To: <1223971312.31.0.131537865896.issue4120@psf.upfronthosting.co.za> Message-ID: <1224840540.62.0.21335890642.issue4120@psf.upfronthosting.co.za> Andre Heider added the comment: I tried to use _CRT_NOFORCE_MANIFEST but i couldn't get it working. There're some infos about this approach at http://blog.m-ri.de/index.php/2008/05/06/hotfix-fuer-usemsprivateassembliesh-und-vc-2008/ , but even with the mentioned "__declspec(selectany) int _forceCRTManifest[RTM];" statement, i wasn't able to suppress the manifest dependency :( Microsoft, in its infinite wisdom, decided to compile the CRT itself with those #pragma's enabled. That puts the "/manifestdependency" linker arguments in msvcrt.lib. When you link against that file you get that CRT manifest entry, whether you like it or not :( Looks like _CRT_NOFORCE_MANIFEST only works if you build your own CRT without the #pragma's. Of course that only applies to the dynamic version of the CRT, when using /MT the manifest hell just vanishes. I'm unsure what the best way to fix this issue for python is... _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 11:32:13 2008 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 24 Oct 2008 09:32:13 +0000 Subject: [issue3714] nntplib module broken by str to unicode conversion In-Reply-To: <1219932621.55.0.439111476187.issue3714@psf.upfronthosting.co.za> Message-ID: <1224840733.96.0.390762608541.issue3714@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- priority: deferred blocker -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 11:52:25 2008 From: report at bugs.python.org (=?utf-8?q?Mart_S=C3=B5mermaa?=) Date: Fri, 24 Oct 2008 09:52:25 +0000 Subject: [issue3518] multiprocessing: BaseManager.from_address documented but doesn't exist In-Reply-To: <1218131168.54.0.934616092257.issue3518@psf.upfronthosting.co.za> Message-ID: <1224841945.85.0.28812877642.issue3518@psf.upfronthosting.co.za> Mart S?mermaa added the comment: I propose we add the following to that section as well. If you need to provide access to a queue from both local and remote processes, use `multiprocessing.Queue` in the server: >>> from multiprocessing import Process, Queue >>> from multiprocessing.managers import BaseManager >>> class Worker(Process): ... def __init__(self, q): ... self.q = q ... super(Worker, self).__init__() ... def run(self): ... self.q.put('local hello') ... >>> q = Queue() >>> w = Worker(q) >>> w.start() >>> class QueueManager(BaseManager): pass ... >>> QueueManager.register('getQueue', callable=lambda: q) >>> m = QueueManager(address=('', 50000), authkey='abracadabra') >>> s = m.get_server() >>> s.serve_forever() Use it in the client as shown above: >>> from multiprocessing.managers import BaseManager >>> class QueueManager(BaseManager): pass ... >>> QueueManager.register('getQueue') >>> m = QueueManager(address=('localhost', 50000), authkey='abracadabra') >>> m.connect() >>> q = m.getQueue() >>> q.get() 'local hello' >>> q.put('remote hello') _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 12:06:55 2008 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 Oct 2008 10:06:55 +0000 Subject: [issue3714] nntplib module broken by str to unicode conversion In-Reply-To: <1219932621.55.0.439111476187.issue3714@psf.upfronthosting.co.za> Message-ID: <1224842815.19.0.922426655809.issue3714@psf.upfronthosting.co.za> STINNER Victor added the comment: As I did for POP3 (poplib) and IMAP4 (imaplib), nntplib should use bytes instead of characters because the charset may be different for each message and nntplib is unable to retreive the charset from the email header. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 12:21:05 2008 From: report at bugs.python.org (Roumen Petrov) Date: Fri, 24 Oct 2008 10:21:05 +0000 Subject: [issue4177] Crash in MIMEText on FreeBSD In-Reply-To: <1224700839.13.0.201844476382.issue4177@psf.upfronthosting.co.za> Message-ID: <1224843665.24.0.434204159942.issue4177@psf.upfronthosting.co.za> Roumen Petrov added the comment: what about data segment and stack size limits ? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 13:16:20 2008 From: report at bugs.python.org (Koen van de Sande) Date: Fri, 24 Oct 2008 11:16:20 +0000 Subject: [issue4120] Do not embed manifest files in *.pyd when compiling with MSVC In-Reply-To: <1223971312.31.0.131537865896.issue4120@psf.upfronthosting.co.za> Message-ID: <1224846980.84.0.778904238733.issue4120@psf.upfronthosting.co.za> Koen van de Sande added the comment: OK, so the define is not going to work. For Python extensions built through distutils, the msvc9compiler_stripruntimes.diff patch will work: it will remove just the dependency on the VC90runtimes. It will leave other assembly dependencies if they are there. For the .pyd's and .dll's in the DLLs folder: I have opened them in a hex editor, and just by hand replaced the entry for the VC90runtimes in each file with spaces. I can confirm that this works, also for _tkinter, for which tk85.dll has an additional dependency on Windows Common Controls (though this one was available in my WinSXS). What would be the best way to integrate a search/replace operation like this in the Python build process? Is the manifest generated as a seperate file here first as well, or is it directly embedded? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 13:27:22 2008 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 Oct 2008 11:27:22 +0000 Subject: [issue4177] Crash in MIMEText on FreeBSD In-Reply-To: <1224700839.13.0.201844476382.issue4177@psf.upfronthosting.co.za> Message-ID: <1224847642.01.0.454999889275.issue4177@psf.upfronthosting.co.za> STINNER Victor added the comment: Your example work here on: - Linux, i386, 2 Go of memory, Python 2.5 - FreeBSD in Qemu, i386, 512 MB of memory, Python 2.5 > The program just eat all the CPU and with high memory usage or raise a MemoryError Yes, it takes one minute or more to finish. If there is not enough memory, Python raises a MemoryError. The behaviour is correct: Python doesn't crash, it's just slow. Your text file is ~40 MB. Python may allocate mutiple objects bigger than 40 MB to create the email content. The algorithm should be changed to work on a stream (process small chunks, eg. 4 KB) instead of manipule the full text in memory (+40,000 KB). Why do you try to send 40 MB by email? Use FTP or another protocol :-p Or use another encoding (base64) to attach the text to the email. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 13:48:44 2008 From: report at bugs.python.org (Dan Dibagh) Date: Fri, 24 Oct 2008 11:48:44 +0000 Subject: [issue2980] Pickle stream for unicode object may contain non-ASCII characters. In-Reply-To: <1211902695.6.0.958731947697.issue2980@psf.upfronthosting.co.za> Message-ID: <1224848924.95.0.115793367096.issue2980@psf.upfronthosting.co.za> Dan Dibagh added the comment: > Which PEP specifically? PEP 263 only mentions the unicode-escape > encoding in its problem statement, i.e. as a pre-existing thing. > It doesn't specify it, nor does it give a rationale for why it behaves > the way it does. PEP 100 and PEP 263. What I looked for was a description of the functional intention and a technical definition of raw unicode escape. The term "raw" tends to have different meanings depending on the context in which it appears. PEP 263 is of interest in the overall understanding of the intention of raw unicode escape. If raw unicode escape is to convert from python source into unicode strings then the decoding of raw unicode escape strings depends on the source code encoding. Then perhaps it would give an idea what the encoding part is supposed to do... PEP 100 is of interest for the technical description. It describes the section "unicode constructors" as the definition. > What code are you looking at, and where do you find it difficult to > follow it? Maybe you get confused between the "unicode-escape" codec, > and the "raw-unicode-escape" codec, also. Since it is the issue with non-ASCII characters in pickle output I look at, it is raw-unicode-escape being in focus. For the decoding bit the distinction between unicode-escape and raw-unicode-escape is very clear. I look at the function PyUnicode_EncodeRawUnicodeEscape in Objects/unicodeobject.c. At the point of the comment "/* Copy everything else as-is */", given the perceived intentions of the encoding type, I try to figure out why there isn't a "/* Map non-printable US ASCII to '\xhh' */" section like in the unicodeescape_string function. The background in older pythons you explained is essentially what I guessed. > The raw-unicode-escape codec? It was designed to support parsing of > Python 2.0 source code, and of "raw" unicode strings (ur"") in > particular. In Python 2.0, you only needed to escape characters above > U+0100; Latin-1 characters didn't need escaping. Python, itself, only > relied on the decoding directory. That the codec choses not to escape > Latin-1 characters on encoding is an arbitrary choice (I guess); it's > still symmetric with decoding. I suppose you mean symmetric with decoding as long as you stick to the latin-1 character set, as raw unicode escaping isn't a one-to-one mapping. When PEP 263 came into the picture, wouldn't it have made sense to change PyUnicode_EncodeRawUnicodeEscape to produce ASCII-only output, or perhaps output conforming to the current default encoding? Given the intention of the raw unicode escape, encoding something with it means producing python source code. But it is in latin-1 while the rest of Python has moved on to use ASCII by default or whatever being configured in the source. I tried to put shine on that problem in my previous example. > Even though the choice was arbitrary, you shouldn't change it now, > because people may rely on how this codec works. > Applications might rely on what was implemented rather than what was > specified. If they had implemented their own pickle readers, such > readers might break if the pickle format is changed. In principle, > even the old pickle readers of Python 2.0..2.6 might break if the >format changes in 2.7 - we would have to go back and check that they don't > break (although I do believe that they would work fine). Then let me ask: How far reaching is the aim to maintain compatibility with programs which depends on Python internals? Even if the internal thing is a bug and the thing which depends on the bug is also a bug? Maybe it is a provoking question, let me explain. The question(s) applies to some extent to the workings of the codec but it is really the pickle problem I think of. In the case of older Python releases, it is just a matter of testing, just as you say. It is boring and perhaps tedious but there is nothing special which prevents it from being done. If there are many versions there ought to be a way to write a program which does it automatically. In the case of those who have implemented their own pickle readers, the source and the comments in pickletools.py clearly states that unicode strings are raw unicode escaped in format 0. Now raw unicode escape isn't a canonical format. The letter A can be represented either as \u0041 or as itself as A. If a hypothetical implementor gets the idea that characters in the range 0-255 cannot be represented by \u00xx sequences then the fact that pickle replaces \ with \u005c and \n with \u000a should give a hint that he is wrong. So if characters in the range 128-255 gets escaped with \u00xx any pickle reader should handle it. I've tried to come up with some sensible way to write a pickle implemenation which fails to understand \u00xx characters without calling it a bug. I cannot. Can you? So it seems that the worry for changing protocol 0 is buggy programs depending on a pickle bug. In the other end of the spectrum there are correct programs with depends on Python externals, ie. programs depending in ASCII-conformant pickle output (even if there are some base64 ...ehm... fundamentalists who think it is the wrong way to do it -- I can think of at least one good reason to do it). > So contributions are welcome. If you find that the patch meets > resistance, you also need to write a PEP, and ask for BDFL > pronouncement. I consider doing a patch. I also understand that in order for the patch to get acceptance it must fit into the Python framework. That's why I ask all these questions. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 14:15:10 2008 From: report at bugs.python.org (Doug Hellmann) Date: Fri, 24 Oct 2008 12:15:10 +0000 Subject: [issue4184] Remove use of private attributes in smtpd In-Reply-To: <1224724634.09.0.0444621109477.issue4184@psf.upfronthosting.co.za> Message-ID: <1224850510.07.0.279001445339.issue4184@psf.upfronthosting.co.za> Changes by Doug Hellmann : ---------- nosy: +doughellmann _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 14:16:48 2008 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 24 Oct 2008 12:16:48 +0000 Subject: [issue639266] Tkinter sliently discards all Tcl errors Message-ID: <1224850608.39.0.284412969589.issue639266@psf.upfronthosting.co.za> Guilherme Polo added the comment: Uhm, long time without discussion but I'm hoping someone interested may read this. You have to provide a "bgerror" command to Tcl, so it will get invoked when a background error happens. Either _tkinter.c could create one for an interpreter is created or Tkinter.py could create one when a Tk instance is created. The command will be invoked with a single argument, the background error message. If you want to play with it: import Tkinter def bgerr_handler(msg): print msg, "<<" root = Tkinter.Tk() root.tk.createcommand("bgerror", bgerr_handler) btn = Tkinter.Button(command="expr 1/0") btn.pack() root.mainloop() To get some form of traceback you would need to play with inspect and traceback modules. But in both cases (in the example above and using inspect) an exception isn't raised at all, and if you try raising then Tcl will think the bgerror handler failed and will tell you that. For this reason I would prefer to leave to _tkinter.c to handle this. ---------- nosy: +gpolo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 14:27:55 2008 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 24 Oct 2008 12:27:55 +0000 Subject: [issue2983] Ttk support for Tkinter In-Reply-To: <1211911032.63.0.360625687085.issue2983@psf.upfronthosting.co.za> Message-ID: <1224851275.53.0.635963151946.issue2983@psf.upfronthosting.co.za> Guilherme Polo added the comment: Now that the new branches are around I guess we could consider adding it then ? I will help with anything. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 14:48:18 2008 From: report at bugs.python.org (=?utf-8?q?S=C3=A9rgio_Surkamp?=) Date: Fri, 24 Oct 2008 12:48:18 +0000 Subject: [issue4177] Crash in MIMEText on FreeBSD In-Reply-To: <1224700839.13.0.201844476382.issue4177@psf.upfronthosting.co.za> Message-ID: <1224852498.06.0.401252645386.issue4177@psf.upfronthosting.co.za> S?rgio Surkamp added the comment: > Your text file is ~40 MB. Python may allocate mutiple objects bigger than 40 MB to create the email content. The algorithm should be changed to work on a stream (process small chunks, eg. 4 KB) instead of manipule the full text in memory (+40,000 KB). The original text block is about 5 to 9 Mbytes - its a server generated report by pflogsum. When it came to our mailing list processing program (wrote by someone else in Python), it freezes building the MIMEText object. Actually no MemoryError isn't raised, just a sudden freeze of the running thread. Unfortunately the test script submited does not do the same behavior, maybe some other things are freezing the software instead of raise the MemoryError. I have checked for blocks of try: ... except ...: pass that could hide the problem, but found nothing. I have already limited the size on Postfix, but the strange thing is why this happens on FreeBSD and don't on Linux. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 15:04:00 2008 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 Oct 2008 13:04:00 +0000 Subject: [issue4177] Crash in MIMEText on FreeBSD In-Reply-To: <1224852498.06.0.401252645386.issue4177@psf.upfronthosting.co.za> Message-ID: <200810241503.53696.victor.stinner@haypocalc.com> STINNER Victor added the comment: > The original text block is about 5 to 9 Mbytes (...), it freezes > building the MIMEText object. Actually no MemoryError isn't raised, > just a sudden freeze of the running thread. Can you give more details about the freeze? - FreeBSD version? - CPU, memory? - Full Python version? On "freeze", the process uses 0% or 100% of the CPU time? You can use the strace program to trace Python activity during the freeze. Your might try my clone of strace, strace.py, which works on FreeBSD without the Linux emulation (but on FreeBSD, only i386 is supported): http://python-ptrace.hachoir.org/trac > Unfortunately the test script submited does not do the same behavior, > maybe some other things are freezing the software instead of raise the > MemoryError. You can try the isolate the bug? Remove some code, disable functions, etc. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 15:17:04 2008 From: report at bugs.python.org (=?utf-8?q?S=C3=A9rgio_Surkamp?=) Date: Fri, 24 Oct 2008 13:17:04 +0000 Subject: [issue4177] Crash in MIMEText on FreeBSD In-Reply-To: <1224700839.13.0.201844476382.issue4177@psf.upfronthosting.co.za> Message-ID: <1224854224.08.0.747710500647.issue4177@psf.upfronthosting.co.za> S?rgio Surkamp added the comment: - FreeBSD version? FreeBSD 7.0-RELEASE - CPU, memory? CPU: 2 x Pentium III 1.133 GHz Memory: 512 Mbytes - Full Python version? Python 2.5.2 (r252:60911, Oct 2 2008, 10:03:50) [GCC 4.2.1 20070719 [FreeBSD]] on freebsd7 > On "freeze", the process uses 0% or 100% of the CPU time? You can use the strace program to trace Python activity during the freeze. Usually 100%. But saw it with more (using both CPU's), I think that mean more then one thread "freezed". I will download your trace program and do some tests with it. Ill try to collect some informations using GDB too. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 15:24:28 2008 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 Oct 2008 13:24:28 +0000 Subject: [issue4177] Crash in MIMEText on FreeBSD In-Reply-To: <1224854224.08.0.747710500647.issue4177@psf.upfronthosting.co.za> Message-ID: <200810241524.42663.victor.stinner@haypocalc.com> STINNER Victor added the comment: > Usually 100%. But saw it with more (using both CPU's), I think that mean > more then one thread "freezed". Does the program finish its job after 10 minutes or 1 hour? Using all the CPU doesn't mean that Python is frozen, it's the opposite: Python is working hard to compute the result :-) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 15:39:47 2008 From: report at bugs.python.org (=?utf-8?q?S=C3=A9rgio_Surkamp?=) Date: Fri, 24 Oct 2008 13:39:47 +0000 Subject: [issue4177] Crash in MIMEText on FreeBSD In-Reply-To: <1224700839.13.0.201844476382.issue4177@psf.upfronthosting.co.za> Message-ID: <1224855587.83.0.186887581194.issue4177@psf.upfronthosting.co.za> S?rgio Surkamp added the comment: When I first saw the problem, the email system queue was stopped about 2 days (weekend) :-( The email system control the number of open threads, so I wasn't opening new threads too and issuing many warnings about it on logs Anyway, already installed the ptrace tool and Ill start debuging when I came back from launch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 17:23:20 2008 From: report at bugs.python.org (Pascal Chambon) Date: Fri, 24 Oct 2008 15:23:20 +0000 Subject: [issue4192] Subprocess error with I/O redirection to Pipes In-Reply-To: <1224861800.81.0.399738040895.issue4192@psf.upfronthosting.co.za> Message-ID: <1224861800.81.0.399738040895.issue4192@psf.upfronthosting.co.za> New submission from Pascal Chambon : I've created on my desktop a file flooder.py containing just the following: ################## import sys, os progress=open(r"C:\Users\v-pascha\Desktop\STDERR.txt","w") for i in range(101): print str(i)*20 progress.write( str(i)+"\n" ) progress.close() ################## and a file receiver.py containing just : ################ import sys, os, subprocess #os.system("pause") subprocess.Popen(r"python C:\Users\v-pascha\Desktop\flooder.py",stdin=subprocess.PIPE,stdout=subprocess.PIPE) #,stdin=subprocess.PIPE,stdout=subprocess.PIPE #os.system("pause") ##################### And when I launch receiver.py, I get a crash with that (not explicit) message : "close failed in file object destructor: Error in sys.excepthook: Original exception was:" The crash doesn't happen if I don't redirect the stdout and stdin of the child process. So it seems something weird happens when subprocess tries to redirect the child's I/O to the PIPEs... ---------- components: Library (Lib), Windows messages: 75169 nosy: pakal severity: normal status: open title: Subprocess error with I/O redirection to Pipes type: crash versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 18:28:44 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 24 Oct 2008 16:28:44 +0000 Subject: [issue2983] Ttk support for Tkinter In-Reply-To: <1224851275.53.0.635963151946.issue2983@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Fri, Oct 24, 2008 at 5:27 AM, Guilherme Polo wrote: > > Guilherme Polo added the comment: > > Now that the new branches are around I guess we could consider adding it > then ? I will help with anything. > Yes, we can consider adding this now. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 18:47:15 2008 From: report at bugs.python.org (Bob Ippolito) Date: Fri, 24 Oct 2008 16:47:15 +0000 Subject: [issue4136] merge json library with simplejson 2.0.3 In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1224866835.68.0.567052862087.issue4136@psf.upfronthosting.co.za> Bob Ippolito added the comment: Attached is a new diff, one byte fix to the float parser when parsing JSON documents that are just a float (also a test and a version bump). Added file: http://bugs.python.org/file11870/json_issue4136_r67009.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 18:48:08 2008 From: report at bugs.python.org (Bob Ippolito) Date: Fri, 24 Oct 2008 16:48:08 +0000 Subject: [issue4136] merge json library with simplejson 2.0.4 In-Reply-To: <1224194929.7.0.263636117378.issue4136@psf.upfronthosting.co.za> Message-ID: <1224866888.21.0.233188901295.issue4136@psf.upfronthosting.co.za> Changes by Bob Ippolito : ---------- title: merge json library with simplejson 2.0.3 -> merge json library with simplejson 2.0.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 18:54:37 2008 From: report at bugs.python.org (David W. Lambert) Date: Fri, 24 Oct 2008 16:54:37 +0000 Subject: [issue4193] Multiprocessing example In-Reply-To: <1224867277.0.0.802822144442.issue4193@psf.upfronthosting.co.za> Message-ID: <1224867277.0.0.802822144442.issue4193@psf.upfronthosting.co.za> New submission from David W. Lambert : http://docs.python.org/dev/3.0/library/multiprocessing.html I'm sure the examples have been thoughtfully contrived. Still, this seems instructive without adding much complexity. I'd change the first "trivial example" to ########################################### from multiprocessing import Process import os def info(title): print(title) print('module name:',__name__) print('parent process:',os.getppid()) print('process id:',os.getpid()) print() def f(name): info('function f') print('hello', name) if __name__ == '__main__': info('main line') p = Process(target=f, args=('bob',)) p.start() p.join() ########################################### with output similar to main line module name: __main__ parent process: 12926 process id: 17002 function f module name: __main__ parent process: 17002 process id: 17004 hello bob ---------- assignee: georg.brandl components: Documentation messages: 75172 nosy: LambertDW, georg.brandl severity: normal status: open title: Multiprocessing example type: feature request versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 19:54:42 2008 From: report at bugs.python.org (Skip Montanaro) Date: Fri, 24 Oct 2008 17:54:42 +0000 Subject: [issue4194] Miserable subprocess.Popen performance In-Reply-To: <18690.3034.472764.227788@montanaro-dyndns-org.local> Message-ID: <18690.3034.472764.227788@montanaro-dyndns-org.local> New submission from Skip Montanaro : I noticed a colleague at work today checked in a change to his code to switch back from subprocess.Popen to os.popen. I asked him about it and he reported that subprocess.Popen was about 10x slower than os.popen. I asked him for a simple test case, which is attached. Here are my results with Python 2.4 through 2.7 (aka CVS HEAD): tmp% python2.4 popentest.py time with os.popen : 0.09 time with subprocess.Popen : 2.27 tmp% python2.5 popentest.py time with os.popen : 0.03 time with subprocess.Popen : 1.52 tmp% python2.6 popentest.py time with os.popen : 0.038824 time with subprocess.Popen : 1.517056 tmp% python2.7 popentest.py time with os.popen : 0.033746 time with subprocess.Popen : 1.512331 These times are on my Mac laptop, all writing to the local disk. It seems there was a bit of improvement in the 2.5 release but that it is still miserably slow when compared with os.popen. His original test used time.clock() as the timer. I changed to time.time() but got essentially the same result. Skip ---------- files: popentest.py messages: 75173 nosy: skip.montanaro severity: normal status: open title: Miserable subprocess.Popen performance Added file: http://bugs.python.org/file11871/popentest.py _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: popentest.py URL: From report at bugs.python.org Fri Oct 24 20:17:35 2008 From: report at bugs.python.org (kai zhu) Date: Fri, 24 Oct 2008 18:17:35 +0000 Subject: [issue3238] backport python 3.0 language functionality to python 2.6 by adding 7 opcodes to ceval.c In-Reply-To: <1214770027.24.0.542856927114.issue3238@psf.upfronthosting.co.za> Message-ID: <1224872255.09.0.697015000638.issue3238@psf.upfronthosting.co.za> kai zhu added the comment: post fyi: here's moderately complex python-3.0 script (plus curry extension) i wrote using numpy, PIL, & scipy.weave 2.6 extensions. it takes a jpeg, gif... image file & outputs it in colorized ascii art. the actual purpose is for colorized 3-d scientific plottin in text terminal (screenshots of image conversion & 3d plots in putty terminal included) usage: python -c "import py3to2; import img2txt; img2txt.img2txt.test()" python -c "import py3to2; import img2txt; img2txt.tplot3d.test()" Added file: http://bugs.python.org/file11872/img2txt mario.jpg screenshot.gif _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 20:20:10 2008 From: report at bugs.python.org (kai zhu) Date: Fri, 24 Oct 2008 18:20:10 +0000 Subject: [issue3238] backport python 3.0 language functionality to python 2.6 by adding 7 opcodes to ceval.c In-Reply-To: <1214770027.24.0.542856927114.issue3238@psf.upfronthosting.co.za> Message-ID: <1224872410.74.0.451705190535.issue3238@psf.upfronthosting.co.za> Changes by kai zhu : Added file: http://bugs.python.org/file11873/img2txt 3dplot screenshot.gif _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 20:21:33 2008 From: report at bugs.python.org (kai zhu) Date: Fri, 24 Oct 2008 18:21:33 +0000 Subject: [issue3238] backport python 3.0 language functionality to python 2.6 by adding 7 opcodes to ceval.c In-Reply-To: <1214770027.24.0.542856927114.issue3238@psf.upfronthosting.co.za> Message-ID: <1224872493.55.0.471986831498.issue3238@psf.upfronthosting.co.za> Changes by kai zhu : Added file: http://bugs.python.org/file11874/img2txt.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 20:28:24 2008 From: report at bugs.python.org (kai zhu) Date: Fri, 24 Oct 2008 18:28:24 +0000 Subject: [issue3238] backport python 3.0 language functionality to python 2.6 by adding 7 opcodes to ceval.c In-Reply-To: <1214770027.24.0.542856927114.issue3238@psf.upfronthosting.co.za> Message-ID: <1224872904.98.0.220923172222.issue3238@psf.upfronthosting.co.za> Changes by kai zhu : Added file: http://bugs.python.org/file11875/mario.jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 20:30:29 2008 From: report at bugs.python.org (Sameer) Date: Fri, 24 Oct 2008 18:30:29 +0000 Subject: [issue4194] Miserable subprocess.Popen performance In-Reply-To: <18690.3034.472764.227788@montanaro-dyndns-org.local> Message-ID: <1224873029.54.0.0741035399629.issue4194@psf.upfronthosting.co.za> Changes by Sameer : ---------- nosy: +sameerd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 20:44:59 2008 From: report at bugs.python.org (vajda) Date: Fri, 24 Oct 2008 18:44:59 +0000 Subject: [issue4195] Regression for executing packages In-Reply-To: <1224873899.8.0.177595218059.issue4195@psf.upfronthosting.co.za> Message-ID: <1224873899.8.0.177595218059.issue4195@psf.upfronthosting.co.za> New submission from vajda : Copy of #2751. Having discussed this with Nick a bit more over email, he suggested that package execution could actually be properly supported by looking for a __main__ module inside the package and executing it instead. This is consistent with the way .zip archives are executed and would neatly resolve this problem. I attached a simple patch implementing this. Nick also said that fixing this might be considered a new feature and might have to wait until 2.7. Given that this worked on Python 2.5, albeit unintentionally, I'd argue that this is closer to a fix of a somewhat buggy Python 2.5 feature than a new feature in 2.6. ---------- components: Interpreter Core files: patch.2751 messages: 75175 nosy: benjamin.peterson, ncoghlan, vajda severity: normal status: open title: Regression for executing packages type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file11876/patch.2751 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 20:47:36 2008 From: report at bugs.python.org (David W. Lambert) Date: Fri, 24 Oct 2008 18:47:36 +0000 Subject: [issue4196] library documentation errors In-Reply-To: <1224874056.75.0.148579483822.issue4196@psf.upfronthosting.co.za> Message-ID: <1224874056.75.0.148579483822.issue4196@psf.upfronthosting.co.za> New submission from David W. Lambert : 4 problems noted here. Thanks, Dave. 1,2---problems 1 & 2 concern py<3k references: http://docs.python.org/dev/3.0/library/multiprocessing.html 1) "apply(func[, args[, kwds]]) Equivalent of the apply() builtin function. It blocks till the result is ready." Of course there isn't any longer an "apply" builtin. 2) "imap(func, iterable[, chunksize]) An equivalent of itertools.imap()." Likewise, there's no "itertools.imap". Perhaps use itertools.some_sort_of_truncating_wrapper(itertools.zip_longest(...))? This brings us to the itertools problem. 3,4---problems 3 & 4 concern "izip" in: http://docs.python.org/dev/3.0/library/itertools.html This mentions "izip_longest()", but there isn't an "izip_anything" in py3k itertools. Searching the page for the string "izip" produces two separate occurrences. izip_longest -> zip_longest but I don't know how to fix the other one. ---------- assignee: georg.brandl components: Documentation messages: 75176 nosy: LambertDW, georg.brandl severity: normal status: open title: library documentation errors versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 20:55:26 2008 From: report at bugs.python.org (Winfried Plappert) Date: Fri, 24 Oct 2008 18:55:26 +0000 Subject: [issue4194] Miserable subprocess.Popen performance In-Reply-To: <18690.3034.472764.227788@montanaro-dyndns-org.local> Message-ID: <1224874526.5.0.597640240139.issue4194@psf.upfronthosting.co.za> Winfried Plappert added the comment: Hi Skip, I find different measurements om Windows/XP: I copied the script and ran it under Python 2.5.2 and Python 2.6 (as downloaded from http://python.org/ftp/python/2.6/python-2.6.msi): Plappert at action-time /cygdrive/e/tmp $ python ./timing.py # 2.5.2 time with os.popen : 0.296999931335 time with subprocess.Popen : 0.203000068665 in other words: identical or subprocess.Popen even faster. and it is getting even better with Python2.6: Plappert at action-time /cygdrive/e/tmp $ python26 timing.py # 2.6 time with os.popen : 0.266000032425 time with subprocess.Popen : 0.18700003624 So could that be a Mac OS issue? ---------- nosy: +wplappert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 21:16:39 2008 From: report at bugs.python.org (Skip Montanaro) Date: Fri, 24 Oct 2008 19:16:39 +0000 Subject: [issue4194] Miserable subprocess.Popen performance In-Reply-To: <18690.3034.472764.227788@montanaro-dyndns-org.local> Message-ID: <1224875799.87.0.361236563597.issue4194@psf.upfronthosting.co.za> Skip Montanaro added the comment: Good question. I don't think it's MacOSX-specific. The original problem raised its ugly head on Solaris 10. I don't have quite as many versions of Python available there, but the relative performance is still bad, roughly 0.05 for os.popen and 0.82 for subprocess.Popen. Not as bad as on the Mac, but certainly not as good as what you saw. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 21:25:36 2008 From: report at bugs.python.org (Sameer) Date: Fri, 24 Oct 2008 19:25:36 +0000 Subject: [issue4194] Miserable subprocess.Popen performance In-Reply-To: <18690.3034.472764.227788@montanaro-dyndns-org.local> Message-ID: <1224876336.88.0.135835902002.issue4194@psf.upfronthosting.co.za> Sameer added the comment: The subprocess module does different things depending on whether the systems are Windows or Posix. This could explain the bad performance on Solaris and the Mac and the good performance on Windows. If this is correct, then we should see poor performance on Linux also. Also, I don't have a box to test that out. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 21:35:08 2008 From: report at bugs.python.org (Skip Montanaro) Date: Fri, 24 Oct 2008 19:35:08 +0000 Subject: [issue4194] Miserable subprocess.Popen performance In-Reply-To: <18690.3034.472764.227788@montanaro-dyndns-org.local> Message-ID: <1224876908.23.0.993083575792.issue4194@psf.upfronthosting.co.za> Skip Montanaro added the comment: Good suggestion Sameer. I tried it out with Python 2.5 on a Linux host here and saw essentially identical results for the two alternatives (~ 0.08s). S _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 21:53:50 2008 From: report at bugs.python.org (Bill Janssen) Date: Fri, 24 Oct 2008 19:53:50 +0000 Subject: [issue4171] SSL handshake fails after TCP connection in getpeername() In-Reply-To: <1224675444.68.0.815389836032.issue4171@psf.upfronthosting.co.za> Message-ID: <1224878030.72.0.897237492016.issue4171@psf.upfronthosting.co.za> Changes by Bill Janssen : ---------- assignee: -> janssen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 21:58:07 2008 From: report at bugs.python.org (David W. Lambert) Date: Fri, 24 Oct 2008 19:58:07 +0000 Subject: [issue4194] Miserable subprocess.Popen performance In-Reply-To: <18690.3034.472764.227788@montanaro-dyndns-org.local> Message-ID: <1224878287.64.0.0509789106455.issue4194@psf.upfronthosting.co.za> David W. Lambert added the comment: cygwin Python 2.5.1 (similar) time with os.popen : 0.439999818802 time with subprocess.Popen : 0.361000061035 linux python 2.4.2 (similar) time with os.popen : 0.0344939231873 time with subprocess.Popen : 0.0354421138763 linux python3K (both awful) time with os.popen : 0.715471029282 time with subprocess.Popen : 1.58627915382 ---------- nosy: +LambertDW _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 22:44:34 2008 From: report at bugs.python.org (Skip Montanaro) Date: Fri, 24 Oct 2008 20:44:34 +0000 Subject: [issue4194] Miserable subprocess.Popen performance In-Reply-To: <18690.3034.472764.227788@montanaro-dyndns-org.local> Message-ID: <1224881074.4.0.291930900966.issue4194@psf.upfronthosting.co.za> Skip Montanaro added the comment: I don't expect Python3 to be all that great io performance-wise yet. Still, for me on the Mac os.popen beats subprocess.Popen pretty handily: % python3.0 popentest.py time with os.popen : 0.874988 time with subprocess.Popen : 2.112976 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 23:51:07 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 24 Oct 2008 21:51:07 +0000 Subject: [issue4120] Do not embed manifest files in *.pyd when compiling with MSVC In-Reply-To: <1224846980.84.0.778904238733.issue4120@psf.upfronthosting.co.za> Message-ID: <49024347.4020809@v.loewis.de> Martin v. L?wis added the comment: > What would be the best way to integrate a search/replace > operation like this in the Python build process? Is the manifest > generated as a seperate file here first as well, or is it directly > embedded? What's wrong with Andre Heider's patch? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 23:52:23 2008 From: report at bugs.python.org (Winfried Plappert) Date: Fri, 24 Oct 2008 21:52:23 +0000 Subject: [issue4194] Miserable subprocess.Popen performance In-Reply-To: <18690.3034.472764.227788@montanaro-dyndns-org.local> Message-ID: <1224885143.31.0.0953353987804.issue4194@psf.upfronthosting.co.za> Winfried Plappert added the comment: Here are my figures from a different processor on Linux (Ubuntu): wplapper at lin-wpl:~/python$ python2.5 popentest.py time with os.popen : 0.0478880405426 time with subprocess.Popen : 0.0596849918365 wplapper at lin-wpl:~/python$ python2.6 popentest.py time with os.popen : 0.0481159687042 time with subprocess.Popen : 0.0592260360718 uname -a: ... 2.6.24-19-generic #1 SMP Wed Aug 20 22:56:21 UTC 2008 i686 GNU/Linux _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 23:58:43 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Fri, 24 Oct 2008 21:58:43 +0000 Subject: [issue3238] backport python 3.0 language functionality to python 2.6 by adding 7 opcodes to ceval.c In-Reply-To: <1224872905.09.0.598250205092.issue3238@psf.upfronthosting.co.za> Message-ID: <49024510.90207@v.loewis.de> Martin v. L?wis added the comment: > Added file: http://bugs.python.org/file11875/mario.jpg Please don't use the bug tracker to upload unrelated code (such as Numpy code - Numpy is not part of Python core). I'm tempted to mark all these images as spam. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 24 23:59:37 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 24 Oct 2008 21:59:37 +0000 Subject: [issue4197] Doctest module does not work with zipped packages In-Reply-To: <1224885577.37.0.0757752980748.issue4197@psf.upfronthosting.co.za> Message-ID: <1224885577.37.0.0757752980748.issue4197@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : With attached teestmodule.zip and svn revision 67006, $ ./python.exe testmodule.zip Traceback (most recent call last): File "/Users/sasha/Work/python-svn/trunk/Lib/runpy.py", line 121, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/Users/sasha/Work/python-svn/trunk/Lib/runpy.py", line 34, in _run_code exec code in run_globals File "testmodule.zip/__main__.py", line 7, in File "/Users/sasha/Work/python-svn/trunk/Lib/doctest.py", line 1817, in testmod for test in finder.find(m, name, globs=globs, extraglobs=extraglobs): File "/Users/sasha/Work/python-svn/trunk/Lib/doctest.py", line 842, in find self._find(tests, obj, name, module, source_lines, globs, {}) File "/Users/sasha/Work/python-svn/trunk/Lib/doctest.py", line 884, in _find test = self._get_test(obj, name, module, globs, source_lines) File "/Users/sasha/Work/python-svn/trunk/Lib/doctest.py", line 965, in _get_test if filename[-4:] in (".pyc", ".pyo"): TypeError: 'NoneType' object is unsubscriptable ---------- components: Library (Lib) files: testmodule.zip messages: 75186 nosy: belopolsky severity: normal status: open title: Doctest module does not work with zipped packages type: crash versions: Python 2.7 Added file: http://bugs.python.org/file11877/testmodule.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 00:03:53 2008 From: report at bugs.python.org (dawidjoubert) Date: Fri, 24 Oct 2008 22:03:53 +0000 Subject: [issue4198] os.path.normcase gets fooled on windows with mapped linux network drive In-Reply-To: <1224885833.7.0.0397055051655.issue4198@psf.upfronthosting.co.za> Message-ID: <1224885833.7.0.0397055051655.issue4198@psf.upfronthosting.co.za> New submission from dawidjoubert : The documentation for os.path.normcase reads the case gets normalized based on the file system http://docs.python.org/dev/library/os.path.html Current documentation: Normalize the case of a pathname. On Unix, this returns the path unchanged; on case-insensitive filesystems, it converts the path to lowercase. On Windows, it also converts forward slashes to backward slashes. Problem: When mounting a network drive (via Samba) onto windows the mapped network drive will claim to be an NTFS network (on Windows XP). Where the network drive is actually a Samba share this can cause problems with case sensitivity versus case insensitivity. More: The Windows based file systems such as FAT, FAT32 and NTFS are as a matter of fact case preservant but case insensitive. That is a file saved with the name 'MyName' will retain its name as 'MyName' and a ls (dir) command will returnr the file as 'MyName' however access to 'Myname' or 'myname' or 'MYNAME' will all still access the same file. Solution: I suggest we drop converting the case to lower case where the file systems FAT, FAT32 and NTFS are involved ---------- components: Windows messages: 75187 nosy: dawidjoubert severity: normal status: open title: os.path.normcase gets fooled on windows with mapped linux network drive type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 00:07:07 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 24 Oct 2008 22:07:07 +0000 Subject: [issue4197] Doctest module does not work with zipped packages In-Reply-To: <1224885577.37.0.0757752980748.issue4197@psf.upfronthosting.co.za> Message-ID: <1224886027.86.0.636061431276.issue4197@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Attached patch addresses the crash, but two issues remain: $ ./python.exe testmodule.zip ********************************************************************** File "__main__", line ?, in __main__.c Failed example: 'line 2' Expected nothing Got: 'line 2' ********************************************************************** 1 items had failures: 1 of 1 in __main__.c ***Test Failed*** 1 failures. The line number for the failed example cannot be found and file name is reported as __main__.c instead of __main__.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 00:07:44 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 24 Oct 2008 22:07:44 +0000 Subject: [issue4197] Doctest module does not work with zipped packages In-Reply-To: <1224885577.37.0.0757752980748.issue4197@psf.upfronthosting.co.za> Message-ID: <1224886064.3.0.892837991225.issue4197@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- keywords: +patch Added file: http://bugs.python.org/file11878/doctest.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 00:12:45 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 24 Oct 2008 22:12:45 +0000 Subject: [issue4197] Doctest module does not work with zipped packages In-Reply-To: <1224885577.37.0.0757752980748.issue4197@psf.upfronthosting.co.za> Message-ID: <1224886365.24.0.0233632341273.issue4197@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: The next patch, doctest-1.patch addresses the line number issue, but the file name is still wrong. $ ./python.exe testmodule.zip ********************************************************************** File "__main__", line 2, in __main__.c Failed example: 'line 2' Expected nothing Got: 'line 2' ********************************************************************** 1 items had failures: 1 of 1 in __main__.c ***Test Failed*** 1 failures. Added file: http://bugs.python.org/file11879/doctest-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 00:17:14 2008 From: report at bugs.python.org (Winfried Plappert) Date: Fri, 24 Oct 2008 22:17:14 +0000 Subject: [issue4194] Miserable subprocess.Popen performance In-Reply-To: <18690.3034.472764.227788@montanaro-dyndns-org.local> Message-ID: <1224886634.14.0.442385592892.issue4194@psf.upfronthosting.co.za> Winfried Plappert added the comment: Yes, I can confirm that the performance is lousy on Solaris. Solaris-9/Python 2.5.1: time with os.popen : 0.124045133591 time with subprocess.Popen : 1.60335588455 Solaris-9/Python 2.6: time with os.popen : 0.115752220154 time with subprocess.Popen : 1.61768198013 Solaris-10/Python 2.4.4: time with os.popen : 0.124130010605 time with subprocess.Popen : 1.45624995232 Solaris-10/Python 2.6: time with os.popen : 0.113790988922 time with subprocess.Popen : 1.42739701271 All machines are idendital in processor speed: v240. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 00:22:15 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 24 Oct 2008 22:22:15 +0000 Subject: [issue4197] Doctest module does not work with zipped packages In-Reply-To: <1224885577.37.0.0757752980748.issue4197@psf.upfronthosting.co.za> Message-ID: <1224886935.05.0.46930468047.issue4197@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I don't think there is an easy way to fix source file name reporting without injecting __file__ = '/' into the module namespace is zipimporter, but I don't know if any code relies on __file__ set to None. Setting __file__ to (in the test case) testmodule.zip/__main__.py will eliminate the need for the first patch and the second patch will only need to pass globs to linecache.getlines() to fix the line number issue. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 00:29:16 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 24 Oct 2008 22:29:16 +0000 Subject: [issue4196] library documentation errors In-Reply-To: <1224874056.75.0.148579483822.issue4196@psf.upfronthosting.co.za> Message-ID: <1224887356.71.0.482028396712.issue4196@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks for the report! Fixed in r67011. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 00:32:35 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 24 Oct 2008 22:32:35 +0000 Subject: [issue4199] add shorthand global and nonlocal statements In-Reply-To: <1224887535.03.0.272495603252.issue4199@psf.upfronthosting.co.za> Message-ID: <1224887535.03.0.272495603252.issue4199@psf.upfronthosting.co.za> New submission from Benjamin Peterson : PEP 3104 says that the nonlocal and global statements should allow a shorthand. ("global x; x = 3" == "global x = 3") This patch implements that. ---------- components: Interpreter Core files: global_nonlocal_short_assign.patch keywords: patch messages: 75193 nosy: benjamin.peterson priority: high severity: normal status: open title: add shorthand global and nonlocal statements versions: Python 3.1 Added file: http://bugs.python.org/file11880/global_nonlocal_short_assign.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 00:32:35 2008 From: report at bugs.python.org (Koen van de Sande) Date: Fri, 24 Oct 2008 22:32:35 +0000 Subject: [issue4120] Do not embed manifest files in *.pyd when compiling with MSVC In-Reply-To: <1223971312.31.0.131537865896.issue4120@psf.upfronthosting.co.za> Message-ID: <1224887555.15.0.409035163387.issue4120@psf.upfronthosting.co.za> Koen van de Sande added the comment: Ah, I wasn't thinking it through. It is fine for all .pyd of course, because they don't have any extra dependencies. I was thinking of DLLs with extra dependencies (of which there is one, TK85.dll). There, leaving out the manifest will break it. But indeed, the patch is fine for .pyd building. My mistake! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 00:37:31 2008 From: report at bugs.python.org (Winfried Plappert) Date: Fri, 24 Oct 2008 22:37:31 +0000 Subject: [issue4194] Miserable subprocess.Popen performance In-Reply-To: <18690.3034.472764.227788@montanaro-dyndns-org.local> Message-ID: <1224887851.1.0.352509393884.issue4194@psf.upfronthosting.co.za> Changes by Winfried Plappert : ---------- type: -> performance versions: +Python 2.4, Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 00:45:55 2008 From: report at bugs.python.org (Graham Dumpleton) Date: Fri, 24 Oct 2008 22:45:55 +0000 Subject: [issue4200] atexit module not safe in Python 3.0 with multiple interpreters In-Reply-To: <1224888355.2.0.82482284838.issue4200@psf.upfronthosting.co.za> Message-ID: <1224888355.2.0.82482284838.issue4200@psf.upfronthosting.co.za> New submission from Graham Dumpleton : In Python 3.0 the atexit module was translated from Python code to C code. Prior to Python 3.0, because it was implemented at C code level, the list of callbacks was specific to each sub interpreter. In Python 3.0 that appears to no longer be the case, with the list of callbacks being maintained globally as static C variable across all interpreters. The end result is that if a sub interpreter registers an atexit callback, that callback will be called within the context of the main interpreter on call of Py_Finalize(), and not in context of the sub interpreter against which it was registered. Various problems could ensue from this depending on whether or not the sub interpreter had also since been destroyed. Still need to validate the above, but from visual inspection looks to be a problem. Issue found because mod_wsgi will trigger atexit callbacks for a sub interpreter when the sub interpreter is being destroyed. This is because Python prior to 3.0 only did it from the main interpreter. In Python 3.0, this all seems to get messed up now as no isolation between callbacks for each interpreter. For mod_wsgi case, since it is explicitly triggering atexit callbacks for sub interpreter, in doing so it is actually calling all registered atexit callbacks across all interpreters for each sub interpreter being destroyed. They then again get called for Py_Finalize(). Even if mod_wsgi weren't doing this, still a problem that Py_Finalize() calling atexit callbacks in context of main interpreter which were actually associated with sub interpreter. For mod_wsgi, will probably end up installing own 'atexit' module variant in sub interpreters to ensure separation. ---------- components: Interpreter Core messages: 75195 nosy: grahamd severity: normal status: open title: atexit module not safe in Python 3.0 with multiple interpreters type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 00:47:09 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 24 Oct 2008 22:47:09 +0000 Subject: [issue4199] add shorthand global and nonlocal statements In-Reply-To: <1224887535.03.0.272495603252.issue4199@psf.upfronthosting.co.za> Message-ID: <1224888429.47.0.918583111278.issue4199@psf.upfronthosting.co.za> Changes by Benjamin Peterson : Removed file: http://bugs.python.org/file11880/global_nonlocal_short_assign.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 00:49:18 2008 From: report at bugs.python.org (Ben Creech) Date: Fri, 24 Oct 2008 22:49:18 +0000 Subject: [issue2320] Race condition in subprocess using stdin In-Reply-To: <1205760712.39.0.906940637593.issue2320@psf.upfronthosting.co.za> Message-ID: <1224888558.39.0.466034129643.issue2320@psf.upfronthosting.co.za> Ben Creech added the comment: You can trigger this bug without use of stdin=subprocess.PIPE, or for that matter any subprocess.PIPE's, although that makes it worse. (So the name for this issue may be overly specific.) I have seen this happening intermittently in our parallel job manager, and verified the lockup via gdb. I've attached a regression test that should reliably trigger it without use of any pipes for stdin, stderr, or stdout. By kludging subprocess.py with an extra "sleep", we can reliably trigger the race condition. The test launches two children, each from a thread. Since there are no calls to Popen.wait(), the main process should exit quickly, but it never does. Indeed, setting close_fds=True will correct the problem, although there may be rare instances wherein the user wants the child to inherit some file descriptors (for instance, this is how you usually use UNIX domain sockets). The problem is, as hinted at by Adam Olsen, as follows. Say we have two threads, A and B, concurrently executing subprocess.Popen.__init__. In subprocess.Popen._execute_child, thread B is sitting between the following lines: errpipe_read, errpipe_write = os.pipe() self._set_cloexec_flag(errpipe_write) ... when thread A calls fork(). Thus, thread A's child inherits both pipes, and never closes either one when it calls execv. Until thread A's child exits, that errpipe_write handle created in thread B will remain open. So, thread B will not return from the "os.read(errpipe_read...)" line, and thus Popen.__init__ until thread A's child exits. That is surely a bug. On the other hand, it is hard to fix. Ludwig H?hne suggested wrapping the pipe creation and cloexec in a mutex. As indicated by Gregory P. Smith, that will not work reliably, as fork() could be called in one thread while another thread is between those operations. The mutex would have to block the fork from happening during the atomic create/cloexec operations. Additionally, a parent could be creating a stdin output pipe end and stdout/stderr input pipe ends for a particular subprocess. Due to the pooled nature of POSIX file descriptors, if another subprocess is launched in a separate thread, it will inherit those pipe ends! That could cause unforeseen artifacts such as Popen.stdout hanging after termination of the process that stdout was intended (because ANOTHER process also inherited those pipe ends, and is still running). Anyways, like Mr. Olson said, this is a mess. close_fds=True is probably the best option. Perhaps it would be best to add an argument allowing for a list of FD's to NOT close, in case the user is intentionally trying to pass on additional file descriptors (eg UNIX domain sockets). I would vote for a change to set close_fds=True by default, and adding an explicit list of inherited_fds. This is based on the logic that setting close_fds=False is unsafe and should not be default. If that is too extreme, foolish users like myself at least need a huge warning in the documentation, and an inherited_fds parameter would still be useful. ---------- nosy: +bpcreech Added file: http://bugs.python.org/file11881/subprocess_race_condition.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 00:52:22 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 24 Oct 2008 22:52:22 +0000 Subject: [issue4201] Pdb cannot access source code in zipped packages. In-Reply-To: <1224888742.6.0.77067400529.issue4201@psf.upfronthosting.co.za> Message-ID: <1224888742.6.0.77067400529.issue4201@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : With attached test.zip and svn revision 67006, $ ./python.exe test.zip > /Users/sasha/Work/python-svn/trunk/test.zip/__main__.py(2)f() (Pdb) l [EOF] With pdb.patch: $ ./python.exe test.zip > /Users/sasha/Work/python-svn/trunk/test.zip/__main__.py(2)f() -> pass (Pdb) l 1 def f(): 2 -> pass 3 4 import pdb 5 pdb.runcall(f) 6 7 [EOF] ---------- files: test.zip messages: 75197 nosy: belopolsky severity: normal status: open title: Pdb cannot access source code in zipped packages. Added file: http://bugs.python.org/file11882/test.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 00:52:30 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 24 Oct 2008 22:52:30 +0000 Subject: [issue4201] Pdb cannot access source code in zipped packages. In-Reply-To: <1224888742.6.0.77067400529.issue4201@psf.upfronthosting.co.za> Message-ID: <1224888750.71.0.710428406198.issue4201@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- keywords: +patch Added file: http://bugs.python.org/file11883/pdb.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 01:24:46 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 24 Oct 2008 23:24:46 +0000 Subject: [issue4199] add shorthand global and nonlocal statements In-Reply-To: <1224887535.03.0.272495603252.issue4199@psf.upfronthosting.co.za> Message-ID: <1224890686.49.0.782432883134.issue4199@psf.upfronthosting.co.za> Changes by Benjamin Peterson : Added file: http://bugs.python.org/file11884/global_nonlocal_shorthand.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 01:35:36 2008 From: report at bugs.python.org (Mark Hammond) Date: Fri, 24 Oct 2008 23:35:36 +0000 Subject: [issue4015] [patch] make installed scripts executable on windows In-Reply-To: <1222949528.24.0.767744507339.issue4015@psf.upfronthosting.co.za> Message-ID: <1224891336.11.0.822234556306.issue4015@psf.upfronthosting.co.za> Mark Hammond added the comment: I can see how this might be useful, but I agree it should not happen by default, at least until it has been out for a while and feedback is clear that people do want it by default. I'd also like to find a way to pass all args, not just the first 9 - that may well end up a source of bugs for people. It might also be worth considering that setuptools has the ability to create a true executable from a script by using a stub executable. Wouldn't that be better still? In the short term, maybe we should keep this functionality in setuptools etc and let it filter back to distutils as it proves itself? ---------- nosy: +mhammond _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 02:57:58 2008 From: report at bugs.python.org (Christian Heimes) Date: Sat, 25 Oct 2008 00:57:58 +0000 Subject: [issue4200] atexit module not safe in Python 3.0 with multiple interpreters In-Reply-To: <1224888355.2.0.82482284838.issue4200@psf.upfronthosting.co.za> Message-ID: <1224896278.13.0.0556537353625.issue4200@psf.upfronthosting.co.za> Christian Heimes added the comment: Ouch! We totally forgot about sub interpreters during the reimplementation of the atexit module. In my opinion it's a big bug for systems like mod_python and mod_wsgi. However it's too late to fix it for 3.0.0. Perhaps we can fix it in 3.0.1. We always knew that Python 3.0 is going to have some bugs that can only be revealed by 3rd party code. I've added Barry to the nosy list in order to get his opinion as release manager. Do you have a suggestion how the problem should be solved? I'd store the atexit_callback information in PyInterpreterState instead of the module. Maybe Martin's PEP 3121 could come into play to rescue us. By the way PEP 3121 ... does the new module initialization code play nice with multiple sub interpreters? ---------- nosy: +barry, christian.heimes priority: -> critical versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 03:52:58 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 25 Oct 2008 01:52:58 +0000 Subject: [issue4201] Pdb cannot access source code in zipped packages. In-Reply-To: <1224888742.6.0.77067400529.issue4201@psf.upfronthosting.co.za> Message-ID: <1224899578.09.0.435170664242.issue4201@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- components: +Library (Lib) type: -> behavior versions: +Python 2.5.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 03:53:49 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 25 Oct 2008 01:53:49 +0000 Subject: [issue4197] Doctest module does not work with zipped packages In-Reply-To: <1224885577.37.0.0757752980748.issue4197@psf.upfronthosting.co.za> Message-ID: <1224899629.67.0.463393415873.issue4197@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- versions: +Python 2.5.3, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 04:40:44 2008 From: report at bugs.python.org (Graham Dumpleton) Date: Sat, 25 Oct 2008 02:40:44 +0000 Subject: [issue4200] atexit module not safe in Python 3.0 with multiple interpreters In-Reply-To: <1224888355.2.0.82482284838.issue4200@psf.upfronthosting.co.za> Message-ID: <1224902444.58.0.0544431111179.issue4200@psf.upfronthosting.co.za> Graham Dumpleton added the comment: I wouldn't be concerned about mod_python as likelihood that it will be ported is very low and even if it was it would be a long long way in the future. There is too much in mod_python itself unrelated to Python 3.0 that needs to be fixed before a port to Python 3.0 should be considered. As to mod_wsgi, I can work around it in the short term by installing an 'atexit' module replacement in sub interpreters and avoid the problem. As to a solution, yes, using PyInterpreterState would seem the most logical place, however there is a lot more to it than that. Prior to Python 3.0, any callbacks registered with atexit module in sub interpreters weren't called anyway. This is because Py_EndInterpreter() didn't trigger them, nor did Py_Finalize(). The latter is in Python 3.0 at the moment, but as pointed out that is a problem in itself. So, although one may register sub interpreter atexit callbacks against PyInterpreterState, what would be done with them. A decision would need to be made as to whether Py_EndInterpreter() should trigger them, or whether the status quo be maintained and nothing done with them. In the short term, ie., for Python 3.0.0, the simplest thing to do may be to have functions of atexit module silently not actually do anything for sub interpreters. The only place this would probably cause a problem would be for mod_wsgi where it was itself calling sys.exitfunc() on sub interpreters to ensure they were run. Since mod_wsgi has to change for Python 3.0 anyway, to call atexit._run_exitfuncs, with a bit more work mod_wsgi can just replace atexit module altogether in sub interpreter context and have mod_wsgi track the callback functions and trigger them. By having atexit module ignore stuff for sub interpreters, at least for now avoid problem of callbacks against sub interpreters being execute by Py_Finalize() in main interpreter context. And no I haven't looked at how PEP 3121 has changed things in Python 3.0. Up till now I hadn't seen any problems to suggest I may need to look at it. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 04:52:44 2008 From: report at bugs.python.org (Graham Dumpleton) Date: Sat, 25 Oct 2008 02:52:44 +0000 Subject: [issue4202] Multiple interpreters and readline module hook functions. In-Reply-To: <1224903164.25.0.50876142409.issue4202@psf.upfronthosting.co.za> Message-ID: <1224903164.25.0.50876142409.issue4202@psf.upfronthosting.co.za> New submission from Graham Dumpleton : Because the readline module uses PyGILState_Ensure() to facilitate triggering callbacks into Python code, this would make the ability to use the hook functions incompatible with use in sub interpreters. If this is the case, then that readline module cannot be used in sub interpreters should be documented if not already. Better still, attempts to register hooks from sub interpreters should result in an exception. Further, when in use, in sub interpreter, callback hooks should also not be called if defined, because if defined they would be the hooks from the main interpreter since variables holding the hooks are static C variables and shared across all interpreters. This issue derived from reading of code only and not tested in real program. ---------- components: Interpreter Core messages: 75201 nosy: grahamd severity: normal status: open title: Multiple interpreters and readline module hook functions. versions: Python 2.5, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 06:25:22 2008 From: report at bugs.python.org (Erick Tryzelaar) Date: Sat, 25 Oct 2008 04:25:22 +0000 Subject: [issue4012] Minor errors in multiprocessing docs In-Reply-To: <1222910620.56.0.617350560863.issue4012@psf.upfronthosting.co.za> Message-ID: <1224908722.91.0.0478284224739.issue4012@psf.upfronthosting.co.za> Erick Tryzelaar added the comment: fyi, the multiprocessing docs also refer to applyAync, but the function was renamed to apply_async. This is also in the python 3.0 docs. ---------- nosy: +erickt versions: +Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 08:25:32 2008 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 25 Oct 2008 06:25:32 +0000 Subject: [issue4195] Regression for executing packages In-Reply-To: <1224873899.8.0.177595218059.issue4195@psf.upfronthosting.co.za> Message-ID: <1224915932.47.0.673424830315.issue4195@psf.upfronthosting.co.za> Nick Coghlan added the comment: Added revised version of patch with test cases and documentation updates, as well as fixing a potential recursion issue with pathological packages where __main__ was also a package) ---------- keywords: +patch Added file: http://bugs.python.org/file11885/issue4195_runpy_package_support.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 10:38:41 2008 From: report at bugs.python.org (Winfried Plappert) Date: Sat, 25 Oct 2008 08:38:41 +0000 Subject: [issue4194] Miserable subprocess.Popen performance In-Reply-To: <18690.3034.472764.227788@montanaro-dyndns-org.local> Message-ID: <1224923921.48.0.0205944659736.issue4194@psf.upfronthosting.co.za> Winfried Plappert added the comment: Hi is the dramatic difference on Solaris-10 / Python2.6: I dtraced the popentest.py and counted syscalls: with os_popen: read = 243 with process:Popen read = 589018 That explains a lot! The rest of the system calls are similir in count and appearance. I have not looked into the C-source (yet). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 10:39:42 2008 From: report at bugs.python.org (Winfried Plappert) Date: Sat, 25 Oct 2008 08:39:42 +0000 Subject: [issue4194] Miserable subprocess.Popen performance In-Reply-To: <18690.3034.472764.227788@montanaro-dyndns-org.local> Message-ID: <1224923982.01.0.18834534424.issue4194@psf.upfronthosting.co.za> Winfried Plappert added the comment: s/Hi is/Hi, here is/ :) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 14:08:38 2008 From: report at bugs.python.org (John J Lee) Date: Sat, 25 Oct 2008 12:08:38 +0000 Subject: [issue2275] urllib2 header capitalization In-Reply-To: <1205270540.47.0.336665756101.issue2275@psf.upfronthosting.co.za> Message-ID: <1224936518.6.0.253268201154.issue2275@psf.upfronthosting.co.za> John J Lee added the comment: I have attached a patch that just: * Improves doctests a bit * Changes .get_headers() and .has_header() to be case-insensitive * Documents .get_header() and .header_items(), fixes some incorrectly-documented argument names, and notes the case-sensitivity change * Note that the headers passed to httplib (the original issue for which this bug was raised) were already correctly Title-Cased, and that is unchanged by this patch Options: * Apply my patch. I'd be happy with this. * Apply my patch and begin the process of deprecating public interfaces .unredirected_hdrs and .headers. Perhaps provide another interface to tell whether a header will be redirected (only if there's a use case for that). I'd be happy with this too. * Bring back Senthil's case-normalized .headers and .unredirected_hdrs and document those interfaces. This a bad idea, because this would result in a very confusing set of interfaces for dealing with headers (see my previous comments on this -- Date: 2008-07-11 19:44). (For what it's worth, I have also attached a doctest to show some examples of the broken invariants issue with Senthil's patch. The doctest also comments on the fact that making .headers case-insensitive in this way is quite confusing in the case where multiple items of different case are present, but __getitem__ returns only a single item -- this is a relatively minor issue, but still worth avoiding. The variation of choosing to discard items that normalize to the same string would avoid this problem, though it might break working code that relies on sending multiple headers with differing case, so I think this would be no better overall.) Added file: http://bugs.python.org/file11886/issue2775.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 14:10:45 2008 From: report at bugs.python.org (John J Lee) Date: Sat, 25 Oct 2008 12:10:45 +0000 Subject: [issue2275] urllib2 header capitalization In-Reply-To: <1205270540.47.0.336665756101.issue2275@psf.upfronthosting.co.za> Message-ID: <1224936645.15.0.605626040513.issue2275@psf.upfronthosting.co.za> Changes by John J Lee : Added file: http://bugs.python.org/file11887/issue2775-problems.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 14:40:11 2008 From: report at bugs.python.org (John J Lee) Date: Sat, 25 Oct 2008 12:40:11 +0000 Subject: [issue2756] urllib2 add_header fails with existing unredirected_header In-Reply-To: <1209913898.38.0.175541514636.issue2756@psf.upfronthosting.co.za> Message-ID: <1224938411.75.0.309650185823.issue2756@psf.upfronthosting.co.za> John J Lee added the comment: I agree there is a bug here: clearly the methods on the Request class are inconsistent with AbstractHTTPHandler.do_open() . I think Facundo's patch is good, though it needs a test. The general principle when fixing earlier bugs has been that the .add_*header() methods override default headers, though there are some reasonable violations this where the implementation relies on specific headers being sent -- e.g. "Connection: close". ---------- nosy: +jjlee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 15:23:40 2008 From: report at bugs.python.org (Winfried Plappert) Date: Sat, 25 Oct 2008 13:23:40 +0000 Subject: [issue4194] Miserable subprocess.Popen performance In-Reply-To: <18690.3034.472764.227788@montanaro-dyndns-org.local> Message-ID: <1224941020.05.0.449619053922.issue4194@psf.upfronthosting.co.za> Winfried Plappert added the comment: The created testfile size is 588890 bytes, which implies that subprocess.Popen reads the file in completely unbuffered mode, one byte at a time. If I modify the popentest.py programme by specifying a bufsize of 1_000_000, the execution time drops quite a bit: time with os.popen 0.069 sec time with subprocess.Popen 0.118 sec This Solaris 9/Python 2.6. I think I have got it: Lib/subprocess.py should have a default bufsize of -1, not 0! I tested it by modifying the subprocess.Popen call and here is the result: time with os.popen 0.086 sec time with subprocess.Popen 0.080 sec See also Modules/posixmodule.c. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 15:50:33 2008 From: report at bugs.python.org (Skip Montanaro) Date: Sat, 25 Oct 2008 13:50:33 +0000 Subject: [issue4194] Miserable subprocess.Popen performance In-Reply-To: <18690.3034.472764.227788@montanaro-dyndns-org.local> Message-ID: <18690.15113.458679.682697@montanaro-dyndns-org.local> Skip Montanaro added the comment: Using a nonzero bufsize parameter makes all the difference in the world: Using the default (bufsize=0 ==> unbuffered): % python popentest.py time with os.popen : 0.035032 time with subprocess.Popen : 1.496455 Creating the Popen object with bufsize=8192: % python popentest.py time with os.popen : 0.034642 time with subprocess.Popen : 0.041376 Creating the Popen object with bufsize=1 (==> line buffered): % python popentest.py time with os.popen : 0.034658 time with subprocess.Popen : 0.04211 Maybe the default for that parameter shouldn't be zero? Skip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 16:11:34 2008 From: report at bugs.python.org (Skip Montanaro) Date: Sat, 25 Oct 2008 14:11:34 +0000 Subject: [issue4194] Miserable subprocess.Popen performance In-Reply-To: <18690.3034.472764.227788@montanaro-dyndns-org.local> Message-ID: <1224943894.12.0.925612464665.issue4194@psf.upfronthosting.co.za> Skip Montanaro added the comment: >> Using a nonzero bufsize parameter makes all the difference in the >> world: ... In fact, looking at posix_popen in posixmodule.c it appears the default value for bufsize there is -1, implying that I/O is fully buffered. Even if the default bufsize value for subprocess.Popen is not changed its documentation should be corrected to reflect the different default values for bufsize between os.popen and subprocess.Popen: Replacing os.popen* ------------------- pipe = os.popen(cmd, mode='r', [bufsize]) ==> pipe = Popen(cmd, shell=True, bufsize=bufsize, stdout=PIPE).stdout If you use the default bufsize with os.popen you must set bufsize to -1 when creating a Popen object. Otherwise your I/O will be unbuffered and you will be disappointed at the I/O performance. ---------- assignee: -> georg.brandl components: +Documentation, Library (Lib) nosy: +georg.brandl versions: +Python 2.7, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 17:58:06 2008 From: report at bugs.python.org (Tim Michelsen) Date: Sat, 25 Oct 2008 15:58:06 +0000 Subject: [issue4203] adapt sphinx-quickstart for windows In-Reply-To: <1224950286.79.0.54626272369.issue4203@psf.upfronthosting.co.za> Message-ID: <1224950286.79.0.54626272369.issue4203@psf.upfronthosting.co.za> New submission from Tim Michelsen : Hello, for users on the windows platform, it could be of great help if the sphinx-quickstart would be adjuste to their platform. Here are my suggestions: * create a batch file instead of the Makefile * make-docs.bat, contents: sphinx-build -a source build * use "_" as default suggestion for the dotfiles. Thanks for your great tool! ---------- assignee: georg.brandl components: Documentation tools (Sphinx) messages: 75212 nosy: georg.brandl, timmie severity: normal status: open title: adapt sphinx-quickstart for windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 17:58:14 2008 From: report at bugs.python.org (Tim Michelsen) Date: Sat, 25 Oct 2008 15:58:14 +0000 Subject: [issue4203] adapt sphinx-quickstart for windows In-Reply-To: <1224950286.79.0.54626272369.issue4203@psf.upfronthosting.co.za> Message-ID: <1224950294.53.0.436816394069.issue4203@psf.upfronthosting.co.za> Changes by Tim Michelsen : ---------- type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 18:50:39 2008 From: report at bugs.python.org (John J Lee) Date: Sat, 25 Oct 2008 16:50:39 +0000 Subject: [issue3924] cookielib chokes on non-integer cookie version, should ignore it instead In-Reply-To: <1222021824.75.0.209543556591.issue3924@psf.upfronthosting.co.za> Message-ID: <1224953439.32.0.0930662388001.issue3924@psf.upfronthosting.co.za> John J Lee added the comment: Patch with tests attached. The patch is slightly different to my first suggestion: in the patch, invalid version values cause the cookie to be ignored (but double quotes around valid versions are fine). ---------- keywords: +patch Added file: http://bugs.python.org/file11888/issue3924.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 18:58:13 2008 From: report at bugs.python.org (John J Lee) Date: Sat, 25 Oct 2008 16:58:13 +0000 Subject: [issue3924] cookielib chokes on non-integer cookie version, should ignore it instead In-Reply-To: <1222021824.75.0.209543556591.issue3924@psf.upfronthosting.co.za> Message-ID: <1224953893.88.0.611203311667.issue3924@psf.upfronthosting.co.za> John J Lee added the comment: The bug is present on trunk and on the py3k branch, so I've selected versions "Python 2.7" and "Python 3.0" This is a straightforward bug, so I selected 2.5.3 and 2.6 also, to indicate this is a candidate for backport. ---------- components: +Library (Lib) -None type: crash -> behavior versions: +Python 2.5.3, Python 2.6, Python 2.7, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 20:01:03 2008 From: report at bugs.python.org (Akira Kitada) Date: Sat, 25 Oct 2008 18:01:03 +0000 Subject: [issue4204] Cannot build _multiprocessing, math, mmap and readline of Python 2.6 on FreeBSD 4.11 w/ gcc 2.95.4 In-Reply-To: <1224957663.27.0.455052730171.issue4204@psf.upfronthosting.co.za> Message-ID: <1224957663.27.0.455052730171.issue4204@psf.upfronthosting.co.za> New submission from Akira Kitada : I was trying to build Python 2.6 on FreeBSD 4.11 and found it failed to build some of the modules. """ Failed to find the necessary bits to build these modules: _bsddb _sqlite3 _tkinter gdbm linuxaudiodev spwd sunaudiodev To find the necessary bits, look in setup.py in detect_modules() for the module's name. Failed to build these modules: _multiprocessing math mmap readline """ Because I don't have Berkeley DB, SQLite3 tk, GDBM installed on the system and running FreeBSD, there is no wonder it failed to build _bsddb, _sqlite3, _tkinter, gdbm, linuxaudiodev, spwd and sunaudiodev. The problem is it failed to build _multiprocessing, math, mmap and readline. Here are the outputs of each build failure. """ building '_multiprocessing' extension creating build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/_multiprocessing gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DHAVE_SEM_OPEN=1 -DHAVE_FD_TRANSFER=1 -DHAVE_SEM_TIMEDWAIT=1 -IModules/_multiprocessing -I. -I/usr/home/build/dev/Python-2.6/./ Include -I. -IInclude -I./Include -I/usr/local/include -I/usr/home/build/dev/Python-2.6/Include -I/usr/home/build/dev/Python-2.6 -c /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/multiprocessing.c -o b uild/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/_multiprocessing/multiprocessing.o In file included from /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/multiprocessing.h:24, from /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/multiprocessing.c:9: /usr/include/arpa/inet.h:89: warning: parameter has incomplete type /usr/include/arpa/inet.h:92: warning: parameter has incomplete type /usr/include/arpa/inet.h:96: warning: parameter has incomplete type /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/multiprocessing.c: In function `multiprocessing_sendfd': /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/multiprocessing.c:102: storage size of `dummy_iov' isn't known /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/multiprocessing.c:102: warning: unused variable `dummy_iov' /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/multiprocessing.c: In function `multiprocessing_recvfd': /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/multiprocessing.c:137: storage size of `dummy_iov' isn't known /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/multiprocessing.c:137: warning: unused variable `dummy_iov' """ """ building 'cmath' extension gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -I/usr/home/build/dev/Python-2.6/./Include -I. -IInclude -I./Include -I/usr/local/include -I/usr/home/build/dev/Python-2.6/I nclude -I/usr/home/build/dev/Python-2.6 -c /usr/home/build/dev/Python-2.6/Modules/cmathmodule.c -o build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/cmathmodule.o /usr/home/build/dev/Python-2.6/Modules/cmathmodule.c: In function `special_type': /usr/home/build/dev/Python-2.6/Modules/cmathmodule.c:79: warning: implicit declaration of function `copysign' /usr/home/build/dev/Python-2.6/Modules/cmathmodule.c: In function `c_acos': /usr/home/build/dev/Python-2.6/Modules/cmathmodule.c:152: warning: implicit declaration of function `asinh' /usr/home/build/dev/Python-2.6/Modules/cmathmodule.c: In function `c_atanh': /usr/home/build/dev/Python-2.6/Modules/cmathmodule.c:345: warning: implicit declaration of function `log1p' gcc -shared build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/cmathmodule.o -L/usr/local/lib -lm -o build/lib.freebsd-4.11-RELEASE-i386-2.6/cmath.so building 'math' extension gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -I/usr/home/build/dev/Python-2.6/./Include -I. -IInclude -I./Include -I/usr/local/include -I/usr/home/build/dev/Python-2.6/I nclude -I/usr/home/build/dev/Python-2.6 -c /usr/home/build/dev/Python-2.6/Modules/mathmodule.c -o build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/mathmodule.o /usr/home/build/dev/Python-2.6/Modules/mathmodule.c: In function `m_atan2': /usr/home/build/dev/Python-2.6/Modules/mathmodule.c:118: warning: implicit declaration of function `copysign' /usr/home/build/dev/Python-2.6/Modules/mathmodule.c: In function `math_acosh': /usr/home/build/dev/Python-2.6/Modules/mathmodule.c:272: `acosh' undeclared (first use in this function) /usr/home/build/dev/Python-2.6/Modules/mathmodule.c:272: (Each undeclared identifier is reported only once /usr/home/build/dev/Python-2.6/Modules/mathmodule.c:272: for each function it appears in.) /usr/home/build/dev/Python-2.6/Modules/mathmodule.c: In function `math_asinh': /usr/home/build/dev/Python-2.6/Modules/mathmodule.c:276: `asinh' undeclared (first use in this function) /usr/home/build/dev/Python-2.6/Modules/mathmodule.c: In function `math_atanh': /usr/home/build/dev/Python-2.6/Modules/mathmodule.c:283: `atanh' undeclared (first use in this function) /usr/home/build/dev/Python-2.6/Modules/mathmodule.c: In function `math_copysign': /usr/home/build/dev/Python-2.6/Modules/mathmodule.c:288: `copysign' undeclared (first use in this function) /usr/home/build/dev/Python-2.6/Modules/mathmodule.c: In function `math_log1p': /usr/home/build/dev/Python-2.6/Modules/mathmodule.c:301: `log1p' undeclared (first use in this function) /usr/home/build/dev/Python-2.6/Modules/mathmodule.c: In function `math_ldexp': /usr/home/build/dev/Python-2.6/Modules/mathmodule.c:666: `copysign' used prior to declaration /usr/home/build/dev/Python-2.6/Modules/mathmodule.c:670: `copysign' used prior to declaration /usr/home/build/dev/Python-2.6/Modules/mathmodule.c: In function `math_modf': /usr/home/build/dev/Python-2.6/Modules/mathmodule.c:699: `copysign' used prior to declaration /usr/home/build/dev/Python-2.6/Modules/mathmodule.c: In function `math_pow': /usr/home/build/dev/Python-2.6/Modules/mathmodule.c:901: `copysign' used prior to declaration """ """ building 'mmap' extension gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -I/usr/home/build/dev/Python-2.6/./Include -I. -IInclude -I./Include -I/usr/local/include -I/usr/home/build/dev/Python-2.6/I nclude -I/usr/home/build/dev/Python-2.6 -c /usr/home/build/dev/Python-2.6/Modules/mmapmodule.c -o build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/mmapmodule.o /usr/home/build/dev/Python-2.6/Modules/mmapmodule.c: In function `initmmap': /usr/home/build/dev/Python-2.6/Modules/mmapmodule.c:1440: warning: implicit declaration of function `my_getallocationgranularity' gcc -shared build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/mmapmodule.o -L/usr/local/lib -o build/lib.freebsd-4.11-RELEASE-i386-2.6/mmap.so *** WARNING: renaming "mmap" since importing it failed: build/lib.freebsd-4.11-RELEASE-i386-2.6/mmap.so: Undefined symbol "my_getallocationgranularity" """ """ building 'readline' extension gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -I/usr/home/build/dev/Python-2.6/./Include -I. -IInclude -I./Include -I/usr/local/include -I/usr/home/build/dev/Python-2.6/I nclude -I/usr/home/build/dev/Python-2.6 -c /usr/home/build/dev/Python-2.6/Modules/readline.c -o build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/readline.o In file included from /usr/include/readline/readline.h:37, from /usr/home/build/dev/Python-2.6/Modules/readline.c:31: /usr/include/readline/keymaps.h:40: warning: function declaration isn't a prototype /usr/include/readline/keymaps.h:41: warning: function declaration isn't a prototype /usr/include/readline/keymaps.h:42: warning: function declaration isn't a prototype /usr/include/readline/keymaps.h:43: warning: function declaration isn't a prototype In file included from /usr/home/build/dev/Python-2.6/Modules/readline.c:31: /usr/include/readline/readline.h:343: warning: function declaration isn't a prototype /usr/home/build/dev/Python-2.6/Modules/readline.c:38: syntax error before `rl_compentry_func_t' /usr/home/build/dev/Python-2.6/Modules/readline.c:38: warning: function declaration isn't a prototype /usr/home/build/dev/Python-2.6/Modules/readline.c: In function `set_completion_display_matches_hook': /usr/home/build/dev/Python-2.6/Modules/readline.c:216: `rl_compdisp_func_t' undeclared (first use in this function) /usr/home/build/dev/Python-2.6/Modules/readline.c:216: (Each undeclared identifier is reported only once /usr/home/build/dev/Python-2.6/Modules/readline.c:216: for each function it appears in.) /usr/home/build/dev/Python-2.6/Modules/readline.c:216: syntax error before `)' /usr/home/build/dev/Python-2.6/Modules/readline.c: At top level: /usr/home/build/dev/Python-2.6/Modules/readline.c:669: warning: `on_completion_display_matches_hook' defined but not used """ Because FreeBSD is not listed on http://www.python.org/dev/peps/pep-0011/, I suppose it's still a supported platform. ---------- messages: 75215 nosy: akitada severity: normal status: open title: Cannot build _multiprocessing, math, mmap and readline of Python 2.6 on FreeBSD 4.11 w/ gcc 2.95.4 type: compile error versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 20:26:10 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 25 Oct 2008 18:26:10 +0000 Subject: [issue4194] Miserable subprocess.Popen performance In-Reply-To: <18690.3034.472764.227788@montanaro-dyndns-org.local> Message-ID: <1224959170.02.0.279603244404.issue4194@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 20:45:06 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sat, 25 Oct 2008 18:45:06 +0000 Subject: [issue4204] Cannot build _multiprocessing, math, mmap and readline of Python 2.6 on FreeBSD 4.11 w/ gcc 2.95.4 In-Reply-To: <1224957663.27.0.455052730171.issue4204@psf.upfronthosting.co.za> Message-ID: <1224960306.09.0.523847204215.issue4204@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Even if a certain platform is supported, you can't infer that all modules will build on it. Can you propose a patch? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 20:55:46 2008 From: report at bugs.python.org (Piotr Meyer) Date: Sat, 25 Oct 2008 18:55:46 +0000 Subject: [issue3876] multiprocessing does not compile on systems which do not define sem_timedwait In-Reply-To: <1221541852.59.0.453473189868.issue3876@psf.upfronthosting.co.za> Message-ID: <1224960946.62.0.887229668082.issue3876@psf.upfronthosting.co.za> Piotr Meyer added the comment: I confirm build failure on NetBSD 4.0.1 (latest stable) - but NetBSD-current is - probably - also affected: *** WARNING: renaming "_multiprocessing" since importing it failed: build/lib.netbsd-4.0.1-i386-2.6/_multiprocessing.so: Undefined PLT symbol "sem_timedwait" (symnum = 20) system: NetBSD 4.0.1 (i386) Python version: 2.6 ---------- nosy: +aniou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 21:03:06 2008 From: report at bugs.python.org (Skip Montanaro) Date: Sat, 25 Oct 2008 19:03:06 +0000 Subject: [issue4194] Miserable subprocess.Popen performance In-Reply-To: <18690.3034.472764.227788@montanaro-dyndns-org.local> Message-ID: <1224961386.88.0.981092757434.issue4194@psf.upfronthosting.co.za> Skip Montanaro added the comment: I've been thinking about it, and I think even though it would be a slight change to the API, I agree with Winfried that the default value for bufsize should be -1, not 0. In my own use of os.popen and friends, almost all the time I use them to process the output of a traditional Unix pipeline, which means the output will be plain text, line buffered. In those cases it makes absolutely no sense to read from the pipe one character at a time. S _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 23:04:32 2008 From: report at bugs.python.org (Winfried Plappert) Date: Sat, 25 Oct 2008 21:04:32 +0000 Subject: [issue4194] Miserable subprocess.Popen performance In-Reply-To: <18690.3034.472764.227788@montanaro-dyndns-org.local> Message-ID: <1224968672.43.0.230759183398.issue4194@psf.upfronthosting.co.za> Winfried Plappert added the comment: On the other hand, we will silently break all those applications which are out there relying on the fact that a pipe is an unbuffered device. You might consider it for Python 3.0, but I don't know if it is a good idea for Python 2.x. The documentation of subprocess.Popen clear states that the default is unbuffered, bufsize=0. I quote from http://docs.python.org/library/subprocess.html: bufsize, if given, has the same meaning as the corresponding argument to the built-in open() function: 0 means unbuffered, 1 means line buffered, any other positive value means use a buffer of (approximately) that size. A negative bufsize means to use the system default, which usually means fully buffered. The default value for bufsize is 0 (unbuffered). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 23:44:55 2008 From: report at bugs.python.org (Eric Devolder) Date: Sat, 25 Oct 2008 21:44:55 +0000 Subject: [issue4205] unexpected str.__init__() behaviour on b'' In-Reply-To: <1224971095.64.0.171830608062.issue4205@psf.upfronthosting.co.za> Message-ID: <1224971095.64.0.171830608062.issue4205@psf.upfronthosting.co.za> New submission from Eric Devolder : creating a unicode string from an empty b'' does not result in '', but produces "b''" instead. >>> str(b'') "b''" Workaround: if the encoding is specified, the resulting string is fine. >>> str(b'', 'ascii') '' ---------- components: Interpreter Core, Unicode messages: 75220 nosy: keldonin severity: normal status: open title: unexpected str.__init__() behaviour on b'' type: behavior versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 23:46:44 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 25 Oct 2008 21:46:44 +0000 Subject: [issue4205] unexpected str.__init__() behaviour on b'' In-Reply-To: <1224971095.64.0.171830608062.issue4205@psf.upfronthosting.co.za> Message-ID: <1224971204.54.0.0523084700336.issue4205@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This is expected. There is no bytes.__str__ method, so the bytes.__repr__ is used. ---------- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 25 23:54:02 2008 From: report at bugs.python.org (Eric Devolder) Date: Sat, 25 Oct 2008 21:54:02 +0000 Subject: [issue4205] unexpected str.__init__() behaviour on b'' In-Reply-To: <1224971095.64.0.171830608062.issue4205@psf.upfronthosting.co.za> Message-ID: <1224971642.01.0.959808808481.issue4205@psf.upfronthosting.co.za> Eric Devolder added the comment: Thanks for the tip - and sorry about the noise. I didn't catch this when reading through PEPs & manual, however. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 26 03:21:08 2008 From: report at bugs.python.org (David W. Lambert) Date: Sun, 26 Oct 2008 02:21:08 +0000 Subject: [issue4206] multiprocessing docs In-Reply-To: <1224987668.88.0.751751151091.issue4206@psf.upfronthosting.co.za> Message-ID: <1224987668.88.0.751751151091.issue4206@psf.upfronthosting.co.za> New submission from David W. Lambert : http://docs.python.org/dev/3.0/library/multiprocessing.html "map(func, iterable[, chunksize]) A parallel equivalent of the map() builtin function. It blocks till the result is ready." Not really, __builtins__.map returns a mapping object, Pool().map returns...a list? >>> print(multiprocessing.Pool().map.__doc__) # rather lame doc string! Equivalent of `map()` builtin ---------- assignee: georg.brandl components: Documentation messages: 75223 nosy: LambertDW, georg.brandl severity: normal status: open title: multiprocessing docs versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 26 12:53:07 2008 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Sun, 26 Oct 2008 11:53:07 +0000 Subject: [issue4207] Remove backwards compatibility in _heapq for performance In-Reply-To: <1225021987.36.0.560633277086.issue4207@psf.upfronthosting.co.za> Message-ID: <1225021987.36.0.560633277086.issue4207@psf.upfronthosting.co.za> New submission from Kristj?n Valur J?nsson : Comparing _heapq with our own legacy C implementation, blue.heapq at CCP, I noticed that ours was somewhat faster. I discovered that a lot of effort is being spent to dynamically search for a __lt__ operator, to provide backwards compatibility. I think we should consider dropping that after this much time, especially for a new python version. Running this code: from timeit import * s = """ import heapq import random l = [random.random() for i in xrange(10000)] """ print "heapify", Timer("heapq.heapify(list(l))", s).timeit(100) s = s + """ heapq.heapify(l) """ print "pushpop", Timer("heapq.heappushpop(l,random.random())", s).timeit (500000) would give heapify 0.289102944648 pushpop 0.343299078514 before. After the patch, we get: heapify 0.0958507994731 pushpop 0.220800967721 This is "release" code on a snappy windows machine. ---------- components: Extension Modules files: heapq1.patch keywords: easy, patch, patch messages: 75224 nosy: krisvale severity: normal status: open title: Remove backwards compatibility in _heapq for performance type: performance versions: Python 2.6 Added file: http://bugs.python.org/file11889/heapq1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 26 14:07:46 2008 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 26 Oct 2008 13:07:46 +0000 Subject: [issue4207] Remove backwards compatibility in _heapq for performance In-Reply-To: <1225021987.36.0.560633277086.issue4207@psf.upfronthosting.co.za> Message-ID: <1225026466.14.0.212572211839.issue4207@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The compatability code was just added in Py2.6 and is needed for apps like Twisted that currently rely on __le__ being tested. In 3.0, the compatability code is removed and full speed is restored. Also, the timing suite exaggerates the effect. A more typical use of heaps involves a heap of tuples with the first tuple element being used as a priority level. That increases the comparison time and decreases the relative significance of the dispatch logic. ---------- assignee: -> rhettinger nosy: +rhettinger resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 26 14:49:29 2008 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Sun, 26 Oct 2008 13:49:29 +0000 Subject: [issue4207] Remove backwards compatibility in _heapq for performance In-Reply-To: <1225021987.36.0.560633277086.issue4207@psf.upfronthosting.co.za> Message-ID: <1225028969.38.0.902315534545.issue4207@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: I am sorry for not doing my research about the age of the compatibility fix. However, modifying the test slightly to work with tuples of (random.random(), random.random()) shows a performance increase from: heapify 0.366187741738 pushpop 0.541365033824 replace 2.69348946584 push and pop 3.12545093022 to: heapify 0.186918030085 pushpop 0.405662172148 replace 1.46039447751 push and pop 1.75253663524 This does look like a large price to pay for this compatibility layer. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 26 15:20:39 2008 From: report at bugs.python.org (Akira Kitada) Date: Sun, 26 Oct 2008 14:20:39 +0000 Subject: [issue4204] Cannot build _multiprocessing, math, mmap and readline of Python 2.6 on FreeBSD 4.11 w/ gcc 2.95.4 In-Reply-To: <1224957663.27.0.455052730171.issue4204@psf.upfronthosting.co.za> Message-ID: <1225030839.09.0.33618530808.issue4204@psf.upfronthosting.co.za> Akira Kitada added the comment: Attached patch fixes build problem of math and mmap. Apparently, FreeBSD 4 does not make some math functions available when _XOPEN_SOURCE is defined and unlike newer FreeBSD, it cannot be fixed with __BSD_VISIBLE macro. As for readline, it just because FreeBSD's readline does not have erl_compentry_func_t and Python 2.6 started to use it. When I cp Python-2.5.2/Modules/readline.c Python-2.6/Modules/readline.c, it built successfully. Probably this is not a good fix. I would be glad if someone suggests me a better one. Lastly, multiprocessing. First I needed a patch like this to get rid of the warnings. """ --- Modules/_multiprocessing/multiprocessing.h.orig Tue Oct 14 14:43:01 2008 +++ Modules/_multiprocessing/multiprocessing.h Tue Oct 14 14:48:59 2008 @@ -20,7 +20,10 @@ # define SEM_VALUE_MAX LONG_MAX #else # include /* O_CREAT and O_EXCL */ +# include # include +# include +# include # include /* htonl() and ntohl() */ # if HAVE_SEM_OPEN # include """ With this patch applied, I tried the build again and got the following error. """ running build running build_ext INFO: Can't locate Tcl/Tk libs and/or headers building '_multiprocessing' extension gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DHAVE_SEM_OPEN=1 -DHAVE_FD_TRANSFER=1 -DHAVE_SEM_TIMEDWAIT=1 -IModules/_multiprocessing -I. -I/usr/home/build/dev/Python-2.6/./Include -I. -IInclude -I./Include -I/usr/local/include -I/usr/home/build/dev/Python-2.6/Include -I/usr/home/build/dev/Python-2.6 -c /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/multiprocessing.c -o build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/_multiprocessing/multiprocessing.o gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DHAVE_SEM_OPEN=1 -DHAVE_FD_TRANSFER=1 -DHAVE_SEM_TIMEDWAIT=1 -IModules/_multiprocessing -I. -I/usr/home/build/dev/Python-2.6/./Include -I. -IInclude -I./Include -I/usr/local/include -I/usr/home/build/dev/Python-2.6/Include -I/usr/home/build/dev/Python-2.6 -c /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/socket_connection.c -o build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/_multiprocessing/socket_connection.o In file included from /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/socket_connection.c:190: /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/connection.h: In function `connection_new': /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/connection.h:51: warning: unknown conversion type character `z' in format /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/connection.h: In function `connection_repr': /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/connection.h:401: warning: unknown conversion type character `z' in format gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DHAVE_SEM_OPEN=1 -DHAVE_FD_TRANSFER=1 -DHAVE_SEM_TIMEDWAIT=1 -IModules/_multiprocessing -I. -I/usr/home/build/dev/Python-2.6/./Include -I. -IInclude -I./Include -I/usr/local/include -I/usr/home/build/dev/Python-2.6/Include -I/usr/home/build/dev/Python-2.6 -c /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/semaphore.c -o build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/_multiprocessing/semaphore.o /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/semaphore.c: In function `semlock_acquire': /usr/home/build/dev/Python-2.6/Modules/_multiprocessing/semaphore.c:314: warning: implicit declaration of function `sem_timedwait' gcc -shared build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/_multiprocessing/multiprocessing.o build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/_multiprocessing/socket_connection.o build/temp.freebsd-4.11-RELEASE-i386-2.6/usr/home/build/dev/Python-2.6/Modules/_multiprocessing/semaphore.o -L/usr/local/lib -o build/lib.freebsd-4.11-RELEASE-i386-2.6/_multiprocessing.so *** WARNING: renaming "_multiprocessing" since importing it failed: build/lib.freebsd-4.11-RELEASE-i386-2.6/_multiprocessing.so: Undefined symbol "sem_timedwait" """ Yes, sem_timedwait is not supported on FreeBSD 4. I would like to find the replacement for that, but I'm not sure how I could solve this at this time. ---------- components: +Build keywords: +patch Added file: http://bugs.python.org/file11890/configure.in.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 26 15:30:36 2008 From: report at bugs.python.org (Christian Heimes) Date: Sun, 26 Oct 2008 14:30:36 +0000 Subject: [issue4204] Cannot build _multiprocessing, math, mmap and readline of Python 2.6 on FreeBSD 4.11 w/ gcc 2.95.4 In-Reply-To: <1224957663.27.0.455052730171.issue4204@psf.upfronthosting.co.za> Message-ID: <1225031436.99.0.200444789975.issue4204@psf.upfronthosting.co.za> Christian Heimes added the comment: The setup.py file in the root directory doesn't have a special case for freebsd4, just for Free BSD 5 to 8. Apparently FreeBSD doesn't support SEM_TIMEDWAIT at all. elif platform in ('freebsd5', 'freebsd6', 'freebsd7', 'freebsd8'): # FreeBSD's P1003.1b semaphore support is very experimental # and has many known problems. (as of June 2008) macros = dict( # FreeBSD HAVE_SEM_OPEN=0, HAVE_SEM_TIMEDWAIT=0, HAVE_FD_TRANSFER=1, ) libraries = [] ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 26 15:45:46 2008 From: report at bugs.python.org (Akira Kitada) Date: Sun, 26 Oct 2008 14:45:46 +0000 Subject: [issue4204] Cannot build _multiprocessing, math, mmap and readline of Python 2.6 on FreeBSD 4.11 w/ gcc 2.95.4 In-Reply-To: <1224957663.27.0.455052730171.issue4204@psf.upfronthosting.co.za> Message-ID: <1225032346.49.0.452319195609.issue4204@psf.upfronthosting.co.za> Akira Kitada added the comment: Thanks Christian, Now all modules are working. $ ./python Python 2.6 (r26:66714, Oct 14 2008, 15:18:41) [GCC 2.95.4 20020320 [FreeBSD]] on freebsd4 Type "help", "copyright", "credits" or "license" for more information. >>> import multiprocessing >>> import math >>> import mmap >>> import readline >>> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 26 15:48:40 2008 From: report at bugs.python.org (Christian Heimes) Date: Sun, 26 Oct 2008 14:48:40 +0000 Subject: [issue4204] Cannot build _multiprocessing, math, mmap and readline of Python 2.6 on FreeBSD 4.11 w/ gcc 2.95.4 In-Reply-To: <1224957663.27.0.455052730171.issue4204@psf.upfronthosting.co.za> Message-ID: <1225032520.17.0.56593705188.issue4204@psf.upfronthosting.co.za> Christian Heimes added the comment: No, you still have to create a patch for the readline module. ;) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 26 16:21:14 2008 From: report at bugs.python.org (Christian Heimes) Date: Sun, 26 Oct 2008 15:21:14 +0000 Subject: [issue4208] Make multiprocessing compatible with Python 2.4 and 2.5 In-Reply-To: <1225034474.82.0.458838457625.issue4208@psf.upfronthosting.co.za> Message-ID: <1225034474.82.0.458838457625.issue4208@psf.upfronthosting.co.za> New submission from Christian Heimes : The patch contains all differences between our multiprocessing backport to 2.4 / 2.5 and the release26-maint branch. The patch should NOT be applied yet. I've created the patch to discuss the differences. Several changes could be avoided by monkey patching the threading module of Python 2.4 and 2.5. Other changes are required like using the old buffer protocol. ---------- components: Interpreter Core, Library (Lib) files: mp_py25_compat.diff keywords: patch, patch messages: 75231 nosy: christian.heimes, jnoller, skip.montanaro priority: low severity: normal status: open title: Make multiprocessing compatible with Python 2.4 and 2.5 type: feature request versions: Python 2.6, Python 2.7 Added file: http://bugs.python.org/file11891/mp_py25_compat.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 26 16:42:43 2008 From: report at bugs.python.org (Christian Heimes) Date: Sun, 26 Oct 2008 15:42:43 +0000 Subject: [issue4200] atexit module not safe in Python 3.0 with multiple interpreters In-Reply-To: <1224888355.2.0.82482284838.issue4200@psf.upfronthosting.co.za> Message-ID: <1225035763.25.0.323363490467.issue4200@psf.upfronthosting.co.za> Christian Heimes added the comment: I'm adding Martin to the nosy list as well. He is the author of PEP 3121 and he might be able to give more insight in the problem. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 26 17:19:26 2008 From: report at bugs.python.org (Akira Kitada) Date: Sun, 26 Oct 2008 16:19:26 +0000 Subject: [issue4204] Cannot build _multiprocessing, math, mmap and readline of Python 2.6 on FreeBSD 4.11 w/ gcc 2.95.4 In-Reply-To: <1224957663.27.0.455052730171.issue4204@psf.upfronthosting.co.za> Message-ID: <1225037966.18.0.938722422277.issue4204@psf.upfronthosting.co.za> Akira Kitada added the comment: Here's the one. I tested this patch on FreeBSD 4.11 and 6.3. Both worked. :) Added file: http://bugs.python.org/file11892/Modules_readline.c.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 26 17:43:12 2008 From: report at bugs.python.org (Jesse Noller) Date: Sun, 26 Oct 2008 16:43:12 +0000 Subject: [issue4208] Make multiprocessing compatible with Python 2.4 and 2.5 In-Reply-To: <1225034474.82.0.458838457625.issue4208@psf.upfronthosting.co.za> Message-ID: <1225039392.84.0.983332565408.issue4208@psf.upfronthosting.co.za> Jesse Noller added the comment: Are you suggesting we apply this to the 2.6/2.7 branch? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 26 17:44:23 2008 From: report at bugs.python.org (Christian Heimes) Date: Sun, 26 Oct 2008 16:44:23 +0000 Subject: [issue4204] Cannot build _multiprocessing, math, mmap and readline of Python 2.6 on FreeBSD 4.11 w/ gcc 2.95.4 In-Reply-To: <1224957663.27.0.455052730171.issue4204@psf.upfronthosting.co.za> Message-ID: <1225039463.0.0.164322822009.issue4204@psf.upfronthosting.co.za> Christian Heimes added the comment: Can you provide a single patch for all three problems (setup.py, configure.in and readline.c)? An update for Misc/NEWS is greatly appreciated, too. Could you test the patch on the Python 3.0 branch, too? I fear the 3.0 branch suffers from the same issues. ---------- nosy: +barry priority: -> release blocker versions: +Python 2.7, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 26 17:47:08 2008 From: report at bugs.python.org (Christian Heimes) Date: Sun, 26 Oct 2008 16:47:08 +0000 Subject: [issue4208] Make multiprocessing compatible with Python 2.4 and 2.5 In-Reply-To: <1225034474.82.0.458838457625.issue4208@psf.upfronthosting.co.za> Message-ID: <1225039628.38.0.33415917484.issue4208@psf.upfronthosting.co.za> Christian Heimes added the comment: Yes, I like to get as much code into 2.6/2.7 as feasible and viable. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 26 18:09:42 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 26 Oct 2008 17:09:42 +0000 Subject: [issue4209] from __future__ import unicode_literals, print_function doesn't work In-Reply-To: <1225040982.87.0.144130248844.issue4209@psf.upfronthosting.co.za> Message-ID: <1225040982.87.0.144130248844.issue4209@psf.upfronthosting.co.za> New submission from Benjamin Peterson : This is because parser.c's future_hack breaks out of the loop when it finds one feature. Patch with test is attached. ---------- components: Interpreter Core files: fix_multiple_features.patch keywords: patch messages: 75237 nosy: benjamin.peterson priority: release blocker severity: normal status: open title: from __future__ import unicode_literals, print_function doesn't work versions: Python 2.6, Python 2.7 Added file: http://bugs.python.org/file11893/fix_multiple_features.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 26 18:48:49 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Sun, 26 Oct 2008 17:48:49 +0000 Subject: [issue4210] os.remove can be used to remove directories on SunOS In-Reply-To: <1225043329.93.0.727010084748.issue4210@psf.upfronthosting.co.za> Message-ID: <1225043329.93.0.727010084748.issue4210@psf.upfronthosting.co.za> New submission from Giampaolo Rodola' : Done against a SunOS 5.10 equipped with Python 2.4.4. >>> import os >>> os.mkdir('foo') >>> os.remove('foo') >>> ---------- messages: 75238 nosy: giampaolo.rodola severity: normal status: open title: os.remove can be used to remove directories on SunOS _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 26 19:36:14 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 26 Oct 2008 18:36:14 +0000 Subject: [issue4200] atexit module not safe in Python 3.0 with multiple interpreters In-Reply-To: <1224888355.2.0.82482284838.issue4200@psf.upfronthosting.co.za> Message-ID: <1225046174.16.0.946023521398.issue4200@psf.upfronthosting.co.za> Martin v. L?wis added the comment: It would certainly be possible to produce per-interpreter callback lists through the module state. You declare a per-interpreter structure, add its size into atexitmodule, and refer to it through PyModule_GetDef, passing the self argument of the module-level functions. Reviewing the code, I have two unrelated remarks: - METH_NOARGS functions still take two arguments. - I would drop the double-indirection of the callback list. Instead, allocate a single block of atexit_callback, and use func==NULL as an indicator that the block is free. According to the documentation of the atexit module, it seems clear that it is a per-interpreter thing. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 26 19:50:06 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 26 Oct 2008 18:50:06 +0000 Subject: [issue4210] os.remove can be used to remove directories on SunOS In-Reply-To: <1225043329.93.0.727010084748.issue4210@psf.upfronthosting.co.za> Message-ID: <1225047006.9.0.996031122645.issue4210@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I cannot reproduce the behavior that your trace suggests; instead, I get >>> os.remove("foo") Traceback (most recent call last): File "", line 1, in ? OSError: [Errno 1] Not owner: 'foo' Perhaps you were trying to do this as root? This is a known issue with Solaris: it allows to call unlink(2) for directories. This is documented in unlink(2) as If the path argument is a directory and the filesystem sup- ports unlink() and unlinkat() on directories, the directory is unlinked from its parent with no cleanup being performed. In UFS, the disconnected directory will be found the next time the filesystem is checked with fsck(1M). The unlink() and unlinkat() functions will not fail simply because a directory is not empty. The user with appropriate privileges can orphan a non-empty directory without generating an error message. If the path argument is a directory and the filesystem does not support unlink() and unlink() on directories (for exam- ple, ZFS), the call will fail with errno set to EPERM. As os.remove is the same as unlink, and as os.unlink deliberately calls the system call, this is not a bug in Python. Closing it as "won't fix, 3rd party". ---------- nosy: +loewis resolution: -> wont fix status: open -> closed versions: +3rd party _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 26 19:53:13 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 26 Oct 2008 18:53:13 +0000 Subject: [issue4209] from __future__ import unicode_literals, print_function doesn't work In-Reply-To: <1225040982.87.0.144130248844.issue4209@psf.upfronthosting.co.za> Message-ID: <1225047193.2.0.702243327885.issue4209@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 26 19:56:53 2008 From: report at bugs.python.org (Christian Heimes) Date: Sun, 26 Oct 2008 18:56:53 +0000 Subject: [issue4200] atexit module not safe in Python 3.0 with multiple interpreters In-Reply-To: <1224888355.2.0.82482284838.issue4200@psf.upfronthosting.co.za> Message-ID: <1225047413.3.0.809577519352.issue4200@psf.upfronthosting.co.za> Christian Heimes added the comment: I'm trying to come up with a patch. It's a little bit trickier than I thought. The atexit module registers "atexit_callfuncs()" with _Py_PyAtExit(). The "atexit_callfuncs()" function is called by Python/pythonrun.c when the interpreter exits. The function is cleared as "static void atexit_callfuncs(void)" so it doesn't get the module through self. However PyModule_GetDef requires self. In order to use PEP 3121 we have to add a mechanism to pass the module instance to atexit_callfuncs(). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 26 20:12:20 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Sun, 26 Oct 2008 19:12:20 +0000 Subject: [issue4210] os.remove can be used to remove directories on SunOS In-Reply-To: <1225043329.93.0.727010084748.issue4210@psf.upfronthosting.co.za> Message-ID: <1225048340.99.0.183381199281.issue4210@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I didn't know about such unlink behavior and yes, I was root. Thanks for the precious infos. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 26 20:18:09 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Sun, 26 Oct 2008 19:18:09 +0000 Subject: [issue4200] atexit module not safe in Python 3.0 with multiple interpreters In-Reply-To: <1225047413.3.0.809577519352.issue4200@psf.upfronthosting.co.za> Message-ID: <4904C26E.3020509@v.loewis.de> Martin v. L?wis added the comment: Christian Heimes wrote: > However PyModule_GetDef requires self. (I actually meant PyModule_GetState). You can use PyState_FindModule to quickly lookup a module. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 26 20:26:27 2008 From: report at bugs.python.org (Christian Heimes) Date: Sun, 26 Oct 2008 19:26:27 +0000 Subject: [issue4200] atexit module not safe in Python 3.0 with multiple interpreters In-Reply-To: <1224888355.2.0.82482284838.issue4200@psf.upfronthosting.co.za> Message-ID: <1225049187.48.0.403118514491.issue4200@psf.upfronthosting.co.za> Christian Heimes added the comment: Ah, thanks. I'll try PyState_FindModule(). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 26 20:48:59 2008 From: report at bugs.python.org (Georg Brandl) Date: Sun, 26 Oct 2008 19:48:59 +0000 Subject: [issue4209] from __future__ import unicode_literals, print_function doesn't work In-Reply-To: <1225040982.87.0.144130248844.issue4209@psf.upfronthosting.co.za> Message-ID: <1225050539.62.0.219804616724.issue4209@psf.upfronthosting.co.za> Georg Brandl added the comment: Looks fine. As a bonus, you can find out why "unicode_literals" doesn't work when used in an exec'd string -- this is why I didn't upload my fix yet. ---------- nosy: +georg.brandl resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 26 21:15:52 2008 From: report at bugs.python.org (Christian Heimes) Date: Sun, 26 Oct 2008 20:15:52 +0000 Subject: [issue4200] atexit module not safe in Python 3.0 with multiple interpreters In-Reply-To: <1224888355.2.0.82482284838.issue4200@psf.upfronthosting.co.za> Message-ID: <1225052152.23.0.17320369693.issue4200@psf.upfronthosting.co.za> Christian Heimes added the comment: Can you review the patch, Martin? I've moved the three state variables into a module state struct. The patch also fixes the METH_NOARGS functions. ---------- keywords: +needs review, patch Added file: http://bugs.python.org/file11894/atexit_modulestate.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 26 21:22:41 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 26 Oct 2008 20:22:41 +0000 Subject: [issue4209] from __future__ import unicode_literals, print_function doesn't work In-Reply-To: <1225040982.87.0.144130248844.issue4209@psf.upfronthosting.co.za> Message-ID: <1225052561.04.0.308063718914.issue4209@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r67030. ---------- resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 26 21:58:24 2008 From: report at bugs.python.org (Christian Heimes) Date: Sun, 26 Oct 2008 20:58:24 +0000 Subject: [issue4200] atexit module not safe in Python 3.0 with multiple interpreters In-Reply-To: <1224888355.2.0.82482284838.issue4200@psf.upfronthosting.co.za> Message-ID: <1225054704.22.0.556447825223.issue4200@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- priority: critical -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 26 23:58:42 2008 From: report at bugs.python.org (Christian Heimes) Date: Sun, 26 Oct 2008 22:58:42 +0000 Subject: [issue3723] Py_NewInterpreter does not work In-Reply-To: <1220011870.63.0.171875917127.issue3723@psf.upfronthosting.co.za> Message-ID: <1225061922.38.0.841272421117.issue3723@psf.upfronthosting.co.za> Christian Heimes added the comment: The patch "subinterpreter.patch" is based on Martin's patch "importexc.diff". The patch contains additional code to setup a preliminary stderr object and a call to initstdio(). Amaury is right. I had to add initstdio() to initialize the standard streams. But I can't get it to work. $ rm -f Demo/embed/importexc.o; cd Demo/embed; make; ./importexc; cd ../.. gcc -g -I../../Include -I../.. -c -o importexc.o importexc.c gcc -Xlinker -export-dynamic importexc.o ../../libpython3.0.a -lnsl -ldl -lreadline -ltermcap -lieee -lpthread -lutil -lm -o importexc Initialize interpreter Initialize subinterpreter Fatal Python error: Py_Initialize: can't initialize sys standard streams Traceback (most recent call last): File "/usr/local/lib/python3.0/encodings/__init__.py", line 32, in ValueError: Cannot encode path item Aborted Added file: http://bugs.python.org/file11895/subinterpreter.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 27 00:40:24 2008 From: report at bugs.python.org (Akira Kitada) Date: Sun, 26 Oct 2008 23:40:24 +0000 Subject: [issue4204] Cannot build _multiprocessing, math, mmap and readline of Python 2.6 on FreeBSD 4.11 w/ gcc 2.95.4 In-Reply-To: <1224957663.27.0.455052730171.issue4204@psf.upfronthosting.co.za> Message-ID: <1225064424.78.0.340114297643.issue4204@psf.upfronthosting.co.za> Akira Kitada added the comment: I will. Would it be enough to test on trunk and py3k branch? By the way, trunk seems to have some problem building now. ./Parser/asdl_c.py -h ./Include ./Parser/Python.asdl env: python: No such file or directory *** Error code 127 Stop in /usr/home/build/dev/python-svn. Anyway, I'll work on this. Thanks for the support. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 27 03:42:05 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 27 Oct 2008 02:42:05 +0000 Subject: [issue4211] frozen packages set an improper __path__ value In-Reply-To: <1225075325.55.0.00322854082077.issue4211@psf.upfronthosting.co.za> Message-ID: <1225075325.55.0.00322854082077.issue4211@psf.upfronthosting.co.za> New submission from Brett Cannon : If you import a frozen package (e.g. __phello__), __path__ is set to '__phello__'. But this should be a list as specified by both PEP 302 (http://www.python.org/dev/peps/pep-0302/) and the original doc outlining the package mechanism (http://www.python.org/doc/essays/packages.html). Changing import to put the string in a list is all that is needed to correct this (although it might break some code relying on the fact that it has been a string in previous versions). ---------- components: Interpreter Core messages: 75250 nosy: brett.cannon severity: normal status: open title: frozen packages set an improper __path__ value type: behavior versions: Python 2.5, Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 27 06:57:21 2008 From: report at bugs.python.org (Brandon Bloom) Date: Mon, 27 Oct 2008 05:57:21 +0000 Subject: [issue4212] email.LazyImporter does not use absolute imports In-Reply-To: <1225087041.33.0.0357186656553.issue4212@psf.upfronthosting.co.za> Message-ID: <1225087041.33.0.0357186656553.issue4212@psf.upfronthosting.co.za> New submission from Brandon Bloom : I have a package with a module called "email". If I try to use the standard email package, it fails to load email.Utils because email.LazyImporter is looking in my email module instead of the top- level email package. ---------- components: Library (Lib) messages: 75251 nosy: brandonbloom severity: normal status: open title: email.LazyImporter does not use absolute imports type: behavior versions: Python 2.5.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 27 14:29:15 2008 From: report at bugs.python.org (Christian Heimes) Date: Mon, 27 Oct 2008 13:29:15 +0000 Subject: [issue4213] Lower case file system encoding In-Reply-To: <1225114155.31.0.609003653611.issue4213@psf.upfronthosting.co.za> Message-ID: <1225114155.31.0.609003653611.issue4213@psf.upfronthosting.co.za> New submission from Christian Heimes : Python should lower case the file system encoding in Python/pythonrun.c. On several occasions Python optimizes code paths for lower case encodings like "utf-8" or "latin-1". On my Ubuntu system the file system encoding is upper case ("UTF-8") and the optimizations aren't used. This also causes problems with sub interpreters #3723 initstdio() in the sub interpreter fails because "UTF-8" must be looked up in the codecs and encoding registry while "utf-8" works like a charm. $ python2.6 -c "import sys; print sys.getfilesystemencoding()" UTF-8 $ python3.0 -c "import sys; print(sys.getfilesystemencoding())" UTF-8 $ locale LANG=de_DE.UTF-8 LANGUAGE=en_US:en:de_DE:de LC_CTYPE="de_DE.UTF-8" LC_NUMERIC="de_DE.UTF-8" LC_TIME="de_DE.UTF-8" LC_COLLATE="de_DE.UTF-8" LC_MONETARY="de_DE.UTF-8" LC_MESSAGES="de_DE.UTF-8" LC_PAPER="de_DE.UTF-8" LC_NAME="de_DE.UTF-8" LC_ADDRESS="de_DE.UTF-8" LC_TELEPHONE="de_DE.UTF-8" LC_MEASUREMENT="de_DE.UTF-8" LC_IDENTIFICATION="de_DE.UTF-8" LC_ALL= The patch is trivial: if (codeset) { if (!Py_FileSystemDefaultEncoding) { char *p; for (p=codeset; *p; p++) *p = tolower(*p); Py_FileSystemDefaultEncoding = codeset; } else free(codeset); } Python/codecs.c:normalizestring() does a similar job. Maybe a new method "char* PyCodec_NormalizeEncodingName(const char*)" could be introduced for the problem. ---------- assignee: barry components: Interpreter Core keywords: patch messages: 75252 nosy: barry, christian.heimes priority: release blocker severity: normal status: open title: Lower case file system encoding type: behavior versions: Python 2.6, Python 2.7, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 27 14:29:28 2008 From: report at bugs.python.org (Christian Heimes) Date: Mon, 27 Oct 2008 13:29:28 +0000 Subject: [issue3723] Py_NewInterpreter does not work In-Reply-To: <1220011870.63.0.171875917127.issue3723@psf.upfronthosting.co.za> Message-ID: <1225114168.14.0.827046249618.issue3723@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- dependencies: +Lower case file system encoding _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 27 14:32:54 2008 From: report at bugs.python.org (Jesse Noller) Date: Mon, 27 Oct 2008 13:32:54 +0000 Subject: [issue4204] Cannot build _multiprocessing, math, mmap and readline of Python 2.6 on FreeBSD 4.11 w/ gcc 2.95.4 In-Reply-To: <1224957663.27.0.455052730171.issue4204@psf.upfronthosting.co.za> Message-ID: <1225114374.56.0.78976381172.issue4204@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- nosy: +jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 27 15:14:40 2008 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Oct 2008 14:14:40 +0000 Subject: [issue4213] Lower case file system encoding In-Reply-To: <1225114155.31.0.609003653611.issue4213@psf.upfronthosting.co.za> Message-ID: <1225116880.65.0.507381910265.issue4213@psf.upfronthosting.co.za> STINNER Victor added the comment: Converting to the lower case doesn't solve the problem: if the locale is "utf8" and Python checks for "utf-8", the optimization will fail. Another example: iso-8859-1, latin-1 or latin1? A correct patch would be to get the most common name of the charset and make sure that Python C code always use this name. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 27 15:30:37 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 27 Oct 2008 14:30:37 +0000 Subject: [issue4213] Lower case file system encoding In-Reply-To: <1225114155.31.0.609003653611.issue4213@psf.upfronthosting.co.za> Message-ID: <1225117837.43.0.122465481422.issue4213@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: The lower-casing doesn't hurt, since that's done anyway during codec lookup, but I'd be -1 on making this try to duplicate the aliasing already done by the encodings package. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 27 15:35:17 2008 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Oct 2008 14:35:17 +0000 Subject: [issue4213] Lower case file system encoding In-Reply-To: <1225114155.31.0.609003653611.issue4213@psf.upfronthosting.co.za> Message-ID: <1225118117.41.0.168843464272.issue4213@psf.upfronthosting.co.za> STINNER Victor added the comment: Here is a patch to get the "most common charset name": use codecs.lookup(codeset).name. Added file: http://bugs.python.org/file11896/get_codeset.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 27 16:03:08 2008 From: report at bugs.python.org (Christian Heimes) Date: Mon, 27 Oct 2008 15:03:08 +0000 Subject: [issue4213] Lower case file system encoding In-Reply-To: <1225114155.31.0.609003653611.issue4213@psf.upfronthosting.co.za> Message-ID: <1225119788.23.0.614246184972.issue4213@psf.upfronthosting.co.za> Christian Heimes added the comment: Victor's patch fixes the issue with #3723. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 27 16:05:33 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 27 Oct 2008 15:05:33 +0000 Subject: [issue4213] Lower case file system encoding In-Reply-To: <1225114155.31.0.609003653611.issue4213@psf.upfronthosting.co.za> Message-ID: <1225119933.64.0.462623608451.issue4213@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: +1 on adding Viktor's patch. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 27 16:53:09 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 27 Oct 2008 15:53:09 +0000 Subject: [issue4212] email.LazyImporter does not use absolute imports In-Reply-To: <1225087041.33.0.0357186656553.issue4212@psf.upfronthosting.co.za> Message-ID: <1225122789.93.0.928487347044.issue4212@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> barry nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 27 18:28:23 2008 From: report at bugs.python.org (Akira Kitada) Date: Mon, 27 Oct 2008 17:28:23 +0000 Subject: [issue4204] Cannot build _multiprocessing, math, mmap and readline of Python 2.6 on FreeBSD 4.11 w/ gcc 2.95.4 In-Reply-To: <1224957663.27.0.455052730171.issue4204@psf.upfronthosting.co.za> Message-ID: <1225128503.45.0.768761293627.issue4204@psf.upfronthosting.co.za> Akira Kitada added the comment: Attached is the patch containing all fixes. I tested this on py3k and trunk on FreeBSD 4.11. The test was done by using unitests in Lib/test. Because I could not find a test for readline and multiprocessing's test does not work on systems with HAVE_SEM_OPEN=0, I skipped test of readline and multiprocessing. Below is the result. Unfortunately, test_math.py failed one of its test. (Which was succeeded on FreeBSD 6.3) ## test_math.py w/ py3k ## $ ./python Lib/test/test_math.py testAcos (__main__.MathTests) ... ok testAcosh (__main__.MathTests) ... ok testAsin (__main__.MathTests) ... ok testAsinh (__main__.MathTests) ... ok testAtan (__main__.MathTests) ... ok testAtan2 (__main__.MathTests) ... ok testAtanh (__main__.MathTests) ... ok testCeil (__main__.MathTests) ... ok testConstants (__main__.MathTests) ... ok bash-3.2$ ./python Lib/test/test_math.py testAcos (__main__.MathTests) ... ok testAcosh (__main__.MathTests) ... ok testAsin (__main__.MathTests) ... ok testAsinh (__main__.MathTests) ... ok testAtan (__main__.MathTests) ... ok testAtan2 (__main__.MathTests) ... ok testAtanh (__main__.MathTests) ... ok testCeil (__main__.MathTests) ... ok testConstants (__main__.MathTests) ... ok testCopysign (__main__.MathTests) ... ok testCos (__main__.MathTests) ... ok testCosh (__main__.MathTests) ... ok testDegrees (__main__.MathTests) ... ok testExp (__main__.MathTests) ... ok testFabs (__main__.MathTests) ... ok testFactorial (__main__.MathTests) ... ok testFloor (__main__.MathTests) ... ok testFmod (__main__.MathTests) ... ok testFrexp (__main__.MathTests) ... ok testFsum (__main__.MathTests) ... ok testHypot (__main__.MathTests) ... ok testIsinf (__main__.MathTests) ... ok testIsnan (__main__.MathTests) ... ok testLdexp (__main__.MathTests) ... ok testLog (__main__.MathTests) ... ok testLog10 (__main__.MathTests) ... ok testLog1p (__main__.MathTests) ... ok testModf (__main__.MathTests) ... ok testPow (__main__.MathTests) ... ok testRadians (__main__.MathTests) ... ok testSin (__main__.MathTests) ... ok testSinh (__main__.MathTests) ... ok testSqrt (__main__.MathTests) ... ok testTan (__main__.MathTests) ... ok testTanh (__main__.MathTests) ... FAIL test_exceptions (__main__.MathTests) ... ok test_testfile (__main__.MathTests) ... ok test_trunc (__main__.MathTests) ... ok Doctest: ieee754.txt ... ok ====================================================================== FAIL: testTanh (__main__.MathTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_math.py", line 764, in testTanh math.copysign(1., -0.)) AssertionError: 1.0 != -1.0 ---------------------------------------------------------------------- Ran 39 tests in 2.623s FAILED (failures=1) Traceback (most recent call last): File "Lib/test/test_math.py", line 891, in test_main() File "Lib/test/test_math.py", line 888, in test_main run_unittest(suite) File "/usr/home/build/dev/py3k/Lib/test/support.py", line 698, in run_unittest _run_suite(suite) File "/usr/home/build/dev/py3k/Lib/test/support.py", line 681, in _run_suite raise TestFailed(err) test.support.TestFailed: Traceback (most recent call last): File "Lib/test/test_math.py", line 764, in testTanh math.copysign(1., -0.)) AssertionError: 1.0 != -1.0 ## test_mmap.py w/ py3k ## $ ./python Lib/test/test_ Display all 328 possibilities? (y or n) bash-3.2$ ./python Lib/test/test_mmap.py test_access_parameter (__main__.MmapTests) ... ok test_anonymous (__main__.MmapTests) ... ok test_bad_file_desc (__main__.MmapTests) ... ok test_basic (__main__.MmapTests) ... ok test_double_close (__main__.MmapTests) ... ok test_entire_file (__main__.MmapTests) ... ok test_error (__main__.MmapTests) ... ok test_extended_getslice (__main__.MmapTests) ... ok test_extended_set_del_slice (__main__.MmapTests) ... ok test_find_end (__main__.MmapTests) ... ok test_move (__main__.MmapTests) ... ok test_offset (__main__.MmapTests) ... ok test_prot_readonly (__main__.MmapTests) ... ok test_rfind (__main__.MmapTests) ... ok test_subclass (__main__.MmapTests) ... ok test_tougher_find (__main__.MmapTests) ... ok ---------------------------------------------------------------------- Ran 16 tests in 0.084s OK ## test_math.py w/ python-trunk ## $ ./python Lib/test/test_math.py testAcos (__main__.MathTests) ... ok testAcosh (__main__.MathTests) ... ok testAsin (__main__.MathTests) ... ok testAsinh (__main__.MathTests) ... ok testAtan (__main__.MathTests) ... ok testAtan2 (__main__.MathTests) ... ok testAtanh (__main__.MathTests) ... ok testCeil (__main__.MathTests) ... ok testConstants (__main__.MathTests) ... ok testCopysign (__main__.MathTests) ... ok testCos (__main__.MathTests) ... ok testCosh (__main__.MathTests) ... ok bash-3.2$ ./python Lib/test/test_math.py testAcos (__main__.MathTests) ... ok testAcosh (__main__.MathTests) ... ok testAsin (__main__.MathTests) ... ok testAsinh (__main__.MathTests) ... ok testAtan (__main__.MathTests) ... ok testAtan2 (__main__.MathTests) ... ok testAtanh (__main__.MathTests) ... ok testCeil (__main__.MathTests) ... ok testConstants (__main__.MathTests) ... ok testCopysign (__main__.MathTests) ... ok testCos (__main__.MathTests) ... ok testCosh (__main__.MathTests) ... ok testDegrees (__main__.MathTests) ... ok testExp (__main__.MathTests) ... ok testFabs (__main__.MathTests) ... ok testFactorial (__main__.MathTests) ... ok testFloor (__main__.MathTests) ... ok testFmod (__main__.MathTests) ... ok testFrexp (__main__.MathTests) ... ok testFsum (__main__.MathTests) ... ok testHypot (__main__.MathTests) ... ok testIsinf (__main__.MathTests) ... ok testIsnan (__main__.MathTests) ... ok testLdexp (__main__.MathTests) ... ok testLog (__main__.MathTests) ... ok testLog10 (__main__.MathTests) ... ok testLog1p (__main__.MathTests) ... ok testModf (__main__.MathTests) ... ok testPow (__main__.MathTests) ... ok testRadians (__main__.MathTests) ... ok testSin (__main__.MathTests) ... ok testSinh (__main__.MathTests) ... ok testSqrt (__main__.MathTests) ... ok testTan (__main__.MathTests) ... ok testTanh (__main__.MathTests) ... FAIL test_exceptions (__main__.MathTests) ... ok test_testfile (__main__.MathTests) ... ok test_trunc (__main__.MathTests) ... ok Doctest: ieee754.txt ... ok ====================================================================== FAIL: testTanh (__main__.MathTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_math.py", line 768, in testTanh math.copysign(1., -0.)) AssertionError: 1.0 != -1.0 ---------------------------------------------------------------------- Ran 39 tests in 2.374s FAILED (failures=1) Traceback (most recent call last): File "Lib/test/test_math.py", line 894, in test_main() File "Lib/test/test_math.py", line 891, in test_main run_unittest(suite) File "/usr/home/build/dev/python-svn/Lib/test/test_support.py", line 710, in run_unittest _run_suite(suite) File "/usr/home/build/dev/python-svn/Lib/test/test_support.py", line 693, in _run_suite raise TestFailed(err) test.test_support.TestFailed: Traceback (most recent call last): File "Lib/test/test_math.py", line 768, in testTanh math.copysign(1., -0.)) AssertionError: 1.0 != -1.0 ## test_mmap.py w/ python-trunk ## $ ./python Lib/test/test_mmap.py test_access_parameter (__main__.MmapTests) ... ok test_anonymous (__main__.MmapTests) ... ok test_bad_file_desc (__main__.MmapTests) ... ok test_basic (__main__.MmapTests) ... ok test_double_close (__main__.MmapTests) ... ok test_entire_file (__main__.MmapTests) ... ok test_error (__main__.MmapTests) ... ok test_extended_getslice (__main__.MmapTests) ... ok test_extended_set_del_slice (__main__.MmapTests) ... ok test_find_end (__main__.MmapTests) ... ok test_move (__main__.MmapTests) ... ok test_offset (__main__.MmapTests) ... ok test_prot_readonly (__main__.MmapTests) ... ok test_rfind (__main__.MmapTests) ... ok test_subclass (__main__.MmapTests) ... ok test_tougher_find (__main__.MmapTests) ... ok ---------------------------------------------------------------------- Ran 16 tests in 0.094s OK Added file: http://bugs.python.org/file11897/issue4204.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 27 18:38:01 2008 From: report at bugs.python.org (Jesse Noller) Date: Mon, 27 Oct 2008 17:38:01 +0000 Subject: [issue4204] Cannot build _multiprocessing, math, mmap and readline of Python 2.6 on FreeBSD 4.11 w/ gcc 2.95.4 In-Reply-To: <1224957663.27.0.455052730171.issue4204@psf.upfronthosting.co.za> Message-ID: <1225129081.03.0.403598801553.issue4204@psf.upfronthosting.co.za> Jesse Noller added the comment: Please see issue3770 for details on the multiprocessing library, SEM_OPEN and freebsd. The short answer is that FreeBSD support for MP is not available. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 27 20:35:42 2008 From: report at bugs.python.org (inkblotter) Date: Mon, 27 Oct 2008 19:35:42 +0000 Subject: [issue4026] fcntl extension fails to build on AIX 6.1 In-Reply-To: <1223022763.11.0.245770368063.issue4026@psf.upfronthosting.co.za> Message-ID: <1225136142.26.0.389630056676.issue4026@psf.upfronthosting.co.za> inkblotter added the comment: This occurs because it must link with -lbsd on AIX 6.1. If you hand link the failing module by adding -lbsd it builds quietly. If you build the prerequisites for the _tkinter module on AIX 6.1, you will also encounter an error becuase this module is not linked with the -lXext library. Again, you can hand link it with that library. Notice that the modules ignore these two libraries when they are passed to the python build. The modules should build against the libraries that are mentioned in the --with-libs=LIBS argument to python configure. I will eventually figure out how to modify setup.py so that these two failures no longer occur on AIX 6.1. ---------- nosy: +inkblotter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 27 21:26:45 2008 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 27 Oct 2008 20:26:45 +0000 Subject: [issue4204] Cannot build _multiprocessing, math, mmap and readline of Python 2.6 on FreeBSD 4.11 w/ gcc 2.95.4 In-Reply-To: <1224957663.27.0.455052730171.issue4204@psf.upfronthosting.co.za> Message-ID: <1225139205.75.0.189375157466.issue4204@psf.upfronthosting.co.za> Mark Dickinson added the comment: The test_math failure may well be due to a libm bug: tanh(-0.0) might be incorrectly (judging by the BSD man pages) dropping the negative sign from the negative zero. In the output of ./configure, there should be a line that looks like: checking whether tanh preserves the sign of zero... yes I'm guessing that on your machine you get a "no" instead of a "yes" there, indicating that tanh(-0.0) is 0.0 instead of -0.0 on your platform. Is this the case? ---------- nosy: +marketdickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 27 21:53:26 2008 From: report at bugs.python.org (Roumen Petrov) Date: Mon, 27 Oct 2008 20:53:26 +0000 Subject: [issue4204] Cannot build _multiprocessing, math, mmap and readline of Python 2.6 on FreeBSD 4.11 w/ gcc 2.95.4 In-Reply-To: <1224957663.27.0.455052730171.issue4204@psf.upfronthosting.co.za> Message-ID: <1225140806.03.0.969286032024.issue4204@psf.upfronthosting.co.za> Roumen Petrov added the comment: about changes in configure.in(issue4204.diff) - it seems to me that we could unify all darwin platforms. ---------- nosy: +rpetrov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 27 21:53:32 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 27 Oct 2008 20:53:32 +0000 Subject: [issue2306] Update What's new in 3.0 In-Reply-To: <1205701603.67.0.309619584416.issue2306@psf.upfronthosting.co.za> Message-ID: <1225140812.76.0.666402585087.issue2306@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Ping. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 27 22:54:22 2008 From: report at bugs.python.org (Robin Dunn) Date: Mon, 27 Oct 2008 21:54:22 +0000 Subject: [issue4214] no extension debug info with msvc9compiler.py In-Reply-To: <1225144462.62.0.9122976862.issue4214@psf.upfronthosting.co.za> Message-ID: <1225144462.62.0.9122976862.issue4214@psf.upfronthosting.co.za> New submission from Robin Dunn : It looks like part of r59290 resulted in /pdb:None always being part of the ldflags_shared_debug list. This means that there will be no debug info stored for extensions built in debug mode, which kinda negates the purpose of doing a debug build. Looking back at the revision history and comparing similar code in msvccompiler.py it looks like the /pdb:None was optionally added in the first place because of compatibility issues with earlier compilers. For MSVC 7 and 9 I think it should be fine to simply remove /pdb:None from that list. My ad hoc testing so far has not revealed any problems with making this change. ---------- components: Distutils messages: 75264 nosy: robind severity: normal status: open title: no extension debug info with msvc9compiler.py type: compile error versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 27 23:13:50 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 27 Oct 2008 22:13:50 +0000 Subject: [issue4214] no extension debug info with msvc9compiler.py In-Reply-To: <1225144462.62.0.9122976862.issue4214@psf.upfronthosting.co.za> Message-ID: <1225145630.71.0.263530348917.issue4214@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Furthermore, /PDB:None is no more supported by VC2008 express. You end up with files named "None"... ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 27 23:38:23 2008 From: report at bugs.python.org (Akira Kitada) Date: Mon, 27 Oct 2008 22:38:23 +0000 Subject: [issue4204] Cannot build _multiprocessing, math, mmap and readline of Python 2.6 on FreeBSD 4.11 w/ gcc 2.95.4 In-Reply-To: <1224957663.27.0.455052730171.issue4204@psf.upfronthosting.co.za> Message-ID: <1225147103.14.0.138436343509.issue4204@psf.upfronthosting.co.za> Akira Kitada added the comment: Here's the output of configure. Just as Mark said, it looks this is due to a libm bug. """ $ grep tanh config.log configure:22062: checking whether tanh preserves the sign of zero | and tanh(-0.) == -0. */ | atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0); configure:22261: checking for atanh ac_cv_func_atanh=yes ac_cv_tanh_preserves_zero_sign=no """ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 00:04:32 2008 From: report at bugs.python.org (Kevin Watters) Date: Mon, 27 Oct 2008 23:04:32 +0000 Subject: [issue3545] Python turning off assertions (Windows) In-Reply-To: <1218535531.94.0.182570624972.issue3545@psf.upfronthosting.co.za> Message-ID: <1225148672.5.0.916981859896.issue3545@psf.upfronthosting.co.za> Changes by Kevin Watters : ---------- nosy: +kevinwatters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 00:18:28 2008 From: report at bugs.python.org (Joey Pallaria) Date: Mon, 27 Oct 2008 23:18:28 +0000 Subject: [issue4215] Running Python 2.6 GUI on Windows Vista In-Reply-To: <1225149508.54.0.581976390408.issue4215@psf.upfronthosting.co.za> Message-ID: <1225149508.54.0.581976390408.issue4215@psf.upfronthosting.co.za> New submission from Joey Pallaria : I installed Python 2.6 a few days ago and tried to launch the Python IDLE GUI application. Nothing happened. I've read a couple issues about previous versions of Python IDLE not working on Windows Vista. and they recommended deleting the .idlerc folder in the user directory as well as disabling the UAC (User Account Control) I've done both of these, but i still can't manage to get IDLE to run, any help would be greatly appreciated. ---------- components: IDLE messages: 75267 nosy: Elushin severity: normal status: open title: Running Python 2.6 GUI on Windows Vista type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 00:28:29 2008 From: report at bugs.python.org (Akira Kitada) Date: Mon, 27 Oct 2008 23:28:29 +0000 Subject: [issue4204] Cannot build _multiprocessing, math, mmap and readline of Python 2.6 on FreeBSD 4.11 w/ gcc 2.95.4 In-Reply-To: <1224957663.27.0.455052730171.issue4204@psf.upfronthosting.co.za> Message-ID: <1225150109.69.0.807028017018.issue4204@psf.upfronthosting.co.za> Akira Kitada added the comment: Roumen, in Darwin, there is a macro called _DARWIN_C_SOURCE, which re-enables things disabled by _XOPEN_SOURCE or the like. (At least on OS X 10.5.5) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 00:54:50 2008 From: report at bugs.python.org (Brett Cannon) Date: Mon, 27 Oct 2008 23:54:50 +0000 Subject: [issue4211] frozen packages set an improper __path__ value In-Reply-To: <1225075325.55.0.00322854082077.issue4211@psf.upfronthosting.co.za> Message-ID: <1225151690.45.0.148941839144.issue4211@psf.upfronthosting.co.za> Brett Cannon added the comment: Looking at Python/import.c:find_module, fixing this will require changing the setting of __path__ for frozen packages and how frozen modules are found. The former will require changing PyImport_ImportFrozenModule() to use a list instead of a string for the packages. To make the change work for find frozen modules, find_module() will need to change. Basically the special-casing for 'path' around frozen module just needs to go. This will lead to a slight performance penalty as all imports will require checking for an equivalent frozen module, but since it is a strcmp in a loop it should not be too bad. The performance cost can go away if some strapping young lad happens to re-implement import in such a way that the frozen module parts can easily be left out. =) Setting as a release blocker for now in case Barry is willing to let this go into 3.0rc4. ---------- assignee: -> brett.cannon priority: -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 00:57:47 2008 From: report at bugs.python.org (Amy) Date: Mon, 27 Oct 2008 23:57:47 +0000 Subject: [issue4216] subprocess.Popen hangs at communicate() when child exits In-Reply-To: <1225151867.64.0.844146967045.issue4216@psf.upfronthosting.co.za> Message-ID: <1225151867.64.0.844146967045.issue4216@psf.upfronthosting.co.za> New submission from Amy : I have a simple program to call a shell command "service cpboot start" to start Check Point firewall on RHEL5.1. ================= #!/usr/bin/env python # vim: softtabstop=4 shiftwidth=4 expandtab import os from subprocess import * p = Popen('service cpboot stop',shell=True, stdout=PIPE) output = p.communicate() print 'STDERR: %s' % output[0] print 'STDOUT: %s' % output[1] =============== Python process pid 13343 spawned child 13375 to run "service cpboot start". However, after child process 13375 finished and sent SIGCHLD to the python script, the parent hangs in Popen function communicate() at line 1041 and child process 13375 became a defunct process. Traceback (most recent call last): File "./subprocess_test03.py", line 7, in ? output = p.communicate() File "/usr/lib/python2.4/subprocess.py", line 1041, in communicate rlist, wlist, xlist = select.select(read_set, write_set, []) KeyboardInterrupt Here is part of the strace: Process 13375 detached [pid 19195] close(878) = -1 EBADF (Bad file descriptor) [pid 19195] close(879) = -1 EBADF (Bad file descriptor) [pid 19195] close(880) = -1 EBADF (Bad file descriptor) [pid 13343] <... select resumed> ) = ? ERESTARTNOHAND (To be restarted) [pid 19195] close(881 [pid 13343] --- SIGCHLD (Child exited) @ 0 (0) --- [pid 19195] <... close resumed> ) = -1 EBADF (Bad file descriptor) [pid 13343] select(7, [4 6], [], [], NULL It seems like the select system call got interrupted and error code was "ERESTARTNOHAND" was returned. The PIPEs won't be able to terminate since child process has finished and exited and EOF won't be read from the PIPEs. If executing the shell command directly from shell command line, there's no problem at all.It seems like there might be some race condition somewhere in the python library. Any idea what may cause the problem? Many thanks in advance. ---------- components: Library (Lib) files: subprocess_test03.py messages: 75270 nosy: amy20_z severity: normal status: open title: subprocess.Popen hangs at communicate() when child exits type: crash versions: Python 2.4 Added file: http://bugs.python.org/file11898/subprocess_test03.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 01:26:26 2008 From: report at bugs.python.org (Bill Hart) Date: Tue, 28 Oct 2008 00:26:26 +0000 Subject: [issue4217] Add file comparisons to the unittest library In-Reply-To: <1225153586.34.0.218245937188.issue4217@psf.upfronthosting.co.za> Message-ID: <1225153586.34.0.218245937188.issue4217@psf.upfronthosting.co.za> New submission from Bill Hart : In the past year I've become a heavy user of the unittest package for managing a variety of software tests. One capability that I've frequently needed is the ability to generate text file outputs that can be compared against a baseline. To my knowledge, this is not currently supported in unittest. I've developed several file comparison functions that are written in a unittest-like style. See https://software.sandia.gov/svn/public/pyutilib/trunk/pyutilib_th/pyunit.py for the test functions, and https://software.sandia.gov/svn/public/pyutilib/trunk/pyutilib_th/misc.py for the underlying file comparison functions. ---------- components: Library (Lib) messages: 75271 nosy: wehart severity: normal status: open title: Add file comparisons to the unittest library type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 03:26:23 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 28 Oct 2008 02:26:23 +0000 Subject: [issue4217] Add file comparisons to the unittest library In-Reply-To: <1225153586.34.0.218245937188.issue4217@psf.upfronthosting.co.za> Message-ID: <1225160783.17.0.106236785788.issue4217@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 06:42:02 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 28 Oct 2008 05:42:02 +0000 Subject: [issue4049] IDLE does not open too In-Reply-To: <1223253081.14.0.0863464602504.issue4049@psf.upfronthosting.co.za> Message-ID: <1225172522.7.0.856720282982.issue4049@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Giampaolo: I'm skeptical that the patch helps. If you can't start IDLE because you cannot import Tkinter, displaying the error in a tkMessageBox will do no good, either. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 06:49:10 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 28 Oct 2008 05:49:10 +0000 Subject: [issue4215] Running Python 2.6 GUI on Windows Vista In-Reply-To: <1225149508.54.0.581976390408.issue4215@psf.upfronthosting.co.za> Message-ID: <1225172950.14.0.498499584822.issue4215@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Can you confirm that you used a "for me" installation, rather than a "for all" installation? If so, this is a duplicate of issue4018. Please understand that the bug tracker is not a place where you get help. Instead, it is a place where you *provide* help. ---------- nosy: +loewis resolution: -> duplicate superseder: -> "for me" installer problem on x64 Vista _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 11:29:46 2008 From: report at bugs.python.org (Roumen Petrov) Date: Tue, 28 Oct 2008 10:29:46 +0000 Subject: [issue4204] Cannot build _multiprocessing, math, mmap and readline of Python 2.6 on FreeBSD 4.11 w/ gcc 2.95.4 In-Reply-To: <1224957663.27.0.455052730171.issue4204@psf.upfronthosting.co.za> Message-ID: <1225189786.37.0.887217642836.issue4204@psf.upfronthosting.co.za> Roumen Petrov added the comment: The patch issue4204.diff split cases for "FreeBSD/4.8* | Darwin/6* )". Please look 10-15 lines below in same case statement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 12:15:50 2008 From: report at bugs.python.org (Christian Heimes) Date: Tue, 28 Oct 2008 11:15:50 +0000 Subject: [issue4213] Lower case file system encoding In-Reply-To: <1225114155.31.0.609003653611.issue4213@psf.upfronthosting.co.za> Message-ID: <1225192550.46.0.398014424142.issue4213@psf.upfronthosting.co.za> Christian Heimes added the comment: Me, too! The solution is elegant and works well. Barry still has to accept the patch, though. ---------- resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 12:20:44 2008 From: report at bugs.python.org (Christian Heimes) Date: Tue, 28 Oct 2008 11:20:44 +0000 Subject: [issue3723] Py_NewInterpreter does not work In-Reply-To: <1220011870.63.0.171875917127.issue3723@psf.upfronthosting.co.za> Message-ID: <1225192844.67.0.220109191212.issue3723@psf.upfronthosting.co.za> Christian Heimes added the comment: In combination with the patch in #4213, "subinterpreter.patch" fixes the problem. I'm assigning the bug to Barry for his final decision. ---------- assignee: -> barry nosy: +barry type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 12:22:49 2008 From: report at bugs.python.org (Christian Heimes) Date: Tue, 28 Oct 2008 11:22:49 +0000 Subject: [issue4200] atexit module not safe in Python 3.0 with multiple interpreters In-Reply-To: <1224888355.2.0.82482284838.issue4200@psf.upfronthosting.co.za> Message-ID: <1225192969.14.0.275444796026.issue4200@psf.upfronthosting.co.za> Christian Heimes added the comment: Martin, can you please review and comment on my patch? Graham, does the patch solve your problem? ---------- assignee: -> loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 12:27:12 2008 From: report at bugs.python.org (Graham Dumpleton) Date: Tue, 28 Oct 2008 11:27:12 +0000 Subject: [issue4200] atexit module not safe in Python 3.0 with multiple interpreters In-Reply-To: <1224888355.2.0.82482284838.issue4200@psf.upfronthosting.co.za> Message-ID: <1225193232.76.0.854710559292.issue4200@psf.upfronthosting.co.za> Graham Dumpleton added the comment: By visual inspection the intent looks correct, but can't actually test it until I can checkout Python code from source repository and apply patch as patch doesn't apply cleanly to 3.0rc1. With #3723 and #4213 now also having patches, will need to sit down and look at all of them and see if find any new issues. May take me a couple of days to get time. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 13:57:05 2008 From: report at bugs.python.org (Christian Heimes) Date: Tue, 28 Oct 2008 12:57:05 +0000 Subject: [issue3626] python3.0 interpreter on Cygwin ignores all arguments In-Reply-To: <1219293362.56.0.98048679745.issue3626@psf.upfronthosting.co.za> Message-ID: <1225198625.6.0.468449750976.issue3626@psf.upfronthosting.co.za> Christian Heimes added the comment: I can't reproduce the problem with my installation of Cygwin on Windows XP. However the patch doesn't cause problems so you might apply it. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 15:18:33 2008 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 28 Oct 2008 14:18:33 +0000 Subject: [issue2306] Update What's new in 3.0 In-Reply-To: <1205701603.67.0.309619584416.issue2306@psf.upfronthosting.co.za> Message-ID: <1225203513.24.0.425151264859.issue2306@psf.upfronthosting.co.za> Guido van Rossum added the comment: Yes, I know. I'll spend some time on it this week. BTW what's the hold-up with the rc2 release? Or did I just miss it? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 16:02:03 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 Oct 2008 15:02:03 +0000 Subject: [issue1210] imaplib does not run under Python 3 In-Reply-To: <1190872174.76.0.553436258502.issue1210@psf.upfronthosting.co.za> Message-ID: <1225206123.34.0.868138064948.issue1210@psf.upfronthosting.co.za> STINNER Victor added the comment: Can anyone review my last patch (imaplib_bytes-3.patch)? ---------- keywords: +needs review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 16:02:25 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 Oct 2008 15:02:25 +0000 Subject: [issue3727] poplib module broken by str to unicode conversion In-Reply-To: <1220018390.31.0.482710376741.issue3727@psf.upfronthosting.co.za> Message-ID: <1225206145.34.0.241586819217.issue3727@psf.upfronthosting.co.za> STINNER Victor added the comment: Can anyone review my last patch (poplib-bytes-2.patch)? ---------- keywords: +needs review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 16:05:37 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 Oct 2008 15:05:37 +0000 Subject: [issue3714] nntplib module broken by str to unicode conversion In-Reply-To: <1219932621.55.0.439111476187.issue3714@psf.upfronthosting.co.za> Message-ID: <1225206337.42.0.0543423019493.issue3714@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file11787/nntplib_unicode.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 16:12:12 2008 From: report at bugs.python.org (gerhard_xXx) Date: Tue, 28 Oct 2008 15:12:12 +0000 Subject: [issue4218] tarfile module fails to correctly parse some .tar.gz archives?! In-Reply-To: <1225206732.62.0.645534354703.issue4218@psf.upfronthosting.co.za> Message-ID: <1225206732.62.0.645534354703.issue4218@psf.upfronthosting.co.za> New submission from gerhard_xXx : hi, seems like tarfile module for python 2.4 is broken. If I open the attached dir.tar.gz (tried it on different machines) then tarfile module only displays a part of the contents. what I did: >>> import tarfile >>> f = tarfile.open('dir.tar.gz','r:gz') >>> f.getnames() getnames() only returns the files/directories in the dir.tar.gz that start with letter "a-j" and skips the rest???!! cheers gerhard More info (I have debian etch installation): Python 2.4.4 (#2, Apr 16 2008, 17:58:59) [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 $ tar --version tar (GNU tar) 1.16 Copyright (C) 2006 Free Software Foundation, Inc. ---------- components: Extension Modules files: dir.tar.gz messages: 75284 nosy: gerhard_xXx severity: normal status: open title: tarfile module fails to correctly parse some .tar.gz archives?! type: behavior versions: Python 2.4 Added file: http://bugs.python.org/file11899/dir.tar.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 16:16:06 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 Oct 2008 15:16:06 +0000 Subject: [issue4218] tarfile module fails to correctly parse some .tar.gz archives?! In-Reply-To: <1225206732.62.0.645534354703.issue4218@psf.upfronthosting.co.za> Message-ID: <1225206966.79.0.782047020973.issue4218@psf.upfronthosting.co.za> STINNER Victor added the comment: The bug is fixed in Python 2.5. Since Python 2.6 was released the 1st October, why not upgrading to 2.6 or at least 2.5? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 16:46:13 2008 From: report at bugs.python.org (Carlos Eduardo Klock) Date: Tue, 28 Oct 2008 15:46:13 +0000 Subject: [issue4219] Problem with regular expression In-Reply-To: <1225208773.16.0.104236960618.issue4219@psf.upfronthosting.co.za> Message-ID: <1225208773.16.0.104236960618.issue4219@psf.upfronthosting.co.za> New submission from Carlos Eduardo Klock : Hello, I am having a weird problem with regex. I am trying to get the tokens that match the pattern below, but it is not working only for a specific case. I do this for many lines of text, and it works, except for the string '1214578800'. Any idea of what is happening? Is it a problem of my code or a bug in regular expressions? Thanks for any help, Carlos. import re r = re.compile(",'([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])'[,|)]") text = "('25','2','3','2','0','1','0','0/350','30','21','5','','1211641200','1214578800','0','2','1214662622');" timestamps = r.findall(text) print timestamps OUTPUT: Python 2.5.2 (r252:60911, Jul 31 2008, 17:31:22) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on Trabalho15, Standard >>> ['1211641200', '1214662622'] ---------- components: Regular Expressions messages: 75286 nosy: carlosklock severity: normal status: open title: Problem with regular expression type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 16:55:08 2008 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 Oct 2008 15:55:08 +0000 Subject: [issue4219] Problem with regular expression In-Reply-To: <1225208773.16.0.104236960618.issue4219@psf.upfronthosting.co.za> Message-ID: <1225209308.89.0.0713051243568.issue4219@psf.upfronthosting.co.za> STINNER Victor added the comment: It's not a Python bug: your regex is invalid. When the regex finds '1211641200', it reads >,'1211641200',< includind the last comma. So the cursor will be at the apostrophe before 1214578800: ...200','121457... --------^ You have to change your regex to not check the comma or use a non-matching group like (?<=,) and (?=[,)]). Note: you're using [,|)] which matchs >,<, >|<, and >)<. I guess that you wanted [,)]. ---------- nosy: +haypo resolution: -> invalid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 17:04:40 2008 From: report at bugs.python.org (Carlos Eduardo Klock) Date: Tue, 28 Oct 2008 16:04:40 +0000 Subject: [issue4219] Problem with regular expression In-Reply-To: <1225208773.16.0.104236960618.issue4219@psf.upfronthosting.co.za> Message-ID: <1225209880.59.0.425785881973.issue4219@psf.upfronthosting.co.za> Carlos Eduardo Klock added the comment: Sorry, it is really a problem with the comma. Thanks for helping! :) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 17:19:48 2008 From: report at bugs.python.org (David Fugate) Date: Tue, 28 Oct 2008 16:19:48 +0000 Subject: [issue4220] Builtins treated as free variables? In-Reply-To: <1225210788.32.0.89272753959.issue4220@psf.upfronthosting.co.za> Message-ID: <1225210788.32.0.89272753959.issue4220@psf.upfronthosting.co.za> New submission from David Fugate : #---------------------------------------------------------------------- VERSION AFFECTED: 2.5 and 2.6 BUILD TYPE: x86 FLAGS PASSED TO PYTHON.EXE: None OPERATING SYSTEM: 32-bit Windows Vista SP1 #---------------------------------------------------------------------- BRIEF DESCRIPTION: According to http://docs.python.org/dev/reference/executionmodel.html#interaction- with-dynamic-features, a free variable is a variable used from some local scope that is not defined there. The behavior of Python 2.5/2.6 is that it treats certain Python keywords and builtin types/functions used in nested scopes as free variables as well. This seems a little odd. Could the documentation be clarified to state: usage of certain Python keywords are considered to be free variables. I.e., a line simply containing "int" triggers the free variable behavior. Alternatively, usage of builtin types/functions could be allowed from nested functions with calls to "exec"? Thanks, Dave #---------------------------------------------------------------------- REPRODUCTION SNIPPET: def a(): def b(): x = long(3) #Replace me with "x = 3L" and this works int #This must be commented out exec "" emits the following: File "garbage.py", line 4 exec "" SyntaxError: unqualified exec is not allowed in function 'b' it is a nested function unless the "x = long(3)" and "int" lines are commented out. ---------- assignee: georg.brandl components: Documentation, Interpreter Core files: garbage.py messages: 75289 nosy: dfugate, georg.brandl severity: normal status: open title: Builtins treated as free variables? type: compile error versions: Python 2.5.3, Python 2.6 Added file: http://bugs.python.org/file11900/garbage.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 17:55:53 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 28 Oct 2008 16:55:53 +0000 Subject: [issue4219] Problem with regular expression In-Reply-To: <1225208773.16.0.104236960618.issue4219@psf.upfronthosting.co.za> Message-ID: <1225212953.85.0.735507594707.issue4219@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 18:11:57 2008 From: report at bugs.python.org (Jean-Paul Calderone) Date: Tue, 28 Oct 2008 17:11:57 +0000 Subject: [issue4221] inconsistent exception from int is confusing In-Reply-To: <1225213917.89.0.391557406226.issue4221@psf.upfronthosting.co.za> Message-ID: <1225213917.89.0.391557406226.issue4221@psf.upfronthosting.co.za> New submission from Jean-Paul Calderone : exarkun at charm:~$ python Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> int('\0', 256) Traceback (most recent call last): File "", line 1, in ValueError: invalid literal for int() with base 256: '\x00' >>> int('x', 256) Traceback (most recent call last): File "", line 1, in ValueError: int() base must be >= 2 and <= 36 >>> The former is misleading. \x00 is a perfectly valid byte if the base is 256. The real problem, that base 256 isn't supported, is obscured. It would be much better for the latter case's message to be used in the former case. ---------- components: Interpreter Core messages: 75290 nosy: exarkun severity: normal status: open title: inconsistent exception from int is confusing type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 18:15:43 2008 From: report at bugs.python.org (Akira Kitada) Date: Tue, 28 Oct 2008 17:15:43 +0000 Subject: [issue4204] Cannot build _multiprocessing, math, mmap and readline of Python 2.6 on FreeBSD 4.11 w/ gcc 2.95.4 In-Reply-To: <1224957663.27.0.455052730171.issue4204@psf.upfronthosting.co.za> Message-ID: <1225214143.62.0.849141899221.issue4204@psf.upfronthosting.co.za> Changes by Akira Kitada : Removed file: http://bugs.python.org/file11890/configure.in.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 18:15:54 2008 From: report at bugs.python.org (Akira Kitada) Date: Tue, 28 Oct 2008 17:15:54 +0000 Subject: [issue4204] Cannot build _multiprocessing, math, mmap and readline of Python 2.6 on FreeBSD 4.11 w/ gcc 2.95.4 In-Reply-To: <1224957663.27.0.455052730171.issue4204@psf.upfronthosting.co.za> Message-ID: <1225214154.15.0.910631086413.issue4204@psf.upfronthosting.co.za> Changes by Akira Kitada : Removed file: http://bugs.python.org/file11892/Modules_readline.c.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 18:16:01 2008 From: report at bugs.python.org (Akira Kitada) Date: Tue, 28 Oct 2008 17:16:01 +0000 Subject: [issue4204] Cannot build _multiprocessing, math, mmap and readline of Python 2.6 on FreeBSD 4.11 w/ gcc 2.95.4 In-Reply-To: <1224957663.27.0.455052730171.issue4204@psf.upfronthosting.co.za> Message-ID: <1225214161.06.0.29890645259.issue4204@psf.upfronthosting.co.za> Changes by Akira Kitada : Removed file: http://bugs.python.org/file11897/issue4204.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 18:16:46 2008 From: report at bugs.python.org (Jean-Paul Calderone) Date: Tue, 28 Oct 2008 17:16:46 +0000 Subject: [issue4222] dis.findlinestarts is missing from dis.__all__ and from the online documentation In-Reply-To: <1225214206.66.0.527749553778.issue4222@psf.upfronthosting.co.za> Message-ID: <1225214206.66.0.527749553778.issue4222@psf.upfronthosting.co.za> New submission from Jean-Paul Calderone : There aren't many high-ish level APIs for dealing with lnotab. dis.findlinestarts is one, but it's not clear if it's private or public. If it's public, it'd be great to make it clear that it is and document it. If it's not, perhaps it should be renamed _findlinestarts. ---------- assignee: georg.brandl components: Documentation, Library (Lib) messages: 75291 nosy: exarkun, georg.brandl severity: normal status: open title: dis.findlinestarts is missing from dis.__all__ and from the online documentation versions: Python 2.4, Python 2.5, Python 2.5.3, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 18:19:46 2008 From: report at bugs.python.org (Jean-Paul Calderone) Date: Tue, 28 Oct 2008 17:19:46 +0000 Subject: [issue4223] inspect.getsource doesn't work on functions imported from a zipfile In-Reply-To: <1225214386.69.0.0480331344152.issue4223@psf.upfronthosting.co.za> Message-ID: <1225214386.69.0.0480331344152.issue4223@psf.upfronthosting.co.za> New submission from Jean-Paul Calderone : It'd be better if it did. ---------- components: Library (Lib) messages: 75292 nosy: exarkun severity: normal status: open title: inspect.getsource doesn't work on functions imported from a zipfile type: behavior versions: Python 2.5, Python 2.5.3, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 18:19:52 2008 From: report at bugs.python.org (Akira Kitada) Date: Tue, 28 Oct 2008 17:19:52 +0000 Subject: [issue4204] Cannot build _multiprocessing, math, mmap and readline of Python 2.6 on FreeBSD 4.11 w/ gcc 2.95.4 In-Reply-To: <1224957663.27.0.455052730171.issue4204@psf.upfronthosting.co.za> Message-ID: <1225214392.37.0.0952435900602.issue4204@psf.upfronthosting.co.za> Akira Kitada added the comment: Thank you for pointing that out, Roumen! I didn't realize that. I updated the patch again. Added file: http://bugs.python.org/file11901/issue4204.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 18:22:48 2008 From: report at bugs.python.org (Georg Brandl) Date: Tue, 28 Oct 2008 17:22:48 +0000 Subject: [issue4221] inconsistent exception from int is confusing In-Reply-To: <1225213917.89.0.391557406226.issue4221@psf.upfronthosting.co.za> Message-ID: <1225214568.67.0.323790153439.issue4221@psf.upfronthosting.co.za> Georg Brandl added the comment: Since it is not defined which bytes are used as digits for bases > 36, \x00 is not a "valid byte". In any case, the problem here is that the base check is done after the "no NULL" check. Perhaps the error should explicitly mention that no null bytes are allowed. ---------- nosy: +georg.brandl priority: -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 18:27:30 2008 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 28 Oct 2008 17:27:30 +0000 Subject: [issue4223] inspect.getsource doesn't work on functions imported from a zipfile In-Reply-To: <1225214386.69.0.0480331344152.issue4223@psf.upfronthosting.co.za> Message-ID: <1225214850.61.0.313495540865.issue4223@psf.upfronthosting.co.za> Guilherme Polo added the comment: doesn't it ? it works here ---------- nosy: +gpolo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 18:43:55 2008 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 28 Oct 2008 17:43:55 +0000 Subject: [issue4223] inspect.getsource doesn't work on functions imported from a zipfile In-Reply-To: <1225214386.69.0.0480331344152.issue4223@psf.upfronthosting.co.za> Message-ID: <1225215835.44.0.0766994804455.issue4223@psf.upfronthosting.co.za> Guilherme Polo added the comment: Well anyway, some sample code: import zipfile z = zipfile.ZipFile('aaa.zip', mode='w') z.writestr('aa.py', 'def x(): print "hi there"\n\ndef y(): print "hi"') z.close() and then: import sys import inspect sys.path.append('aaa.zip') import aa inspect.getsource(aa.x) inspect.getsource(aa.y) Doesn't that work for you ? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 18:44:45 2008 From: report at bugs.python.org (=?utf-8?q?S=C3=A9rgio_Surkamp?=) Date: Tue, 28 Oct 2008 17:44:45 +0000 Subject: [issue4177] Crash in MIMEText on FreeBSD In-Reply-To: <1224700839.13.0.201844476382.issue4177@psf.upfronthosting.co.za> Message-ID: <1225215885.65.0.645170802593.issue4177@psf.upfronthosting.co.za> S?rgio Surkamp added the comment: Ok. Something is very wrong with our code too. I have dumped the text that's cousing the "freeze" and run it using the test case scripts. It worked slow, but worked. It seems that our application is eating too many memory from server (about 60Mbytes for a 2.4Mbytes message), so its obviously a application bug/leak. Unfortunately I cant submit the files for performance test, becose they may contain confidential information. As long as I can see on GDB, the python process is in a loop inside this functions: #0 0x2825798e in memcpy () from /lib/libc.so.7 #1 0x080a4607 in PyUnicodeUCS4_Concat () #2 0x080aec8d in PyEval_EvalFrameEx () #3 0x080b2c49 in PyEval_EvalCodeEx () #4 0x080b111a in PyEval_EvalFrameEx () #5 0x080b2c49 in PyEval_EvalCodeEx () #6 0x080b111a in PyEval_EvalFrameEx () #7 0x080b1f65 in PyEval_EvalFrameEx () #8 0x080b2c49 in PyEval_EvalCodeEx () #9 0x080b111a in PyEval_EvalFrameEx () #10 0x080b2c49 in PyEval_EvalCodeEx () #11 0x080eebd6 in PyClassMethod_New () #12 0x08059ef7 in PyObject_Call () #13 0x0805f341 in PyClass_IsSubclass () #14 0x08059ef7 in PyObject_Call () #15 0x080ac86c in PyEval_CallObjectWithKeywords () #16 0x080629d6 in PyInstance_New () #17 0x08059ef7 in PyObject_Call () #18 0x080af2bb in PyEval_EvalFrameEx () #19 0x080b2c49 in PyEval_EvalCodeEx () #20 0x080b111a in PyEval_EvalFrameEx () #21 0x080b1f65 in PyEval_EvalFrameEx () #22 0x080b1f65 in PyEval_EvalFrameEx () #23 0x080b1f65 in PyEval_EvalFrameEx () #24 0x080b2c49 in PyEval_EvalCodeEx () #25 0x080eec4e in PyClassMethod_New () #26 0x08059ef7 in PyObject_Call () #27 0x0805f341 in PyClass_IsSubclass () #28 0x08059ef7 in PyObject_Call () #29 0x080ac86c in PyEval_CallObjectWithKeywords () #30 0x080d4b58 in initthread () #31 0x28175acf in pthread_getprio () from /lib/libthr.so.3 #32 0x00000000 in ?? () Every memcpy call take a lot to complete, but it seems a problem with GDB debugging as it eats 80% to 95% of the CPU and python just 1% or 2%. How python charset conversion works from inside? It duplicates the original string every character substitution? If this is the case, shouldn't be better to count the substituitions, calculate the amount of needed memory and make just one allocation for the new string? Then copy the unmodified characters from the original to the new string and change other chars as needed? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 18:51:24 2008 From: report at bugs.python.org (Jean-Paul Calderone) Date: Tue, 28 Oct 2008 17:51:24 +0000 Subject: [issue4223] inspect.getsource doesn't work on functions imported from a zipfile In-Reply-To: <1225214386.69.0.0480331344152.issue4223@psf.upfronthosting.co.za> Message-ID: <1225216284.95.0.159490916659.issue4223@psf.upfronthosting.co.za> Jean-Paul Calderone added the comment: It seems to depend on working directory: exarkun at charm:/tmp$ python Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.path.append('/home/exarkun/foobar.zip') >>> import foobar, inspect >>> inspect.getsource(foobar.foo) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.5/inspect.py", line 629, in getsource lines, lnum = getsourcelines(object) File "/usr/lib/python2.5/inspect.py", line 618, in getsourcelines lines, lnum = findsource(object) File "/usr/lib/python2.5/inspect.py", line 468, in findsource raise IOError('could not get source code') IOError: could not get source code >>> versus: exarkun at charm:~$ python Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.path.append('/home/exarkun/foobar.zip') >>> import foobar, inspect >>> inspect.getsource(foobar.foo) 'def foo():\n pass\n' >>> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 19:17:56 2008 From: report at bugs.python.org (Christian Heimes) Date: Tue, 28 Oct 2008 18:17:56 +0000 Subject: [issue4204] Cannot build _multiprocessing, math, mmap and readline of Python 2.6 on FreeBSD 4.11 w/ gcc 2.95.4 In-Reply-To: <1224957663.27.0.455052730171.issue4204@psf.upfronthosting.co.za> Message-ID: <1225217876.33.0.279068103495.issue4204@psf.upfronthosting.co.za> Christian Heimes added the comment: The patch looks fine to me. ---------- assignee: -> barry resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 19:19:00 2008 From: report at bugs.python.org (=?utf-8?q?Lars_Gust=C3=A4bel?=) Date: Tue, 28 Oct 2008 18:19:00 +0000 Subject: [issue4218] tarfile module fails to correctly parse some .tar.gz archives?! In-Reply-To: <1225206732.62.0.645534354703.issue4218@psf.upfronthosting.co.za> Message-ID: <1225217940.92.0.294517637744.issue4218@psf.upfronthosting.co.za> Lars Gust?bel added the comment: This is a known bug in Python 2.4's tarfile version (cp. issue1509889 and issue1719898). It was fixed in Python 2.5. Thank you anyway for your report. ---------- nosy: +lars.gustaebel resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 19:51:50 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 28 Oct 2008 18:51:50 +0000 Subject: [issue4223] inspect.getsource doesn't work on functions imported from a zipfile In-Reply-To: <1225214386.69.0.0480331344152.issue4223@psf.upfronthosting.co.za> Message-ID: <1225219910.24.0.688561941672.issue4223@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: This must be very similar to #4197 and #4201 that I reported a few days ago. I'll see if a similar patch would work in this case. ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 20:24:14 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 28 Oct 2008 19:24:14 +0000 Subject: [issue4223] inspect.getsource doesn't work on functions imported from a zipfile In-Reply-To: <1225214386.69.0.0480331344152.issue4223@psf.upfronthosting.co.za> Message-ID: <1225221854.33.0.271212629243.issue4223@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Hmm, apparently inspect was made to work with zipped modules back in r45248 . I cannot reproduce the problem either. Jean-Paul, can you attach your foobar.zip? What else do you have in your /tmp directory? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 22:48:41 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Tue, 28 Oct 2008 21:48:41 +0000 Subject: [issue4223] inspect.getsource doesn't work on functions imported from a zipfile In-Reply-To: <1225214386.69.0.0480331344152.issue4223@psf.upfronthosting.co.za> Message-ID: <1225230521.65.0.505987122282.issue4223@psf.upfronthosting.co.za> Martin v. L?wis added the comment: In any case, it's clearly not a candidate for 2.5.3, due to the lack of a clear problem description, and a working patch. That essentially means that associating the version 2.5 is also fairly pointless, but I'll leave that in, anyway. ---------- nosy: +loewis versions: -Python 2.5.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 22:53:14 2008 From: report at bugs.python.org (Martin Green) Date: Tue, 28 Oct 2008 21:53:14 +0000 Subject: [issue4224] ** operating incorrectly for negative bases? In-Reply-To: <1225230794.37.0.55524776899.issue4224@psf.upfronthosting.co.za> Message-ID: <1225230794.37.0.55524776899.issue4224@psf.upfronthosting.co.za> New submission from Martin Green : I suspect that the following behavior is incorrect: Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32 >>> -1**2 -1 >>> -2**2 -4 >>> -1**0.5 -1.0 The same happens when the base is a float. I have not checked out the functionality of other versions of python The function pow (which claims to be equivalent to **) works as I would expect: >>> pow(-1, 2) 1 >>> pow(-2, 2) 4 >>> pow(-1, 0.5) Traceback (most recent call last): File "", line 1, in ValueError: negative number cannot be raised to a fractional power I was not sure which components to select, please change them if I got it wrong. ---------- assignee: theller components: Tests, ctypes messages: 75304 nosy: martin.speleo, theller severity: normal status: open title: ** operating incorrectly for negative bases? type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 22:57:07 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 28 Oct 2008 21:57:07 +0000 Subject: [issue4224] ** operating incorrectly for negative bases? In-Reply-To: <1225230794.37.0.55524776899.issue4224@psf.upfronthosting.co.za> Message-ID: <1225231027.75.0.613762989963.issue4224@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This is because the negative sign is evaluated after the power. (-1)**2 works correctly. ---------- components: +Interpreter Core -Tests, ctypes nosy: +benjamin.peterson resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 22:59:40 2008 From: report at bugs.python.org (Jean-Paul Calderone) Date: Tue, 28 Oct 2008 21:59:40 +0000 Subject: [issue4223] inspect.getsource doesn't work on functions imported from a zipfile In-Reply-To: <1225214386.69.0.0480331344152.issue4223@psf.upfronthosting.co.za> Message-ID: <1225231180.3.0.306670127153.issue4223@psf.upfronthosting.co.za> Jean-Paul Calderone added the comment: Here is a transcript for a complete, self-contained, minimal reproduction: exarkun at charm:~$ cd /tmp exarkun at charm:/tmp$ mkdir zipimportbugexample exarkun at charm:/tmp$ cd zipimportbugexample/ exarkun at charm:/tmp/zipimportbugexample$ mkdir foobar exarkun at charm:/tmp/zipimportbugexample$ echo "def foo(): pass" > foobar/__init__.py exarkun at charm:/tmp/zipimportbugexample$ zip foobar.zip foobar adding: foobar/ (stored 0%) exarkun at charm:/tmp/zipimportbugexample$ zip foobar.zip foobar/__init__.py adding: foobar/__init__.py (stored 0%) exarkun at charm:/tmp/zipimportbugexample$ rm -r foobar exarkun at charm:/tmp/zipimportbugexample$ mkdir workingdirectory exarkun at charm:/tmp/zipimportbugexample$ cd workingdirectory/ exarkun at charm:/tmp/zipimportbugexample/workingdirectory$ python Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.path.append('/tmp/zipimportbugexample/foobar.zip') >>> import foobar, inspect >>> inspect.getsource(foobar.foo) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.5/inspect.py", line 629, in getsource lines, lnum = getsourcelines(object) File "/usr/lib/python2.5/inspect.py", line 618, in getsourcelines lines, lnum = findsource(object) File "/usr/lib/python2.5/inspect.py", line 468, in findsource raise IOError('could not get source code') IOError: could not get source code >>> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 23:06:44 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 28 Oct 2008 22:06:44 +0000 Subject: [issue4225] unicode_literals doesn't work in exec In-Reply-To: <1225231604.07.0.232278936912.issue4225@psf.upfronthosting.co.za> Message-ID: <1225231604.07.0.232278936912.issue4225@psf.upfronthosting.co.za> New submission from Benjamin Peterson : exec "from __future__ import unicode_literals; print type('')" gives in 2.6/2.7. It's the result of flags not being passed from the parser to AST. ---------- components: Interpreter Core files: fix_exec_literals.patch keywords: needs review, patch messages: 75307 nosy: benjamin.peterson, georg.brandl priority: high severity: normal status: open title: unicode_literals doesn't work in exec versions: Python 2.6, Python 2.7 Added file: http://bugs.python.org/file11902/fix_exec_literals.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 23:09:55 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 28 Oct 2008 22:09:55 +0000 Subject: [issue4225] unicode_literals doesn't work in exec In-Reply-To: <1225231604.07.0.232278936912.issue4225@psf.upfronthosting.co.za> Message-ID: <1225231795.7.0.0394639095371.issue4225@psf.upfronthosting.co.za> Changes by Benjamin Peterson : Removed file: http://bugs.python.org/file11902/fix_exec_literals.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 23:10:07 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 28 Oct 2008 22:10:07 +0000 Subject: [issue4225] unicode_literals doesn't work in exec In-Reply-To: <1225231604.07.0.232278936912.issue4225@psf.upfronthosting.co.za> Message-ID: <1225231807.66.0.249614672171.issue4225@psf.upfronthosting.co.za> Changes by Benjamin Peterson : Added file: http://bugs.python.org/file11903/fix_exec_literals.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 23:47:00 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 28 Oct 2008 22:47:00 +0000 Subject: [issue4223] inspect.getsource doesn't work on functions imported from a zipfile In-Reply-To: <1225214386.69.0.0480331344152.issue4223@psf.upfronthosting.co.za> Message-ID: <1225234020.41.0.982262119532.issue4223@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Thanks, Jean-Paul, I can now reproduce your problem and I think I found the culprit. I believe the file name check in linecache.updatecache is unnecessary and is responsible for this problem. With the following patch: --- Lib/linecache.py (revision 67040) +++ Lib/linecache.py (working copy) @@ -88,7 +88,7 @@ get_source = getattr(loader, 'get_source', None) if name and get_source: - if basename.startswith(name.split('.')[-1]+'.'): +# if basename.startswith(name.split('.')[-1]+'.'): try: data = get_source(name) except (ImportError, IOError): and Jean-Paul's foobar: $ PYTHONPATH=/tmp/foobar.zip ./python.exe -c "import inspect,foobar; print inspect.getsource(foobar)" def foo(): pass Martin, is there a chance for this issue and #4197, #4201 to make it to 2.5.3? If so, I'll prepare a combined patch with tests for your consideration shortly. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 28 23:54:13 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 28 Oct 2008 22:54:13 +0000 Subject: [issue4200] atexit module not safe in Python 3.0 with multiple interpreters In-Reply-To: <1224888355.2.0.82482284838.issue4200@psf.upfronthosting.co.za> Message-ID: <1225234453.41.0.895398796107.issue4200@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This patch looks fine. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 29 03:45:39 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 29 Oct 2008 02:45:39 +0000 Subject: [issue4216] subprocess.Popen hangs at communicate() when child exits In-Reply-To: <1225151867.64.0.844146967045.issue4216@psf.upfronthosting.co.za> Message-ID: <1225248339.14.0.980099218382.issue4216@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 29 03:59:39 2008 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 29 Oct 2008 02:59:39 +0000 Subject: [issue4220] Builtins treated as free variables? In-Reply-To: <1225210788.32.0.89272753959.issue4220@psf.upfronthosting.co.za> Message-ID: <1225249179.87.0.912609607114.issue4220@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 29 04:23:20 2008 From: report at bugs.python.org (David W. Lambert) Date: Wed, 29 Oct 2008 03:23:20 +0000 Subject: [issue4226] Should 2to3 know that file type is gone? In-Reply-To: <1225250600.04.0.735766094217.issue4226@psf.upfronthosting.co.za> Message-ID: <1225250600.04.0.735766094217.issue4226@psf.upfronthosting.co.za> New submission from David W. Lambert : class c(file): pass 2to3 says no changes required. Might it possibly suggest a replacement for file class? Thanks, Dave. ---------- messages: 75310 nosy: LambertDW severity: normal status: open title: Should 2to3 know that file type is gone? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 29 04:25:08 2008 From: report at bugs.python.org (David W. Lambert) Date: Wed, 29 Oct 2008 03:25:08 +0000 Subject: [issue4226] Should 2to3 know that file type is gone? In-Reply-To: <1225250600.04.0.735766094217.issue4226@psf.upfronthosting.co.za> Message-ID: <1225250708.03.0.0269314708189.issue4226@psf.upfronthosting.co.za> Changes by David W. Lambert : ---------- components: +2to3 (2.x to 3.0 conversion tool) type: -> feature request versions: +Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 29 06:44:44 2008 From: report at bugs.python.org (David W. Lambert) Date: Wed, 29 Oct 2008 05:44:44 +0000 Subject: [issue4226] Should 2to3 know that file type is gone? In-Reply-To: <1225250600.04.0.735766094217.issue4226@psf.upfronthosting.co.za> Message-ID: <1225259084.74.0.611958203578.issue4226@psf.upfronthosting.co.za> David W. Lambert added the comment: python3k and I are having difficulty with File class, which in a version 2 python release extended the file type with methods to read through a file until some condition is found. ---------- type: feature request -> crash Added file: http://bugs.python.org/file11904/coredump.tar.Z _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 29 09:57:31 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 29 Oct 2008 08:57:31 +0000 Subject: [issue4225] unicode_literals doesn't work in exec In-Reply-To: <1225231604.07.0.232278936912.issue4225@psf.upfronthosting.co.za> Message-ID: <1225270651.92.0.987903083491.issue4225@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The attached patch works, but can be simplified by using a stack variable: Index: pythonrun.c =================================================================== --- pythonrun.c (revision 66902) +++ pythonrun.c (working copy) @@ -1284,7 +1290,13 @@ { PyObject *ret = NULL; mod_ty mod; - PyArena *arena = PyArena_New(); + PyCompilerFlags localflags; + PyArena *arena; + + if (flags == NULL) + flags = &localflags; + + arena = PyArena_New(); if (arena == NULL) return NULL; ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 29 10:53:56 2008 From: report at bugs.python.org (Wang Chun) Date: Wed, 29 Oct 2008 09:53:56 +0000 Subject: [issue1982] Feature: extend strftime to accept milliseconds In-Reply-To: <1201805956.67.0.436839158391.issue1982@psf.upfronthosting.co.za> Message-ID: <1225274036.26.0.151382551479.issue1982@psf.upfronthosting.co.za> Wang Chun added the comment: Ruby recently added support of millisecond and nanosecond to strftime. This is their changeset: http://redmine.ruby-lang.org/repositories/revision/ruby-19?rev=18731 To use the extended strftime, one can do: >> Time.now.strftime('%Y-%m-%dT%H:%M:%S.%L%z') .. "2008-10-29T17:46:03.895+0800" In the current implementation of Python, both datetime and time modules have strftime. Like in Ruby, the strftime in datetime module is a method. But the strftime in time module is a function, which takes time value to be formatted from argument, and which must be a 9-tuple returned by gmtime or localtime. No microsecond data in the tuple, unfortunately. I think as the first step we can make datetime.datetime.strftime do microsecond. I prefer microsecond to milli- or micro- second because it is something from the the system. The current Ruby implementation use %L or %3N for millisecond, %6N for microsecond, and %N or %9N for nanosecond. I am not sure where they came from. Hope there can be some widely accepted standard. ---------- nosy: +wangchun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 29 10:57:56 2008 From: report at bugs.python.org (Wang Chun) Date: Wed, 29 Oct 2008 09:57:56 +0000 Subject: [issue4227] unicode_literals and print_function do not work together. In-Reply-To: <1225274276.85.0.338026841433.issue4227@psf.upfronthosting.co.za> Message-ID: <1225274276.85.0.338026841433.issue4227@psf.upfronthosting.co.za> New submission from Wang Chun : If "from __future__ import unicode_literals, print_function", unicode_literals works, but not print_function; If "from __future__ import print_function, unicode_literals", print_function works, but not unicode_literals. ---------- components: Interpreter Core messages: 75314 nosy: wangchun severity: normal status: open title: unicode_literals and print_function do not work together. type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 29 11:20:51 2008 From: report at bugs.python.org (Christian Heimes) Date: Wed, 29 Oct 2008 10:20:51 +0000 Subject: [issue4227] unicode_literals and print_function do not work together. In-Reply-To: <1225274276.85.0.338026841433.issue4227@psf.upfronthosting.co.za> Message-ID: <1225275651.45.0.515151521874.issue4227@psf.upfronthosting.co.za> Christian Heimes added the comment: The bug has been fixed a couple of days ago. The fix will be in the next release of Python 2.6. Thanks. ---------- nosy: +christian.heimes resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 29 15:38:52 2008 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 29 Oct 2008 14:38:52 +0000 Subject: [issue1544339] _ctypes fails to build on Solaris x86 32-bit (Sun compiler) Message-ID: <1225291132.78.0.626452280431.issue1544339@psf.upfronthosting.co.za> Skip Montanaro added the comment: FWIW, ctypes builds on trunk and all its tests pass with Sun Studio 12. I suspect this issue can be closed but will leave that for Thomas to decide. ---------- nosy: +skip.montanaro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 29 15:49:52 2008 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 29 Oct 2008 14:49:52 +0000 Subject: [issue1544339] _ctypes fails to build on Solaris x86 32-bit (Sun compiler) Message-ID: <1225291792.87.0.00163068357199.issue1544339@psf.upfronthosting.co.za> Skip Montanaro added the comment: Though I should note that ctypes 1.0.2 won't build with Sun Studio 12 on Python 2.4 without some patches for the __i386 macro in ffitarget.h. I added this check near the top of ffitarget.h: #ifdef __i386 /* Sun Studio 12 */ #define __i386__ #endif _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 29 15:54:01 2008 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 29 Oct 2008 14:54:01 +0000 Subject: [issue1544339] _ctypes fails to build on Solaris x86 32-bit (Sun compiler) Message-ID: <1225292041.07.0.920871005541.issue1544339@psf.upfronthosting.co.za> Skip Montanaro added the comment: *argh* segfault running tests w/ Sun Studio 12 compiled version of ctypes 1.0.2: % python ctypes/test/runtests.py -v sh: objdump: not found find_library('c') -> sh: objdump: not found None find_library('m') -> sh: objdump: not found None test_anon (ctypes.test.test_anon.AnonTest) ... ok test_anon_nonmember (ctypes.test.test_anon.AnonTest) ... ok test_anon_nonseq (ctypes.test.test_anon.AnonTest) ... ok test_nested (ctypes.test.test_anon.AnonTest) ... ok test (ctypes.test.test_array_in_pointer.Test) ... ok test_2 (ctypes.test.test_array_in_pointer.Test) ... ok test_classcache (ctypes.test.test_arrays.ArrayTestCase) ... ok test_from_address (ctypes.test.test_arrays.ArrayTestCase) ... ok test_from_addressW (ctypes.test.test_arrays.ArrayTestCase) ... ok test_numeric_arrays (ctypes.test.test_arrays.ArrayTestCase) ... ok test_simple (ctypes.test.test_arrays.ArrayTestCase) ... ok test_byval (ctypes.test.test_as_parameter.AsParamPropertyWrapperTestCase) ... oktest_callbacks (ctypes.test.test_as_parameter.AsParamPropertyWrapperTestCase) ... Segmentation Fault Beginning of backtrace: #0 0xfeb50ad4 in ffi_closure_SYSV_inner () from /export/home/skipm/python-sunstudio/lib/python2.4/site-packages/_ctypes.so #1 0xfeb50cca in ffi_closure_SYSV () from /export/home/skipm/python-sunstudio/lib/python2.4/site-packages/_ctypes.so #2 0xfe9d141f in _testfunc_callback_i_if () from /export/home/skipm/python-sunstudio/lib/python2.4/site-packages/_ctypes_test.so #3 0xfeb50c4f in ffi_call_SYSV () from /export/home/skipm/python-sunstudio/lib/python2.4/site-packages/_ctypes.so #4 0xfeb50aa4 in ffi_call () from /export/home/skipm/python-sunstudio/lib/python2.4/site-packages/_ctypes.so #5 0xfeb4b440 in _call_function_pointer () from /export/home/skipm/python-sunstudio/lib/python2.4/site-packages/_ctypes.so #6 0xfeb4baa0 in _CallProc () from /export/home/skipm/python-sunstudio/lib/python2.4/site-packages/_ctypes.so #7 0xfeb483ea in CFuncPtr_call () from /export/home/skipm/python-sunstudio/lib/python2.4/site-packages/_ctypes.so #8 0xfeeb23ba in PyObject_Call () from /export/home/skipm/python-sunstudio/lib/libpython2.4.so.1.0 #9 0xfef16c38 in do_call () from /export/home/skipm/python-sunstudio/lib/libpython2.4.so.1.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 29 16:41:02 2008 From: report at bugs.python.org (Armin Rigo) Date: Wed, 29 Oct 2008 15:41:02 +0000 Subject: [issue4228] struct.pack('L', -1) In-Reply-To: <1225294862.2.0.0798680271584.issue4228@psf.upfronthosting.co.za> Message-ID: <1225294862.2.0.0798680271584.issue4228@psf.upfronthosting.co.za> New submission from Armin Rigo : struct.pack('L', -1) raises a DeprecationWarning since Python 2.5, as it should. However, it also returns a different (and nonsensical) result than Python <= 2.4 used to: it returns '\x00\x00\x00\x00' instead of '\xff\xff\xff\xff'. This might lead the zipfile module of release25-maint (the version >= 2.5.2) to produce buggy zip files. The -1 value can come as the header_offset field, which will then be packed as an all-0 string instead of an all-ff string in the zip file headers. Given the DeprecationWarning I would classify this as low priority. However, given that the stdlib module zipfile relies on this feature in release25-maint, it should probably really be fixed. ---------- messages: 75319 nosy: arigo severity: normal status: open title: struct.pack('L', -1) versions: Python 2.5, Python 2.5.3, Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 29 16:43:00 2008 From: report at bugs.python.org (Armin Rigo) Date: Wed, 29 Oct 2008 15:43:00 +0000 Subject: [issue4228] struct.pack('L', -1) In-Reply-To: <1225294862.2.0.0798680271584.issue4228@psf.upfronthosting.co.za> Message-ID: <1225294980.39.0.53735291695.issue4228@psf.upfronthosting.co.za> Armin Rigo added the comment: Ah, I should also mention that a fix of zipfile for 2.5 to no longer use the deprecated feature (and thus no longer cause DeprecationWarnings) also sounds like a good idea, in addition to the fix to the struct module. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 29 18:11:17 2008 From: report at bugs.python.org (Clifford Burtown) Date: Wed, 29 Oct 2008 17:11:17 +0000 Subject: [issue4229] Can't Start Python In-Reply-To: <1225300277.72.0.801669602518.issue4229@psf.upfronthosting.co.za> Message-ID: <1225300277.72.0.801669602518.issue4229@psf.upfronthosting.co.za> New submission from Clifford Burtown : I just got Python, in order to do some game modding that required it. However, I can't open Python files in my computer, neither can I edit them with IDLE. I'm using Vista. Is this common? ---------- messages: 75321 nosy: CliffB severity: normal status: open title: Can't Start Python versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 29 18:46:02 2008 From: report at bugs.python.org (Armin Rigo) Date: Wed, 29 Oct 2008 17:46:02 +0000 Subject: [issue4230] "__getattr__" can't be a descriptor In-Reply-To: <1225302362.81.0.484581196319.issue4230@psf.upfronthosting.co.za> Message-ID: <1225302362.81.0.484581196319.issue4230@psf.upfronthosting.co.za> New submission from Armin Rigo : The attached example works in the __add__ and __getattribute__ cases on CPython, but fails in the __getattr__ case. All three cases work as the semantics say they should on Jython, IronPython and PyPy. It's admittedly an obscure use case. There is no reason that __getattr__ should behave differently. The behavior of __add__ and __getattribute__ is the "correct" one, according to the rule that special methods are bound (with __get__) before they are called. ---------- components: Interpreter Core files: x.py messages: 75322 nosy: arigo, cfbolz priority: low severity: normal status: open title: "__getattr__" can't be a descriptor type: behavior versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7 Added file: http://bugs.python.org/file11905/x.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 29 18:59:08 2008 From: report at bugs.python.org (Anthony Tuininga) Date: Wed, 29 Oct 2008 17:59:08 +0000 Subject: [issue1109963] bdist_wininst ignores build_lib from build command Message-ID: <1225303148.33.0.351659632883.issue1109963@psf.upfronthosting.co.za> Anthony Tuininga added the comment: This problem also occurs in the bdist_msi command. ---------- versions: +Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 29 19:06:42 2008 From: report at bugs.python.org (=?utf-8?q?Ren=C3=A9_Liebscher?=) Date: Wed, 29 Oct 2008 18:06:42 +0000 Subject: [issue902061] pydoc insists upon producing file: URLs Message-ID: <1225303602.73.0.762575780852.issue902061@psf.upfronthosting.co.za> Ren? Liebscher added the comment: I would like to see this change introducing a method of class HTMLDoc. It has already some such methods as: def namelink(self, name, *dicts): def classlink(self, object, modname): def modulelink(self, object): def modpkglink(self, data): So it would be logically to make it a method def filelink(self,url,path): """Make a link to source file.""" return '%s' % (url, path) and changing the creating of the filelink to ... filelink = self.filelink(url, path) except TypeError: filelink = '(built-in)' ... This way one can easily subclass HTMLDoc for own purposes and define a own filelink method. ---------- nosy: +r.liebscher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 29 20:12:03 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Wed, 29 Oct 2008 19:12:03 +0000 Subject: [issue4229] Can't Start Python In-Reply-To: <1225300277.72.0.801669602518.issue4229@psf.upfronthosting.co.za> Message-ID: <1225307523.28.0.107419319922.issue4229@psf.upfronthosting.co.za> Martin v. L?wis added the comment: You need to install "for all users", not "just for me" (the latter is not supported on Vista), or alternatively install 2.5.2. This will be fixed in 2.6.1. ---------- nosy: +loewis resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 29 20:21:37 2008 From: report at bugs.python.org (David W. Lambert) Date: Wed, 29 Oct 2008 19:21:37 +0000 Subject: [issue4231] print " should be print(" In-Reply-To: <1225308097.29.0.139692797373.issue4231@psf.upfronthosting.co.za> Message-ID: <1225308097.29.0.139692797373.issue4231@psf.upfronthosting.co.za> New submission from David W. Lambert : http://docs.python.org/dev/3.0/reference/datamodel.html >>> class Meta(type): ... def __getattribute__(*args): ... print "Metaclass getattribute invoked" xxx ... print "Class getattribute invoked" perhaps there's a way to search all of the code examples in the new documents to fix most of these occurrences instead of finding them piecemeal? print(re.compile("print *[^(]").search(code_examples(all_dev_docs))) ---------- messages: 75326 nosy: LambertDW severity: normal status: open title: print " should be print(" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 29 21:23:41 2008 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Wed, 29 Oct 2008 20:23:41 +0000 Subject: [issue4232] tempfile.gettempdir() availability not documented In-Reply-To: <1225311821.2.0.778460458115.issue4232@psf.upfronthosting.co.za> Message-ID: <1225311821.2.0.778460458115.issue4232@psf.upfronthosting.co.za> New submission from Ville Skytt? : The documentation for tempfile.gettempdir() at http://docs.python.org/library/tempfile.html#module-tempfile does not mention in which version the function was added. Based on browsing older docs, looks like "New in version 2.3." should be added to its docs. ---------- assignee: georg.brandl components: Documentation messages: 75327 nosy: georg.brandl, scop severity: normal status: open title: tempfile.gettempdir() availability not documented versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 29 21:31:07 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 29 Oct 2008 20:31:07 +0000 Subject: [issue4226] Should 2to3 know that file type is gone? In-Reply-To: <1225250600.04.0.735766094217.issue4226@psf.upfronthosting.co.za> Message-ID: <1225312267.69.0.784038173273.issue4226@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I'm going to close this because inferring the correct type to replace here is really beyond 2to3's capabilities. (I would recommend you look at the io library for a replacement.) ---------- nosy: +benjamin.peterson resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 29 21:33:26 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 29 Oct 2008 20:33:26 +0000 Subject: [issue4232] tempfile.gettempdir() availability not documented In-Reply-To: <1225311821.2.0.778460458115.issue4232@psf.upfronthosting.co.za> Message-ID: <1225312406.48.0.97792542035.issue4232@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r67041. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 29 21:35:45 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 29 Oct 2008 20:35:45 +0000 Subject: [issue4231] print " should be print(" In-Reply-To: <1225308097.29.0.139692797373.issue4231@psf.upfronthosting.co.za> Message-ID: <1225312545.82.0.589623577617.issue4231@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r67043. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 29 21:53:52 2008 From: report at bugs.python.org (David W. Lambert) Date: Wed, 29 Oct 2008 20:53:52 +0000 Subject: [issue4226] Should 2to3 know that file type is gone? Python core crashes with associated files. In-Reply-To: <1225312267.69.0.784038173273.issue4226@psf.upfronthosting.co.za> Message-ID: <84B204FFB016BA4984227335D8257FBA2738C4@CVCV0XI05.na.corning.com> David W. Lambert added the comment: While trying to find a "file" replacement in the io library I managed to get py3k to crash. Please look at the file associated with the issue. Thanks, Dave. ---------- title: Should 2to3 know that file type is gone? -> Should 2to3 know that file type is gone? Python core crashes with associated files. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 29 21:56:29 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 29 Oct 2008 20:56:29 +0000 Subject: [issue4225] unicode_literals doesn't work in exec In-Reply-To: <1225231604.07.0.232278936912.issue4225@psf.upfronthosting.co.za> Message-ID: <1225313789.01.0.490730544712.issue4225@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This patch uses heap variables and tries to catch more places. Added file: http://bugs.python.org/file11906/pass_flags.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 29 22:00:42 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 29 Oct 2008 21:00:42 +0000 Subject: [issue4226] Python core crashes with associated files. In-Reply-To: <1225250600.04.0.735766094217.issue4226@psf.upfronthosting.co.za> Message-ID: <1225314042.45.0.534282085569.issue4226@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- components: +Interpreter Core -2to3 (2.x to 3.0 conversion tool) priority: -> critical resolution: rejected -> status: closed -> open title: Should 2to3 know that file type is gone? Python core crashes with associated files. -> Python core crashes with associated files. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 29 23:43:41 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 29 Oct 2008 22:43:41 +0000 Subject: [issue4225] unicode_literals doesn't work in exec In-Reply-To: <1225231604.07.0.232278936912.issue4225@psf.upfronthosting.co.za> Message-ID: <1225320221.76.0.741321076647.issue4225@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The newer patch is good. I found another use of PyAST_FromNode() with NULL flags, and which has the same problem: import parser s=parser.suite( "from __future__ import unicode_literals; print type('')") eval(s.compile()) But I don't know how to correct this: the CO_FUTURE_UNICODE_LITERALS flag is determined during the parse phase (in parser.suite), but this value is lost and not passed to s.compile(). Maybe PyST_Object could grow a "st_flags" attribute. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 00:18:10 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Wed, 29 Oct 2008 23:18:10 +0000 Subject: [issue3816] __newobj__ pickle feature is not documented In-Reply-To: <1220962394.03.0.479554047795.issue3816@psf.upfronthosting.co.za> Message-ID: <1225322290.12.0.500678998319.issue3816@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Could explain me how this feature could be used, other than for providing the efficient and backward-compatible pickling mechanism for new-style classes? ---------- nosy: +alexandre.vassalotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 00:26:02 2008 From: report at bugs.python.org (Christian Heimes) Date: Wed, 29 Oct 2008 23:26:02 +0000 Subject: [issue3816] __newobj__ pickle feature is not documented In-Reply-To: <1225322290.12.0.500678998319.issue3816@psf.upfronthosting.co.za> Message-ID: <4908F109.5070102@cheimes.de> Christian Heimes added the comment: Alexandre Vassalotti wrote: > Alexandre Vassalotti added the comment: > > Could explain me how this feature could be used, other than for > providing the efficient and backward-compatible pickling mechanism for > new-style classes? The feature makes it easy to write __reduce__ methods for subclasses of builtins. Take this example: def __newobj__(cls, *args): return cls.__new__(cls, *args) class mydict(dict): def __reduce__(self): state = (dict(self), self.__dict__) return (__newobj__, (self.__class__,), state) Without the __reduce__ method the information in __dict__ and the class would be lost. Christian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 00:40:01 2008 From: report at bugs.python.org (Christian Heimes) Date: Wed, 29 Oct 2008 23:40:01 +0000 Subject: [issue3816] __newobj__ pickle feature is not documented In-Reply-To: <4908F109.5070102@cheimes.de> Message-ID: <4908F450.3060408@cheimes.de> Christian Heimes added the comment: Christian Heimes wrote: > Christian Heimes added the comment: > > Alexandre Vassalotti wrote: >> Alexandre Vassalotti added the comment: >> >> Could explain me how this feature could be used, other than for >> providing the efficient and backward-compatible pickling mechanism for >> new-style classes? > > The feature makes it easy to write __reduce__ methods for subclasses of > builtins. Take this example: > > def __newobj__(cls, *args): > return cls.__new__(cls, *args) > > class mydict(dict): > def __reduce__(self): > state = (dict(self), self.__dict__) > return (__newobj__, (self.__class__,), state) Of course one has to provide a __setstate__ method, too. def __setstate__(self, state): dict.update(self, state[0]) self.__dict__.update(state[1]) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 01:08:01 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 30 Oct 2008 00:08:01 +0000 Subject: [issue4233] open(0, closefd=False) prints 3 warnings In-Reply-To: <1225325281.06.0.202625450166.issue4233@psf.upfronthosting.co.za> Message-ID: <1225325281.06.0.202625450166.issue4233@psf.upfronthosting.co.za> New submission from Amaury Forgeot d'Arc : This happens with a recent py3k build: >>> x = open(0, closefd=False) >>> del x C:\dev\python\py3k\lib\io.py:1461: RuntimeWarning: Trying to close unclosable fd! self.buffer.close() C:\dev\python\py3k\lib\io.py:389: RuntimeWarning: Trying to close unclosable fd! self.close() __main__:1: RuntimeWarning: Trying to close unclosable fd! Also, there are no unit test for closefd. ---------- components: Interpreter Core messages: 75337 nosy: amaury.forgeotdarc priority: critical severity: normal status: open title: open(0, closefd=False) prints 3 warnings versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 01:10:06 2008 From: report at bugs.python.org (Graham Dumpleton) Date: Thu, 30 Oct 2008 00:10:06 +0000 Subject: [issue3723] Py_NewInterpreter does not work In-Reply-To: <1220011870.63.0.171875917127.issue3723@psf.upfronthosting.co.za> Message-ID: <1225325406.79.0.82110971238.issue3723@psf.upfronthosting.co.za> Graham Dumpleton added the comment: In conjunction with #4213, the attached subinterpreter.patch appears to fix issue for mod_wsgi. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 01:11:17 2008 From: report at bugs.python.org (Graham Dumpleton) Date: Thu, 30 Oct 2008 00:11:17 +0000 Subject: [issue4200] atexit module not safe in Python 3.0 with multiple interpreters In-Reply-To: <1224888355.2.0.82482284838.issue4200@psf.upfronthosting.co.za> Message-ID: <1225325477.35.0.359649913254.issue4200@psf.upfronthosting.co.za> Graham Dumpleton added the comment: In conjunction with #3723 and #4213, the attached atexit_modulestate.patch appears to fix issue for mod_wsgi. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 01:17:49 2008 From: report at bugs.python.org (Glenn Linderman) Date: Thu, 30 Oct 2008 00:17:49 +0000 Subject: [issue4234] bin missing from documentation In-Reply-To: <1225325869.41.0.586364126902.issue4234@psf.upfronthosting.co.za> Message-ID: <1225325869.41.0.586364126902.issue4234@psf.upfronthosting.co.za> New submission from Glenn Linderman : Py3.0 has bin(x) Convert an integer number to a binary string. The result is a valid Python expression. If x is not a Python int object, it has to define an __index__() method that returns an integer. Py2.6 doesn't document builtin bin. ---------- assignee: georg.brandl components: Documentation messages: 75340 nosy: georg.brandl, v+python severity: normal status: open title: bin missing from documentation versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 01:36:36 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 30 Oct 2008 00:36:36 +0000 Subject: [issue4235] Crash when iImporting a builtin module crashes In-Reply-To: <1225326996.63.0.504612324764.issue4235@psf.upfronthosting.co.za> Message-ID: <1225326996.63.0.504612324764.issue4235@psf.upfronthosting.co.za> New submission from Amaury Forgeot d'Arc : Some object deallocator (file_dealloc) sometimes call PyErr_WarnEx. This can happen on interpreter shutdown. But this function may try to ---------- messages: 75341 nosy: amaury.forgeotdarc severity: normal status: open title: Crash when iImporting a builtin module crashes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 01:37:06 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 30 Oct 2008 00:37:06 +0000 Subject: [issue4235] Crash when iImporting a builtin module crashes In-Reply-To: <1225326996.63.0.504612324764.issue4235@psf.upfronthosting.co.za> Message-ID: <1225327026.91.0.365056426918.issue4235@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Sorry, bad issue creation ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 01:37:52 2008 From: report at bugs.python.org (Glenn Linderman) Date: Thu, 30 Oct 2008 00:37:52 +0000 Subject: [issue4234] bin missing from documentation In-Reply-To: <1225325869.41.0.586364126902.issue4234@psf.upfronthosting.co.za> Message-ID: <1225327072.43.0.328344943692.issue4234@psf.upfronthosting.co.za> Glenn Linderman added the comment: Perhaps there are other 3.0 builtins that were also missed, in the 2.6 docs? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 01:57:47 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 30 Oct 2008 00:57:47 +0000 Subject: [issue4236] Crash when importing builtin module during interpreter shutdown In-Reply-To: <1225328266.56.0.143062114726.issue4236@psf.upfronthosting.co.za> Message-ID: <1225328266.56.0.143062114726.issue4236@psf.upfronthosting.co.za> New submission from Amaury Forgeot d'Arc : The following interactive session crashes the interpreter on shutdown: >>> class C: ... def __del__(self): ... import warnings ... >>> C() <__main__.C object at 0x00C29D58> >>> ^Z Fatal Python error: Interpreter not initialized (version mismatch?) This problem actually happens with the file object, which can call PyErr_WarnEx when it is deallocated and closed, see example in issue4226. This "Fatal" message is new in 3.0. If I ignore it all seems correct, and the module is correctly imported. ---------- messages: 75344 nosy: amaury.forgeotdarc priority: release blocker severity: normal status: open title: Crash when importing builtin module during interpreter shutdown versions: Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 01:59:14 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 30 Oct 2008 00:59:14 +0000 Subject: [issue4226] Python core crashes with associated files. In-Reply-To: <1225250600.04.0.735766094217.issue4226@psf.upfronthosting.co.za> Message-ID: <1225328354.29.0.529705404408.issue4226@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Closing in favor of #4236. ---------- resolution: -> duplicate status: open -> closed superseder: -> Crash when importing builtin module during interpreter shutdown _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 02:02:19 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 30 Oct 2008 01:02:19 +0000 Subject: [issue4237] io.FileIO('foo', 'rt') prints a RuntimeWarning In-Reply-To: <1225328538.91.0.279296861257.issue4237@psf.upfronthosting.co.za> Message-ID: <1225328538.91.0.279296861257.issue4237@psf.upfronthosting.co.za> New submission from Amaury Forgeot d'Arc : >>> import io >>> io.FileIO('foo', 'rt') __main__:1: RuntimeWarning: Trying to close unclosable fd! Traceback (most recent call last): File "", line 1, in ValueError: invalid mode: rt The ValueError is expected, but the warning is not. This happens on file deallocation: the file object is in an invalid state. ---------- messages: 75346 nosy: amaury.forgeotdarc severity: normal status: open title: io.FileIO('foo', 'rt') prints a RuntimeWarning versions: Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 02:03:52 2008 From: report at bugs.python.org (Christian Heimes) Date: Thu, 30 Oct 2008 01:03:52 +0000 Subject: [issue4236] Crash when importing builtin module during interpreter shutdown In-Reply-To: <1225328266.56.0.143062114726.issue4236@psf.upfronthosting.co.za> Message-ID: <1225328632.46.0.181428424651.issue4236@psf.upfronthosting.co.za> Christian Heimes added the comment: I can reproduce the same output with CTRL+D on Linux. $ python3.0 Python 3.0rc1+ (py3k:67029M, Oct 26 2008, 23:48:21) [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> class C: ... def __del__(self): ... print("del") ... import warnings ... [33876 refs] >>> C() <__main__.C object at 0x7f4740a98d80> [33893 refs] >>> exit() [33900 refs] del Fatal Python error: Interpreter not initialized (version mismatch?) Aborted ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 02:05:08 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 30 Oct 2008 01:05:08 +0000 Subject: [issue4226] Python core crashes with associated files. In-Reply-To: <1225250600.04.0.735766094217.issue4226@psf.upfronthosting.co.za> Message-ID: <1225328708.76.0.242644576041.issue4226@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: There are actually three distinct issues here: issue4233, issue4236, issue4237 Nice shot, David ;-) ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 02:08:56 2008 From: report at bugs.python.org (Christian Heimes) Date: Thu, 30 Oct 2008 01:08:56 +0000 Subject: [issue4226] Python core crashes with associated files. In-Reply-To: <1225250600.04.0.735766094217.issue4226@psf.upfronthosting.co.za> Message-ID: <1225328936.35.0.80593990159.issue4226@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes resolution: duplicate -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 02:11:55 2008 From: report at bugs.python.org (Christian Heimes) Date: Thu, 30 Oct 2008 01:11:55 +0000 Subject: [issue4237] io.FileIO('foo', 'rt') prints a RuntimeWarning In-Reply-To: <1225328538.91.0.279296861257.issue4237@psf.upfronthosting.co.za> Message-ID: <1225329115.93.0.660515291556.issue4237@psf.upfronthosting.co.za> Christian Heimes added the comment: Verified. The issue should be easy to fix. I wonder why 'rt' is an invalid mode. Python 2.x supports 'rt'. ---------- nosy: +christian.heimes priority: -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 02:18:52 2008 From: report at bugs.python.org (Christian Heimes) Date: Thu, 30 Oct 2008 01:18:52 +0000 Subject: [issue4237] io.FileIO('foo', 'rt') prints a RuntimeWarning In-Reply-To: <1225328538.91.0.279296861257.issue4237@psf.upfronthosting.co.za> Message-ID: <1225329532.83.0.711614602841.issue4237@psf.upfronthosting.co.za> Christian Heimes added the comment: I propose to move self->closefd closer to the top of the function: Index: Modules/_fileio.c =================================================================== --- Modules/_fileio.c (Revision 67040) +++ Modules/_fileio.c (Arbeitskopie) @@ -181,6 +181,7 @@ self->readable = self->writable = 0; self->seekable = -1; + self->closefd = closefd; s = mode; while (*s) { switch (*s++) { @@ -243,7 +244,6 @@ if (fd >= 0) { self->fd = fd; - self->closefd = closefd; } else { self->closefd = 1; ---------- keywords: +needs review, patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 03:15:41 2008 From: report at bugs.python.org (David W. Lambert) Date: Thu, 30 Oct 2008 02:15:41 +0000 Subject: [issue4237] io.FileIO('foo', 'rt') prints a RuntimeWarning In-Reply-To: <1225328538.91.0.279296861257.issue4237@psf.upfronthosting.co.za> Message-ID: <1225332941.07.0.557785922549.issue4237@psf.upfronthosting.co.za> Changes by David W. Lambert : ---------- nosy: +LambertDW _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 03:34:23 2008 From: report at bugs.python.org (David W. Lambert) Date: Thu, 30 Oct 2008 02:34:23 +0000 Subject: [issue4237] io.FileIO('foo', 'rt') prints a RuntimeWarning In-Reply-To: <1225328538.91.0.279296861257.issue4237@psf.upfronthosting.co.za> Message-ID: <1225334063.26.0.906273661059.issue4237@psf.upfronthosting.co.za> David W. Lambert added the comment: >>> print(io.read.__doc__) ... The default mode is 'rt' (open for reading text). ... _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 04:00:31 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Thu, 30 Oct 2008 03:00:31 +0000 Subject: [issue3816] __newobj__ pickle feature is not documented In-Reply-To: <1220962394.03.0.479554047795.issue3816@psf.upfronthosting.co.za> Message-ID: <1225335631.86.0.342668979164.issue3816@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: > Without the __reduce__ method the information in __dict__ and > the class would be lost. Are you sure about that? Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 >>> class mydict(dict): pass ... >>> D = mydict({1:"one",2:"two"}) >>> D.foo = 3 >>> import pickle >>> E = pickle.loads(pickle.dumps(D)) >>> E.foo 3 >>> E {1: 'one', 2: 'two'} >>> type(E) >>> F = pickle.loads(pickle.dumps(D, 2)) >>> F.foo 3 >>> F {1: 'one', 2: 'two'} >>> type(F) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 06:18:45 2008 From: report at bugs.python.org (Eric Gillespie) Date: Thu, 30 Oct 2008 05:18:45 +0000 Subject: [issue4238] BSD support for multiprocessing.cpu_count In-Reply-To: <1225343925.21.0.735322419857.issue4238@psf.upfronthosting.co.za> Message-ID: <1225343925.21.0.735322419857.issue4238@psf.upfronthosting.co.za> New submission from Eric Gillespie : Tested on NetBSD, but should work on any; sysctl goes back to 4.4BSD. ---------- components: Library (Lib) files: diff messages: 75353 nosy: epg severity: normal status: open title: BSD support for multiprocessing.cpu_count versions: Python 2.6, Python 3.0 Added file: http://bugs.python.org/file11907/diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 06:29:48 2008 From: report at bugs.python.org (Matt Johnston) Date: Thu, 30 Oct 2008 05:29:48 +0000 Subject: [issue4239] Email example should use SMTP.quit() rather than SMTP.close() In-Reply-To: <1225344587.11.0.0184336607447.issue4239@psf.upfronthosting.co.za> Message-ID: <1225344587.11.0.0184336607447.issue4239@psf.upfronthosting.co.za> New submission from Matt Johnston : The email module example has "s.close()", while the smtplib docs say to use .quit() The latter is probably correct? ---------- assignee: georg.brandl components: Documentation messages: 75354 nosy: georg.brandl, matt severity: normal status: open title: Email example should use SMTP.quit() rather than SMTP.close() type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 07:25:37 2008 From: report at bugs.python.org (Matt Johnston) Date: Thu, 30 Oct 2008 06:25:37 +0000 Subject: [issue4239] Email example should use SMTP.quit() rather than SMTP.close() In-Reply-To: <1225344587.11.0.0184336607447.issue4239@psf.upfronthosting.co.za> Message-ID: <1225347937.69.0.715259737352.issue4239@psf.upfronthosting.co.za> Matt Johnston added the comment: Another problem with that example - the .connect() isn't required and causes the SMTP session to fail to send anything and time out. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 09:13:01 2008 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Thu, 30 Oct 2008 08:13:01 +0000 Subject: [issue4240] parasite form feed character in email.mime.text In-Reply-To: <1225354381.34.0.206878201002.issue4240@psf.upfronthosting.co.za> Message-ID: <1225354381.34.0.206878201002.issue4240@psf.upfronthosting.co.za> New submission from Tarek Ziad? : Hi, There's a parasite form feed character in email/mime/text.py (as well in python 2.4 and 2.5) I caught that under vim (^L), it is located line 12 in the file, the line before the class definition starts ---------- components: Library (Lib) messages: 75356 nosy: tarek severity: normal status: open title: parasite form feed character in email.mime.text versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 09:46:14 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 30 Oct 2008 08:46:14 +0000 Subject: [issue4237] io.FileIO('foo', 'rt') prints a RuntimeWarning In-Reply-To: <1225328538.91.0.279296861257.issue4237@psf.upfronthosting.co.za> Message-ID: <1225356374.68.0.87455818626.issue4237@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: 'rt' is a valid mode for open() or io.open(). But io.FileIO is the unbuffered raw binary file... Python 2.6 has exactly the same problem and displays the same RuntimeWarning. Christian, the change you propose does not fix another case: >>> io.FileIO([]) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 10:04:26 2008 From: report at bugs.python.org (STINNER Victor) Date: Thu, 30 Oct 2008 09:04:26 +0000 Subject: [issue4238] BSD support for multiprocessing.cpu_count In-Reply-To: <1225343925.21.0.735322419857.issue4238@psf.upfronthosting.co.za> Message-ID: <1225357466.15.0.719515335961.issue4238@psf.upfronthosting.co.za> STINNER Victor added the comment: I prefer to use the test "sys.platform in ('darwin', 'bsd')" ;-) ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 10:13:41 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 30 Oct 2008 09:13:41 +0000 Subject: [issue4240] parasite form feed character in email.mime.text In-Reply-To: <1225354381.34.0.206878201002.issue4240@psf.upfronthosting.co.za> Message-ID: <1225358021.51.0.72450503871.issue4240@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: PEP 8 does not call them parasites: http://www.python.org/dev/peps/pep-0008/ """ Python accepts the control-L (i.e. ^L) form feed character as whitespace; Many tools treat these characters as page separators, so you may use them to separate pages of related sections of your file. """ ---------- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 10:23:53 2008 From: report at bugs.python.org (STINNER Victor) Date: Thu, 30 Oct 2008 09:23:53 +0000 Subject: [issue1248] ftplib needs a rewrite to use bytes/buffers In-Reply-To: <1191874324.3.0.017965594704.issue1248@psf.upfronthosting.co.za> Message-ID: <1225358633.57.0.845979197559.issue1248@psf.upfronthosting.co.za> STINNER Victor added the comment: > So can we close this? Yes: retrbinary() and storbinary() can be used to get/send bytes. Reopen the issue (or open another one) if we miss another problem. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 10:24:04 2008 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Thu, 30 Oct 2008 09:24:04 +0000 Subject: [issue4240] parasite form feed character in email.mime.text In-Reply-To: <1225354381.34.0.206878201002.issue4240@psf.upfronthosting.co.za> Message-ID: <1225358644.41.0.728681892782.issue4240@psf.upfronthosting.co.za> Tarek Ziad? added the comment: so basically, if I open email.py, it is perfectly OK to have is opened in two pages in an editor ? How weird ! PEP 8 also says that we should be consistent throughout a code base. If this was the case everywhere in sdtlib, I'd say ok, but imho this should be removed because this is the first time I see such a FF in there. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 10:30:58 2008 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Thu, 30 Oct 2008 09:30:58 +0000 Subject: [issue4240] parasite form feed character in email.mime.text In-Reply-To: <1225354381.34.0.206878201002.issue4240@psf.upfronthosting.co.za> Message-ID: <1225359058.18.0.958152667028.issue4240@psf.upfronthosting.co.za> Tarek Ziad? added the comment: ok so it seems there are around 150 occurences, so I guess it is OK in this particular code base :D _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 10:33:47 2008 From: report at bugs.python.org (STINNER Victor) Date: Thu, 30 Oct 2008 09:33:47 +0000 Subject: [issue4240] parasite form feed character in email.mime.text In-Reply-To: <1225354381.34.0.206878201002.issue4240@psf.upfronthosting.co.za> Message-ID: <1225359227.89.0.335945980501.issue4240@psf.upfronthosting.co.za> STINNER Victor added the comment: ^L is used for a printer to insert a new blank page. But who really print a source code on a printer? Or does some editor have a special usage of this *control sequence*? It looks like ^L is used in Lib/smtpd.py as a hack for some editors so jump to the different classes, but there are other tools to jump to the classes. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 10:35:02 2008 From: report at bugs.python.org (STINNER Victor) Date: Thu, 30 Oct 2008 09:35:02 +0000 Subject: [issue1069092] segfault on printing nested sequences of None/Ellipsis Message-ID: <1225359302.41.0.767412772747.issue1069092@psf.upfronthosting.co.za> STINNER Victor added the comment: I propose a generic solution in issue #3999 to catch stack overflow (and be able to continue after such "exception"). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 10:48:37 2008 From: report at bugs.python.org (STINNER Victor) Date: Thu, 30 Oct 2008 09:48:37 +0000 Subject: [issue3996] PyOS_CheckStack does not work In-Reply-To: <1222688051.36.0.56998762725.issue3996@psf.upfronthosting.co.za> Message-ID: <1225360117.05.0.648100185405.issue3996@psf.upfronthosting.co.za> STINNER Victor added the comment: See also issue #3999: I wrote a new generic handler for stack overflow "exception". _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 10:52:19 2008 From: report at bugs.python.org (STINNER Victor) Date: Thu, 30 Oct 2008 09:52:19 +0000 Subject: [issue4036] Support bytes for subprocess.Popen() In-Reply-To: <1223077515.41.0.60688229915.issue4036@psf.upfronthosting.co.za> Message-ID: <1225360339.06.0.106345177929.issue4036@psf.upfronthosting.co.za> STINNER Victor added the comment: @loewis: My patch only changes the behaviour of the POSIX version of subprocess, Windows version is unchanged. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 11:22:31 2008 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 30 Oct 2008 10:22:31 +0000 Subject: [issue4234] bin missing from documentation In-Reply-To: <1225325869.41.0.586364126902.issue4234@psf.upfronthosting.co.za> Message-ID: <1225362151.99.0.539869280879.issue4234@psf.upfronthosting.co.za> Mark Dickinson added the comment: In addition, the description of binary literals is missing from the lexical analysis section of the reference manual, as is the description of new-style octal literals (i.e. "0o23" instead of "023"). Here's a patch (against the trunk; 2.6 also needs fixing). ---------- keywords: +patch nosy: +marketdickinson versions: +Python 2.7 Added file: http://bugs.python.org/file11908/issue4234.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 12:52:05 2008 From: report at bugs.python.org (=?utf-8?q?Eino_M=C3=A4kitalo?=) Date: Thu, 30 Oct 2008 11:52:05 +0000 Subject: [issue4241] zipfile.py -> is_zipfile leaves file open when error In-Reply-To: <1225367525.69.0.93727529387.issue4241@psf.upfronthosting.co.za> Message-ID: <1225367525.69.0.93727529387.issue4241@psf.upfronthosting.co.za> New submission from Eino M?kitalo : Very simple error. If is_zipfile crashes when checking is_zipfile if zipfile is corrupted or not at all zip. It leaves file open and prevents later to remove file etc... Maybe it's corrected in next versions Old code: zipfile... line 86: endrec = _EndRecData(fpin) line 87: fpin.close My simple corrections to cope with this try: endrec = _EndRecData(fpin) finally: fpin.close() ---------- components: Library (Lib) messages: 75368 nosy: eino severity: normal status: open title: zipfile.py -> is_zipfile leaves file open when error type: crash versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 13:41:21 2008 From: report at bugs.python.org (Skip Montanaro) Date: Thu, 30 Oct 2008 12:41:21 +0000 Subject: [issue4240] parasite form feed character in email.mime.text In-Reply-To: <1225354381.34.0.206878201002.issue4240@psf.upfronthosting.co.za> Message-ID: <1225370481.26.0.904384582137.issue4240@psf.upfronthosting.co.za> Skip Montanaro added the comment: Perhaps final comment here. The email package was authored by Barry Warsaw. That's the way he prefers to break his code into sections. Definitely neither parasitic nor accidental. Skip ---------- nosy: +skip.montanaro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 15:15:55 2008 From: report at bugs.python.org (Christian Heimes) Date: Thu, 30 Oct 2008 14:15:55 +0000 Subject: [issue4237] io.FileIO('foo', 'rt') prints a RuntimeWarning In-Reply-To: <1225328538.91.0.279296861257.issue4237@psf.upfronthosting.co.za> Message-ID: <1225376155.21.0.858698372464.issue4237@psf.upfronthosting.co.za> Christian Heimes added the comment: The new patch fixes the problem and adds a unit test, too. The bug was caused by a design flaw -- which was partly my fault. Some elements of the PyFileIOObject struct were initialized in __new__ while other parts were initialized in __init__. I've moved the initialization to __new__. We should add a rule that all struct members must be properly initialized in __new__. In the past Victor's fuzzying tool has revealed several crashers related to similar design flaws. I'm raising the severity of the bug to release blocker because I can't predict if the problem can be abused to crash the interpreter. We should also review all __new__ and __init__ methods of objects and extension modules for similar issues. ---------- assignee: -> barry components: +Interpreter Core nosy: +barry, haypo priority: normal -> release blocker type: -> resource usage versions: +Python 2.7 Added file: http://bugs.python.org/file11909/issue_4237.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 17:02:57 2008 From: report at bugs.python.org (Eric Gillespie) Date: Thu, 30 Oct 2008 16:02:57 +0000 Subject: [issue4238] BSD support for multiprocessing.cpu_count In-Reply-To: <1225343925.21.0.735322419857.issue4238@psf.upfronthosting.co.za> Message-ID: <1225382577.85.0.3748785468.issue4238@psf.upfronthosting.co.za> Eric Gillespie added the comment: sys.platform is 'netbsd4', and presumably 'freebsd5' and so on, so that won't work. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 17:37:07 2008 From: report at bugs.python.org (STINNER Victor) Date: Thu, 30 Oct 2008 16:37:07 +0000 Subject: [issue4238] BSD support for multiprocessing.cpu_count In-Reply-To: <1225343925.21.0.735322419857.issue4238@psf.upfronthosting.co.za> Message-ID: <1225384627.14.0.450581132676.issue4238@psf.upfronthosting.co.za> STINNER Victor added the comment: @epg: Ooops, I read sys.platform == 'bsd'. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 18:03:00 2008 From: report at bugs.python.org (Armin Rigo) Date: Thu, 30 Oct 2008 17:03:00 +0000 Subject: [issue4242] Classify language vs. impl-detail tests, step 1 In-Reply-To: <1225386180.53.0.475585271298.issue4242@psf.upfronthosting.co.za> Message-ID: <1225386180.53.0.475585271298.issue4242@psf.upfronthosting.co.za> New submission from Armin Rigo : This patch contains a first step towards classifying CPython tests into language tests and implementation-details tests. The patch is against the 2.7 trunk's test_descr.py. It is derived from a similar patch that we wrote for the 2.5's test_descr.py in order to make it pass on PyPy. The main new feature introduced here is a couple of helpers in test_support - see comments and docstrings in the patch. The main ones are "check_impl_detail", which is a flag which is False on non-CPython hosts; and "impl_detail", a decorator to skip whole functions based on the "check_impl_detail" flag. If this patch is accepted, then we plan to port many more of PyPy's patches for core tests, as a step towards helping non-CPython implementations to obtain a good test suite. ---------- components: Tests files: test-impl-details.diff keywords: patch, patch messages: 75373 nosy: arigo, cfbolz severity: normal status: open title: Classify language vs. impl-detail tests, step 1 type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file11910/test-impl-details.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 18:48:25 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 30 Oct 2008 17:48:25 +0000 Subject: [issue4243] has_key doc could be clearer In-Reply-To: <1225388905.15.0.305323271668.issue4243@psf.upfronthosting.co.za> Message-ID: <1225388905.15.0.305323271668.issue4243@psf.upfronthosting.co.za> New submission from Terry J. Reedy : 2.6 lib ref builtin types, mappings, has_key doc now says "dict.has_key(key) is equivalent to key in d, but deprecated." Posters on c.l.p found this confusing. Which is deprecated? I agree that this could be confusing to a beginner. D'Arcy J.M. Cain suggests "dict.has_key(key) is deprecated. Use "key in dict" instead." Or "Use the replacement ..." Or "Use the new version ..." ---------- assignee: georg.brandl components: Documentation messages: 75374 nosy: georg.brandl, tjreedy severity: normal status: open title: has_key doc could be clearer versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 19:05:04 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 30 Oct 2008 18:05:04 +0000 Subject: [issue4237] io.FileIO('foo', 'rt') prints a RuntimeWarning In-Reply-To: <1225328538.91.0.279296861257.issue4237@psf.upfronthosting.co.za> Message-ID: <1225389904.17.0.186712434438.issue4237@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The patch looks fine to me _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 19:17:27 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 30 Oct 2008 18:17:27 +0000 Subject: [issue4243] has_key doc could be clearer In-Reply-To: <1225388905.15.0.305323271668.issue4243@psf.upfronthosting.co.za> Message-ID: <1225390647.08.0.6275325541.issue4243@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Out of curiosity: is that really ambiguous in plain English? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 19:39:43 2008 From: report at bugs.python.org (Brett Cannon) Date: Thu, 30 Oct 2008 18:39:43 +0000 Subject: [issue4242] Classify language vs. impl-detail tests, step 1 In-Reply-To: <1225386180.53.0.475585271298.issue4242@psf.upfronthosting.co.za> Message-ID: <1225391983.44.0.0158229696333.issue4242@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 19:42:51 2008 From: report at bugs.python.org (Brett Cannon) Date: Thu, 30 Oct 2008 18:42:51 +0000 Subject: [issue4242] Classify language vs. impl-detail tests, step 1 In-Reply-To: <1225386180.53.0.475585271298.issue4242@psf.upfronthosting.co.za> Message-ID: <1225392171.14.0.068013154599.issue4242@psf.upfronthosting.co.za> Brett Cannon added the comment: Based on your experience, Armin, is it worth having a class decorator as well/instead? The other comment I have is whether impl_detail is really the best name. Would something like cpython work out better to be more obvious that the test is specific for CPython? Otherwise would a naive PyPy use not understand that the impl_detail tests are not meant for PyPy? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 21:04:21 2008 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 30 Oct 2008 20:04:21 +0000 Subject: [issue4243] has_key doc could be clearer In-Reply-To: <1225388905.15.0.305323271668.issue4243@psf.upfronthosting.co.za> Message-ID: <1225397061.05.0.918741770183.issue4243@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: English is not my first language but it seems obvious to me that the suggestion is using: >>> key in dict ...instead of: >>> dict.has_key(key) The only thing which may be confusing is the dictionary which is first called "dict" and then "d", in which case the following modification should be made: - dict.has_key(key) is equivalent to key in d, but deprecated. + dict.has_key(key) is equivalent to key in dict, but deprecated. ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 21:39:45 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 30 Oct 2008 20:39:45 +0000 Subject: [issue4238] BSD support for multiprocessing.cpu_count In-Reply-To: <1225343925.21.0.735322419857.issue4238@psf.upfronthosting.co.za> Message-ID: <1225399185.91.0.184986105393.issue4238@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> jnoller nosy: +jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 21:42:29 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 30 Oct 2008 20:42:29 +0000 Subject: [issue4242] Classify language vs. impl-detail tests, step 1 In-Reply-To: <1225386180.53.0.475585271298.issue4242@psf.upfronthosting.co.za> Message-ID: <1225399349.35.0.862001222836.issue4242@psf.upfronthosting.co.za> Benjamin Peterson added the comment: As I mentioned on Python-dev, I have implemented something similar to this in my testing branch. [1] http://code.python.org/users/benjamin.peterson/new_testing/main ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 21:58:55 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 30 Oct 2008 20:58:55 +0000 Subject: [issue4170] segfault with defaultdict and pickle In-Reply-To: <1224667622.54.0.802753290346.issue4170@psf.upfronthosting.co.za> Message-ID: <1225400335.2.0.712676422486.issue4170@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Fixed with r67048. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 22:20:25 2008 From: report at bugs.python.org (Georg Brandl) Date: Thu, 30 Oct 2008 21:20:25 +0000 Subject: [issue4243] has_key doc could be clearer In-Reply-To: <1225388905.15.0.305323271668.issue4243@psf.upfronthosting.co.za> Message-ID: <1225401625.69.0.998231901893.issue4243@psf.upfronthosting.co.za> Georg Brandl added the comment: If I understand English correctly, I don't see an ambiguity. Probably the poster(s) on c.l.p didn't look properly and read something like "equivalent to key in d, but the latter is deprecated". The d/dict inconsistency should be fixed. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 22:26:55 2008 From: report at bugs.python.org (Christian Heimes) Date: Thu, 30 Oct 2008 21:26:55 +0000 Subject: [issue4237] io.FileIO('foo', 'rt') prints a RuntimeWarning In-Reply-To: <1225328538.91.0.279296861257.issue4237@psf.upfronthosting.co.za> Message-ID: <1225402015.74.0.620953545018.issue4237@psf.upfronthosting.co.za> Christian Heimes added the comment: Fixed in r67051 (py3k), r67052 (trunk) ---------- assignee: barry -> christian.heimes resolution: -> accepted versions: -Python 2.7, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 22:34:25 2008 From: report at bugs.python.org (Christian Heimes) Date: Thu, 30 Oct 2008 21:34:25 +0000 Subject: [issue4200] atexit module not safe in Python 3.0 with multiple interpreters In-Reply-To: <1224888355.2.0.82482284838.issue4200@psf.upfronthosting.co.za> Message-ID: <1225402465.18.0.490052396071.issue4200@psf.upfronthosting.co.za> Christian Heimes added the comment: Fixed in r67054 ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 22:40:26 2008 From: report at bugs.python.org (Christian Heimes) Date: Thu, 30 Oct 2008 21:40:26 +0000 Subject: [issue4213] Lower case file system encoding In-Reply-To: <1225114155.31.0.609003653611.issue4213@psf.upfronthosting.co.za> Message-ID: <1225402826.53.0.697228653692.issue4213@psf.upfronthosting.co.za> Christian Heimes added the comment: Fixed in r67055 ---------- resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 22:48:53 2008 From: report at bugs.python.org (Christian Heimes) Date: Thu, 30 Oct 2008 21:48:53 +0000 Subject: [issue3723] Py_NewInterpreter does not work In-Reply-To: <1220011870.63.0.171875917127.issue3723@psf.upfronthosting.co.za> Message-ID: <1225403333.89.0.420379182931.issue3723@psf.upfronthosting.co.za> Christian Heimes added the comment: Applied in r67057 ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 23:04:54 2008 From: report at bugs.python.org (Christian Heimes) Date: Thu, 30 Oct 2008 22:04:54 +0000 Subject: [issue4237] io.FileIO('foo', 'rt') prints a RuntimeWarning In-Reply-To: <1225328538.91.0.279296861257.issue4237@psf.upfronthosting.co.za> Message-ID: <1225404294.76.0.264656104253.issue4237@psf.upfronthosting.co.za> Christian Heimes added the comment: Merged into the release26 branch, too. ---------- resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 23:14:21 2008 From: report at bugs.python.org (=?utf-8?q?Martin_v._L=C3=B6wis?=) Date: Thu, 30 Oct 2008 22:14:21 +0000 Subject: [issue4213] Lower case file system encoding In-Reply-To: <1225114155.31.0.609003653611.issue4213@psf.upfronthosting.co.za> Message-ID: <1225404861.5.0.864210967508.issue4213@psf.upfronthosting.co.za> Martin v. L?wis added the comment: > The solution is elegant and works well. I can't agree with that evaluation. In cases where Python would fail without this patch (i.e. because the file system encoding cannot be found during startup), this solution doesn't work well in general - it only works if the file system encoding happens to be UTF-8. If the file system encoding is not in the list of "builtin" codec names, startup would still fail. r67057 addresses this case in a somewhat more general manner, by falling back to ASCII during startup, for encoding file names. This should work in the usual case where Python is in /usr/bin (say), but it's still possible to make it fail, e.g. if the codecs are in /home/????? (say), on a system that uses koi8-r as the file system encoding, this bug would persist despite the two patches that have been applied. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 23:27:04 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 30 Oct 2008 22:27:04 +0000 Subject: [issue4176] segfault with pickle if 4th or 5th item of tuple returned by __reduce__ is not an iterator In-Reply-To: <1224699458.64.0.19589652139.issue4176@psf.upfronthosting.co.za> Message-ID: <1225405624.57.0.114369772694.issue4176@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Committed r67048 (trunk), r67056 (2.5), r67053 (2.6), r67059 (py3k). ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 23:28:50 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 30 Oct 2008 22:28:50 +0000 Subject: [issue4225] unicode_literals doesn't work in exec In-Reply-To: <1225231604.07.0.232278936912.issue4225@psf.upfronthosting.co.za> Message-ID: <1225405730.68.0.462301324037.issue4225@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Here's a patch that handles the parser module. Added file: http://bugs.python.org/file11911/parser_module_fixed_too.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 23:31:24 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 30 Oct 2008 22:31:24 +0000 Subject: [issue4225] unicode_literals doesn't work in exec In-Reply-To: <1225231604.07.0.232278936912.issue4225@psf.upfronthosting.co.za> Message-ID: <1225405884.01.0.00989009511485.issue4225@psf.upfronthosting.co.za> Changes by Benjamin Peterson : Removed file: http://bugs.python.org/file11911/parser_module_fixed_too.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 23:31:32 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 30 Oct 2008 22:31:32 +0000 Subject: [issue4225] unicode_literals doesn't work in exec In-Reply-To: <1225231604.07.0.232278936912.issue4225@psf.upfronthosting.co.za> Message-ID: <1225405892.87.0.453541264683.issue4225@psf.upfronthosting.co.za> Changes by Benjamin Peterson : Added file: http://bugs.python.org/file11912/parser_module_fixed_too.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 23:33:40 2008 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 30 Oct 2008 22:33:40 +0000 Subject: [issue4242] Classify language vs. impl-detail tests, step 1 In-Reply-To: <1225386180.53.0.475585271298.issue4242@psf.upfronthosting.co.za> Message-ID: <1225406020.38.0.596099804876.issue4242@psf.upfronthosting.co.za> Nick Coghlan added the comment: I personally wonder if we should be moving towards a more systematic means of identifying the underlying Python VM than the current fairly ad hoc use of sys.platform. By that I mean adding another sys attribute (e.g. sys.vm) which could be checked explicitly for the Python VM identity, rather than the underlying platform. E.g. CPython: sys.vm == "cpython" Jython: sys.vm == "jython" PyPy: sys.vm == "pypy" IronPython: sys.vm == "ironpython" Then instead of relying on a separate flag in test_support the impl_detail decorator could be written based on the VM names: def impl_detail(*vm_names): if not vm_names: vm_names = "cpython", if sys.vm in vm_names: # Test the implementation detail else: # Skip this test Depending on how ambitious an implementer of an alternative VM wants to be, they could either set sys.vm to the same value as one of the existing interpreters and try to match the implementation details as well as the language spec, or else use their own name. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 23:36:12 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 30 Oct 2008 22:36:12 +0000 Subject: [issue4242] Classify language vs. impl-detail tests, step 1 In-Reply-To: <1225406020.38.0.596099804876.issue4242@psf.upfronthosting.co.za> Message-ID: <1afaf6160810301534k1e807897kb7a6a202ec3d53c9@mail.gmail.com> Benjamin Peterson added the comment: On Thu, Oct 30, 2008 at 5:33 PM, Nick Coghlan wrote: > > Nick Coghlan added the comment: > > I personally wonder if we should be moving towards a more systematic > means of identifying the underlying Python VM than the current fairly ad > hoc use of sys.platform. I use platform.python_implementation(). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 23:41:07 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 30 Oct 2008 22:41:07 +0000 Subject: [issue4234] bin missing from documentation In-Reply-To: <1225325869.41.0.586364126902.issue4234@psf.upfronthosting.co.za> Message-ID: <1225406467.27.0.0815151359236.issue4234@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r67060. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 23:43:14 2008 From: report at bugs.python.org (STINNER Victor) Date: Thu, 30 Oct 2008 22:43:14 +0000 Subject: [issue4213] Lower case file system encoding In-Reply-To: <1225404861.5.0.864210967508.issue4213@psf.upfronthosting.co.za> Message-ID: <200810302338.31576.victor.stinner@haypocalc.com> STINNER Victor added the comment: Le Thursday 30 October 2008 23:14:21 Martin v. L?wis, vous avez ?crit?: > I can't agree with that evaluation. In cases where Python would fail > without this patch (i.e. because the file system encoding cannot be > found during startup), My patch doesn't change the way how Python get the file system encoding: it just gets the "Python charset name" (eg. "utf-8" instead of "UTF8", or "iso8859-1" instead of "latin-1"). The goal was to enable the optimizations, especially with utf-8. It's not related to #3723. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 23:53:11 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 30 Oct 2008 22:53:11 +0000 Subject: [issue3727] poplib module broken by str to unicode conversion In-Reply-To: <1220018390.31.0.482710376741.issue3727@psf.upfronthosting.co.za> Message-ID: <1225407191.13.0.0695539765036.issue3727@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I'm happy with Victor's patch. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 30 23:55:52 2008 From: report at bugs.python.org (STINNER Victor) Date: Thu, 30 Oct 2008 22:55:52 +0000 Subject: [issue3714] nntplib module broken by str to unicode conversion In-Reply-To: <1219932621.55.0.439111476187.issue3714@psf.upfronthosting.co.za> Message-ID: <1225407352.92.0.731565278274.issue3714@psf.upfronthosting.co.za> STINNER Victor added the comment: After testing many different emails servers (POP3, IMAP4 and NNTP), I think that the best type is bytes and not str (unicode). Attached patch changes nntplib to use bytes: - write tests using Gmane NNTP public server - use bytes everywhere except for the commands (str), converted to bytes using ASCII charset - factorizy post() + ihave(): create _post() - replace line[-1] == '\n' by line.endswith(b'\n') - replace e.response[:3] == '480' by e.response.startswith(b'480') - use format() method because str+int is forbidden. Eg. see body() method: id can be an integer (or an unicode string). I like startswith() / endswith() because it's more readable and it works with string of 1 byte: line[-1:] == b'\n' vs line.endswith(b'\n'). TODO: - test authentication - test methods marked as "TODO" in the testcase: * Check newgroups(), newnews(), list() * Check xhdr(), xover(), xgtitle(), xpath() * Check post(), ihave() - does .format() work with bytes? body(b'1') may creates the command "BODY b'1'" which is wrong <= should I also use bytes for the commands? I don't know NNTP enough to test all methods, and I don't have any account to test the authentication :-/ But most common commands should work (see the testcase). Added file: http://bugs.python.org/file11913/nntp-bytes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 00:00:42 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 30 Oct 2008 23:00:42 +0000 Subject: [issue3714] nntplib module broken by str to unicode conversion In-Reply-To: <1219932621.55.0.439111476187.issue3714@psf.upfronthosting.co.za> Message-ID: <1225407642.48.0.488695111519.issue3714@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I haven't been able to examine the patch in depth, but one thing I see is that the test case needs to call test.support.requires("network"). ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 00:03:37 2008 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 30 Oct 2008 23:03:37 +0000 Subject: [issue4242] Classify language vs. impl-detail tests, step 1 In-Reply-To: <1225386180.53.0.475585271298.issue4242@psf.upfronthosting.co.za> Message-ID: <1225407817.51.0.0331632810102.issue4242@psf.upfronthosting.co.za> Nick Coghlan added the comment: Interesting, I hadn't noticed that addition to the platform module for 2.6. A bit more verbose than sys.vm, but it would certainly do the trick :) In that case, I would suggest something along the lines of the following: vm = platform.python_implementation().lower() reference_vm = "cpython" def impl_detail(*vm_names): if vm_names: vm_names = [vm.lower() for vm in vm_names] else: vm_names = [reference_vm] if vm in vm_names: # Test the implementation detail else: # Skip this test _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 00:04:15 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 30 Oct 2008 23:04:15 +0000 Subject: [issue3626] python3.0 interpreter on Cygwin ignores all arguments In-Reply-To: <1219293362.56.0.98048679745.issue3626@psf.upfronthosting.co.za> Message-ID: <1225407855.93.0.380999695401.issue3626@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Committed the "%ls" fix with r67064. ---------- keywords: -needs review resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 01:18:08 2008 From: report at bugs.python.org (STINNER Victor) Date: Fri, 31 Oct 2008 00:18:08 +0000 Subject: [issue3714] nntplib module broken by str to unicode conversion In-Reply-To: <1219932621.55.0.439111476187.issue3714@psf.upfronthosting.co.za> Message-ID: <1225412288.55.0.0057007481199.issue3714@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- keywords: +needs review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 01:45:45 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 31 Oct 2008 00:45:45 +0000 Subject: [issue4225] unicode_literals doesn't work in exec In-Reply-To: <1225231604.07.0.232278936912.issue4225@psf.upfronthosting.co.za> Message-ID: <1225413945.2.0.321205190673.issue4225@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The patch is good, except that you removed "static" before the function err_input (?) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 01:48:51 2008 From: report at bugs.python.org (STINNER Victor) Date: Fri, 31 Oct 2008 00:48:51 +0000 Subject: [issue4216] subprocess.Popen hangs at communicate() when child exits In-Reply-To: <1225151867.64.0.844146967045.issue4216@psf.upfronthosting.co.za> Message-ID: <1225414131.4.0.435309843303.issue4216@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm unable to reproduce your problem with Python 2.4.4 nor Python 2.5.1. I'm using Ubuntu and the program "service" doesn't exist. So I used the commands "pwd", "sh -c pwd", "sh -c 'echo $$'". All commands terminate correctly. Your problem is specific to the command "service cpboot start"? You can reproduce the problem with another command? Can you attach the full trace? I mean something like "strace -f -o trace python test.py". ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 02:04:50 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 31 Oct 2008 01:04:50 +0000 Subject: [issue4176] segfault with pickle if 4th or 5th item of tuple returned by __reduce__ is not an iterator In-Reply-To: <1224699458.64.0.19589652139.issue4176@psf.upfronthosting.co.za> Message-ID: <1225415090.45.0.461002312984.issue4176@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Thank you, Amaury, for fixing this. However, you forgot to also patch the Python implementation of pickle, which makes the following test fail: ====================================================================== FAIL: test_reduce_bad_iterator (__main__.PyPicklerTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/alex/src/python.org/py3k/Lib/test/pickletester.py", line 892, in test_reduce_bad_iterator self.assertRaises(pickle.PickleError, self.dumps, C(), proto) AssertionError: PickleError not raised by dumps Also, I am not sure if moving the type and length check of the reduce value into save_reduce() was a good idea. In pickle.py, the check must be done before calling save_reduce(), since the method is called with the star-syntax "self.save_reduce(obj=obj, *rv)". In _pickle, there's no such requirement; however I don't like the idea of adding needless differences. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 02:10:26 2008 From: report at bugs.python.org (STINNER Victor) Date: Fri, 31 Oct 2008 01:10:26 +0000 Subject: [issue4236] Crash when importing builtin module during interpreter shutdown In-Reply-To: <1225328266.56.0.143062114726.issue4236@psf.upfronthosting.co.za> Message-ID: <1225415426.34.0.321790766829.issue4236@psf.upfronthosting.co.za> STINNER Victor added the comment: The problem occurs in PyImport_Cleanup() on this line: PyDict_SetItemString(dict, "_", Py_None); So the problem is that "_" (special variable in the Python interpreter) is removed too late, or that a destructor loads a module when Python is exiting. Call trace: Py_Finalize() -> PyImport_Cleanup() -> builtin___import__("warnings") -> builtin___import__("_warnings") -> _PyWarnings_Init() -> PyModule_Create2() Full backtrace: (gdb) where #0 0xffffe410 in __kernel_vsyscall () #1 0xb7d68875 in raise () from /lib/tls/i686/cmov/libc.so.6 #2 0xb7d6a201 in abort () from /lib/tls/i686/cmov/libc.so.6 #3 0x080ba54b in Py_FatalError (msg=0x8163ad0 "Interpreter not initialized (version mismatch?)") at Python/pythonrun.c:1922 #4 0x081248e2 in PyModule_Create2 (module=0x8174e20, module_api_version=1013) at Objects/moduleobject.c:71 #5 0x080882d7 in _PyWarnings_Init () at Python/_warnings.c:879 #6 0x080abcb0 in init_builtin (name=0xbf8627a3 "_warnings") at Python/import.c:1867 #7 0x080aba9f in load_module (name=0xbf8627a3 "_warnings", fp=0x0, buf=0xbf8627a3 "_warnings", type=6, loader=0x0) at Python/import.c:1795 #8 0x080ad54f in import_submodule (mod=0x81695a4, subname=0xbf863833 "_warnings", fullname=0xbf863833 "_warnings") at Python/import.c:2567 #9 0x080acd21 in load_next (mod=0x81695a4, altmod=0x81695a4, p_name=0xbf863814, buf=0xbf863833 "_warnings", p_buflen=0xbf86381c) at Python/import.c:2372 #10 0x080ac26e in import_module_level (name=0x0, globals=0xb7b2802c, locals=0xb7b2802c, fromlist=0xb7b208fc, level=0) at Python/import.c:2089 #11 0x080ac5b2 in PyImport_ImportModuleLevel (name=0xb7b2c650 "_warnings", globals=0xb7b2802c, locals=0xb7b2802c, fromlist=0xb7b208fc, level=0) at Python/import.c:2140 #12 0x08088b0d in builtin___import__ (self=0xb7be8eac, args=0xb7b2098c, kwds=0x0) at Python/bltinmodule.c:173 #13 0x081241c6 in PyCFunction_Call (func=0xb7be8f6c, arg=0xb7b2098c, kw=0x0) at Objects/methodobject.c:84 #14 0x080ec5b8 in PyObject_Call (func=0xb7be8f6c, arg=0xb7b2098c, kw=0x0) at Objects/abstract.c:2184 #15 0x08094bae in PyEval_CallObjectWithKeywords (func=0xb7be8f6c, arg=0xb7b2098c, kw=0x0) at Python/ceval.c:3278 #16 0x080916dd in PyEval_EvalFrameEx (f=0x826661c, throwflag=0) at Python/ceval.c:1985 #17 0x08093d64 in PyEval_EvalCodeEx (co=0xb7b25608, globals=0xb7b2802c, locals=0xb7b2802c, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:2835 #18 0x0808d2b4 in PyEval_EvalCode (co=0xb7b25608, globals=0xb7b2802c, locals=0xb7b2802c) at Python/ceval.c:519 #19 0x080a9be8 in PyImport_ExecCodeModuleEx (name=0xbf866dd3 "warnings", co=0xb7b25608, pathname=0xbf864ca3 "/home/haypo/prog/py3k/Lib/warnings.pyc") at Python/import.c:729 #20 0x080aa41e in load_source_module (name=0xbf866dd3 "warnings", pathname=0xbf864ca3 "/home/haypo/prog/py3k/Lib/warnings.pyc", fp=0x82650f8) at Python/import.c:1020 #21 0x080aba14 in load_module (name=0xbf866dd3 "warnings", fp=0x82650f8, buf=0xbf865d43 "/home/haypo/prog/py3k/Lib/warnings.py", type=1, loader=0x0) at Python/import.c:1773 #22 0x080ad54f in import_submodule (mod=0x81695a4, subname=0xbf866dd3 "warnings", fullname=0xbf866dd3 "warnings") at Python/import.c:2567 #23 0x080acd21 in load_next (mod=0x81695a4, altmod=0x81695a4, p_name=0xbf866db4, buf=0xbf866dd3 "warnings", p_buflen=0xbf866dbc) at Python/import.c:2372 #24 0x080ac26e in import_module_level (name=0x0, globals=0xb7c0402c, locals=0x81695a4, fromlist=0x81695a4, level=0) at Python/import.c:2089 #25 0x080ac5b2 in PyImport_ImportModuleLevel (name=0xb7b1f850 "warnings", globals=0xb7c0402c, locals=0x81695a4, fromlist=0x81695a4, level=0) at Python/import.c:2140 #26 0x08088b0d in builtin___import__ (self=0xb7be8eac, args=0xb7b87e6c, kwds=0x0) at Python/bltinmodule.c:173 #27 0x081241c6 in PyCFunction_Call (func=0xb7be8f6c, arg=0xb7b87e6c, kw=0x0) at Objects/methodobject.c:84 #28 0x080ec5b8 in PyObject_Call (func=0xb7be8f6c, arg=0xb7b87e6c, kw=0x0) at Objects/abstract.c:2184 #29 0x08094bae in PyEval_CallObjectWithKeywords (func=0xb7be8f6c, arg=0xb7b87e6c, kw=0x0) at Python/ceval.c:3278 #30 0x080916dd in PyEval_EvalFrameEx (f=0x8264fa4, throwflag=0) at Python/ceval.c:1985 #31 0x08093d64 in PyEval_EvalCodeEx (co=0xb7b62c80, globals=0xb7c0402c, locals=0x0, args=0xb7b1f4d8, argcount=1, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:2835 ---Type to continue, or q to quit--- #32 0x08111b1e in function_call (func=0xb7b2626c, arg=0xb7b1f4cc, kw=0x0) at Objects/funcobject.c:628 #33 0x080ec5b8 in PyObject_Call (func=0xb7b2626c, arg=0xb7b1f4cc, kw=0x0) at Objects/abstract.c:2184 #34 0x080fe956 in method_call (func=0xb7b2626c, arg=0xb7b1f4cc, kw=0x0) at Objects/classobject.c:323 #35 0x080ec5b8 in PyObject_Call (func=0xb7b1f6cc, arg=0xb7bde02c, kw=0x0) at Objects/abstract.c:2184 #36 0x08094bae in PyEval_CallObjectWithKeywords (func=0xb7b1f6cc, arg=0xb7bde02c, kw=0x0) at Python/ceval.c:3278 #37 0x0806bf2d in slot_tp_del (self=0xb7b2906c) at Objects/typeobject.c:5230 #38 0x080613eb in subtype_dealloc (self=0xb7b2906c) at Objects/typeobject.c:922 #39 0x0811eb64 in insertdict (mp=0xb7be0acc, key=0xb7c03ac0, hash=-724865314, value=0x81695a4) at Objects/dictobject.c:461 #40 0x0811f20d in PyDict_SetItem (op=0xb7be0acc, key=0xb7c03ac0, value=0x81695a4) at Objects/dictobject.c:730 #41 0x081218a4 in PyDict_SetItemString (v=0xb7be0acc, key=0x8153c82 "_", item=0x81695a4) at Objects/dictobject.c:2092 #42 0x080a902b in PyImport_Cleanup () at Python/import.c:419 #43 0x080b7518 in Py_Finalize () at Python/pythonrun.c:408 #44 0x080c80ad in Py_Main (argc=1, argv=0x81af008) at Modules/main.c:639 #45 0x0805a2ab in main (argc=1, argv=0xbf869624) at ./Modules/python.c:70 ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 02:24:27 2008 From: report at bugs.python.org (STINNER Victor) Date: Fri, 31 Oct 2008 01:24:27 +0000 Subject: [issue4236] Crash when importing builtin module during interpreter shutdown In-Reply-To: <1225328266.56.0.143062114726.issue4236@psf.upfronthosting.co.za> Message-ID: <1225416267.12.0.701241072597.issue4236@psf.upfronthosting.co.za> STINNER Victor added the comment: Here is a patch fixing this issue: set builtins._=None at exit. The new introduced function, PyRun_InteractiveCleanup(), might also be called at the end of other functions like PyRun_InteractiveOne() or PyRun_InteractiveOneFlags(). If not, PyRun_InteractiveCleanup() should be exported. ---------- keywords: +patch Added file: http://bugs.python.org/file11914/interactive_cleanup.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 02:44:41 2008 From: report at bugs.python.org (STINNER Victor) Date: Fri, 31 Oct 2008 01:44:41 +0000 Subject: [issue4236] Crash when importing builtin module during interpreter shutdown In-Reply-To: <1225328266.56.0.143062114726.issue4236@psf.upfronthosting.co.za> Message-ID: <1225417481.67.0.923123767968.issue4236@psf.upfronthosting.co.za> STINNER Victor added the comment: Another solution: just remove the initialization test from PyModule_Create2(). I don't know if it's a safety test or something like that. Added file: http://bugs.python.org/file11915/pymodule_create2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 02:46:42 2008 From: report at bugs.python.org (STINNER Victor) Date: Fri, 31 Oct 2008 01:46:42 +0000 Subject: [issue4236] Crash when importing builtin module during interpreter shutdown In-Reply-To: <1225328266.56.0.143062114726.issue4236@psf.upfronthosting.co.za> Message-ID: <1225417602.68.0.388595190961.issue4236@psf.upfronthosting.co.za> STINNER Victor added the comment: Python2 is not affected because the bug comes from PyModule_Create2() which was introduced in Python3. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 03:16:41 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 31 Oct 2008 02:16:41 +0000 Subject: [issue4225] unicode_literals doesn't work in exec In-Reply-To: <1225231604.07.0.232278936912.issue4225@psf.upfronthosting.co.za> Message-ID: <1225419401.73.0.275209167748.issue4225@psf.upfronthosting.co.za> Benjamin Peterson added the comment: The removal of the "static" was a mistake. Fixed in r67066. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 07:48:59 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 31 Oct 2008 06:48:59 +0000 Subject: [issue4176] segfault with pickle if 4th or 5th item of tuple returned by __reduce__ is not an iterator In-Reply-To: <1224699458.64.0.19589652139.issue4176@psf.upfronthosting.co.za> Message-ID: <1225435739.97.0.473093355785.issue4176@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: >the Python implementation of pickle This was out of my mind. I hope fix_pickle_consistency_on_py3k.patch can fix the buildbot error. ;-) ---------- keywords: -needs review Added file: http://bugs.python.org/file11916/fix_pickle_consistency_on_py3k.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 09:00:23 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 31 Oct 2008 08:00:23 +0000 Subject: [issue4176] segfault with pickle if 4th or 5th item of tuple returned by __reduce__ is not an iterator In-Reply-To: <1224699458.64.0.19589652139.issue4176@psf.upfronthosting.co.za> Message-ID: <1225440023.51.0.215167768371.issue4176@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : Added file: http://bugs.python.org/file11917/fix_pickle_consistency_on_trunk.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 09:17:26 2008 From: report at bugs.python.org (Steve Roberts) Date: Fri, 31 Oct 2008 08:17:26 +0000 Subject: [issue1673409] datetime module missing some important methods Message-ID: <1225441045.99.0.80420279133.issue1673409@psf.upfronthosting.co.za> Steve Roberts added the comment: I would like to add a use case, generating random dates. Especially generating random dates/times according to different probability distributions and within ranges. It would be nicest if operations could be done directly with datetime, date, time and timedelta objects, but easy conversion to and from timestamps as requested here would also make for reasonably convenient code (i.e. get timestamp conversions from objects to represent ranges, generate random numbers and convert back) ---------- nosy: +steve.roberts _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 09:37:52 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 31 Oct 2008 08:37:52 +0000 Subject: [issue4236] Crash when importing builtin module during interpreter shutdown In-Reply-To: <1225328266.56.0.143062114726.issue4236@psf.upfronthosting.co.za> Message-ID: <1225442272.68.0.311179301672.issue4236@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Setting builtins._=None is not enough. My example is very simple, but the crash I had initially was during the deletion of sys.last_tb: the C() object may be stored anywhere. I agree that the test in PyModule_Create2 is too strong: the import machinery is still functional at this point. It could be replaced by something that becomes true on _PyImport_Init(), and false on _PyImport_Fini(). ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 11:22:58 2008 From: report at bugs.python.org (Skip Montanaro) Date: Fri, 31 Oct 2008 10:22:58 +0000 Subject: [issue1673409] datetime module missing some important methods Message-ID: <1225448578.04.0.650914146622.issue1673409@psf.upfronthosting.co.za> Skip Montanaro added the comment: Unassigning. Haven't heard from Tim in quite awhile and he's made no input on this issue. Also bump to 2.7. ---------- assignee: tim_one -> versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 11:23:46 2008 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 31 Oct 2008 10:23:46 +0000 Subject: [issue1673409] datetime module missing some important methods Message-ID: <1225448626.65.0.0708004997729.issue1673409@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: You can have all this by using the time module's functions. It is true that these don't work for all dates, but they are still useful to have. FWIW: mxDateTime has always had methods to convert the date/time values to ticks and back again: http://www.egenix.com/products/python/mxBase/mxDateTime/ Since most of the datetime module was inspired by mxDateTime, I wonder why these were left out. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 13:14:01 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 31 Oct 2008 12:14:01 +0000 Subject: [issue4176] segfault with pickle if 4th or 5th item of tuple returned by __reduce__ is not an iterator In-Reply-To: <1224699458.64.0.19589652139.issue4176@psf.upfronthosting.co.za> Message-ID: <1225455241.74.0.855441996496.issue4176@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Iterators only need to provide a __next__() method. So, you don't have to check __iter__. Other than that, the patch looks good. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 13:52:17 2008 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 31 Oct 2008 12:52:17 +0000 Subject: [issue4176] segfault with pickle if 4th or 5th item of tuple returned by __reduce__ is not an iterator In-Reply-To: <1224699458.64.0.19589652139.issue4176@psf.upfronthosting.co.za> Message-ID: <1225457537.75.0.68815574372.issue4176@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Thank you for review. >Iterators only need to provide a __next__() method. So, you don't have >to check __iter__. Hmm, but python document says, (http://docs.python.org/library/stdtypes.html#typeiter) >The iterator objects themselves are required to support the >following two methods, which together form the iterator protocol: Is this false information? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 14:32:40 2008 From: report at bugs.python.org (Jean-Paul Calderone) Date: Fri, 31 Oct 2008 13:32:40 +0000 Subject: [issue4244] ihooks incompatible with absolute_import feature In-Reply-To: <1225459960.12.0.259014417715.issue4244@psf.upfronthosting.co.za> Message-ID: <1225459960.12.0.259014417715.issue4244@psf.upfronthosting.co.za> New submission from Jean-Paul Calderone : The __import__ function ihooks installs has a signature which is incompatible with the real __import__ function, breaking some things when ihooks is in use: exarkun at charm:~$ python2.5 Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import ihooks >>> ihooks.install() >>> from __future__ import absolute_import Traceback (most recent call last): File "", line 1, in TypeError: import_module() takes at most 5 arguments (6 given) >>> ---------- components: Interpreter Core, Library (Lib) messages: 75414 nosy: exarkun severity: normal status: open title: ihooks incompatible with absolute_import feature type: behavior versions: Python 2.5, Python 2.5.3, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 14:44:41 2008 From: report at bugs.python.org (Armin Rigo) Date: Fri, 31 Oct 2008 13:44:41 +0000 Subject: [issue4242] Classify language vs. impl-detail tests, step 1 In-Reply-To: <1225386180.53.0.475585271298.issue4242@psf.upfronthosting.co.za> Message-ID: <1225460681.75.0.527495332416.issue4242@psf.upfronthosting.co.za> Armin Rigo added the comment: Brett: in my experience the granularity is usually fine, and not coarse. A class decorator doesn't look too useful. A function decorator is useful, but not enough. We also need a flag that can be checked in the middle of a larger test. (See the patch for test_descr for many examples of this use case.) Nick: your impl_detail() decorator looks fine to me (except that I think it should also accept an optional reason=... keyword argument). Based on it, the way to skip only a few lines in a larger test should be with a similar helper check_impl_detail(*vm_names) which returns True or False. I agree that "impl_detail()" wasn't the best name originally, but in Nick's proposed approach, "impl_detail()" sounds like exactly the right name. I also like Nick's approach because it means that in the various little cases where, for some elegance argument, CPython is really wrong, then it can be "officialized" by writing a test that is skipped on CPython :-) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 15:05:20 2008 From: report at bugs.python.org (David W. Lambert) Date: Fri, 31 Oct 2008 14:05:20 +0000 Subject: [issue4243] has_key doc could be clearer In-Reply-To: <1225388905.15.0.305323271668.issue4243@psf.upfronthosting.co.za> Message-ID: <1225461920.05.0.682057780074.issue4243@psf.upfronthosting.co.za> David W. Lambert added the comment: The D'Arcy J.M. Cain wording is clearer. "dict.has_key(key) is deprecated. Use "key in dict" instead." would improve python. ---------- nosy: +LambertDW _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 15:46:35 2008 From: report at bugs.python.org (D'Arcy J.M. Cain) Date: Fri, 31 Oct 2008 14:46:35 +0000 Subject: [issue4243] has_key doc could be clearer In-Reply-To: <1225388905.15.0.305323271668.issue4243@psf.upfronthosting.co.za> Message-ID: <1225464395.27.0.465160613673.issue4243@psf.upfronthosting.co.za> D'Arcy J.M. Cain added the comment: The original is not technically ambiguous modulo the dict/d issue. The suggested text just makes it more obvious. We just don't want to reduce the possibility of no confusion. :-) ---------- nosy: +darcy at druid.net _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 16:13:16 2008 From: report at bugs.python.org (Amy) Date: Fri, 31 Oct 2008 15:13:16 +0000 Subject: [issue4216] subprocess.Popen hangs at communicate() when child exits In-Reply-To: <1225151867.64.0.844146967045.issue4216@psf.upfronthosting.co.za> Message-ID: <1225465996.59.0.90139433217.issue4216@psf.upfronthosting.co.za> Amy added the comment: Yes, I can only replicate this issue with command to start firewall. Stopping firewall or other service commands don't have the problem. Check Point firewall is a kernel application. Somehow select system call is interrupted and can't terminate the PIPE. I don't know what interrupt it is, though. I'll collect the full log and attach it here. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 16:35:30 2008 From: report at bugs.python.org (STINNER Victor) Date: Fri, 31 Oct 2008 15:35:30 +0000 Subject: [issue4216] subprocess.Popen hangs at communicate() when child exits In-Reply-To: <1225151867.64.0.844146967045.issue4216@psf.upfronthosting.co.za> Message-ID: <1225467330.43.0.803830531247.issue4216@psf.upfronthosting.co.za> STINNER Victor added the comment: The bug should be fixed in Python 2.5 since it uses: while read_set or write_set: try: rlist, wlist, xlist = select.select(read_set, write_set, []) except select.error, e: if e[0] == errno.EINTR: continue else: raise EINTR is supported in subprocess for select(), read(), write() and waitpid() Can't you migrate to Python 2.5 or 2.6? You can try to copy subprocess.py from Python 2.5 to Python 2.4. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 18:00:21 2008 From: report at bugs.python.org (STINNER Victor) Date: Fri, 31 Oct 2008 17:00:21 +0000 Subject: [issue3022] mailbox module, two small fixes In-Reply-To: <1212355773.67.0.369854949727.issue3022@psf.upfronthosting.co.za> Message-ID: <1225472421.36.0.799514798359.issue3022@psf.upfronthosting.co.za> STINNER Victor added the comment: @gpolo: your patch is correct, but I prefer line.rstrip() to line.strip(). My new patch combines your two patches + replace strip by rstrip + use itervalues() instead of items() in MH.pack(). ---------- nosy: +haypo Added file: http://bugs.python.org/file11918/mailbox.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 18:02:38 2008 From: report at bugs.python.org (Akira Kitada) Date: Fri, 31 Oct 2008 17:02:38 +0000 Subject: [issue4204] Cannot build _multiprocessing, math, mmap and readline of Python 2.6 on FreeBSD 4.11 w/ gcc 2.95.4 In-Reply-To: <1224957663.27.0.455052730171.issue4204@psf.upfronthosting.co.za> Message-ID: <1225472558.72.0.216729990983.issue4204@psf.upfronthosting.co.za> Akira Kitada added the comment: Christian, Thank you for the review. Let me know if there is anything I could help with this. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 18:03:34 2008 From: report at bugs.python.org (Michael Hoffman) Date: Fri, 31 Oct 2008 17:03:34 +0000 Subject: [issue4245] threading documentation: reorder sections In-Reply-To: <1225472614.88.0.0607016795949.issue4245@psf.upfronthosting.co.za> Message-ID: <1225472614.88.0.0607016795949.issue4245@psf.upfronthosting.co.za> New submission from Michael Hoffman : It is somewhat confusing that the meat of the threading module, the Thread object itself, is so far down in the documentation. It should be the first section after the module functions and objects. http://docs.python.org/library/threading.html ---------- assignee: georg.brandl components: Documentation messages: 75422 nosy: georg.brandl, hoffman severity: normal status: open title: threading documentation: reorder sections _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 18:20:28 2008 From: report at bugs.python.org (STINNER Victor) Date: Fri, 31 Oct 2008 17:20:28 +0000 Subject: [issue1673409] datetime module missing some important methods Message-ID: <1225473628.56.0.251199909613.issue1673409@psf.upfronthosting.co.za> STINNER Victor added the comment: I wrote this function is my program: def timedelta2seconds(delta): """ Convert a datetime.timedelta() objet to a number of second (floatting point number). >>> timedelta2seconds(timedelta(seconds=2, microseconds=40000)) 2.04 >>> timedelta2seconds(timedelta(minutes=1, milliseconds=250)) 60.25 """ return delta.microseconds / 1000000.0 \ + delta.seconds + delta.days * 60*60*24 About the use cases: I use it to compute the compression rate of an audio song (bytes / seconds), to compute the bit rate of a video (bytes / seconds). I'm using datetime.timedelta() to store the audio/video duration. It's not related to time_t: see issue #2736 for datetime.datetime.totimestamp(). And about time_t: I don't about 31 bits signed integer. It's not beacuse other programs have arbitrary limits than Python should also be limited. About the patch: I don't like the name "tosecs", it's not consistent with the constructor: timedelta(seconds=...).tosec[ond]s(). And why dropping the microseconds? For short duration, microseconds are useful. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 18:33:00 2008 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 31 Oct 2008 17:33:00 +0000 Subject: [issue4243] has_key doc could be clearer In-Reply-To: <1225388905.15.0.305323271668.issue4243@psf.upfronthosting.co.za> Message-ID: <1225474380.65.0.76906747907.issue4243@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I believe "deprecated" at the end is the sort of dangling modifier deprecated by English style books I have read. I felt it to be sufficiently awkward and potentially confusing, at least for a moment, to be worth a few minutes to report and change. Another suggestion for improvement: "dict.has_key(key), now deprecated, is equivalent to key in dict, the recommended replacement." With or without the (optional) final phrase, this is smoother and impossible to misread. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 18:55:48 2008 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 31 Oct 2008 17:55:48 +0000 Subject: [issue4176] segfault with pickle if 4th or 5th item of tuple returned by __reduce__ is not an iterator In-Reply-To: <1224699458.64.0.19589652139.issue4176@psf.upfronthosting.co.za> Message-ID: <1225475748.03.0.686773030853.issue4176@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I corrected the test in the py3k branch. I don't know why I did not make it similar to the one in trunk; I guess I ran the test suite on the wrong directory... Sorry for the inconvenience. Regarding the consistency between python and C, I don't think it is necessary to be so strict. If the python version can allow a weaker version of the "iterator" concept, let be it. OTOH, in 3.0 the C version was rewritten to be quasi identical to the Python one, so I do understand your desire to have similar code. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 19:12:26 2008 From: report at bugs.python.org (STINNER Victor) Date: Fri, 31 Oct 2008 18:12:26 +0000 Subject: [issue1673409] datetime module missing some important methods Message-ID: <1225476746.23.0.155854035789.issue1673409@psf.upfronthosting.co.za> STINNER Victor added the comment: New patch based on catlee's patch: add toseconds() method to timedelta but use the float type to keep the microseconds. The error between the exact value and IEEE754 value is small: the error is smaller than one second even with 999999999 days: - with less than 16 days, the microsecond error is smaller than 0,01%. - with less than 1000 days, the microsecond error is smaller than 1% - with 99500 days or more, the microsecond error is bigger than 90% To compute the error in microseconds: >>> d=100; m=1 >>> e=abs((timedelta(days=d, microseconds=m).toseconds() - d*86400)*1e6 - m) >>> e*100/m 0.024044513702392578 For the seconds, this is no error even with 999999999 days. Error in seconds: >>> d=999999999; s=1; timedelta(days=d, seconds=m).toseconds() - d*86400, s (1.0, 1) (no error, both values are the same) ---------- keywords: +patch Added file: http://bugs.python.org/file11919/timedelta_toseconds_float.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 21:28:32 2008 From: report at bugs.python.org (Ed Summers) Date: Fri, 31 Oct 2008 20:28:32 +0000 Subject: [issue1544339] _ctypes fails to build on Solaris x86 32-bit (Sun compiler) Message-ID: <1225484912.72.0.692183205412.issue1544339@psf.upfronthosting.co.za> Changes by Ed Summers : ---------- nosy: +edsu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 21:42:08 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 31 Oct 2008 20:42:08 +0000 Subject: [issue4243] has_key doc could be clearer In-Reply-To: <1225388905.15.0.305323271668.issue4243@psf.upfronthosting.co.za> Message-ID: <1225485728.45.0.94903702364.issue4243@psf.upfronthosting.co.za> Benjamin Peterson added the comment: After consulting with an English teacher who agreed that the phrasing was awkward, I fix it up in r67070. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 21:47:32 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 31 Oct 2008 20:47:32 +0000 Subject: [issue4176] segfault with pickle if 4th or 5th item of tuple returned by __reduce__ is not an iterator In-Reply-To: <1224699458.64.0.19589652139.issue4176@psf.upfronthosting.co.za> Message-ID: <1225486052.47.0.992525087571.issue4176@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Hirokazu Yamamoto wrote > Hmm, but python document says, > (http://docs.python.org/library/stdtypes.html#typeiter) > > >The iterator objects themselves are required to support the > >following two methods, which together form the iterator protocol: > > Is this false information? Oh, you are right. I got confused by looking at the implementation of PyIter_Check(), which only verifies that tp_next is not NULL. Anyway, _batch_appends() and _batch_setitems() in pickle.py calls iter() on the iterators; so, the iterators must provide __iter__ too. Personally, I wouldn't bother about checking for __iter__ to avoid adding a new method to Pickler and also to save a few hasattr() calls. But I have to admit, it is really just nitpicking at this point. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 21:48:02 2008 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 31 Oct 2008 20:48:02 +0000 Subject: [issue4225] unicode_literals doesn't work in exec In-Reply-To: <1225231604.07.0.232278936912.issue4225@psf.upfronthosting.co.za> Message-ID: <1225486082.94.0.0338339642166.issue4225@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This problem will still persist for anybody who uses PyParser_* APIs and then PyNode_Compile, but we can probably only document that. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 22:05:54 2008 From: report at bugs.python.org (Alexandre Vassalotti) Date: Fri, 31 Oct 2008 21:05:54 +0000 Subject: [issue4176] segfault with pickle if 4th or 5th item of tuple returned by __reduce__ is not an iterator In-Reply-To: <1224699458.64.0.19589652139.issue4176@psf.upfronthosting.co.za> Message-ID: <1225487154.28.0.362411797498.issue4176@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Amaury Forgeot d'Arc wrote: > Regarding the consistency between python and C, I don't think it is > necessary to be so strict. If the python version can allow a weaker > version of the "iterator" concept, let be it. I guess you're right. However, my only fear is that people will write code for pickle.py and then, when they run it on _pickle, their code will fail due to the stricter requirements. In addition, I think having the same requirements make it easier to write tests for both implementations. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 22:37:42 2008 From: report at bugs.python.org (Christian Heimes) Date: Fri, 31 Oct 2008 21:37:42 +0000 Subject: [issue4233] open(0, closefd=False) prints 3 warnings In-Reply-To: <1225325281.06.0.202625450166.issue4233@psf.upfronthosting.co.za> Message-ID: <1225489062.5.0.646105339228.issue4233@psf.upfronthosting.co.za> Christian Heimes added the comment: I don't see a good 'n easy way to fix the issue. close() is called in too many places and I don't wanna add more checks in Python code. This patch reduces the mass of warnings to one, but it also changes the semantic of close() a bit. However it seems logical to set the fd attribute of the file object to -1 (meaning closed). Index: Modules/_fileio.c =================================================================== --- Modules/_fileio.c (Revision 67068) +++ Modules/_fileio.c (Arbeitskopie) @@ -60,7 +60,8 @@ static PyObject * fileio_close(PyFileIOObject *self) { - if (!self->closefd) { + if (!self->closefd && self->fd >= 0) { + self->fd = -1; if (PyErr_WarnEx(PyExc_RuntimeWarning, "Trying to close unclosable fd!", 3) < 0) { return NULL; ---------- nosy: +christian.heimes priority: critical -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 31 23:54:16 2008 From: report at bugs.python.org (Brett Cannon) Date: Fri, 31 Oct 2008 22:54:16 +0000 Subject: [issue4211] frozen packages set an improper __path__ value In-Reply-To: <1225075325.55.0.00322854082077.issue4211@psf.upfronthosting.co.za> Message-ID: <1225493656.7.0.491759141743.issue4211@psf.upfronthosting.co.za> Brett Cannon added the comment: I have an attached patch that fixes the reported problem. First, it adds a sanity check that no empty module name is checked for (crashes the interpreter otherwise). Second, the __path__ attribute is now a list. This does break backwards-compatibility and thus cannot be backported to 2.6. Third, I removed the special-casing of frozen packages and just made frozen module checks a universal thing. This did change the module resolution order such that frozen modules are checked before built-in modules and registered modules under Windows (whatever those are). Moving frozen modules after those two cases are possible if it's really desired. At this point I need a review to get this into 3.0 and a decision on whether to backport to 2.7 (I say don't bother, out of backward-compatibility, but it probably wouldn't really hurt anything either). ---------- assignee: brett.cannon -> keywords: +needs review, patch Added file: http://bugs.python.org/file11920/issue4211.diff _______________________________________ Python tracker _______________________________________
ABC Inherits Abstract Methods Mixin Methods